faster_rcnn_resnet50_fpn(pretrained: bool | str = False, weights: FasterRCNNResNet50FPNWeights | None = None, overrides: object = {})Faster R-CNN with a ResNet-50-FPN backbone (COCO-pretrained).
Builds the reference fasterrcnn_resnet50_fpn detector: ResNet-50
backbone with frozen batch-norm, a 5-level Feature Pyramid Network
(P2-P5 + a parameter-free pool level for RPN), anchors at sizes
((32,),(64,),(128,),(256,),(512,)) and ratios (0.5, 1.0, 2.0),
and a Fast R-CNN RoI head (TwoMLPHead + FastRCNNPredictor) over
MultiScale RoI Align. COCO box AP 37.0, ~41.8M parameters.
Model Size
Parameters
pretrainedbool or str= FalseFalse → random init; True →
the DEFAULT tag (FasterRCNNResNet50FPNWeights.COCO_V1);
a tag string → that specific checkpoint. Mutually exclusive with
weights (which wins if both are given).pretrained.**overridesobject= {}FasterRCNNConfig.Returns
FasterRCNNForObjectDetectionDetector with the ResNet-50-FPN configuration applied (or with
overrides merged on top of it).
Notes
Pretrained weights are converted from the reference
FasterRCNN_ResNet50_FPN_Weights.COCO_V1 checkpoint and hosted under
lucid-dl/faster-rcnn-resnet-50-fpn. The detector expects an
already resized + normalised image batch (the
lucid.utils.transforms.Detection preset).
Examples
>>> import lucid
>>> from lucid.models.vision.faster_rcnn import faster_rcnn_resnet50_fpn
>>> model = faster_rcnn_resnet50_fpn()
>>> model.eval()
>>> out = model(lucid.randn(1, 3, 224, 224))
>>> out.logits.shape[-1]
91