tztztztztz / eql.detectron2

The official implementation of Equalization Loss for Long-Tailed Object Recognition (CVPR 2020) based on Detectron2. https://arxiv.org/abs/2003.05176
Apache License 2.0
202 stars 17 forks source link

Questions regarding the influence of background classes #2

Closed TonyLianLong closed 4 years ago

TonyLianLong commented 4 years ago

Hi @tztztztztz ,

I'm wondering how you get the SCORE_THRESH_TEST as 0.0001 (the code is here: https://github.com/tztztztztz/eql.detectron2/blob/8164f4ae20bccfa86f78e996ce4af8b4d5573ffd/projects/EQL/configs/eql_mask_rcnn_R_50_FPN_1x.yaml#L9). It seems that the parameter is much smaller than the standard/default parameter, which is 0.05. Is it by experimentation and tuning? If I'm correct, this is a hard threshold and the only way to differentiate background and foreground classes. Is this correct, or there are other places which also filter out predictions?

In addition, another question that I have is that, given that you train rare classes with gradient from the background class, as described in the formulation of EQL, wouldn't the background gradient discourage the prediction of rare classes?

Thank you!

TonyLianLong commented 4 years ago

From the log attached on the main page, it seems like a lot of classes, such as beachball, have only 1 image. In this case, would not the background EQL have much larger impact than the foreground (we only have gradient for foreground once an epoch)?

tztztztztz commented 4 years ago
  1. The SCORE_THRESH_TEST is tuned by experiments. The original paper has report it in Table 3 (a). The value is the same as that in LVIS baseline config. https://github.com/tztztztztz/eql.detectron2/blob/8164f4ae20bccfa86f78e996ce4af8b4d5573ffd/configs/LVIS-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml#L9 This implementation only changes the loss function. The rest should be exactly the same as Mask RCNN (no extra post-processing), so there is no other place which filters out predictions.

  2. EQL only cares about the competition between foreground classes. Yes, the massive background gradients could be a problem for some rare classes, but it's not our focus in this paper.