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

How class embedding is implemented? #3

Closed
Jianqiuer opened this issue Mar 7, 2022 · 8 comments
Closed

How class embedding is implemented? #3

Jianqiuer opened this issue Mar 7, 2022 · 8 comments

Comments

@Jianqiuer
Copy link

Thanks for your excellent work.
Could you give more details how decoder embedding is specified as class label embedding?

@FengLi-ust
Copy link
Collaborator

You can refer to Conditional DETR or DAB DETR, in which decoder queries are specified as a content part and a positional part. Therefore, we can set decoder content embedding as class label embedding as they are both related to content features. Please feel free to ask any question that helps you understand this paper. Thank you.

@Jianqiuer
Copy link
Author

Thanks for your reply. I have two questions about this part. How the class label embedding specifies to a class label? Is label noising implementing for the content part of query?

@FengLi-ust
Copy link
Collaborator

Yes, label noising is implemented for the content part. For the first question, you can use label embedding to embed a class label, just like word embedding in NLP. Thank you.

@Jianqiuer
Copy link
Author

Thank you, It inspires me a lot.

@encounter1997
Copy link

You can refer to Conditional DETR or DAB DETR, in which decoder queries are specified as a content part and a positional part. Therefore, we can set decoder content embedding as class label embedding as they are both related to content features. Please feel free to ask any question that helps you understand this paper. Thank you.

Hi, thanks for the amazing work!
May I ask where does the "class label embedding" comes from?
To my understanding, the weight of each class in the classifier (for final prediction) is used to initialize the content embedding of corresponding ground-truth class (for denoising input). Is that right?

@FengLi-ust
Copy link
Collaborator

No. We add a new linear layer to embed the class labels.

@encounter1997
Copy link

No. We add a new linear layer to embed the class labels.

OK, I get it. Thanks for your explanation~

@YellowPig-zp
Copy link

I am still a bit confused as how the class label embeddings are obtained. Do you mean, say, for a one-hot vector (0,0,0,1,0...), you pass it through an MLP to obtain a feature vector, which is then served as the content query for the decoder part?

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

4 participants