All models

retinanet_resnet50_fpn_v2

RetinaNet is a one-stage detector with an FPN backbone and separate class and box subnets, trained with focal loss.

Detection and tracking · 2,755 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 2,755 operations (1.4 MB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
52.4M
Operations
2,755
Framework
PyTorch
Recurrent
No
Published
ICCV 2017
Cited by
1,227 (as of 29 October 2026)
Authors
Tsung-Yi Lin, Priya Goyal, Ross Girshick and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m8932
Graph hash
70da84e06b87c70a2aaef49eecc2a787fe692fedad4759f40318cceb378924b3
Skeleton hash
22d4106cc70c4899793ad922a13df920ed0d6a6f17b87c53a96c2f5681a1584d
Architecture hash
754870cd4073d731e526d469ad48d8730d69eb9f850d02be9b811f2ac138cd2b
Diagram SHA-256
25e0bce0eef16d26d585d19c148a80960940de9b9703eee37c7d5dc336365967
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

About this model's family

RetinaNet is a one-stage object detector that its authors designed in order to test a training loss. The paper asks why one-stage detectors, which are applied over a regular, dense sampling of possible object locations, had trailed two-stage detectors in accuracy, and finds the central cause in the extreme imbalance between foreground and background examples during training. Its answer is the focal loss, a reshaped cross entropy loss that down-weights well-classified examples.

The network is a backbone plus two task-specific subnetworks. In the paper the backbone is a Feature Pyramid Network built on top of ResNet. One subnetwork classifies anchor boxes and the other regresses from anchor boxes to ground-truth object boxes. The classification subnet is a small FCN attached to each FPN level, with parameters shared across all pyramid levels, and it does not share parameters with the box regression subnet.

The paper's best model, based on a ResNet-101-FPN backbone, reached a COCO test-dev AP of 39.1 while running at 5 fps. The name comes from the detector's dense sampling of object locations in an input image.

Key idea. The paper introduces the focal loss, which down-weights well-classified examples so that a simple one-stage detector, RetinaNet, can train despite extreme foreground-background imbalance.

  • RetinaNet
  • focal loss
  • one-stage detector
  • dense object detection
  • object detection
  • feature pyramid network
  • anchor boxes
  • class imbalance

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{lin2018focallossdenseobject,
      title={Focal Loss for Dense Object Detection}, 
      author={Tsung-Yi Lin and Priya Goyal and Ross Girshick and Kaiming He and Piotr Dollár},
      year={2018},
      eprint={1708.02002},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1708.02002}, 
}