机器学习 缺陷检测_球检测-体育中的机器学习。

机器学习 缺陷检测

🚩 目标 (🚩Objective)

We want to evaluate the quickest way to detect the ball in a sport event in order to develop an Sports AI without spending a million dollars on tech or developers. Quickly we find out that detecting the ball is key component to develop a robust Sports AI.

我们想要评估一种在体育赛事中检测球的最快方法,以便开发出一款运动型AI,而无需在技术或开发人员上花费一百万美元。 很快我们发现,检测球是开发强大的Sports AI的关键组成部分。

(I’m not the technician on my team meaning the point of view provided in this post won’t take you deep into any algorithm or neural network).

(我不是团队的技术人员,这意味着本文中提供的观点不会带您深入任何算法或神经网络)。

🚩 你为什么要关心? 为什么要球? (🚩Why should you care? and Why the ball?)

If you are in the AI Sports niche is totally relevant for you to know the state of the art in ball detection, this object is always the main center of attention of any sport. If you can detect the ball (even at high speeds) then you will be able to detect easier key events of the game, metrics and so much more useful information.

如果您位于AI Sports领域,那么 了解球检测的最新技术 完全相关 ,那么此对象始终是任何运动的主要关注中心。 如果您能够(甚至在高速时)检测到球,那么您将能够检测到更简单的游戏关键事件,指标以及更多有用的信息。

the球员呢? (🚩What about the players?)

Having a successful Sports AI is a result of a well done computer vision set of detections, nowadays there are many available neural networks good at detecting human bodies (like OpenPose for example) so players will be easy to detect but not so the ball.. even less at high speeds… That's why we created this post to take evaluate the quickest way possible to ball detection.

拥有出色的运动AI的原因是计算机视觉检测功能的完善, 如今,有许多可用的神经网络擅长检测人体(例如OpenPose),因此玩家很容易检测到球而不是球。甚至在高速情况下也是如此……这就是为什么我们创建此帖子以评估最快的测球方法的原因。

Only being able to detect the ball won't take you there but we believe with a good ball detector alongside the actual people detector from pre-trained neural networks is the quickest way to start.

仅能够检测到球并不能带您到那里,但是我们相信,将优质的球检测器与预训练的神经网络中的实际人检测器一起使用是最快的入门方法。

简介:跟踪和检测运动对象 (Introduction: Tracking and Detecting Moving Objects)

As we stated before detect and track moving objects are key tasks for an AI in order to succeed in and thrive in this niche. Sports is equivalent to motion, people and objects moving in different speeds and directions.

如前所述, 检测 跟踪移动物体是AI的关键任务,以便成功地在这一小众市场中发展和繁荣。 运动等同于运动,人和物体以不同的速度和方向运动。

The capability to track moving objects and analyze them plays a crucial role. For us to develop and teach an AI to to watch a football game and detect elements or events from the match sounds like an easy task but its is actually very challenging..

跟踪运动物体并对其进行分析的能力起着至关重要的作用 对于我们来说,开发和教导AI观看足球比赛并从比赛中检测元素或事件听起来像是一件容易的事,但这实际上是非常艰巨的。

有以下两个原因: (Here are a couple of reasons:)

  • The camera is constantly panning, zooming and sometimes tilting and sometimes a replay appears from a radical different angle and our brains are SO good at negating this motion that we don’t even notice it.

    相机不断摇摄,变焦,有时倾斜,有时从根本不同的角度出现重放,我们的大脑非常擅长否定这种动作,甚至我们都没有注意到。
  • The amount of objects and people moving in every direction with different speeds and sometimes unpredictable trajectories

    以不同的速度甚至有时无法预测的轨迹朝各个方向移动的物体和人员的数量
  • The background mixing with players and ball, objects and people with nearly identical appearance

    背景与球员和球,物体和人物相融合,外观几乎相同
  • False positives, same objects outside the game (Players with the same outfit on the benches, sports balls outside the game identical to the ball “in game”)

    误报,游戏外相同的物体(球员在板凳上穿着相同的衣服,游戏外的运动球与“游戏中”的球相同)

But we humans are magnificent at this tasks! We as humans negate effectively the camera movement that's why we don't get confused between the background and playing field for example…

