Paper commentary
FCOS: Fully Convolutional One-Stage Object Detection
FCOS detects objects per pixel without anchor boxes or proposals
- Problem Anchor-based detectors such as Faster R-CNN, SSD and RetinaNet place many predefined boxes on each image. Their results depend on anchor sizes and ratios, and most anchors become negative samples.
- Method FCOS predicts a class score and four distances to the box sides at every pixel, like semantic segmentation. Levels P3 to P7 split objects by size, and a center-ness score down-weights boxes far from object centers before NMS.
- Results FCOS reaches 44.7 AP on COCO test-dev with a ResNeXt-64x4d-101 backbone, single-model and single-scale. With ResNet-101-FPN it reaches 41.5 AP against 39.1 for RetinaNet.
Why anchor boxes are the thing to question
Faster R-CNN, SSD and YOLOv2 all place a set of pre-defined boxes over the image and treat them as the reference for localisation and classification. The authors list four problems with this design: performance depends on anchor sizes, aspect ratios and counts; fixed scales struggle with large shape variation; the density of anchors causes many negatives; and computing overlaps with ground truth adds cost.
In FPN, more than 180K anchor boxes are placed on an image whose shorter side is 800, and most of them end up as negative training samples.
Dense prediction tasks such as semantic segmentation, depth estimation, keypoint detection and counting already rely on fully convolutional networks that predict a value at every pixel. Detection is the high-level task that departs from this pattern, mainly because of anchors, so the authors ask whether detection can be written in the same per-pixel form as semantic segmentation.
DenseBox had already regressed a 4D vector per location, but it cropped and resized training images to a fixed scale, worked on image pyramids, and was believed to fail on generic objects with heavily overlapping boxes.
Per-location targets and outputs
Each location on a feature map is mapped back to the input image near the center of its receptive field, at \( (\lfloor s/2 \rfloor + xs,\ \lfloor s/2 \rfloor + ys) \), where s is the total stride up to that layer. A location inside any ground-truth box is a positive sample and takes that box's class label; every other location is negative and gets the background class 0.
Positives regress four distances from the location to the sides of their box, defined as follows.
\[ l^* = x - x_0^{(i)},\quad t^* = y - y_0^{(i)},\quad r^* = x_1^{(i)} - x,\quad b^* = y_1^{(i)} - y \] A location that falls inside several boxes is ambiguous, and it regresses the box with the smallest area. Later multi-level prediction reduces how often this happens. Because every location inside a box is used, FCOS trains its regressor on more foreground locations than anchor-based detectors, which only use anchors with high enough IOU.
The authors argue this is one reason FCOS can outperform its anchor-based counterparts.
The final layer predicts an 80D classification vector for COCO, trained as C binary classifiers rather than one multi-class classifier, plus a 4D vector of box coordinates. Each branch uses four convolutional layers on the backbone features, and exp is applied to the regression output so that the distances stay in (0,∞). Compared with RetinaNet using 9 anchor boxes per location, this gives 9× fewer network output variables.
Multi-level prediction across FPN levels
Five levels P3 to P7 are built from C3, C4 and C5 with a 1×1 convolution and top-down connections, and P6 and P7 come from stride-2 convolutions on P5 and P6. The levels have strides 8, 16, 32, 64 and 128. Each level has a maximum regression distance, and a location only regresses on a level when its largest regression distance lies within that level's range.
The ranges m2, m3, m4, m5, m6 and m7 are 0, 64, 128, 256, 512 and infinity.
Objects that overlap usually differ a lot in size, so separating them across levels removes most of the overlap that the single-level detector had to resolve. If a location is still in several boxes after this, the smallest-area box is kept as its target. The heads are shared across levels, but the exponential uses exp(s_i x) with a trainable scalar s_i for each level, since the size ranges differ between levels, and this slightly improves detection.
A large stride could lower the best possible recall, since an object no location encodes cannot be recalled at all. The authors found that a single stride-16 level already gives a BPR of 95.55%, higher than RetinaNet's 90.92% under low-quality matches with IOU of at least 0.4, and FPN raises it to 98.40%.
Center-ness and low-quality boxes
A single-layer center-ness branch runs in parallel with the classification branch and predicts how close each location is to the center of the object it is responsible for. Its target is computed from the regression distances as follows, with a square root that slows the decay from 1 to 0. \[ \text{centerness}^* = \sqrt{\frac{\min(l^*,r^*)}{\max(l^*,r^*)} \times \frac{\min(t^*,b^*)}{\max(t^*,b^*)}} \] The center-ness is trained with binary cross entropy and added to the loss.
At test time each detection is ranked by its predicted center-ness multiplied with its classification score, so boxes far from the object center are down-weighted before NMS. The alternative of sampling only the central part of each ground-truth box as positives needs an extra hyper-parameter, and the authors cite later work combining both ideas.
Losses, training and inference settings
The loss sums a focal loss over all locations for classification and an IOU loss over positive locations for regression, normalised by the number of positives. \[ L = \frac{1}{N_{pos}} \sum_{x,y} L_{cls}(p_{x,y}, c^*_{x,y}) + \frac{\lambda}{N_{pos}} \sum_{x,y} \mathbf{1}_{\{c^*_{x,y}>0\}}\, L_{reg}(t_{x,y}, t^*_{x,y}) \] The balance weight λ is 1 in the paper, and the indicator keeps the regression term to locations with c* greater than 0.
Training uses ResNet-50 unless stated otherwise, SGD for 90K iterations, an initial learning rate of 0.01, and a mini-batch of 16 images, with the learning rate reduced by a factor of 10 at iterations 60K and 80K. Weight decay is 0.0001 and momentum is 0.9, the backbone starts from ImageNet weights, and inputs have shorter side 800 and longer side at most 1333.
Test-time post-processing copies RetinaNet's settings, and the authors note that tuning these hyper-parameters for FCOS may improve it.
At inference, a location is kept as a positive candidate when its class score exceeds 0.05, and Eq. (1) is inverted to recover the box from the four distances.
Recall and ambiguity checks
The authors argue the remaining gap of less than 1% does not matter, because current detectors recall well under 90% of ground truth, so recall is not the bottleneck.
Without FPN, 23.16% of positive samples are ambiguous on minival, and with FPN this falls to 7.14%. Counting only overlaps between different categories, the share falls from 17.84% to 3.75% with FPN.
What the center-ness branch adds
On minival, FCOS without center-ness reaches 33.5 AP, and the separate center-ness branch raises it to 37.1. Computing center-ness from the regression vector instead leaves AP at 33.5, so the separate branch is what supplies the gain. RetinaNet uses two IoU thresholds to suppress low-quality predictions, and center-ness removes the need for them, reaching 37.1 AP against 35.9 for RetinaNet.
Matched comparison with RetinaNet on minival
With the C5 feature level and the same settings, FCOS reaches 36.3 AP against 35.9 for RetinaNet. Using P5, Group Normalization in the heads and an NMS threshold of 0.6, FCOS reaches 37.1 AP. The authors used RetinaNet's hyper-parameters throughout, and the GN and P5 choices are FCOS-side changes.
Post-submission changes move the center-ness to the regression branch, use center sampling and GIoU from the work in reference [1], and normalise regression targets by FPN stride. These raise AP to 37.4, 38.1, 38.3 and 38.6 in turn, with the final row using normalisation.
Comparison on COCO test-dev
Test-dev runs use a shorter side randomly scaled from 640 to 800 in training and 180K iterations, with other settings as in the minival model reaching 37.1 AP. With ResNet-101-FPN, FCOS reaches 41.5 AP against 39.1 for RetinaNet with the same backbone, which is the 2.4% AP gap the authors report. With ResNeXt-64x4d-101-FPN, FCOS reaches 43.2 AP, and with the improvements it reaches 44.7 AP under single-model, single-scale testing.
Faster R-CNN with ResNet-101-FPN scores 36.2 AP, and CornerNet with Hourglass-104 scores 40.5 AP, although these rows use different backbones from FCOS. FSAF with ResNeXt-64x4d-101-FPN scores 42.9 AP, which is below the 43.2 AP of FCOS with the same backbone name, and the improved FCOS reaches 44.7.
FCOS as a region proposal network
Keeping the rest of the RPN setup, the authors swap anchors for the FCOS formulation with GN in the FPN heads. The RPN with FPN and GN baseline reaches AR100 of 44.7 with roughly 200K samples, while FCOS with GN and without center-ness reaches 48.0 with roughly 66K samples, and adding center-ness reaches 52.8. On AR1k, the values are 56.9 for the baseline, 59.3 without center-ness and 60.3 with it.
The text describes the AR100 gain as an 18% relative improvement and the AR1k gain as 3.4% absolute.
Why per-pixel prediction may gain over anchors
The authors suggest that using more foreground locations for regression is one reason FCOS can outperform anchor-based detectors. In the class-agnostic analysis, the AP90 is 13.1 for FCOS against 10.6 for the original RetinaNet, and the gain grows at the stricter IOU threshold. The authors read this as a better bounding box regressor, since the gain grows with stricter IOU thresholds.
Limitations
The hyper-parameters, including the NMS threshold and learning rate, come from RetinaNet and were not tuned for FCOS, so the authors expect further gains from tuning. The ambiguity analysis counts only overlaps across different categories, and same-category overlaps are excluded by argument. Center-ness cannot be used directly in RetinaNet with several anchors per location, because one location has one center-ness score while each anchor needs its own.
The authors conjecture that differences in training details, such as the learning rate schedule, may explain part of the gap to the 2% test-dev gain.
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}
}