FCOS: Fully Convolutional One-Stage Object Detection

Zhi Tian, Chunhua Shen, Hao Chen, Tong He

TL;DR

FCOS (Fully Convolutional One-Stage Object Detection) is a simple, anchor-free object detector that treats detection as a per-pixel prediction problem, much like semantic segmentation. By eliminating complex anchor box hyper-parameters and introducing a novel "center-ness" branch to filter low-quality detections, it achieves state-of-the-art performance while being significantly easier to implement and train.

What Problem Does This Paper Address?

For years, the "de facto" standard for object detection has relied on anchor boxes—pre-defined rectangles of various sizes and aspect ratios tiled across an image. While successful, anchors introduce several headaches:

  1. Hyper-parameter Sensitivity: Detection performance is highly sensitive to the chosen sizes and ratios of anchors, requiring careful heuristic tuning.
  2. Generalization Issues: Fixed anchors struggle with objects of extreme shapes and don't transfer well to new tasks with different object scales.
  3. Imbalance: To ensure high recall, thousands of anchors are placed, but only a tiny fraction overlap with real objects, creating a massive imbalance between positive and negative samples during training.
  4. Computational Complexity: Calculating Intersection-over-Union (IoU) for thousands of anchors is computationally expensive.

The authors ask: Can we solve object detection in a "neat" per-pixel fashion, similar to how Fully Convolutional Networks (FCNs) handle semantic segmentation?

Methods

FCOS moves away from anchors entirely. Instead of predicting offsets for a box, it predicts a 4D vector $(l, t, r, b)$ at every foreground pixel, representing the distances from that pixel to the left, top, right, and bottom boundaries of the bounding box.

Figure 1 – As shown in the left image, FCOS works by pre- dicting a 4D vector (l, t, r, b) encoding the location of a bound- ing box at each foreground pixel (supervised by ground-truth bounding box information during training). The right plot shows that when a location residing in multiple bounding boxes, it can be ambiguous in terms of which bounding box this location should regress.

Key components of the architecture include:

  • Multi-level Prediction with FPN: To handle different object scales and resolve "ambiguity" (when a pixel falls into multiple overlapping ground-truth boxes), FCOS uses a Feature Pyramid Network (FPN). Different levels of the pyramid are responsible for different size ranges of objects.
  • Center-ness Branch: This is the paper's most novel contribution. The authors observed that pixels far from an object's center often produce low-quality bounding box predictions. They added a single-layer branch that predicts a "center-ness" score (from 0 to 1) for each pixel. During testing, this score is multiplied by the classification score to down-weight and filter out these low-quality boxes.
  • Shared Heads: The detection heads (classification, regression, and center-ness) are shared across all FPN levels, making the model parameter-efficient.
Figure 2 – The network architecture of FCOS, where C3, C4, and C5 denote the feature maps of the backbone network and P3 to P7 are the feature levels used for the final prediction. H × W is the height and width of feature maps. ‘/s’ (s = 8, 16, ..., 128) is the down- sampling ratio of the feature maps at the level to the input image. As an example, all the numbers are computed with an 800 × 1024 input.

Datasets

The model was trained and evaluated on the MS-COCO (Common Objects in Context) benchmark, specifically using the trainval35k split for training and reporting main results on the test-dev split.

Key Insights and Ideas

  • Anchor-free is viable: FCOS proves that the "anchor-based" paradigm isn't a requirement for high-performance detection. By treating every pixel inside a box as a positive sample, the model has more data to learn from.
  • Center-ness is the "Secret Sauce": Without the center-ness branch, anchor-free detectors often lag behind. By providing a way to suppress "noisy" predictions from the edges of objects, FCOS achieves a cleaner set of final detections.
  • Unified Vision Framework: By making detection look like segmentation, FCOS brings us closer to a unified framework for many instance-level tasks (like keypoint detection or instance segmentation), where ideas can be easily shared across sub-fields.
Figure 3 – Center-ness. Red, blue, and other colors denote 1, 0 and the values between them, respectively. Center-ness is com- puted by Eq. (3) and decays from 1 to 0 as the location deviates from the center of the object. When testing, the center-ness pre- dicted by the network is multiplied with the classification score thus can down-weight the low-quality bounding boxes predicted by a location far from the center of an object.

Key Results

  • State-of-the-Art Performance: FCOS with a ResNeXt-64x4d-101 backbone achieved 44.7% AP on COCO, surpassing previous one-stage detectors like RetinaNet.
  • Simplicity Wins: Even a "pure" version of FCOS (without extra bells and whistles) performs on par with RetinaNet while having 9x fewer output variables.
  • Better RPN: When used as a Region Proposal Network (RPN) in two-stage detectors (like Faster R-CNN), FCOS significantly outperforms traditional anchor-based RPNs.
  • Ablation Success: Table 3 shows that adding simple improvements like Group Normalization (GN) and "center sampling" (only treating the central portion of a box as positive) leads to steady gains in accuracy.
Table 3 – FCOS vs. RetinaNet on the minival split with ResNet-50-FPN as the backbone. Directly using the training and testing settings of RetinaNet, our anchor-free FCOS achieves even better performance than anchor-based RetinaNet both in AP and AR. With Group Normalization (GN) in heads and NMS threshold being 0.6, FCOS can achieve 37.1 in AP. After our submission, some almost cost-free improvements have been made for FCOS and the performance has been improved by a large margin, as shown by the rows below “Improvements”. “ctr. on reg.”: moving the center-ness branch to the regression branch. “ctr. sampling”: only sampling the central portion of ground-truth boxes as positive samples. “GIoU”: penalizing the union area over the circumscribed rectangle’s area in IoU Loss. “Normalization”: normalizing the regression targets in Eq. (1) with the strides of FPN levels. Refer to our code for details.

Limitations and Future Work

  • Ambiguity: While FPN resolves most overlapping box issues, there is still a theoretical limit when two objects of the same category overlap significantly at the same scale level.
  • Hyper-parameter Tuning: While FCOS removes anchor hyper-parameters, it introduces others (like the scale ranges for FPN levels), though the authors argue these are less sensitive.
  • Future Extensions: The authors suggest that the FCOS framework is naturally suited for extension to other instance-level tasks like instance segmentation and key-point detection.

Summary updated

BibTeX
@misc{tian2019fcos,
  author = {Zhi Tian and Chunhua Shen and Hao Chen and Tong He},
  title = {{FCOS: Fully Convolutional One-Stage Object Detection}},
  year = {2019},
  eprint = {1904.01355},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1904.01355},
}
Figure