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

Hard Negative mining for scaled yolov4-mish,csp,swish ? #7957

Closed akashAD98 closed 2 years ago

akashAD98 commented 3 years ago

Adding negative samples(background images with no object ) will help but apart from this is there any other way in which we can implement hard negative mining?

bulatnv commented 3 years ago

@akashAD98 Did not understand question fully, but it seems to be relevant for me too.

"Hard Negative Mining. The main idea of hard negative mining is to repeatedly bootstrap negative examples by selecting false positives which the detector incorrectly classifies [1]. Hard negative mining is originally used in object detection tasks, where the datasets usually involve overwhelming easy examples [2]"

  1. Navneet Dalal and Bill Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005
  2. Abhinav Shrivastava, Abhinav Gupta, and Ross Girshick. Training region-based object detectors with online hard example mining. In CVPR, 2016.
akashAD98 commented 2 years ago

@bulatnv yes its same,concept is same like adding background images

bulatnv commented 2 years ago

@akashAD98 Hello again,

Did you find the answer to the question?

I have found that increasing image size moves balance to background, in contrast reducing image size moves balance to foreground. But training on big images does not mean that it is the same as training with hard negative samples. I have found that the HNM is the best way to improve precision.