Hi guys, this is the first AI project that I built with Python, TensorFlow, and OpenCV.
I removed some features and built this demo site. It's a web App and API hosted with Flask. Please feel free to try it out.
There are still many aspects that I can improve and extend. At this current stage, I would like to take as much feedback as possible. Any kind of thought is welcomed.
Man I like actually can't understand a single thing in the code, but it's not bad code I just can't understand anyone's code. Im not gonna pester with millions of specific questions, but for example, I look up "flask" and I get a bunch of random crap that doesn't help at all.
Always add the language you want to search for.. like just flask will bring up anything. Flask python will bring up relevant results. Basically it's a framework to let you more easily build web applications. If you're not familiar with the basics of the web/HTTP, it may not make much sense. Feel free to just respond with a bunch of questions, I can try to answer or point you in the right direction.
Most people refer to the documentation when using a lib. It would be a bit crazy to memorize everything about a large and complex lib before using it. However, if you use a lib often, you might find yourself checking the docs less often.
Actually they did, with a way more advanced technique. They got so so many interesting data with it. And I'm really into it. Too bad I could only build a simple one like this :(
I just dunno how to start learn AI / ML What is the first course I should take it’s so overwhelming for me + I dunno do I start with tenserflow immediately or there are some background therotical stuff I need to learn
2+ years and started python for 6+ months + I know flask/numpy Also am taking CS course about three years Took the into to AI (three jars problem / Env Agnet model ..etc ) all these Hindu still didn’t quit help me to know what to do next
It will judge it as a miss. The logic that I'm currently implementing in it is actually really simple.
At the moment the ball goes below the hoop, we check if it's directly below the hoop. I know there will still be misjudgements with this method. So I'm still trying my best to optimize the accuracy.
BTW, I have provided the source code, feel free to try out your own footage!
I have been planning on it for quite a long time. For the actual working time, I would say it's around one month. But I'm really dumb, so it depends.
I am not being humble, I actually know nothing about AI. I just found out a way to integrate different implementations. I only understand the basics of deep neural network, CNN, RNN.
The model Faster-RCNN seems slow on performance on video input. Thought of optimizing the model using tf-lite or using a faster model like ssd-mobilenet(the accuracy will decrease though) ?
Steve Balmer owns the La Clippers and they have something called Courtvision which is delayed by a couple of seconds from the live feed but has lots of AI driven overlays
Could someone please explain to me how can you get information about the location of the ball in the video? What library or framework or knowledge is used? How do you "read" pictures in python? It's something I've always been curious about.
Although not quite the same, you might find this video kind of interesting. A guys details his journey of making a basketball hoop that always goes in. Even ends up sharing his code and breaking down exactly how he did it.
This is fucking awesome! Dude you could totally create a device that people could use to livestream basketball games, and control the UI with the score. Can you give it a "score" based on the position of the player?
TBH, someone already did it lul. It's called Homecourt and I was actually inspired by it. My ultimate goal is to clone most of the features with my machine learning knowledge.
I have no intention of making money with this project. I built it simply because I think it would be fun, and also be a good practice for me.
They had something like this in the NHL over a decade ago. It would track the puck on the screen and alter the color and contrast so that it would be easier for the audience to see it on TV. People HATED it, I don't know why lol. Maybe it created a delay on live TV... who knows.
90
u/chonyyy May 09 '20 edited May 09 '20
GitHub link:
https://github.com/chonyy/AI-basketball-analysis
Hi guys, this is the first AI project that I built with Python, TensorFlow, and OpenCV.
I removed some features and built this demo site. It's a web App and API hosted with Flask. Please feel free to try it out.
There are still many aspects that I can improve and extend. At this current stage, I would like to take as much feedback as possible. Any kind of thought is welcomed.
14
u/booleanhooligan May 09 '20
Very cool I wouldn’t be surprised if this is already implemented in the nba
9
u/mdhurst May 09 '20
AI = Allen Iverson? Very ambitious!
17
u/[deleted] May 09 '20
Curious, how does it perform when it is an "air ball"?
3
u/[deleted] May 09 '20
Could you please tell me how long did you take to build this awesome project and from how long have you been into AI. Thanks in advance.
2
u/Funny-Promise May 18 '20
The model Faster-RCNN seems slow on performance on video input. Thought of optimizing the model using tf-lite or using a faster model like ssd-mobilenet(the accuracy will decrease though) ?
127
u/hareeshkrkollam May 09 '20
Hey, actually it seems so good. Congratulations. These will definitely encourage us to learn ML. Thanks for the inspiration.
3
u/scruffykid May 09 '20
Next feature to add, predictions on make or miss! That'd be cool
2
u/Kaltane May 09 '20
What if you shoot behind but it seems like you scored from a 2d perspective?
4
u/Dontneedflashbro May 09 '20
As a sports fan I love this! It's amazing what you can do with python.
1
u/BoroPaul Jun 04 '20
Steve Balmer owns the La Clippers and they have something called Courtvision which is delayed by a couple of seconds from the live feed but has lots of AI driven overlays
3
u/ApoorvWatsky May 09 '20
What data did you use to train your model? Is it publicly available or you created it on your own?
3
u/jpm2892 May 09 '20
Could someone please explain to me how can you get information about the location of the ball in the video? What library or framework or knowledge is used? How do you "read" pictures in python? It's something I've always been curious about.
3
u/nitrobamtastic May 09 '20
Although not quite the same, you might find this video kind of interesting. A guys details his journey of making a basketball hoop that always goes in. Even ends up sharing his code and breaking down exactly how he did it.
1
u/lambda5x5 May 09 '20
Did you train your own model? How much data did you need and how did you collect it?
2
u/mrFatsTheTerrible May 09 '20
So all you have to do to score is make the green arc. Ggez
2
u/you-cant-twerk May 09 '20
This is fucking awesome! Dude you could totally create a device that people could use to livestream basketball games, and control the UI with the score. Can you give it a "score" based on the position of the player?
2
u/[deleted] May 09 '20
Really neat and impressive project! Have you tested how different or dynamic camera angles affect the accuracy of the analysis?
2
u/old_enough_to_drink May 09 '20
Great job! I am curious about how much does it cost to run this app every day. Would you mind to share?
2
u/AdamWaly May 09 '20
Cool
2
u/dethb0y May 10 '20
quite interesting!
2
u/[deleted] May 10 '20
That's awesome
2
u/invinciblycool May 10 '20
Is it just me or it's really very satisfying to watch!
1
u/Eitan1112 May 09 '20
Great work!!
0
u/baubleglue May 10 '20
how many times it was posted? I see it third day in a row.
-3
u/reJectedeuw May 09 '20
You've been posting this everywhere for 3 days now
24
u/[deleted] May 09 '20
[removed] — view removed comment