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 condence. 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.
Hello,
It is implemented in the post-processor, namely here: https://github.com/facebookresearch/detr/blob/b7b62c080d34f76c0069a63afcfb9093213d235c/models/detr.py#L265-L266
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
This is exactly what I was looking for.
Thank you very much.
Most helpful comment
Hello,
It is implemented in the post-processor, namely here: https://github.com/facebookresearch/detr/blob/b7b62c080d34f76c0069a63afcfb9093213d235c/models/detr.py#L265-L266
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.