但是我们人类在这项任务上是伟大的! 作为人类,我们有效地消除了摄像机的运动,这就是为什么我们不会在背景和运动场之间感到困惑的原因……

Or get lost in the rapid and sometimes erratic movement of people (players) and objects (ball, net, etc.) for an AI to compete with a human is difficult.

或由于人(玩家)和物体(球,网等)的快速,有时不稳定的运动而迷失, 很难使AI与人类竞争。

让我们开始 ! -我的探球之旅 (Let’s begin ! — My journey into ball detection)

My objective was to try out the ball detectors I come across within 5 hours of research in Google to let this experiment very plain and without an insider view of the AI industry.

我的目标是尝试在Google进行研究的5个小时内尝试碰到的球探测器,以使该实验非常简单,并且不了解AI行业。

To make this I use a “plug and play” approach, I don’t modify the code of the detectors and neural networks I find, I just download and run it with my local example with only minor modifications.

为此,我使用“即插即用”方法,我不修改发现的检测器和神经网络的代码,我只是通过本地示例下载并运行它,而仅做了少量修改。

I successfully want to track the ball on the following video, for sure my expectations were not too high, I’m aware the ball moves incredible fast..

我成功地希望在以下视频中跟踪球,确保我的期望不是太高,我知道球的移动速度令人难以置信。

让我们来看看发生了什么!! (Let’s see what happened!!)

This is the video I will use to analyze with 3 options of ball detectors.

这是我将使用3种球探测器选项进行分析的视频

Image for post
URUGUAY vs GAHANA [FIFA WORLD CUP QUARTERFINALS] SOUTH-AFRICA 2010
乌拉圭vs加哈纳[国际足联四分之一决赛] 2010年南非

1st — PyImageSearch,OpenCV球检测器 (1st — PyImageSearch, OpenCV ball Detector)

¡TOO GOOD TO BE TRUE! ¡ first result on my search!📹 Running on CPU at 32fps 🤯✅ Realtime capabilities.

难以置信! ¡我搜索的第一结果! on以32fps在CPU上运行📹实时功能。

Reference Link Source Code:https://www.pyimagesearch.com/2015/09/14/ball-tracking-with-opencv/

参考链接源代码: https : //www.pyimagesearch.com/2015/09/14/ball-tracking-with-opencv/

Image for post
Ball detection and tracking with PyImageSearch.
使用PyImageSearch进行球检测和跟踪

This PyImageSearch article describes a very naive method to detect and track the tennis ball: just look for a green region on the image, and then find the enclosing circle for that region. Easy!

这篇PyImageSearch文章描述了一种非常幼稚的方法来检测和跟踪网球:只需在图像上寻找绿色区域,然后找到该区域的包围圈。 简单!

The reported results show the ball was actually very well tracked, even if was partially occluded from view by the hand It does even run at 32 FPS, which is insanely high and allows for real-time detection.

报告的结果显示,即使被手部分挡住了球,实际上也能很好地追踪到它。它甚至以32 FPS的速度运行,该速度实在太高了,可以进行实时检测。

So far so good, fits perfectly my needs so i needed to give it a try on my video!

到目前为止,一切都很好,完全可以满足我的需求,因此我需要尝试一下我的视频!

这是应用此检测器的结果。 (This was the result of applying this detector.)

Small clarification here: We did change the color detector from green to white in order to try to detect soccer ball because was set to green.

这里的一些澄清: 我们确实将颜色检测器从绿色更改为白色,以便尝试检测足球,因为将其设置为绿色。

Image for post

Didn’t worked at all, it got confused with other white objects on the screen and the ball was never detected or tracked.

根本不起作用,它与屏幕上的其他白色物体混淆,并且从未检测到或跟踪到球。

第二个DETECTRON2(来自Facebook的预训练神经网络) (2nd DETECTRON2 (Pre-Trained Neural Network From Facebook))

📹 Running on GPU (Nvidia GTX 1060Ti 6Gb Ram) at 2 fps, Not real time capability

on以2 fps在GPU(Nvidia GTX 1060Ti 6Gb Ram)上运行, 📹 非实时功能

