AlexeyAB / darknet

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

Accuracy problem when learning after extracting 6 classes from coco dataset(yolov3) #5834

Open yacad opened 4 years ago

yacad commented 4 years ago

Hi AlexeyAB.

I extracted 6 classes(person, car, truck, bus, motorcycle, cycle) from coco dataset used cocoapi(The number of training images is about 70,000). And I trained as you explained. However, accuracy was lower than when training using 80 existing classes. I used multi-GPU and as you explained, I first trained on 1 GPU for 1000 iterations and then run training with multi-GPU using partially trained model /backup/yolov3_1000.weights. You explained that the max_batches value should be classes 2000, but the training were not enough, so we set classes 4000. The rest followed your instructions.

The detailed configuration file is attached here. config.zip

chart_yolov3-suhdol_1000 chart_yolov3-suhdol

When I run the program using the weight file I created, I get the following result. image

When I run the program using the existing 80 classes weight file, I get the following result. image

As can be seen from the results, the recognition rate is lower than when training using 80 classes weight file.

Why did this result? Was there a problem with my training?

AlexeyAB commented 4 years ago

https://github.com/AlexeyAB/darknet#how-to-train-to-detect-your-custom-objects

change line max_batches to (classes*2000 but not less than number of training images, but not less than number of training images and not less than 6000), f.e. max_batches=6000 if you train for 3 classes