Submitted by Lugi t3_xt01bk in MachineLearning
The equation of α-balanced focal loss (binary in this case for simplicity) is given by:
What puzzles me is that it seems like weighing used here is opposite to what is intuitive when dealing with imbalanced datasets: normally you would scale the loss of class 1 (minority - foreground objects in case of object detection) higher than the class 0 (majority - background). However what happens here is that we scale class 1 by 0.25, and class 0 by 0.75.
Is this behavior explained anywhere? I don't think I'm getting the foreground/background labels wrong, as I've looked into multiple implementations, as well as the original paper. Or maybe am I missing some crucial detail?
Paper for reference: https://arxiv.org/abs/1708.02002
CatalyzeX_code_bot t1_iqn5ydz wrote
Found relevant code at https://github.com/facebookresearch/Detectron + all code implementations here
--
To opt out from receiving code links, DM me