当前位置:网站首页>AI basketball referee, walking is special, ask harden care don't care

AI basketball referee, walking is special, ask harden care don't care

2022-08-09 13:10:00 QbitAl

Alex from Concave Fei Temple
qubit | public account QbitAI

Basketball players should know that walking is one of the most common violations in the game.

4d03bca73e391cfe33acf36d3f815259.gif

In order to better monitor whether players walk in basketball games, a little brother named @Ayush Pai (let's call him AP brother)) came up with an AI referee.

eff0eedefbc2b1354ffaf3b35806d8a2.gif

As you can see, the computer "watches" the basketball player all the time and can immediately tell if the person is walking.

This AI basketball referee quickly attracted a group of netizens to watch.

Some people joked that if the NBA used this AI referee, they would be finished.(Because NBA referees sometimes don't blow away)

6ac7088961c4a6c83a3a34555be0c3b6.png

Some people say that this AI seems to be very helpful in regulating children's basketball.

5f18ef2ae3563a129dfb127f5d90a9f8.png

There is also a smart person who suggested that Brother AP design another Oscar-winning error detection AI.(Doge)

d9b4790a386fc58763ab85a978cae962.png

So having said that, how did this AI referee have such a "sightly eye"?

Mainly track the trajectory and steps of the ball

As you may have guessed, this AI referee is mainly created based on computer vision (CV).

The AI ​​mainly tracks two things: the trajectory of the ball and the number of steps a person takes.

In order to achieve this, the timing of the dribble will be detected first.

First, Brother AP wrote a set of CV algorithms to detect the bouncing of the ball and stream the camera's view, that is, extract video frames in sequence.

The AP then created an Aegis v image color mask to identify and filter out the color of the basketball.

In the computer daemon, the basketball is displayed in white, and other objects of different colors than the basketball are displayed in black; because only the ball is recognized and placed in the maskmiddle.

ddea72d4224823950736da0e4e7ddbe5.gif

However, the interfering colors caused some irregular pixel blocks to appear around the basketball. In order to optimize this problem, AP brother deleted some post-processing code and made a circle around the ball.round to make it look neater.

27e50ca252ee0325584e5999fc0b18df.png

In order to better track the bounce of the basketball, Brother AP measured its radius, obtained a vertex based on the radius of the ball and the center point, and then used a parabolic function to represent the ballmovement trajectory.When the vertex reaches the minimum value, the basketball has touched the ground.

After the basketball identification problem is solved, the next step is to count the number of steps people take while dribbling.

The pedometer on the Apple Watch does not update in real time.

1790f9b09f19f61f6029fc73f9ecf67a.jpeg

So AP brother simply did it himself and designed a real-time counting pedometer.

He created an Android application that detects and counts steps based on acceleration in the three axes of x, y, and z, and feeds this data back to a Python program.

Finally, by combining the two datasets that monitor the trajectory of the ball and the number of steps, it is possible to determine whether a person has walking behavior.

However, the current AI referee is not "perfect" enough. Some netizens pointed out that this AI does not seem to recognize the gather step that is popular in the NBA today (Harden should be more familiar with this)).

In this regard, AP said that he will add this function to it later.

6ef28745c15c68bc574f1afde99b4068.png

Are you optimistic about this AI basketball referee?By the way, AP brother has open sourced his algorithm on GitHub, interested partners can go and have a look~

Portal:
https://github.com/ayushpai/Basketball-Detector
Reference link:
[1]https://www.youtube.com/watch?v=3UeoKxw8UYs
[2]https://www.reddit.com/r/MachineLearning/comments/wbwkwb/i_created_a_cvbased_automated_basketball_referee_p/

原网站

版权声明
本文为[QbitAl]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/221/202208091154422741.html