DINO icon indicating copy to clipboard operation
DINO copied to clipboard

Any hint to find the implementation of Look Forward Twice in Code?

Open Vallum opened this issue 3 years ago • 2 comments

Sorry to bother you.

But I have some difficulty to find the implementation of "3.5 Look Forward Twice".

My rough guess is to try to search around https://github.com/IDEACVR/DINO/blob/8758cf02146f306dc36babab4fff1f09c114c682/models/dino/deformable_transformer.py#L764

However, I couldn't find any Look Forward Twice, unexpectedly found out some unmentioned (in paper) codes which is probably using class_embed to make topk proposals to refine box iterations.

Am I looking for a needle in a wrong haystack?

BTW, I am very impressed from your wonderful, awesome project.

Very many thanks!

Vallum avatar Aug 16 '22 05:08 Vallum

It's just one line of code to implement it, controlled by the parameter rm_detach. https://github.com/IDEACVR/DINO/blob/8758cf02146f306dc36babab4fff1f09c114c682/models/dino/deformable_transformer.py#L773

FengLi-ust avatar Aug 16 '22 05:08 FengLi-ust

@Vallum Sorry, it should be this line https://github.com/IDEA-Research/DINO/blob/8758cf02146f306dc36babab4fff1f09c114c682/models/dino/deformable_transformer.py#L777 that implements look forward twice.

HaoZhang534 avatar May 07 '23 08:05 HaoZhang534