GHM_Detection icon indicating copy to clipboard operation
GHM_Detection copied to clipboard

About "target" in ghm_loss.py for GHMC

Open tjzjp opened this issue 6 years ago • 1 comments

Many thanks for your GREAT work! I have a question about the "target" in ghm_loss.py:

def forward(self, pred, target, label_weight, *args, **kwargs):

Is the "target" a ont-hot format? and where the "target" from?

Thanks a lot~~

tjzjp avatar Nov 28 '19 08:11 tjzjp

The target is expected to have the one-hot format. If the target is the class number from COCO, these codes are used to deal with it: https://github.com/libuyu/mmdetection/blob/be06992564cc6b995b1ae86a258568e9d7b7a599/mmdet/models/losses/ghm_loss.py#L47-L49

libuyu avatar Dec 04 '19 07:12 libuyu