PyTorch implementation of YOLOv3, including training and inference based on darknet and mobilnetv2
The YOLO is one of the most popular one stage object detector. In Mar 2018, YOLOv3: An Incremental Improvement, which is extremely fast and accurate has been released. The aim of this project is to replicate the Darknet implementation. It also supports training YOLOv3 network with various backends such as MobileNetv2, Darknet(53 or 21). If you have any question or idea about this repo, make comments or email to anqitommy@gmail.com
Generate your own annotation file and class names file.
One row for one image;
Row format: image_file_path box1 box2 ... boxN
;
Box format: x_min,y_min,x_max,y_max,class_id
(no space).
Here is an example:
path/to/img1.jpg 50,100,150,200,0 30,50,200,120,3
path/to/img2.jpg 120,300,250,600,2
...
If you want to use original pretrained weights for YOLOv3:
Download YOLOv3 darknet53 backbone weights from BaiduDisk, password:w6fm.
Modify yolo_train.yml and start training.
python train.py
Use your trained weights or checkpoint weights, modify the training parameters, weightfile in yolo_train.yml,
Remember to modify the annotation_path of your own annotation file, class_names, anchors, save_path. If you want to use mobilnetv2 as the backbone net, modify the backbones_network