# FCOS

**FCOS**（Fully Convolutional One-Stage Object Detection，全卷积单阶段目标检测）是一种无锚框的单阶段目标检测器，它将检测视为逐像素预测，正如全卷积网络执行语义分割那样。该方法由田智（Zhi Tian）、沈春华（Chunhua Shen）、陈浩（Hao Chen）和何通（Tong He）提出，发表于 ICCV 2019。<sup>[1](https://arxiv.org/abs/1904.01355)</sup><sup> • </sup><sup>[2](https://bibbase.org/network/publication/tian-shen-chen-he-fcosfullyconvolutionalonestageobjectdetection)</sup> FCOS 不像 [RetinaNet](https://www.edgepedia.org/zh/retinanet)、SSD、YOLOv3 和 Faster R-CNN 那样在每个特征图位置上放置预定义的锚框，而是在每个位置直接回归边界框，从而消除了与锚框相关的计算和所有锚框超参数。<sup>[1](https://arxiv.org/abs/1904.01355)</sup>

| 关键事实 | 详情 |
|---|---|
| 发表 | ICCV 2019，第 9626–9635 页，DOI 10.1109/ICCV.2019.00972；作者：田智、沈春华、陈浩、何通<sup>[2](https://bibbase.org/network/publication/tian-shen-chen-he-fcosfullyconvolutionalonestageobjectdetection)</sup> |
| 设计 | 无锚框且无候选框；逐像素预测，类似于语义分割；NMS 是唯一的后处理步骤<sup>[1](https://arxiv.org/abs/1904.01355)</sup> |
| 标志性结果 | 使用 ResNeXt-64x4d-101，单模型单尺度测试，在 COCO 上达到 44.7% AP<sup>[1](https://arxiv.org/abs/1904.01355)</sup> |
| 输出效率 | 网络输出变量数仅为每个位置使用 9 个锚框的基于锚框的检测器的九分之一<sup>[3](https://openaccess.thecvf.com/content_ICCV_2019/papers/Tian_FCOS_Fully_Convolutional_One-Stage_Object_Detection_ICCV_2019_paper.pdf)</sup> |
| 速度对比 Faster R-CNN | 使用 ResNet-50-FPN：训练 6.5 小时对 8.8 小时，每张图像推理 44 毫秒对 56 毫秒<sup>[4](https://github.com/tianzhi0549/FCOS)</sup> |
| 最佳报告模型 | 使用 ResNeXt-64x4d-101 和可变形卷积，多尺度测试，在 COCO test-dev 上达到 49.0% AP<sup>[4](https://github.com/tianzhi0549/FCOS)</sup> |
| 可用性 | 官方 PyTorch 代码（3.3k 星标，618 复刻）；也在 torchvision 和 mmdetection 中实现<sup>[4](https://github.com/tianzhi0549/FCOS)</sup><sup> • </sup><sup>[5](https://docs.pytorch.org/vision/stable/models/fcos.html)</sup> |

## 工作原理

**逐像素预测。** FCOS 将特征图上的每个位置 \((x, y)\) 视为一个训练样本，正如全卷积网络在分割中对待像素那样。如果一个位置落在任何真实标注框内，它就是正样本，并采用该框的类别标签；否则为背景。网络不回归相对于锚框的偏移量，而是预测一个 4D 向量 \( t^* = (l^*, t^*, r^*, b^*) \)，即该位置到边界框左、上、右、下四边的距离：<sup>[3](https://openaccess.thecvf.com/content_ICCV_2019/papers/Tian_FCOS_Fully_Convolutional_One-Stage_Object_Detection_ICCV_2019_paper.pdf)</sup>

\[
l^* = x - x_0^{(i)}, \quad t^* = y - y_0^{(i)}, \quad r^* = x_1^{(i)} - x, \quad b^* = y_1^{(i)} - y.
\]

最终层为每个位置预测一个 80 维分类向量和 4 维框向量，按照 RetinaNet 的方式训练为 \( C \) 个二分类器。由于回归目标始终为正，使用 \( \exp(x) \) 映射将预测值映射到 \( (0, \infty) \)。训练损失将用于分类的焦点损失与用于回归的 UnitBox 的 IoU 损失相结合，权重为 \( \lambda = 1 \)，并按正样本数 \( N_{pos} \) 归一化。推理时，保留分类分数 \( p_{x,y} > 0.05 \) 的位置，并根据距离反推出框坐标。<sup>[3](https://openaccess.thecvf.com/content_ICCV_2019/papers/Tian_FCOS_Fully_Convolutional_One-Stage_Object_Detection_ICCV_2019_paper.pdf)</sup>

**中心度。** 由于远离物体中心的位置往往产生低质量的框，FCOS 增加了一个独立的中心度分支，预测一个位置与其物体中心的接近程度。推理时，分类分数乘以中心度，\( \text{score} = \text{cls} \times \text{centerness} \)，在非极大值抑制之前抑制低质量候选框。论文中的消融实验表明，加入该分支后 AP 从 33.5% 升至 37.1%，而如果仅从回归值推导中心度，则不会出现这种提升，作者据此认为独立分支是必要的。<sup>[6](https://docsaid.org/en/papers/object-detection/fcos/)</sup>

**多层级预测。** 通过特征金字塔网络（FPN）解决了两个问题。第一，最终特征图上较大的步长（如 \( 16\times \)）可能降低最佳可能召回率（BPR），即检测器能达到的召回率上限；论文通过实验表明，FCOS 仍能达到良好的 BPR，甚至在官方 Detectron 实现中优于基于锚框的 RetinaNet，而 FPN 预测进一步提升了它。第二，当一个位置落在多个真实标注框内时，回归目标的选择存在歧义；FCOS 通过分配最小面积的框来解决这一问题，更重要的是，通过在不同 FPN 层级上检测不同大小的物体，减少了歧义样本的数量，使其几乎不影响性能。<sup>[3](https://openaccess.thecvf.com/content_ICCV_2019/papers/Tian_FCOS_Fully_Convolutional_One-Stage_Object_Detection_ICCV_2019_paper.pdf)</sup>

## 性能

**对比基于锚框的检测器。** 使用 ResNet-50，这个简单的单阶段检测器达到 38.7 AP，而 Faster R-CNN 为 36.8，同时训练时间为 6.5 小时而非 8.8 小时，每张图像推理快 12 毫秒（44 毫秒对 56 毫秒）。<sup>[4](https://github.com/tianzhi0549/FCOS)</sup> 在 COCO test-dev 划分上使用多尺度训练，采用 ResNet-101-FPN 的 FCOS 比相同骨干的 RetinaNet 高出 4.1 AP（43.2% 对 39.1%），比带 FPN 的两阶段 Faster R-CNN 高出更大差距（43.2% 对 36.2%）。<sup>[7](https://www.researchgate.net/publication/342229509_FCOS_A_simple_and_strong_anchor-free_object_detector)</sup> 在控制为 RetinaNet 设置的对比中，移除 GroupNorm 并从 C5 生成 P6/P7，直接复制 RetinaNet 的学习率和 NMS 超参数，FCOS 仍略优于 RetinaNet（36.3% 对 35.9% AP）。<sup>[6](https://docsaid.org/en/papers/object-detection/fcos/)</sup>

**对比其他无锚框检测器。** FCOS 还优于早期的无锚框检测器 CornerNet 和 [CenterNet](https://www.edgepedia.org/zh/centernet)，同时更为简单，因为那些方法需要用嵌入向量对预测的角点进行分组，而逐像素方法避免了这种特殊设计。<sup>[7](https://www.researchgate.net/publication/342229509_FCOS_A_simple_and_strong_anchor-free_object_detector)</sup>

**后续结果。** 发布的模型库改进了论文中的数字：最佳配置 ResNeXt-64x4d-101 配合可变形卷积，在多尺度测试下于 COCO test-dev 上达到 49.0% AP，一个实时变体在 COCO minival 上以 40.3 AP 达到 46 FPS。<sup>[4](https://github.com/tianzhi0549/FCOS)</sup> 在自然分布偏移下，COCO-O 基准（ICCV 2023）测得 FCOS 的域内 mAP 为 36.6，为鲁棒性比较提供了基线。<sup>[8](https://openaccess.thecvf.com/content/ICCV2023/papers/Mao_COCO-O_A_Benchmark_for_Object_Detectors_under_Natural_Distribution_Shifts_ICCV_2023_paper.pdf)</sup>

## 无锚框为何重要

基于锚框的检测器在每个位置放置多个尺度和长宽比的预定义框，其超参数（如锚框大小和长宽比）对最终检测性能敏感；训练还需要计算锚框与真实标注之间的重叠。FCOS 移除了整个设计层：网络输出变量数仅为每个位置使用 9 个锚框的检测器的九分之一；它可以使用真实标注框内的所有位置作为正回归样本，而基于锚框的检测器仅将 IoU 足够高的锚框计为正样本，作者认为这是 FCOS 优于基于锚框的对应方法的原因之一。<sup>[1](https://arxiv.org/abs/1904.01355)</sup><sup> • </sup><sup>[3](https://openaccess.thecvf.com/content_ICCV_2019/papers/Tian_FCOS_Fully_Convolutional_One-Stage_Object_Detection_ICCV_2019_paper.pdf)</sup>

论文的核心主张——一个更简单、更灵活的检测框架也能提高精度——影响了一系列后续工作。NAS-FCOS 使用神经架构搜索为该无锚框检测器设计 FPN 和预测头，在 COCO 上以 1.5 到 3.5 AP 超越 Faster R-CNN、RetinaNet 和 FCOS。<sup>[9](https://arxiv.org/abs/1906.04423)</sup> 逐像素建模方式在 FCOS-LiDAR 中扩展到三维，这是一种全卷积单阶段 3D 检测器，在激光雷达距离图像上运行，用于自动驾驶场景。<sup>[10](https://arxiv.org/abs/2205.13764)</sup> 后来的标签分配研究，如 ATSS，将 FCOS 的基于中心的分配作为其两种参考范式之一，并指出 FCOS 的小中心区域（半径 1.5）将正样本集中在物体中心附近。<sup>[11](https://pmc.ncbi.nlm.nih.gov/articles/PMC10384063/)</sup>

## 可用性

官方实现基于 PyTorch，托管在 GitHub 上，构建于 maskrcnn-benchmark，AdelaiDet 中有 [Detectron2](https://www.edgepedia.org/zh/detectron2) 版本；据报道，训练完整的 ResNet-50-FPN 模型可容纳在 4 块 GTX 1080Ti GPU 上，因为该检测器内存效率高。<sup>[4](https://github.com/tianzhi0549/FCOS)</sup> torchvision 通过 `torchvision.models.detection.fcos.FCOS` 提供预训练的 FCOS 模型，mmdetection 包含 FCOS 配置。<sup>[5](https://docs.pytorch.org/vision/stable/models/fcos.html)</sup>

## References

1. [Zhi Tian, Chunhua Shen, Hao Chen, Tong He (2019). FCOS: Fully Convolutional One-Stage Object Detection. arXiv:1904.01355.](https://arxiv.org/abs/1904.01355)
2. [FCOS: Fully Convolutional One-Stage Object Detection, ICCV 2019 bibliographic record (DOI 10.1109/ICCV.2019.00972).](https://bibbase.org/network/publication/tian-shen-chen-he-fcosfullyconvolutionalonestageobjectdetection)
3. [Tian et al., FCOS, ICCV 2019 paper (CVF open access).](https://openaccess.thecvf.com/content_ICCV_2019/papers/Tian_FCOS_Fully_Convolutional_One-Stage_Object_Detection_ICCV_2019_paper.pdf)
4. [tianzhi0549/FCOS, official GitHub repository.](https://github.com/tianzhi0549/FCOS)
5. [FCOS, Torchvision documentation.](https://docs.pytorch.org/vision/stable/models/fcos.html)
6. [FCOS paper walkthrough, DOCSAID.](https://docsaid.org/en/papers/object-detection/fcos/)
7. [Tian et al., FCOS: A simple and strong anchor-free object detector (extended version), ResearchGate.](https://www.researchgate.net/publication/342229509_FCOS_A_simple_and_strong_anchor-free_object_detector)
8. [Mao et al. (2023). COCO-O: A Benchmark for Object Detectors under Natural Distribution Shifts, ICCV 2023.](https://openaccess.thecvf.com/content/ICCV2023/papers/Mao_COCO-O_A_Benchmark_for_Object_Detectors_under_Natural_Distribution_Shifts_ICCV_2023_paper.pdf)
9. [Wang et al. (2019). NAS-FCOS: Fast Neural Architecture Search for Object Detection. arXiv:1906.04423.](https://arxiv.org/abs/1906.04423)
10. [FCOS-LiDAR: Fully Convolutional One-Stage 3D Object Detection on LiDAR Range Images. arXiv:2205.13764.](https://arxiv.org/abs/2205.13764)
11. [The Lightweight Anchor Dynamic Assignment Algorithm for Object Detection, PMC.](https://pmc.ncbi.nlm.nih.gov/articles/PMC10384063/)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Language and vision AI › Computer vision

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/fcos

English original: https://www.edgepedia.org/fcos
