AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.63k stars 7.95k forks source link

Training additional classes on top of custom trained yolov4 (darknet) weights #8320

Open pankaja0285 opened 2 years ago

pankaja0285 commented 2 years ago

@AlexeyAB the premise is as follows: 1) I have trained following all the guidelines for custom VOC dataset, training with only 20 classes as a custom base model. _darknet.exe detector train data/obj.data cfg/yolov4-custom.cfg yolov4.conv.137 dontshow -map

2) Now I have the best weights (_yolov4-custombest.weights along with final and last weights, also 10, 20, 30 & 40 K iterations weights) saved - all the good stuff - up to this point I am good... :)

TODO: 3) Next to start with, what I need to do is just add one new class (then later if this works well, repeat for few other new classes) and the corresponding labels and images - VOC dataset and train with using the above _yolov4-custombest.weights and NOT the yolov4.conv.137 that I used in Step 1) to train my custom base model.

4) Then evaluate the above model (obviously with all the 21 classes? or just one? )

How and what do I need to do? I see several stackoverflow articles but none of them gave me any direction as to how to do....

Can you please list out what steps to take, say pseudo code / code that I can repurpose without much difficulty? Your help is much appreciated.

TIA

lsd1994 commented 2 years ago

You should put your images and VOC dataset together and train with yolov4.conv.137, then test all 21 classes.