Reference Link Source Code: https://nol.cs.nctu.edu.tw:234/open-source/TrackNet/

参考链接源代码: https : //nol.cs.nctu.edu.tw : 234/ open-source/ TrackNet/

Image for post
I don't own the rights of this image. Taken from Detectron2 Github
我不拥有此图片的权利。 取自Detectron2 Github

In this second option I will try to implement a neural network provided by Facebook already pre-trained with tons objects (including Sports balls). I was really intrigued about the “out of the box” result. Also, I wanted to see if it was going to be capable of detecting the players bodies.

在第二个选项中,我将尝试实现一个由Facebook提供的神经网络,该神经网络已经预先训练过吨物体(包括运动球)。 我对“开箱即用”的结果很感兴趣。 另外,我想看看它是否能够检测玩家的身体。

这是应用此检测器的结果: (This was the result of applying this detector:)

Image for post
The result with Detectron2 is not so great for the ball but is magnificent for palyers. I don’t own the rights of this image.
Detectron2的结果对球来说并不是很好,但对杆手来说却是巨大的。 我不拥有此图片的权利。

The players were all perfectly detected that is a point in favor for Detectron2. About the ball, it got detected in a few frames but was the first time I saw it detected!

所有人都被完美检测到 ,这是对Detectron2的支持。 关于球,它在几帧后就被检测到了,但这是我第一次看到它被检测到!

Image for post
Ball object is detected with good precision only standing still or in slow motion.
仅在静止或慢动作的情况下,才能以较高的精度检测到球形物体。

We find out that when the ball is in still position it is able to be detected by Detectron2 and with a high confidence score.

我们发现, 当球处于静止位置时,它可以被Detectron2 检测到并且具有很高的置信度。

But this pretrained neural network has problems with fast moving objects like the ball.

但是,这种经过预训练的神经网络在球等快速移动物体方面存在问题

This led me to the last experiment with a custom tracker specially solving the fast moving objects based on heatmaps this next development is promising because the nearly perfect detections on tennis (which is a smaller ball and moves faster!)

这使我进入了最后一个实验,该实验是使用定制跟踪器基于热图专门解决快速移动的对象的,因此下一个发展很有希望,因为网球上的检测几乎是完美的(较小的球,移动速度更快!)

第三轨道网 (3rd TrackNet)

📹 Inside the documentation specify that it was able to run at 22fps! Allowing Real Time Capability BUT was not so correct.. On my GPU (Nvidia GTX 1060Ti 6Gb Ram) it ran at 2 fps..Not real time capability.

📹在文档中指定它能够以22fps运行! 允许实时功能BUT并不是那么正确。在我的GPU(Nvidia GTX 1060Ti 6Gb Ram)上, 它以2 fps的速度运行 。❌ 不是实时功能。

Reference Link Source Code: https://nol.cs.nctu.edu.tw:234/open-source/TrackNet/

参考链接源代码: https : //nol.cs.nctu.edu.tw : 234/ open-source/ TrackNet/

This one was my best candidate for Ball Tracking even though the detection was on tennis I was confident that it could be easier to detect a ball that is bigger in size and never travel with that much speed, but…

即使是在网球上进行检测,这也是我最好的跟踪球的人选, 我坚信检测更大尺寸的球并且永远不会以如此快的速度行驶可能更容易,但是……

Image for post
This looks like perfect for our propose and the small tennis ball is perfect detected and tracked. I don’t own the rights of this image. Taken from TrackNet Github
这对于我们的建议来说似乎是完美的,小网球是完美检测和跟踪的。 我不拥有此图片的权利。 摘自TrackNet Github

应用此检测器的结果: (The result of applying this detector:)

Image for post

I was wrong, the result was bad… Even though the detection of the soccer ball improve comparing to the PyImageSearch detector, there are too many false positives on the frames… meaning that TrackNet detects the ball even where there is not a ball at all…

我错了,结果很糟糕 ……尽管与PyImageSearch检测器相比,足球的检测有所改善,但帧上的误报过多……这意味着即使在根本没有球的情况下,TrackNet也会检测到球……

Additionally this ran at 2 fps not the 22 fps that were mention on the documentation, this blocks the possibility to analyze and detect at realtime.

