Mask R-CNN
Paper • 1703.06870 • Published • 1
He et al., 2017 — Mask R-CNN (arXiv:1703.06870)
Lucid port of torchvision/MaskRCNN_ResNet50_FPN_Weights.COCO_V1,
converted to Lucid-native safetensors.
| Tag | box mAP | mask mAP | Params | GFLOPs | Size | Source |
|---|---|---|---|---|---|---|
COCO_V1 (default) |
37.9 | 34.6 | 44.4M | 134.38 | 169.81 MB | torchvision |
import lucid.models as models
from lucid.models.weights import MaskRCNNResNet50FPNWeights
# default tag
model = models.mask_rcnn_resnet50_fpn(pretrained=True)
# explicit tag (enum or string)
model = models.mask_rcnn_resnet50_fpn(weights=MaskRCNNResNet50FPNWeights.COCO_V1)
model = models.mask_rcnn_resnet50_fpn(pretrained="COCO_V1")
# preprocessing travels with the weights
weights = MaskRCNNResNet50FPNWeights.COCO_V1
preprocess = weights.transforms()
out = model(preprocess(image)[None])
# InstanceSegmentationOutput: class logits + boxes + per-instance masks
logits, boxes, masks = out.logits, out.pred_boxes, out.pred_masks
Converted from torchvision/MaskRCNN_ResNet50_FPN_Weights.COCO_V1 via
python -m tools.convert_weights mask_rcnn_resnet50_fpn --tag COCO_V1.
Key mapping + numerical parity verified against the source.
bsd-3-clause — inherited from the original weights.
@inproceedings{he2017mask,
title={Mask R-CNN},
author={He, Kaiming and Gkioxari, Georgia and Doll{\'a}r, Piotr and Girshick, Ross},
booktitle={Proceedings of the IEEE International Conference on Computer Vision (ICCV)},
pages={2961--2969},
year={2017}
}