IDEA-Research / DN-DETR

[CVPR 2022 Oral] Official implementation of DN-DETR
Apache License 2.0
528 stars 57 forks source link

Trained checkpoints for DN-Detr #31

Closed Sharpiless closed 1 year ago

Sharpiless commented 1 year ago
6 | DN-DAB-Deformable-DETR-R50-v24 | R50 | 49.5 (48.4 in 24 epochs) | Google Drive / BaiDu | Optimized implementation with deformable attention in both encoder and decoder. See DAB-DETR for more details. -- | -- | -- | -- | -- | --

I download checkpoint0049.pth from this url. It namely seems to be model trained in 50 epochs. But I got the results below when testing:

 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.484
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.665
 Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.526
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.301
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.517
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.639
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.361
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.590
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.626
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.436
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.673
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.780

Is this normal?

FengLi-ust commented 1 year ago

Hey, did you use relu as the activation function?

# for dn_deformable_detr: 49.5 AP
python main.py -m dn_deformable_detr \
  --output_dir logs/dab_deformable_detr/R50 \
  --batch_size 1 \
  --coco_path /path/to/your/COCODIR \ # replace the args to your COCO path
  --resume /path/to/our/checkpoint \ # replace the args to your checkpoint path
  --transformer_activation relu \
  --use_dn \
  --eval
Sharpiless commented 1 year ago

This is the command I used to test:

python -m torch.distributed.launch --nproc_per_node=2 --master_port=2071 \
  main.py -m dn_dab_deformable_detr \
  --output_dir logs/dn_dab_deformable_detr-exp13/R50 \
  --batch_size 1 \
  --lr 2e-4 \
  --lr_backbone 2e-5 \
  --epochs 12 \
  --target_task large \
  --lr_drop 11 \
  --transformer_activation relu \
  --coco_path datasets/coco \
  --resume checkpoint0049.pth \
  --use_dn --eval
FengLi-ust commented 1 year ago

It seems you have modified the code and added many other parameters. You can clone our clean code and evaluate with the provided command to reproduce our results.