機器學習 缺陷檢測_球檢測-體育中的機器學習。

機器學習 缺陷檢測

🚩 目標 (🚩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.pswp.cn/news/389449.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/389449.shtml
英文地址,請注明出處:http://en.pswp.cn/news/389449.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

莫煩Pytorch神經網絡第二章代碼修改

import torch import numpy as np""" Numpy Torch對比課程 """ # #tensor與numpy格式數據相互轉換 # np_data np.arange(6).reshape((2,3)) # print(np_data) # # torch_data torch.from_numpy(np_data) # print(\n,torch_data) # # tensor2ar…

自定義字符類

當 VC不使用MFC,無法使用屬于MFC的CString,為此自定義一個,先暫時使用,后續完善。 頭文件: #pragma once#define MAX_LOADSTRING 100 // 最大字符數class CString {public:char *c_str, cSAr[MAX_LOADSTRING];WCHAR *w…

使用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 獲得業務理解并定義項目目…

Android 事件處理

事件就是用戶對圖形的操作,在android手機和平板電腦上,主要包含物理按鍵事件和觸摸屏事件兩類。物理按鍵事件包含:按下、抬起、長按等;觸摸屏事件主要包含按下、抬起、滾動、雙擊等。 在View中提供了onTouchEvent()方法&#xff0…

莫煩Pytorch神經網絡第三章代碼修改

3.1Regression回歸 import torch import torch.nn.functional as F from torch.autograd import Variable import matplotlib.pyplot as plt""" 創建數據 """x torch.unsqueeze(torch.linspace(-1,1,100),dim1) y x.pow(2) 0.2*torch.rand(x…

為什么餅圖有問題

介紹 (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…

New Distinct Substrings(后綴數組)

New Distinct Substrings&#xff08;后綴數組&#xff09; 給定一個字符串&#xff0c;求不相同的子串的個數。\(n<50005\)。 顯然&#xff0c;任何一個子串一定是后綴上的前綴。先&#xff08;按套路&#xff09;把后綴排好序&#xff0c;對于當前的后綴\(S_i\)&#xff0…

Android dependency 'com.android.support:support-v4' has different version for the compile (26.1.0...

在項目中加入react-native-camera的時候 出現的錯誤. 解決方案: 修改 implementation project(:react-native-camera)為 implementation (project(:react-native-camera)) {exclude group: "com.android.support"}查看原文 Could not find play-services-basement.aa…

先知模型 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 …

莫煩Pytorch神經網絡第四章代碼修改

4.1CNN卷積神經網絡 import torch import torch.nn as nn from torch.autograd import Variable import torch.utils.data as Data import torchvision import matplotlib.pyplot as pltEPOCH 1 BATCH_SIZE 50 LR 0.001 DOWNLOAD_MNIST False #如果數據集已經下載到…

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&#xff0c;并查看技術文章&#xff0c;那么您無疑會看到類似于以下內容的小窗口&#xff1a; def hello_…

loj #6278. 數列分塊入門 2

題目 題解 區間修改&#xff0c;詢問區間小于c的個數。分塊排序&#xff0c;用vector。至于那個塊的大小&#xff0c;好像要用到均值不等式 我不太會。。。就開始一個個試&#xff0c;發現sizsqrt(n)/4時最快&#xff01;&#xff01;&#xff01;明天去學一下算分塊復雜度的方…

基于Netty的百萬級推送服務設計要點

1. 背景1.1. 話題來源最近很多從事移動互聯網和物聯網開發的同學給我發郵件或者微博私信我&#xff0c;咨詢推送服務相關的問題。問題五花八門&#xff0c;在幫助大家答疑解惑的過程中&#xff0c;我也對問題進行了總結&#xff0c;大概可以歸納為如下幾類&#xff1a;1&#x…

莫煩Pytorch神經網絡第五章代碼修改

5.1動態Dynamic import torch from torch import nn import numpy as np import matplotlib.pyplot as plt# torch.manual_seed(1) # reproducible# Hyper Parameters INPUT_SIZE 1 # rnn input size / image width LR 0.02 # learning rateclass…

鮮為人知的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創建環回口&#xff0c;模擬外網?2、R2&#xff0c;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…

網頁JS獲取當前地理位置(省市區)

網頁JS獲取當前地理位置&#xff08;省市區&#xff09; 一、總結 一句話總結&#xff1a;ip查詢接口 二、網頁JS獲取當前地理位置&#xff08;省市區&#xff09; 眼看2014又要過去了&#xff0c;翻翻今年的文章好像沒有寫幾篇&#xff0c;忙真的或許已經不能成為借口了&#…

大熊貓卸妝后_您不應錯過的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 …

PyTorch官方教程中文版:PYTORCH之60MIN入門教程代碼學習

Pytorch入門 import torch""" 構建非初始化的矩陣 """x torch.empty(5,3) #print(x)""" 構建隨機初始化矩陣 """x torch.rand(5,3)""" 構造一個矩陣全為 0&#xff0c;而且數據類型是 long &qu…