Skip to content

🌼 re-implementation of DETR (DEtectionTRansformer) (ECCV2020)

Notifications You must be signed in to change notification settings

csm-kr/detr_pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DETR pytorch

re-implementation of detr Please refer to https://arxiv.org/abs/2005.12872

Properties of this repo.

  • Not Use the "Nested Tensor"
  • Not Use nn.MultiheadAttention, instead of use timm like transformer(from scratch)
  • Change Hungarian mather efficiently
  • Able to Much more data augmentation including Mosaic
  • Use Voc dataset
  • Even though much fixing, the performance is on far the official repo.
  • Not distinguish the learning rate between transformer and backbone.
  • Fix the resolution of images

To Do

  • Segmentation
  • voc experiments

Training Setting

- batch size : 36 (official - 64)
- optimizer : Adamw
- epoch : 500
- lr : 1e-4 
- weight decay : 1e-4
- scheduler : step LR (*0.1 at epoch 400)

Results

  • quantitative results
methods Traning Dataset Testing Dataset Resolution. AP
papers COCOtrain2017 COCO val2017(minival) 800 ~ 1333 42.0 (500 epoch)
this repo COCOtrain2017 COCO val2017(minival) 1024 x 1024 41.9 (500 epoch)
  • result of RTX 3090 (batch 36)
Accumulating evaluation results...
DONE (t=6.23s).
IoU metric: bbox
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.419
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.616
 Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.442
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.197
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.458
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.618
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.337
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.538
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.579
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.302
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.642
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.817
mAP :  0.4190736759071826
mean Loss :  8.931809981664022
Eval Time : 66.7581
  • result of gtx 1080 ti (barch 2)
Accumulating evaluation results...
DONE (t=6.01s).
IoU metric: bbox
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.419
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.615
 Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.442
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.197
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.458
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.618
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.337
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.538
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.579
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.302
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.642
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.817
mAP :  0.41899994889138625
mean Loss :  7.4997836683601475
Eval Time : 438.7726

  • qualitative reusults

results

  • attention results

attention

  • test as pretrained model
  1. download .pth.tar file from https://drive.google.com/file/d/1BfgWrkkX2v_d3sbLtIrguZTtIy-MRA5K/view?usp=share_link

  2. make ./.logs/detr_coco/saves and put it in .pth.tar file

  3. run main for eval

python main.py --config ./configs/detr_coco_test.txt

About

🌼 re-implementation of DETR (DEtectionTRansformer) (ECCV2020)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages