Paper commentary
FCOS: Fully Convolutional One-Stage Object Detection
Object detection without anchor boxes becomes simpler and more accurate
- Problem Anchor-based detectors place many predefined boxes on each image, and their accuracy depends on anchor sizes and ratios that need careful tuning. Those anchors also add computation and most of them end up as negatives.
- Method FCOS drops anchor boxes and predicts a class and four side distances at each location. Overlapping objects are split across pyramid levels, and a center-ness branch down-ranks off-center boxes.
- Results FCOS reaches 44.7 AP with ResNeXt-64x4d-101 using single-model, single-scale testing. The paper reports it surpasses previous one-stage detectors while being simpler.
Why anchor boxes are hard to live with
Anchor-based detectors such as Faster R-CNN, SSD and YOLOv2 place a pre-defined set of boxes on the image and classify and refine them. Their accuracy depends on the sizes, aspect ratios and number of those anchors. In RetinaNet, changing these settings moves AP by up to 4% on COCO, so they need careful tuning.
Fixed scales and aspect ratios also struggle with objects whose shapes vary a lot, especially small ones. The same anchor design has to be redone for each new task with different object sizes. Dense placement is another cost: FPN needs more than 180K anchor boxes for an image whose shorter side is 800, and most of them become negatives. Computing the IoU between every anchor and the ground-truth boxes adds more work on top of that.
Fully convolutional networks already handle dense prediction well in segmentation, depth and keypoint tasks. Object detection is almost the only high-level task that departs from this per-pixel pattern, mainly because of anchors. Earlier FCN-style detectors such as DenseBox resized images to a fixed scale, which forced detection over image pyramids, and they were mostly used for text and faces.
A per-location detector and why overlaps should be manageable
The key idea is to treat each location inside a ground-truth box as a training sample and to predict a class plus four distances to that box's sides. Each location therefore plays the role a pixel plays in semantic segmentation. The main obstacle is overlap, because one location can sit inside several boxes and it is then unclear which box it should regress.
The authors' answer is to spread objects over several pyramid levels, so that overlapping objects of very different sizes land on different levels. They also expect more positives to help, because FCOS trains on every foreground location rather than only on anchors with a high IoU. Center-ness then handles the low-quality predictions that remain from locations far away from an object's center.
From a feature location to a training target
Each feature map has a total stride s, and a location (x, y) on it maps back to the input image near the center of its receptive field. A ground-truth box is given by two corners and a class, and a location counts as positive when it falls inside any such box. A positive location takes the class of the box it falls in, and every other location is background with class 0.
For a positive location, the regression target is the distance from the location to each of the four box sides, written as \( l^*, t^*, r^*, b^* \). For box corners \( (x_0^{(i)}, y_0^{(i)}) \) and \( (x_1^{(i)}, y_1^{(i)}) \), these are \( l^* = x - x_0^{(i)} \), \( t^* = y - y_0^{(i)} \), \( r^* = x_1^{(i)} - x \) and \( b^* = y_1^{(i)} - y \).
If a location lies in several boxes, it takes the box with the smallest area as its target.
The network outputs C binary class scores per location instead of one multi-class classifier, following RetinaNet. The regression branch passes its four outputs through exp, so the predicted distances stay positive. Because each location makes one prediction, FCOS has 9× fewer network output variables than a detector with 9 anchor boxes per location.
Training minimizes, over all locations, a focal classification loss plus an IOU regression loss, with the sum normalized by the number of positives \( N_{pos} \). The balance weight \( \lambda \) is 1 in this paper, and the regression term applies only where the class target is greater than 0.
At inference the network keeps the locations whose classification score is above 0.05 and inverts Equation (1) to obtain boxes. Each score is then multiplied by the predicted center-ness before NMS filters the boxes.
Assigning objects to pyramid levels
A large stride in the final feature map can lower the best possible recall, because a missed object gets no location at all. The authors show that even with a large stride, FCOS still reaches a good BPR, so the stride is not the main issue. Multi-level FPN prediction raises the BPR further, to match the best that RetinaNet can reach.
FCOS uses five levels, P3 to P7, with strides 8, 16, 32, 64 and 128, built from C3, C4 and C5 and two stride-2 convolutions. Each level has a maximum regression distance \( m_i \), and a location is negative at that level when its largest distance exceeds \( m_i \) or falls below \( m_{i-1} \).
This works because most overlap happens between objects of very different sizes, which the levels separate. The heads are shared across levels, but each level uses \( \exp(s_i x) \) with a trainable scalar \( s_i \), since the size ranges differ by level. The authors report that this scalar slightly improves detection.
Down-weighting boxes far from the center
Even with multi-level prediction, many low-quality boxes come from locations far from an object's center, and they can keep high scores. A single extra layer, run in parallel with the classification branch, predicts center-ness with no new hyperparameter. Its target is the square root of the product of two ratios, the smaller over the larger distance on each axis.
The square root slows the decay, and the target lies between 0 and 1, so the branch is trained with binary cross entropy. At test time the predicted center-ness multiplies the classification score, which ranks the boxes. Off-center boxes then rank lower and are more likely to be removed by NMS.
Central sampling is an alternative that treats only the middle part of each box as positive, but it adds one extra hyperparameter. After the submission, the authors report that combining both methods performs better.
Does the stride-16 grid keep enough recall?
In Table 1, FCOS with only P4 at stride 16 reaches a BPR of 95.55%, compared to 90.92% for RetinaNet with low-quality matches at IoU of 0.4 or more. The authors argue that the gap of under 1 point doesn't matter much, because current detectors recall well under 90%.
Ambiguous samples are positives inside overlapping boxes, and without FPN they make up 23.16% of positives. Counting only overlaps between different classes, the ratio falls from 17.84% to 3.75% with multi-level prediction.
What center-ness adds on minival
On minival, plain FCOS scores 33.5 AP without center-ness. Adding the separate branch lifts AP to 37.1, which is above the 35.9 of RetinaNet in the same table. Computing center-ness from the predicted regression vector instead gives 33.5, so it brings no gain.
So the gain depends on the separate branch, not on the score alone. Anchor-based RetinaNet already uses two IoU thresholds to suppress low-quality positives, and center-ness is meant to remove those thresholds. Center-ness is one score per location, so it can't be applied directly to RetinaNet's several anchors per location.
FCOS against RetinaNet under matched settings
Using RetinaNet's training and testing settings, FCOS with C5 scores 36.3 AP, compared to 35.9 for RetinaNet with ResNet-50-FPN. For this fair comparison the authors remove GN and use C5 instead of P5, so the backbone and heads are closer to RetinaNet's.
On the stricter AP90 metric in the class-agnostic appendix, FCOS scores 13.1, compared to 10.6 for the original RetinaNet. The authors read the wider margin at stricter IoU as a sign of better box regression.
Table 8 shows a plain FCOS with C5 at 35.7 AP, equal to RetinaNet with 9 anchors and above RetinaNet with one anchor at 32.5. So the anchor-free head alone matches the 9-anchor baseline in this table.
Test-dev results with deeper backbones
For these runs the authors randomly scale the shorter side from 640 to 800 and double training to 180K iterations. With ResNet-101-FPN on test-dev, FCOS scores 41.5 AP, compared to 39.1 for RetinaNet with the same backbone. The authors describe this as the first anchor-free detector that beats anchor-based ones by a large margin without extra components.
With ResNeXt-64x4d-101-FPN, FCOS reaches 43.2 AP, and the improvements from Table 3 raise it to 44.7. CornerNet reaches 40.5 with Hourglass-104, and its corner grouping needs an embedding step that FCOS avoids. The backbones differ, so that comparison is not matched.
FCOS as a region proposal network
The authors swap the anchors in the RPN with FPN for the FCOS head, and add GN to the FPN heads. Without center-ness, FCOS reaches an AR100 of 48.0 and an AR1k of 59.3, compared to 44.7 and 56.9 for the re-implemented RPN with FPN and GN. With center-ness, AR100 rises to 52.8 and AR1k to 60.3.
The authors describe this as an 18% relative gain on AR100 and a 3.4% absolute gain on AR1k. The sample counts differ, with about 200K samples for the RPN and about 66K for FCOS.
Limits of the evidence
FCOS reuses RetinaNet's hyperparameters, which were tuned for the anchor-based detector, and the authors expect that tuning for FCOS would help. Several gains, such as center sampling, GIoU and normalization, came after the submission as the authors' later changes.
The 2% test-dev gain over RetinaNet is attributed partly to training differences such as the learning-rate schedule. All experiments in the paper run on COCO. The ambiguity analysis counts only overlaps between different classes, so same-class overlap is excluded by design.
Paper info
- Authors
- Zhi Tian, Chunhua Shen, Hao Chen, Tong He
- Venue
- arXiv · Preprint
- First published
- 2019-4-2
- Added
- 2026-11-11
- Updated
- 2019-8-20
- Version
- v5
- arXiv
- 1904.01355
- Category
- cs.CV
- Original paper terms
- CC BY-NC-SA 4.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Zhi Tian, Chunhua Shen, Hao Chen, Tong He (2019). FCOS: Fully Convolutional One-Stage Object Detection. arXiv:1904.01355v5. https://arxiv.org/abs/1904.01355v5
BibTeX
@misc{tian2019fcos,
title = {{FCOS: Fully Convolutional One-Stage Object Detection}},
author = {Zhi Tian and Chunhua Shen and Hao Chen and Tong He},
year = {2019},
eprint = {1904.01355},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1904.01355v5}
}