Computer Vision Lab Models FCOS ResNet-50 FPN
FCOS ResNet-50 FPN
Anchor-free per-pixel detector with centre-ness
Knowledge card: an anchor-free detector that treats detection as per-pixel prediction as in segmentation; it removes tuning of anchor sizes and ratios and reduces hyperparameters.
| Architecture | Anchor-free per-pixel detector with centre-ness |
|---|---|
| Task | Object detection |
| Training data | COCO 2017 |
| the number of parameters | 32,269,600 |
| Framework | PyTorch (torchvision) |
| File size | ≈124 MB |
| Licence | BSD-3-Clause (torchvision code); weights trained on COCO 2017 |
| Where it runs | Knowledge card only |
| Official source | pytorch.org |
| Official weights | download.pytorch.org |
Published metrics (from the official source, not measured by this site)
| Metric | Value | Evaluation data | Source |
|---|---|---|---|
| box mAP | 39.2 | COCO val2017 | Source |
Architecture diagram
- Input / output
- Convolutional layer
- Composite block
- Memory / intermediate features
- Output head
- Operation (add, multiply, merge)
Detailed model explanation
Idea and intuition
FCOS (Fully Convolutional One-Stage) abandons anchors entirely and treats detection as semantic segmentation is treated: every pixel of the feature map that falls inside a ground-truth box counts as a positive example, and it directly predicts the four distances from its location to the box edges. The anchor-specific hyperparameters (sizes, ratios and IoU thresholds for assignment) disappear.
Components
- A backbone with FPN (P3–P7); each object is assigned to a level according to the largest distance
\max(l,t,r,b)to reduce ambiguity when boxes overlap. - A classification branch with focal loss.
- A regression branch that predicts
(l,t,r,b). - A «centerness» branch estimates how close the pixel is to the object centre, and is multiplied by the classification score to suppress poor boxes produced by pixels far from the centre.
Mathematical formulation
l^*=x-x_0,\; t^*=y-y_0,\; r^*=x_1-x,\; b^*=y_1-y\mathrm{centerness}^* = \sqrt{\frac{\min(l^*,r^*)}{\max(l^*,r^*)}\cdot\frac{\min(t^*,b^*)}{\max(t^*,b^*)}}The regression loss is computed with IoU loss between the predicted and ground-truth box, and the centerness loss with binary cross-entropy.
Performance
The torchvision release FCOS ResNet-50 FPN: about 32.3 million parameters and box mAP = 39.2 on COCO val2017.
Strengths and limitations
- Strength: fewer hyperparameters and a simpler design, and lighter training memory because IoU is not computed against thousands of anchors.
- Strength: the per-pixel formulation makes it easy to extend to other dense tasks.
- Limitation: still needs NMS after prediction.
- Limitation: sensitivity to how overlapping objects are assigned to levels.
Uses
General detection, the basis for later anchor-free detectors.
Runtime requirements
—
How to load
Not loaded in the lab (knowledge card).
References
- Z. Tian, C. Shen, H. Chen, T. He (2019).FCOS: Fully Convolutional One-Stage Object Detection. arXiv:1904.01355 (ICCV 2019). doi:10.48550/arXiv.1904.01355
- T.-Y. Lin, P. Dollár, R. Girshick, K. He, B. Hariharan, S. Belongie (2016).Feature Pyramid Networks for Object Detection. arXiv:1612.03144 (CVPR 2017). doi:10.48550/arXiv.1612.03144
- T.-Y. Lin, P. Goyal, R. Girshick, K. He, P. Dollár (2017).Focal Loss for Dense Object Detection. arXiv:1708.02002 (ICCV 2017). doi:10.48550/arXiv.1708.02002
