the repo is forked from [liangeming's github repo]: https://github.com/liangheming/retinanetv1
RetinaNet
This is an unofficial pytorch implementation of RetinaNet object detection as described in Focal Loss for Dense Object Detection by Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He and Piotr Dollár.
requirement
tqdm
pyyaml
numpy
opencv-python
pycocotools
torch >= 1.6
torchvision >=0.7.0
result
we trained this repo on 4 GPUs with batch size 8 (4 image per node). the total epoch is 24 ,Adam with cosine lr decay is used for optimizing. finally, this repo achieves 34.6 mAp at 896px(max side) resolution with resnet50 backbone.
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.346
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.544
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.362
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.221
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.401
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.455
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.285
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.460
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.491
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.306
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.573
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.620
training
for now we only support coco detection data.
- run train scripts
python -m torch.distributed.launch --nproc_per_node=4 main.py
tricks
- Color Jitter
- Perspective Transform
- Mosaic Augment
- MixUp Augment
- IOU GIOU DIOU CIOU
- Warming UP
- Cosine Lr Decay
- EMA(Exponential Moving Average)
- Mixed Precision Training (supported by apex)
- Sync Batch Normalize