Detr: How was the DETR demo trained?

Created on 7 Jun 2020  路  3Comments  路  Source: facebookresearch/detr

tl;dr:
1) how was the demo model trained?
2) why does the batch size have to be 1?

Thanks for the amazing work!

I'm very intrigued by the simplicity of DETR, especially the inference demo code. I was wondering how the demo model was trained, since you guys do provide pretrained weights for it. I'm asking this particularly because the inference code says that it only supports a batch size of 1. Does the batch size have to be 1 during training? Also, _why_ does it have to be 1, either in training or inference?

Thank you so much for your time!

question

Most helpful comment

I'm closing the issue following @szagoruyko comments, but please let us know if you have further questions!

All 3 comments

Hi @jinyeom , thanks for your interest in DETR! the demo model was trained with an older version of the code, the hyperparameters were a bit different, on 8 nodes with batch size 1 for 700 epochs.

why does the batch size have to be 1?

It's just for simplicity, as dealing with masking would require additional code. With our baseline model (not the demo), what we observe is that if a model was trained with batch size 1, when we evaluate with more than 1 im/gpu the AP drops significantly, presumably due to boundary effects for which the model was not trained for. If we train with more than 1, and evaluate with a different number of images, including 1, there is some variation but it's not significant.

Hope this helps.

I'm closing the issue following @szagoruyko comments, but please let us know if you have further questions!

That definitely helped :) Thanks for the explanation!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gaopengcuhk picture gaopengcuhk  路  3Comments

dvd42 picture dvd42  路  7Comments

Ww-Lee picture Ww-Lee  路  8Comments

AlexAndrei98 picture AlexAndrei98  路  7Comments

jeromen7 picture jeromen7  路  8Comments