Various tools, scripts and research made for football players detection and extraction from one static video
Project is for master thesis research purposes but I thought some of functions may be usefull so made it public.
The main purpose of this project is to research various techniques and ways of detecting players. Ideally program would recognize players, team they belong to and track them after some initialisation.
Master thesis in polish: Google Drive
At this moment most of functions are adapted to particural video. You need to make some changes in order to work it for you (Check Usage section)
If you want to work with same video as me download it from here (393MB): Google Drive
All Code was tested on Python 3.6.6
Install OpenCV (min. 4.1.1)
pip3 install opencv-python
Install PyTorch (min 1.3.1)
pip3 install torch===1.3.1 torchvision===0.4.2 -f https://download.pytorch.org/whl/torch_stable.html
Install imutils
pip3 install imutils
Download video from link above and use
python3 main.py
All scripts and functions gathered up together.
Various functions connected with computer vision.
Class representing football player.
Load neural network model for translating video points to 2D field representation.
Learn neural network model for translating sample video points to 2D field (field.png).
Prepare kalman filter class for player movement predictions
Homography matrix for point from video to 2D translation