此外, 该文件以2 fps的速度运行,而不是文档中提到的22 fps ,这阻止了实时分析和检测的可能性。

One big advantages is that this TrackNet neural network have very good documentation and advice in how to train with your own data. This could be a solution to solve the ball detection on soccer, but it’s clearly not an easy task.

一大优势是,该TrackNet神经网络在如何使用自己的数据进行训练方面具有非常好的文档和建议。 这可能是解决足球球检测的一种解决方案,但这显然不是一件容易的事。

If anyone has a dataset of soccer balls (real and/or synthetic) we are interested in collaboration to train this neural network or develop a custom solution write an email to us at gcor@eidos.ai

如果有人拥有足球(真实和/或合成)数据集,我们有兴趣合作训练该神经网络或开发定制解决方案,请写信给我们,电子邮件为gcor@eidos.ai

结果结论 (CONCLUSION FROM THE RESULTS)

In conclusion no “plug and play” neural network will take you all the way there in AI Sports, there is no global solution (YET) in this niche. This makes an incredible advantage for those who jump in this space early and develop a global solution. This is yet to come..

总之,在AI Sports中,没有“即插即用”神经网络会带您一路走,在这一细分市场中没有全局解决方案 ( YET )。 对于那些早日涉足这一领域并开发全球解决方案的人来说,这具有不可思议的优势。 这还没有来。

But, even though there’s not a global solution, each different situation can be solved with different methods, creating custom solutions adapted for each problem.

但是,即使没有全局解决方案,也可以使用不同的方法解决每种不同的情况,从而创建适合每个问题的定制解决方案。

That’s why you will need to contact a team to develop this type of AI.

这就是为什么您需要联系团队来开发这种类型的AI的原因。

If you are interested on collaborate or build your AI with us.

如果您有兴趣与我们合作或构建您的AI。

Reach out!

伸手!

We are an Software agency focused on Machine Learning and specifically Computer Vision you can contact us at info@eidos.ai our website is https://eidos.ai

我们是一家专注于机器学习(尤其是计算机视觉)的软件代理商,您可以通过info@eidos.ai与我们联系。我们的网站是 https://eidos.ai

Stayed tuned for our next post on medium next month!

请继续关注我们下个月中发布的下一篇文章!

翻译自: https://towardsdatascience.com/ball-detection-with-computer-vision-ai-in-sports-f9ef743e0ef1

机器学习 缺陷检测

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/389449.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

使用python和javascript进行数据可视化

Any data science or data analytics project can be generally described with the following steps:通常可以通过以下步骤来描述任何数据科学或数据分析项目: Acquiring a business understanding & defining the goal of a project 获得业务理解并定义项目目…

为什么饼图有问题

介绍 (Introduction) It seems as if people are split on pie charts: either you passionately hate them, or you are indifferent. In this article, I am going to explain why pie charts are problematic and, if you fall into the latter category, what you can do w…

先知模型 facebook_使用Facebook先知进行犯罪率预测

先知模型 facebookTime series prediction is one of the must-know techniques for any data scientist. Questions like predicting the weather, product sales, customer visit in the shopping center, or amount of inventory to maintain, etc - all about time series …

github gists 101使代码共享漂亮

If you’ve been going through Medium, looking at technical articles, you’ve undoubtedly seen little windows that look like the below:如果您一直在阅读Medium,并查看技术文章,那么您无疑会看到类似于以下内容的小窗口: def hello_…

基于Netty的百万级推送服务设计要点

1. 背景1.1. 话题来源最近很多从事移动互联网和物联网开发的同学给我发邮件或者微博私信我,咨询推送服务相关的问题。问题五花八门,在帮助大家答疑解惑的过程中,我也对问题进行了总结,大概可以归纳为如下几类:1&#x…

鲜为人知的6个黑科技网站_6种鲜为人知的熊猫绘图工具

鲜为人知的6个黑科技网站Pandas is the go-to Python library for data analysis and manipulation. It provides numerous functions and methods that expedice the data analysis process.Pandas是用于数据分析和处理的Python库。 它提供了加速数据分析过程的众多功能和方法…

