Note: This repository contains fine-tuned models based on the original DeepDarts project. Many thanks to wmcnally and the original authors for their excellent foundational work — this project wouldn't be possible without it.
Code for the CVSports 2021 paper: DeepDarts: Modeling Keypoints as Objects for Automatic Scorekeeping in Darts using a Single Camera
Python 3.5-3.8, CUDA >= 10.1, cuDNN >= 7.6
- Install Anaconda or Miniconda
- Create a new conda environment with Python 3.7:
$ conda create -n deep-darts python==3.7. Activate the environment:$ conda activate deep-darts - Clone this repo:
$ git clone https://github.com/MikeMcGarry/deep-darts.git - Go into the directory and install the dependencies:
$ cd deep-darts && pip install -r requirements.txt - Download
images.zipfrom IEEE Dataport and extract in thedatasetdirectory. Crop the images:$ python crop_images.py --size 800. This step could take a while. Alternatively, you can download the 800x800 cropped images directly from IEEE Dataport. If you choose this option, extractcropped_images.zipin thedatasetdirectory. - Download
models.zipfrom IEEE Dataport and extract in the main directory.
To test the Dataset 1 model:
$ python predict.py --cfg deepdarts_d1 --split test
To test the Dataset 2 model and write the prediction images:
$ python predict.py --cfg deepdarts_d2 --split test --write
To train the Dataset 1 model:
$ python train.py --cfg deepdarts_d1
To train the Dataset 2 model:
$ python train.py --cfg deepdarts_d2
You may need to adjust the batch sizes to fit your total GPU memory. The default batch sizes are for 24 GB total GPU memory.
- Take photo
- Save to images/utrecht_{month}{day}{year}
- Run "annotate" on folder above using --img-folder
- Annotate images manually
- Run "combine_labels"
- Run "crop_images" with --size=800 and appropriate --labels-path