Megvii-BaseDetection / DisAlign

Implementation of "Distribution Alignment: A Unified Framework for Long-tail Visual Recognition"(CVPR 2021)
Apache License 2.0
118 stars 10 forks source link

exp_reweight = exp_reweight / np.sum(exp_reweight) * num_foreground #6

Closed Liu-wanbing closed 3 years ago

Liu-wanbing commented 3 years ago

Dear author, I have some questions about the code and paper:

  1. exp_reweight = exp_reweight / np.sum(exp_reweight) * num_foreground Why "exp_reweight" is multiplied by the coefficient "num_foreground"? It is not mentioned in the paper.
  2. Is "K" in the empirical class frequencies r = [r1, · · · , rK] on the training set in the paper the same as the class number C of the training set?
tonysy commented 3 years ago

Hi,

  1. num_foreground is used to maintain the total loss coefficient same with the no-reweight setting. It's a common operation in reweight-based methods.
  2. exp_reweight is the class frequencies in the training set. I will upload the class frequency files, or you can calculate based on the annotation of the training set.

Thanks.

Liu-wanbing commented 3 years ago

Thanks for your reply!!