Skip to content

fedserfey/basketball-highlights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Basketball Goal Highlights With Computer Vision

Bachelor's thesis project in Computer Science: Artificial Intelligence at Kharkiv National University of Radio Electronics.

The main goal of this project is to create basketball highlights of goals using computer vision with two parts: YOLOv5 for identifying the basket and ResNet50 for classifying goal/no goal.

The whole process was documented in Serhii_Fedosov_Thesis_Basketball_Goal_Highlights.ipynb.

I chose a basketball game Ukraine v Poland | FIBA EuroBasket 2022 to create highlights. Here are the created clips and higlights video using our models.

Technologies

  • Python
  • PyTorch
  • YOLOv5
  • OpenCV
  • MoviePy

Results

Detection of goals does not have the greatest performance. From a video I fed to the models, we got following results:

  • Goals detected: 20
  • Goals not detected: 2
  • Mistaken detection: 27

More than half of the detections are mistaken. Metrics we got are: Precision: 0.425 and Recall: 0.91.

The main problem was not classification of goal/no goal, but the detection of the basket.

To conclude, our model has an excellent recall. It could be a useful tool to assist with the creation of basketball highlights. The model could suggest the timings, and we could choose to include them in the highlights or not.

Still, half of the detections are mistaken, it would be nice to invest some time into either using newer or more capable YOLO versions, or being careful with data and dedicate some time for manual data selection and preprocessing.

About

Basketball Goal Highlights With Computer Vision

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors