Czm369 / MixPL

Mixed Pseudo Labels for Semi-Supervised Object Detection
Apache License 2.0
47 stars 0 forks source link

TOPK query selection out of range when training MixPL over DINO #8

Open PAGF188 opened 4 months ago

PAGF188 commented 4 months ago

Hello, when training MixPL over DINO detector the next error appears:

File "/workspace/mmdet/models/detectors/dino.py", line 179, in pre_decoder enc_outputs_class.max(-1)[0], k=self.num_queries, dim=1)[1] RuntimeError: selected index k out of range

https://github.com/Czm369/MixPL/blob/bb2c9aa6c32aaaf7d474f4b595f189cf00f633dc/mmdet/models/detectors/dino.py#L174-L179

This error indicates that the topk selection is greater than the number of tokens produced by the encoder, ultimately suggesting that the input image is too small (here you have a reference for the same problem).

How did you overcome this problem? Perhaps the resizing dimensions in the configuration file do not match the real dimensions of your experiments?

I also upload the training log with the error for debugging purposes: dist_job_6113329_MixPL_distributed_DINO.log.

Czm369 commented 4 months ago

It seems that img_shape is too small.

PAGF188 commented 4 months ago

I am reproducing MixPL's results on DINO at 10% COCO (table 6 of your article, column 10%),

image

so I am using the configuration file you provided at mixpl_coco_detection.py and mixpl_dino-4scale_r50_fpn_90k_coco-s1-p10.py, which uses a resizing scale of:

https://github.com/Czm369/MixPL/blob/bb2c9aa6c32aaaf7d474f4b595f189cf00f633dc/projects/MixPL/configs/mixpl_coco_detection.py#L25

When I do this I get the error mentioned above (topK out of range). My question is: Is it possible that the configuration file has an error? Is it possible that the scaling does not correspond to the resizing values used to produce the results of your paper?

Czm369 commented 4 months ago

Sorry, it is the debug config. It should be scale = [(1333, 400), (1333, 1200)] .