Sport AI System
Program for analysis of videos of sport events based on machine learning
Prerequisites
- OS: Linux (tested only on Ubuntu >= 16.04) or Windows 10
- NVIDIA videocard with CUDA capability >= 3.5
- Installed CUDA >= 9.0 and cuDNN 7
Requirements
- Towards-Realtime-MOT
- Python >= 3.6
- PyTorch >= 1.2.0
- opencv-python
- motmetrics
- NumPy
- logging
- Cython
- cython-bbox
- FFmpeg
- numba
- matplotlib
- sklearn
- Pillow 6.1.0
- tqdm
- pandas
- yagmail
- SciPy
- argparse
- PyQt5
- plotly
- your favourite browser
Installation
-
Clone this repository
git clone https://github.com/leonel11/DetectTrackSportEvents.git
-
Clone this repository into another directory
git clone https://github.com/Zhongdao/Towards-Realtime-MOT
or download it as a zip file and repack
-
Copy all files of repository
Towards-Realtime-MOT
to foldervideo_player
without exchanging files of the same name -
Exchange file
video_player/models.py
to file of the same name from foldervideo_player/exchange_files/
with the replacement -
Install all requirements (you can follow some instructions of installation using Requirements or Issues in case of any problem)
-
Copy file of weights JDE-1088x608 (1 or 2) for running of MOT algorithm
Advice
-
For Ubuntu:
-
For Windows:
-
It's possible to work with
virtualenv
environment of Python. You can create it after Python installation, before PyTorch installation. Also read this article which describes how to work withvirtualenv
.
Docker
It's also possible to launch this GUI application using Docker container.
-
Install Docker on your computer
-
Pull and run container with the support of CUDA >=9.0 and cuDNN 7. For example, 1, 2 etc.
-
After PyQt5 installation, before plotly installation type these commands into container:
sudo apt-get update export QT_DEBUG_PLUGUINS=1 sudo apt-get install libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev sudo apt install libxkbcommon-x11-0
-
Install your favourite browser into container
-
For Windows:
- Use XLaunch to implement your own server. Here is some instructions how to launch it.
- For volume project don't forget to share needed drive in Docker settings
Running
- For Windows: double click on
video_player/SportAISystem.lnk
or runvideo_player/run_sportaisystem.bat
incmd
- For Linux or Docker container: run
video_player/sportaisystem.sh
inTerminal