AlexeyAB / darknet

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

class imbalance problem #1498

Open groot-1313 opened 6 years ago

groot-1313 commented 6 years ago

Hi, I have 2 classes, one class has 5700 images and the other class has 9000 images. Upon training a YOLO V1 model, will we suffer a huge class imbalance problem? If yes, what are the measures we can take to avoid it?

AlexeyAB commented 6 years ago

@groot-1313 Hi,

I think there is no huge class imbalance problem.

But you can try to solve it by the 2 ways:

groot-1313 commented 6 years ago

Thanks for the quick reply @AlexeyAB . I am using YOLO v1, so setting focal_loss = 1 is not an option. I will duplicate the data!

liminghu commented 3 years ago

@AlexeyAB Is focal_loss=1 in the [yolo]/[region]-layers supported in YoloV4 or Yolov4-tiny? Thanks.