Add MaskRCNN improved weights by datumbox · Pull Request #5773 · pytorch/vision (original) (raw)
Fixes #5307
Adds new pre-trained weights for MaskRCNN + ResNet50 + FPN for the v2 variant with post-paper optimizations (no FrozenBN + c5 instead of p5 input on extra layers + heavier RPN/Box/Mask Heads with BNs). It improves the previous baseline by +9.5 mAP for boxes and +7.2 mAP for masks.
Trained with:
python -u run_with_submitit.py --ngpus 8 --nodes 4 --dataset coco --model maskrcnn_resnet50_fpn_v2 \
--epochs 400 --lr-steps 352 384 --lr 0.1 --batch-size 2 --weight-decay 0.00004 --sync-bn \
--data-augmentation lsj
Verified with:
torchrun --nproc_per_node=1 train.py --test-only --weights MaskRCNN_ResNet50_FPN_V2_Weights.COCO_V1 \
--model maskrcnn_resnet50_fpn_v2 -b 1
IoU metric: bbox
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.474
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.679
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.518
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.308
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.512
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.609
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.367
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.589
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.618
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.443
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.652
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.762
IoU metric: segm
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.418
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.651
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.450
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.222
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.447
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.602
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.527
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.551
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.363
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.587
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.715