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

labe issue #18

Closed
DoublePan-Oh opened this issue Mar 22, 2022 · 4 comments
Closed

labe issue #18

DoublePan-Oh opened this issue Mar 22, 2022 · 4 comments

Comments

@DoublePan-Oh
Copy link

I am confused about the label problem. In your code, the label of the ground-truth is 0, which represent this is action, can I think that the lable output by the network is 0 for action, not 0 for background? If the predicted label is 0, does it match the ground-truth?

@DoublePan-Oh
Copy link
Author

Can the ground-truth label be modified, for example, to 1?1 means that the predicted label matches the ground-truth, otherwise there is no match. I now want to modify it into such a requirement, do you think it is feasible?

@sparkstj
Copy link
Collaborator

We take the last label entry as background. Since it's a binary classification problem, the first label entry is action. So yes, the label 0 represents action and the label 1 represents background. It's just a matter of notations, so it would be feasible to swap the labels for action and background.

@DoublePan-Oh
Copy link
Author

This classification task should be a binary classification. According to the detr, it should be num_class=2 when setting num_class, but your code setting is num_class=1. This is where I don't quite understand.

image

@sparkstj
Copy link
Collaborator

sparkstj commented Mar 25, 2022

In the COCO dataset and many other datasets, labels are expected to start at 1, so DETR leaves class 0 untouched and reserves max_id + 1 for no-object class. That's why they decide num_classes = max_id + 1.

In our case, we index classes from 0 to create more compact class embedding. We assign action to class 0, and the background/no-object class to class 1. That is to say, our max_id is 0 and therefore num_classes = 1.

You could also check this discussion for detailed explanations.

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