- Follow detectron2's readme to install detection2
cd DETR.detectron2
python setup.py build develop
- link dataset path to DETR.detectron2/datasets/
- Train DETR
python projects/DETR/train_net.py --num-gpus 8 --config-file projects/DETR/configs/detr.res50.coco.multiscale.150e.yaml
: use MSRA pretrain weights
- Evaluate DETR using provided weights here
python projects/DETR/train_net.py --num-gpus 8 --config-file projects/DETR/configs/detr.res50.coco.multiscale.150e.yaml --eval-only MODEL.WEIGHTS path/to/provided/ckpt.pth
- For faster training:
python projects/DETR/train_net.py --num-gpus 8 --config-file projects/DETR/configs/detr.res50.coco.multiscale.150e.bs48.yaml
Using a 8x2080ti server, 150 epochs take about 3 day 6 hours.
config | COCO AP | Paper | Checkpoint |
---|---|---|---|
detr.res50.coco.multiscale.150e.yaml | 38.6 without RC | 39.5 with RC | LINK |
"RC" means RandomCrop, it brings about 1% AP improvements accroding to paper.
- I haven't add RandomCrop.
- I haven't add support for segmentaion, but it can be easily added.
- Training faster
- Avoid memory leaking in official implementation
- Use backbone in detectron2