Construct Faster R-CNN model variants for object-detection task.

model_fasterrcnn_resnet50_fpn(
  pretrained = FALSE,
  progress = TRUE,
  num_classes = 91,
  score_thresh = 0.05,
  nms_thresh = 0.5,
  detections_per_img = 100,
  ...
)

model_fasterrcnn_resnet50_fpn_v2(
  pretrained = FALSE,
  progress = TRUE,
  num_classes = 91,
  score_thresh = 0.05,
  nms_thresh = 0.5,
  detections_per_img = 100,
  ...
)

model_fasterrcnn_mobilenet_v3_large_fpn(
  pretrained = FALSE,
  progress = TRUE,
  num_classes = 91,
  score_thresh = 0.05,
  nms_thresh = 0.5,
  detections_per_img = 100,
  ...
)

model_fasterrcnn_mobilenet_v3_large_320_fpn(
  pretrained = FALSE,
  progress = TRUE,
  num_classes = 91,
  score_thresh = 0.05,
  nms_thresh = 0.5,
  detections_per_img = 100,
  ...
)

Arguments

pretrained

Logical. If TRUE, loads pretrained weights from local file.

progress

Logical. Show progress bar during download (unused).

num_classes

Number of output classes (default: 91 for COCO).

score_thresh

Numeric. Minimum score threshold for detections (default: 0.05).

nms_thresh

Numeric. Non-Maximum Suppression (NMS) IoU threshold for removing overlapping boxes (default: 0.5).

detections_per_img

Integer. Maximum number of detections per image (default: 100).

...

Other arguments (unused).

Value

A fasterrcnn_model nn_module.

Functions

  • model_fasterrcnn_resnet50_fpn(): Faster R-CNN with ResNet-50 FPN

  • model_fasterrcnn_resnet50_fpn_v2(): Faster R-CNN with ResNet-50 FPN V2

  • model_fasterrcnn_mobilenet_v3_large_fpn(): Faster R-CNN with MobileNet V3 Large FPN

  • model_fasterrcnn_mobilenet_v3_large_320_fpn(): Faster R-CNN with MobileNet V3 Large 320 FPN

Task

Object detection over images with bounding boxes and class labels.

Input Format

Input images should be torch_tensors of shape (batch_size, 3, H, W) where H and W are typically around 800.

Available Models

  • model_fasterrcnn_resnet50_fpn()

  • model_fasterrcnn_resnet50_fpn_v2()

  • model_fasterrcnn_mobilenet_v3_large_fpn()

  • model_fasterrcnn_mobilenet_v3_large_320_fpn()

See also

Other object_detection_model: model_convnext_detection, model_facenet, model_maskrcnn

Examples