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

What is the purpose of unsigmoid for output_proposals #136

Open weicheng113 opened 1 year ago

weicheng113 commented 1 year ago

Hi,

Thanks for sharing high performance model. I am going through the model source code and get a question about the use of unsigmoid in the following code.

https://github.com/IDEA-Research/DINO/blob/290cf6415166cc7cd0f68e5da973004e2f0e686b/models/dino/utils.py#L63

I tried the formula out and observed that sigmoid(unsigmoid(x)) = x. I wonder what the purpose of unsigmoid function here? I can see the value inside output_proposals are more spreaded out after unsigmoid(opposite sigmoid to squeeze the value into 0 and 1). Is 'more spreaded out values are easier to learn' the purpose of using unsigmoid here?

Thanks, Cheng

HaoZhang534 commented 1 year ago

@weicheng113 We need unsigmoid value because the layer-by-layer box refinement scheme requires adding two unsigmoid values and then using sigmoid to restrict the value to (0, 1).

weicheng113 commented 1 year ago

@SuperHenry2333 Thanks for your time and reply. I will have a look.