I tried to run your model on a single sample image. When the topk value = 900, the model detects most of the objects( with confidence > 0.5), but when I reduce the topk value to 100, more than 80% of the detections get vanish (those objects which went missing will be present at confidence < 0.4).
I am not able to understand the reason why this is happening.
I would greatly appreciate your reply.
@ajay1234567899 I recommend visualizing objects with a confidence score>0.25 so that most objects will appear. Also, if you want to modify the number of queries, you should set num_queries=100.
Hello sir,
I tried to run your model on a single sample image. When the topk value = 900, the model detects most of the objects( with confidence > 0.5), but when I reduce the topk value to 100, more than 80% of the detections get vanish (those objects which went missing will be present at confidence < 0.4).
I am not able to understand the reason why this is happening. I would greatly appreciate your reply.
Modifications done are : In this file https://github.com/IDEA-Research/DINO/blob/main/models/dino/deformable_transformer.py
I have changed line 341 from topk = self.num_queries --------------> to topk = 100
and
Line 352 from tgt_ = self.tgt_embed.weight[:, None, :].repeat(1, bs, 1).transpose(0, 1) # nq, bs, dmodel ----------------------> to tgt = self.tgt_embed.weight[:topk, None, :].repeat(1, bs, 1).transpose(0, 1) # nq, bs, d_model