Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.54 KB

README.md

File metadata and controls

31 lines (23 loc) · 1.54 KB

Improving YOLOv3

Accompanying code for Paperspace blog Improving YOLOv3.

Dataset Preparation

Use Microsoft VoTT tool to label objects.

Download pretrained weights
$ mkdir weights
$ cd weights/
$ curl https://pjreddie.com/media/files/yolov3.weights --output yolov3.weights
Convert labelled data to YOLO format
$ python Convert_To_YOLO_Format.py path_to_exported_files_from_the_image_tagging_step_with_VoTT
Create yolo config file for any number of classes
$ python custom_model.py --num_classes 6 --file_name ./config/yolo-custom-6class.cfg

Training

Use pretrained weights to finetune the YOLOv3 model using tricks mentined in Improving YOLOv3 on your data.

$ python -m torch.distributed.launch --nproc_per_node=1 train.py --pretrained_weights "./weights/yolov3.weights" --n_cpu 1 --ngpu 1 --distributed True --model_def ./config/yolo-custom-6class.cfg

Credit

Zhi Zhang, Tong He, Hang Zhang, Zhongyue Zhang, Junyuan Xie, Mu Li

Songtao Liu, Di Huang, Yunhong Wang

Most of the code in this repo has been adapted from here and here.