Mmdetection: How to apply focal loss in Cascade RCNN?

Created on 26 Feb 2020  路  1Comment  路  Source: open-mmlab/mmdetection

Hi, due to the high imbalance of the class distribution of my own dataset, I want to use focal loss to solve it. I tried change all the 'loss_cls' in cascade rcnn to
loss_cls=dict( type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=0.005),
but the loss gets bigger and bigger. I wonder how to change the config file of cascade RCNN to use focal loss, or do you have any advice to help with the imbalance problem? Thanks!

Most helpful comment

It is not surprised. FocalLoss may not work well on two-stage detectors. For the imbalanced problem, it is beyond the scope of the codebase usage. My personal suggestion is that you may read some related papers, to name a few, OHEM, GHM, Libra R-CNN, etc.

>All comments

It is not surprised. FocalLoss may not work well on two-stage detectors. For the imbalanced problem, it is beyond the scope of the codebase usage. My personal suggestion is that you may read some related papers, to name a few, OHEM, GHM, Libra R-CNN, etc.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fengxiuyaun picture fengxiuyaun  路  3Comments

hust-kevin picture hust-kevin  路  3Comments

happog picture happog  路  3Comments

dereyly picture dereyly  路  3Comments

henbucuoshanghai picture henbucuoshanghai  路  3Comments