An implementation to track Soccer players on any random video. The model also detects background such as crowd and hoardings.
- Python 3.7
- TensorFlow 2.0
- OpenCV
- Numpy
- Matplotlib
- Lxml
- tqdm
- Cudnn
- Cuda toolkit
conda env create -f conda-cpu.yml // To create an environment where tensorflow-gpu is not supported
conda activate soccer-cpu
conda env create -f conda-gpu.yml // Creating an environment for tensorflow-gpu
conda activate soccer-gpu
- Download the trained weights from here
- Move the downloaded weights and files to checkpoints/
python detect.py --image ./data/socgirl.jpg // for detections in an image
python detect_video.py --video ./data/goals.mp4 // for detections in a video file
convert.py // Convert the weights of YOLOv3 to .tf format
train.py // to train your own model using custom dataset
utils.py // Draws outputs onto the image/frame using information received from model
models.py // All the model functions are in here.
coco.names // Contains the class names of the COCO dataset
soccerv2.names // Contains the class names of our custom trained model