IDEA-Research / DINO

[ICLR 2023] Official implementation of the paper "DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection"
Apache License 2.0
2.15k stars 232 forks source link

about dn_labelbook_size #124

Closed Innary closed 1 year ago

Innary commented 1 year ago

Hello, When I read the code I found: self.label_enc = nn.Embedding(dn_labelbook_size + 1, hidden_dim) In your model, the loss function is sigmoid_focal_loss, and dn_labelbook_size and num_classes are 91 when using the coco dataset. So:

  1. Why not use 90 but 91 for dn_labelbook_size and num_classes?
  2. Why is the first dimension of label_enc 92 instead of 90?

thank you

FengLi-ust commented 1 year ago

Hey, the dimension of label_enc is not important, as COCO only has around 80 classes, but we use dn_labelbook_size + 1 here. You can simply ignore the empty classes that are not used.

Innary commented 1 year ago

think you for your answer