VRRP网关冗余

实验要求 1、R1创建环回口,模拟外网 2、R2,R3使用VRRP技术 3、路由器之间使用EIGRP路由协议  实验拓扑  实验配置  R1(config)#interface loopback 0R1(config-if)#ip address 1.1.1.1 255.255.255.0R1(config-if)#int e0/0R1(config-if)#ip addr…

大熊猫卸妆后_您不应错过的6大熊猫行动

大熊猫卸妆后数据科学 (Data Science) Pandas is used mainly for reading, cleaning, and extracting insights from data. We will see an advanced use of Pandas which are very important to a Data Scientist. These operations are used to analyze data and manipulate…

数据eda_关于分类和有序数据的EDA

数据eda数据科学和机器学习统计 (STATISTICS FOR DATA SCIENCE AND MACHINE LEARNING) Categorical variables are the ones where the possible values are provided as a set of options, it can be pre-defined or open. An example can be the gender of a person. In the …

jdk重启后步行_向后介绍步行以一种新颖的方式来预测未来

jdk重启后步行“永远不要做出预测,尤其是关于未来的预测。” (KK Steincke) (“Never Make Predictions, Especially About the Future.” (K. K. Steincke)) Does this picture portray a horse or a car? 这张照片描绘的是马还是汽车? How likely is …

mongodb仲裁者_真理的仲裁者

mongodb仲裁者Coming out of college with a background in mathematics, I fell upward into the rapidly growing field of data analytics. It wasn’t until years later that I realized the incredible power that comes with the position. As Uncle Ben told Peter Par…

优化 回归_使用回归优化产品价格

优化 回归应用数据科学 (Applied data science) Price and quantity are two fundamental measures that determine the bottom line of every business, and setting the right price is one of the most important decisions a company can make. Under-pricing hurts the co…

大数据数据科学家常用面试题_进行数据科学工作面试

大数据数据科学家常用面试题During my time as a Data Scientist, I had the chance to interview my fair share of candidates for data-related roles. While doing this, I started noticing a pattern: some kinds of (simple) mistakes were overwhelmingly frequent amo…

scrapy模拟模拟点击_模拟大流行

scrapy模拟模拟点击复杂系统 (Complex Systems) In our daily life, we encounter many complex systems where individuals are interacting with each other such as the stock market or rush hour traffic. Finding appropriate models for these complex systems may give…

vue.js python_使用Python和Vue.js自动化报告过程

vue.js pythonIf your organization does not have a data visualization solution like Tableau or PowerBI nor means to host a server to deploy open source solutions like Dash then you are probably stuck doing reports with Excel or exporting your notebooks.如果…

plsql中导入csvs_在命令行中使用sql分析csvs

plsql中导入csvsIf you are familiar with coding in SQL, there is a strong chance you do it in PgAdmin, MySQL, BigQuery, SQL Server, etc. But there are times you just want to use your SQL skills for quick analysis on a small/medium sized dataset.如果您熟悉SQ…

计算机科学必读书籍_5篇关于数据科学家的产品分类必读文章

计算机科学必读书籍Product categorization/product classification is the organization of products into their respective departments or categories. As well, a large part of the process is the design of the product taxonomy as a whole.产品分类/产品分类是将产品…

交替最小二乘矩阵分解_使用交替最小二乘矩阵分解与pyspark建立推荐系统

交替最小二乘矩阵分解pyspark上的动手推荐系统 (Hands-on recommender system on pyspark) Recommender System is an information filtering tool that seeks to predict which product a user will like, and based on that, recommends a few products to the users. For ex…

python 网页编程_通过Python编程检索网页

python 网页编程The internet and the World Wide Web (WWW), is probably the most prominent source of information today. Most of that information is retrievable through HTTP. HTTP was invented originally to share pages of hypertext (hence the name Hypertext T…

火种 ctf_分析我的火种数据

火种 ctfOriginally published at https://www.linkedin.com on March 27, 2020 (data up to date as of March 20, 2020).最初于 2020年3月27日 在 https://www.linkedin.com 上 发布 (数据截至2020年3月20日)。 Day 3 of social distancing.社会疏离的第三天。 As I sit on…