# RetinaNet (2017)

> Down-weighted easy background examples in the loss so a single-stage detector finally matched two-stage accuracy.

Page: https://mralbu.github.io/ai-datasets/p/retinanet

## Key facts

- Title: Focal Loss for Dense Object Detection
- Authors: Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, Piotr Dollár
- Venue: ICCV 2017
- Category: Vision
- Paper: https://www.alphaxiv.org/abs/1708.02002

## Why it matters

After YOLO, the field assumed you had to trade accuracy for one-stage speed. Focal loss showed the gap was not architectural but a training imbalance between foreground and background, and its one-line loss modification became a standard tool well beyond object detection.

## The idea

Dense single-stage detectors evaluate tens of thousands of candidate boxes per image, almost all obvious background whose small losses add up to swamp the gradient. Focal loss scales standard cross-entropy by (1 − p)^γ so confident negatives barely contribute, letting a clean one-stage detector on a Feature Pyramid Network (RetinaNet) focus on hard examples.

## The result

39.1 AP on COCO test-dev with ResNet-101-FPN (and 37.8 AP at about 5 frames per second), surpassing every published one-stage and two-stage detector of the time without a proposal stage.

## The data

- [MS COCO (2014)](https://mralbu.github.io/ai-datasets/d/coco.md): 330k everyday scenes with 1.5M labeled objects in 80 categories.

## Builds on

- [YOLO (2015)](https://mralbu.github.io/ai-datasets/p/yolo.md)
- [Faster R-CNN (2015)](https://mralbu.github.io/ai-datasets/p/faster-rcnn.md)
- [FPN (2016)](https://mralbu.github.io/ai-datasets/p/fpn.md)
- [ResNet (2015)](https://mralbu.github.io/ai-datasets/p/resnet.md)

## Part of

- [Object detection](https://mralbu.github.io/ai-datasets/t/object-detection.md) (step 5 of 6)
