A minimal tensorflow implementation of YOLOv3, with support for training, inference and evaluation.

Installation


Install requirements and download pretrained weights

$ pip3 install -r ./docs/requirements.txt
$ wget https://pjreddie.com/media/files/yolov3.weights

Exercise1: Evaluation

In this part, we will practice how to compute the average precision of our model.

cd exercise1
python pascalvoc.py -t 0.3

Exercise2: YOLO-V3 inference


In this part, we will use pretrained weights to make predictions on both image and video. See exercise_2_yolov3_inference.ipynb

$ python3 image_demo.py

Exercise3: YOLO-V3 training to detect digits


In this part, we will train the YOLO-V3 on the digits dataset and check the performance. See exercise_3_yolov3_training.ipynb

  • Open ./core/config.py and do some configurations
__C.YOLO.CLASSES                = "./data/classes/yymnist.names"
  • Finally, you can train it and then evaluate your model
$ python3 train.py
$ python3 test.py # Inference on the test-set
$ python3 mAP.py # Compute the mAP on test-set (run test.py first)