Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Implementation not consistent with the original paper? #44

Closed
Joker316701882 opened this issue Jun 3, 2020 · 2 comments
Closed

Implementation not consistent with the original paper? #44

Joker316701882 opened this issue Jun 3, 2020 · 2 comments
Labels
question Further information is requested

Comments

@Joker316701882
Copy link

Joker316701882 commented Jun 3, 2020

Hi.
In original paper, it mentioned in Sec. 4 that

To optimize for AP, we override the prediction of these slots with the second highest scoring class, using the corresponding con dence. This improves AP by 2 points compared to filtering out empty slots.

But I didn't see any corresponding code in this repo. Did I miss something or it is not implement here?

Thank you.

@alcinos
Copy link
Contributor

alcinos commented Jun 3, 2020

Hello,
It is implemented in the post-processor, namely here:

detr/models/detr.py

Lines 265 to 266 in b7b62c0

prob = F.softmax(out_logits, -1)
scores, labels = prob[..., :-1].max(-1)

As you can see, the softmax is taken over all the classes, but the max itself excludes the last element (no-object).

I believe I have answered your question, as such I'm closing this. Let me know if something is still unclear.

@alcinos alcinos closed this as completed Jun 3, 2020
@fmassa fmassa added the question Further information is requested label Jun 3, 2020
@Joker316701882
Copy link
Author

@alcinos
This is exactly what I was looking for.
Thank you very much.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants