Reputation: 41
I'm training YOLO on custom dataset(using Alexey AB implementation of Darknet). It has 3 classes of images where class 1 has 45k images, and remaining two have around 1k images.
After training it for 6k iterations, the loss is in between 1.5 and 2. However, when i tried running it on a video, it is only detecting class 1.
I would like to know what is the reason for this, is it because of the imbalance in the no of images in the dataset? Is there a way to solve this problem?
Upvotes: 2
Views: 5824
Reputation: 176
Yes, to begin with you've an unbalanced dataset. The recommended number of images per class is >2000 (according to the directions on the repository).
I'd recommend you to have a test set and track your mean average precision along with loss while you're training. If the average precision is low, you can assume that not all classes are being detected equally well.
There are a few ways to solve this but I'm assuming you already might have figured out.
I'm calling other classes for the classes with less data.
Upvotes: 3