metadata
library_name: lucid
license: bsd-3-clause
tags:
- instance-segmentation
- mask
- lucid
datasets:
- coco
pipeline_tag: image-segmentation
model-index:
- name: mask-rcnn-resnet50-fpn
results:
- task:
type: instance-segmentation
dataset:
name: COCO
type: coco
metrics:
- type: box mAP
value: 37.9
- type: mask mAP
value: 34.6
Mask R-CNN (ResNet-50-FPN)
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.
Available weights
| Tag | box mAP | mask mAP | Params | GFLOPs | Size | Source |
|---|---|---|---|---|---|---|
COCO_V1 (default) |
37.9 | 34.6 | 44.4M | 134.38 | 169.81 MB | torchvision |
Usage
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
Conversion
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.
License
bsd-3-clause — inherited from the original weights.
Citation
@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}
}