Focal Loss for Dense Object Detection

by   Tsung-Yi Lin, et al.

The highest accuracy object detectors to date are based on a two-stage approach popularized by R-CNN, where a classifier is applied to a sparse set of candidate object locations. In contrast, one-stage detectors that are applied over a regular, dense sampling of possible object locations have the potential to be faster and simpler, but have trailed the accuracy of two-stage detectors thus far. In this paper, we investigate why this is the case. We discover that the extreme foreground-background class imbalance encountered during training of dense detectors is the central cause. We propose to address this class imbalance by reshaping the standard cross entropy loss such that it down-weights the loss assigned to well-classified examples. Our novel Focal Loss focuses training on a sparse set of hard examples and prevents the vast number of easy negatives from overwhelming the detector during training. To evaluate the effectiveness of our loss, we design and train a simple dense detector we call RetinaNet. Our results show that when trained with the focal loss, RetinaNet is able to match the speed of previous one-stage detectors while surpassing the accuracy of all existing state-of-the-art two-stage detectors.


page 1

page 2

page 3

page 4


Focal Loss Dense Detector for Vehicle Surveillance

Deep learning has been widely recognized as a promising approach in diff...

Resolving Class Imbalance in Object Detection with Weighted Cross Entropy Losses

Object detection is an important task in computer vision which serves a ...

DR Loss: Improving Object Detection by Distributional Ranking

Most of object detection algorithms can be categorized into two classes:...

Are Sampling Heuristics Necessary in Object Detectors?

The prevalent object detectors to date, such as Faster R-CNN and RetinaN...

Loss Rank Mining: A General Hard Example Mining Method for Real-time Detectors

Modern object detectors usually suffer from low accuracy issues, as fore...

Residual Objectness for Imbalance Reduction

For a long time, object detectors have suffered from extreme imbalance b...

Structured Sparse R-CNN for Direct Scene Graph Generation

Scene graph generation (SGG) is to detect entity pairs with their relati...

Code Repositories


Focal loss for mxnet SSD example.

view repo


The implementation of Focal-Loss Using Caffe

view repo


Tensorflow Object Detection API

view repo


Implementation of the Deformable Convolutional layer、Active Convolution、Focal-Loss in caffe

view repo

Please sign up or login with your details

Forgot password? Click here to reset