Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About "target" in ghm_loss.py for GHMC #27

Open
tjzjp opened this issue Nov 28, 2019 · 1 comment
Open

About "target" in ghm_loss.py for GHMC #27

tjzjp opened this issue Nov 28, 2019 · 1 comment

Comments

@tjzjp
Copy link

tjzjp commented Nov 28, 2019

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~~

@libuyu
Copy link
Owner

libuyu commented Dec 4, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants