# 小样本目标检测

小样本目标检测（Few-shot object detection，FSOD）是一项机器学习任务：检测器必须仅凭少量带标注样本识别并定位新类别的目标，同时基类的训练数据仍然充足。形式化地，训练集为 \( D = D_{\mathrm{base}} \cup D_{\mathrm{novel}} \)，其中基类与新类类别不相交；在 K 样本检测中，每个新类恰好有 K 个标注实例；\( K = 1 \) 是最困难的情形。<sup>[1](https://www.db-thueringen.de/servlets/MCRFileNodeServlet/dbt_derivate_00064730/2162-237X_0_2023_11958-11978.pdf)</sup> 模型以图像为输入，输出类别标签及边界框。在标注代价高昂的场景中，这一设定很重要，例如罕见病或野生动物监测。<sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S156625352400085X)</sup>

| 关键事实 | 细节 |
|---|---|
| 一个“样本” | 每个新类恰好 K 个标注实例；标准设置采用 \( K = 1, 2, 3, 5, 10 \)（COCO 上还采用 30）<sup>[1](https://www.db-thueringen.de/servlets/MCRFileNodeServlet/dbt_derivate_00064730/2162-237X_0_2023_11958-11978.pdf)</sup><sup> • </sup><sup>[3](https://openaccess.thecvf.com/content_ICCV_2019/papers/Kang_Few-Shot_Object_Detection_via_Feature_Reweighting_ICCV_2019_paper.pdf)</sup> |
| 标准基准 | PASCAL VOC（15 个基类/5 个新类，3 种随机划分，AP50）与 MS COCO（60 个基类/20 个新类，COCO 风格 mAP）<sup>[3](https://openaccess.thecvf.com/content_ICCV_2019/papers/Kang_Few-Shot_Object_Detection_via_Feature_Reweighting_ICCV_2019_paper.pdf)</sup> |
| 指标 | nAP（新类）、bAP（基类）、总体 AP；AP50:95、AP50，以及更严格的 AP75<sup>[1](https://www.db-thueringen.de/servlets/MCRFileNodeServlet/dbt_derivate_00064730/2162-237X_0_2023_11958-11978.pdf)</sup><sup> • </sup><sup>[4](https://proceedings.mlr.press/v119/wang20j.html)</sup> |
| 关键微调结果 | TFA（2020）在 VOC 和 COCO 上以 2–20 个点胜过此前的元学习方法<sup>[4](https://proceedings.mlr.press/v119/wang20j.html)</sup> |
| COCO 30 样本参考数值 | 采用余弦相似度分类的 TFA：总体 AP 28.7，10 次随机抽样的平均 nAP 为 12.1<sup>[5](http://proceedings.mlr.press/v119/wang20j/wang20j-supp.pdf)</sup> |
| 评估注意事项 | 单次运行的 1 样本 AP50 相比 40 次运行平均值高估约 15 个点<sup>[5](http://proceedings.mlr.press/v119/wang20j/wang20j-supp.pdf)</sup> |
| 近期转变 | 零样本 GroundingDINO 在 COCO FSOD 基准上达到 48.3 AP，高于所列全部专用小样本方法<sup>[6](https://proceedings.neurips.cc/paper_files/paper/2024/file/22b2067b8f680812624032025864c5a1-Paper-Datasets_and_Benchmarks_Track.pdf)</sup> |

## 工作原理

几乎所有 FSOD 方法都遵循先基类后新类的两阶段范式：检测器首先利用标注充足的 \( D_{\mathrm{base}} \) 学习，然后仅用每类少量样本快速适应 \( D_{\mathrm{novel}} \)。<sup>[7](https://doi.org/10.48550/arxiv.2108.09017)</sup> 核心困难是一个两难困境：只在 \( D_{\mathrm{novel}} \) 上训练会迅速过拟合，而在不平衡的合并数据上训练会产生严重偏向基类的检测器。<sup>[1](https://www.db-thueringen.de/servlets/MCRFileNodeServlet/dbt_derivate_00064730/2162-237X_0_2023_11958-11978.pdf)</sup>

有三类策略应对这一问题。TFA 等迁移学习方法先在基类上训练完整检测器，然后在一个小型、平衡的基类加新类集合上只微调框分类器和框回归器，同时冻结特征提取器，并对归一化后的实例特征使用余弦相似度分类。<sup>[4](https://proceedings.mlr.press/v119/wang20j.html)</sup> 联合基类训练损失为

\[ L = L_{\mathrm{rpn（区域提议网络，即检测器中提出候选目标框的阶段）}} + L_{\mathrm{cls}} + L_{\mathrm{loc}} \]

其中 \( L_{\mathrm{rpn}} \) 区分前景与背景，\( L_{\mathrm{cls}} \) 是框分类器的交叉熵，\( L_{\mathrm{loc}} \) 是框回归器的平滑 L1。<sup>[4](https://proceedings.mlr.press/v119/wang20j.html)</sup> FSRW 和 Meta R-CNN 等元学习方法将支持图像及已标注目标的二值掩码输入元学习器，由元学习器生成类别重加权向量，对查询图像特征进行调制。<sup>[4](https://proceedings.mlr.press/v119/wang20j.html)</sup> 基于原型的方法借鉴原型网络（Prototypical Networks）<sup>[8](https://doi.org/10.48550/arxiv.1703.05175)</sup>，用原型表示每个类别，原型通常是其支持目标的平均特征向量。<sup>[9](https://xiongweiwu.github.io/papers/MM2020_meta.pdf)</sup>

## 具体做法

标准流程是基类训练、少样本微调，以及联合评估并报告 bAP 与 nAP。<sup>[10](https://github.com/gabrielhuang/awesome-few-shot-object-detection)</sup> 基准采用随 FSRW 引入的划分：[PASCAL VOC](https://www.edgepedia.org/zh/pascal-voc) 包含 15 个基类和 5 个新类，在 \( K = 1, 2, 3, 5, 10 \) 下使用 3 种随机划分，在 VOC07 测试集上以 AP50 评估；MS COCO 包含 60 个基类和 20 个与 VOC 重叠的新类，在 \( K = 10 \) 和 30 下，在 5k 验证图像上以 COCO 风格 mAP 评估。<sup>[3](https://openaccess.thecvf.com/content_ICCV_2019/papers/Kang_Few-Shot_Object_Detection_via_Feature_Reweighting_ICCV_2019_paper.pdf)</sup><sup> • </sup><sup>[7](https://doi.org/10.48550/arxiv.2108.09017)</sup> MS COCO 约含 33 万张图像（约 20 万张有标注），覆盖 80 个类别、约 150 万个实例；LVIS 在 1,000 多个类别上增加约 200 万条标注，其中高频类和常见类作为基类，稀有类作为新类。<sup>[11](https://dl.acm.org/doi/fullHtml/10.1145/3519022)</sup><sup> • </sup><sup>[4](https://proceedings.mlr.press/v119/wang20j.html)</sup> 范（Fan）、齐（Qi）及其同事（2019）的 Attention-RPN 工作附带了一个 1,000 类 FSOD 数据集。<sup>[12](https://doi.org/10.48550/arxiv.1908.01998)</sup><sup> • </sup><sup>[11](https://dl.acm.org/doi/fullHtml/10.1145/3519022)</sup>

COCO 的主要指标是 AP50:95，即在 IoU 阈值 0.5 到 0.95 上取平均的 AP；AP50 对应 Pascal VOC 指标，AP75 只统计 IoU 高于 0.75 的检测。<sup>[1](https://www.db-thueringen.de/servlets/MCRFileNodeServlet/dbt_derivate_00064730/2162-237X_0_2023_11958-11978.pdf)</sup> 由于少样本结果会随抽取到哪些支持样本而强烈变化，TFA 确立了在 VOC 上报告 30 个随机组、在 COCO 上报告 10 个随机组并给出 95% 置信区间的做法。<sup>[4](https://proceedings.mlr.press/v119/wang20j.html)</sup>

## 起源

综述对哪篇论文定义了这一任务存在分歧：一篇综述认为陈浩（Hao Chen）及其同事（2018，arXiv）的 LSTD（Low-Shot Transfer Detector，低样本迁移检测器）是第一篇标准 FSOD 论文<sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S156625352400085X)</sup><sup> • </sup><sup>[13](https://doi.org/10.48550/arxiv.1803.01529)</sup>，而康炳义（Bingyi Kang）及其同事（2018，arXiv，发表于 ICCV 2019）的 FSRW 论文则被认为提出了该设定和最常采用的基准。<sup>[3](https://openaccess.thecvf.com/content_ICCV_2019/papers/Kang_Few-Shot_Object_Detection_via_Feature_Reweighting_ICCV_2019_paper.pdf)</sup><sup> • </sup><sup>[14](https://doi.org/10.48550/arxiv.1812.01866)</sup> FSRW 在 YOLOv2 上使用元特征学习器和重加权模块，并以情景式两阶段学习进行端到端训练。<sup>[3](https://openaccess.thecvf.com/content_ICCV_2019/papers/Kang_Few-Shot_Object_Detection_via_Feature_Reweighting_ICCV_2019_paper.pdf)</sup> 严小鹏（Xiaopeng Yan）及其同事（2019，arXiv）的 Meta R-CNN 将元学习扩展到实例（RoI）级别。<sup>[15](https://doi.org/10.48550/arxiv.1909.13032)</sup> 转折点出现在王鑫（Xin Wang）及其同事（2020，arXiv）的 TFA：它表明，采用修订的多随机种子协议的简单微调就能胜过元学习方法。<sup>[4](https://proceedings.mlr.press/v119/wang20j.html)</sup><sup> • </sup><sup>[16](https://doi.org/10.48550/arxiv.2003.06957)</sup>

## 变体

**TFA** 冻结特征提取器，只微调最后的框分类层和框回归层，新类头使用随机初始化权重，学习率降低 20 倍。<sup>[4](https://proceedings.mlr.press/v119/wang20j.html)</sup> **DeFRCN**，由乔利蒙（Limeng Qiao）及其同事（2021，arXiv）提出，扩展了 Faster R-CNN<sup>[17](https://doi.org/10.1109/tpami.2016.2577031)</sup>，加入梯度解耦层（Gradient Decoupled Layer）将 RPN 与 RCNN 阶段分离，并加入原型校准模块（Prototypical Calibration Block，PCB）将分类与定位解耦；PCB 可作为即插即用模块，为其他方法增加 1.4–3.0 个点。<sup>[7](https://doi.org/10.48550/arxiv.2108.09017)</sup> **FSCE**，由孙博（Bo Sun）及其同事（2021，arXiv）提出，在 TFA 基础上解冻 RPN 和 RoI 头，向前传递更多提议，使用余弦相似度分数，并加入对比提议编码损失。<sup>[18](https://arxiv.org/html/2410.15315)</sup><sup> • </sup><sup>[19](https://doi.org/10.48550/arxiv.2103.05950)</sup>

2019/2020 年有两篇论文名称几乎相同。Meta R-CNN（严小鹏及其同事，2019）执行 RoI 级元学习<sup>[15](https://doi.org/10.48550/arxiv.1909.13032)</sup>；另一篇不同的 Meta-RCNN 同时对 RPN 和分类分支进行元学习，将每个类别原型计算为支持特征向量的均值，并通过类别感知注意力将其与查询图结合，\( f = z \odot \varphi(p) \)。<sup>[9](https://xiongweiwu.github.io/papers/MM2020_meta.pdf)</sup> **Meta Faster R-CNN**，由韩广兴（Guangxing Han）及其同事（2021，arXiv）提出，用元分类器（Meta-Classifier）替换线性 RPN 分类器。<sup>[20](https://doi.org/10.48550/arxiv.2104.07719)</sup><sup> • </sup><sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S156625352400085X)</sup> **SRR-FSD** 将实例投影到由类别词嵌入构建的语义空间。<sup>[11](https://dl.acm.org/doi/fullHtml/10.1145/3519022)</sup> **DE-ViT** 完全移除微调：使用冻结的 DINOv2 ViT 主干、由裁剪后的支持特征平均得到的类别原型、背景原型，以及用于定位的区域传播机制。<sup>[21](https://arxiv.org/html/2309.12969v4)</sup> 开源 MMFewShot 工具箱标准化了 TFA、FSCE 和 Meta R-CNN 的实现，以便可复现比较。<sup>[22](https://dl.acm.org/doi/10.1145/3790093)</sup>

## 应用

FSOD 应用于新类别出现且标签稀少的场景：罕见病医学影像、野生动物保护、工业检测、安全与监控，以及遥感。<sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S156625352400085X)</sup> 在 DIOR 遥感数据上，元检测器在 2–3 样本时更准确，而迁移检测器在 5、10 和 20 样本时领先；微调方法相比基于元学习的方法对基类性能的牺牲也更小。<sup>[23](https://www.mdpi.com/2072-4292/14/18/4435)</sup> 扩展方向涵盖视频检测和 3D 检测，其中 NTIRE 2025 和 CVPR 2025 挑战赛设立了新的跨域基准。<sup>[22](https://dl.acm.org/doi/10.1145/3790093)</sup>

## 局限与替代方案

主要失败模式源于数据不平衡：对少量新类样本过拟合、严重偏向基类，以及在非平衡数据上微调时对基类的灾难性遗忘；在一项采用第 3 种划分的 10 样本 VOC 实验中，这使 MDFAC 和 DeFRCN 的基类 mAP 都降到 0。<sup>[1](https://www.db-thueringen.de/servlets/MCRFileNodeServlet/dbt_derivate_00064730/2162-237X_0_2023_11958-11978.pdf)</sup><sup> • </sup><sup>[24](https://link.springer.com/article/10.1007/s40747-025-02053-x)</sup> 单次运行评估加剧了这一问题，将 1 样本 AP50 高估约 15 个点<sup>[5](http://proceedings.mlr.press/v119/wang20j/wang20j-supp.pdf)</sup>；并且康炳义的划分已被证明方差很大，且在低样本数下相比 TFA 的划分会高估性能。

专用 FSOD 方法还面临更简单的基线和基础模型。2024 年的一项比较发现，TFA 和 FSCE 在闭集或开放词汇设定中“并不优于标准 Full-FT”。<sup>[18](https://arxiv.org/html/2410.15315)</sup> 视觉语言模型（vision-language models，VLM）改变了局面：零样本 GroundingDINO 在 30 样本的 COCO FSOD 基准上达到 48.3 AP（基类 46.3，新类 54.3），高于 DiGeo（33.1 AP）和 Retentive R-CNN（32.9 AP）等专用方法。<sup>[6](https://proceedings.neurips.cc/paper_files/paper/2024/file/22b2067b8f680812624032025864c5a1-Paper-Datasets_and_Benchmarks_Track.pdf)</sup> 对于容易用文本描述的类别，开放词汇检测方法胜过闭集检测器，但对于难以描述的类别，差距缩小到几乎为零（在第 3 种划分上 \( K = 3 \) 时，GLIP(A) 39.7 AP 对 DyHead 39.2 AP）。<sup>[18](https://arxiv.org/html/2410.15315)</sup> 由于传统基准包含 VLM 已经能检测到的常见概念，有人提出在 nuImages 上以“基础模型 FSOD”（Foundational FSOD）重新构建问题，其中 VLM 在 K 样本标注上微调。<sup>[6](https://proceedings.neurips.cc/paper_files/paper/2024/file/22b2067b8f680812624032025864c5a1-Paper-Datasets_and_Benchmarks_Track.pdf)</sup> FSOD 也属于一类减少监督的设定：有限监督、半监督和弱监督 FSOD 的区别在于可访问何种监督，而零样本检测是完全没有任何目标类样本的边界情形。<sup>[25](https://ar5iv.labs.arxiv.org/html/2111.00201)</sup><sup> • </sup><sup>[2](https://www.sciencedirect.com/science/article/abs/pii/S156625352400085X)</sup>

## References

1. [Few-shot object detection: a comprehensive survey](https://www.db-thueringen.de/servlets/MCRFileNodeServlet/dbt_derivate_00064730/2162-237X_0_2023_11958-11978.pdf)
2. [Few-shot object detection: Research advances and challenges (Information Fusion, 2024)](https://www.sciencedirect.com/science/article/abs/pii/S156625352400085X)
3. [Few-Shot Object Detection via Feature Reweighting (FSRW)](https://openaccess.thecvf.com/content_ICCV_2019/papers/Kang_Few-Shot_Object_Detection_via_Feature_Reweighting_ICCV_2019_paper.pdf)
4. [Frustratingly Simple Few-Shot Object Detection (TFA)](https://proceedings.mlr.press/v119/wang20j.html)
5. [TFA Supplementary Material (full benchmark tables)](http://proceedings.mlr.press/v119/wang20j/wang20j-supp.pdf)
6. [Revisiting Few-Shot Object Detection with Vision-Language Models (NeurIPS 2024 Datasets and Benchmarks)](https://proceedings.neurips.cc/paper_files/paper/2024/file/22b2067b8f680812624032025864c5a1-Paper-Datasets_and_Benchmarks_Track.pdf)
7. [Qiao, Limeng and colleagues (2021). DeFRCN: Decoupled Faster R-CNN for Few-Shot Object Detection. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2108.09017)
8. [Snell, Jake, Swersky, Kevin, Zemel, Richard S. (2017). Prototypical Networks for Few-shot Learning. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1703.05175)
9. [Meta-RCNN: Meta Learning for Few-Shot Object Detection (ACM MM 2020)](https://xiongweiwu.github.io/papers/MM2020_meta.pdf)
10. [awesome-few-shot-object-detection leaderboard](https://github.com/gabrielhuang/awesome-few-shot-object-detection)
11. [Few-Shot Object Detection: A Survey (ACM Computing Surveys)](https://dl.acm.org/doi/fullHtml/10.1145/3519022)
12. [Fan, Qi and colleagues (2019). Few-Shot Object Detection with Attention-RPN and Multi-Relation Detector. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1908.01998)
13. [Chen, Hao and colleagues (2018). LSTD: A Low-Shot Transfer Detector for Object Detection. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1803.01529)
14. [Kang, Bingyi and colleagues (2018). Few-shot Object Detection via Feature Reweighting. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1812.01866)
15. [Yan, Xiaopeng and colleagues (2019). Meta R-CNN : Towards General Solver for Instance-level Few-shot Learning. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1909.13032)
16. [Wang, Xin and colleagues (2020). Frustratingly Simple Few-Shot Object Detection. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2003.06957)
17. [Shaoqing Ren and colleagues (2016). Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. IEEE Transactions on Pattern Analysis and Machine Intelligence.](https://doi.org/10.1109/tpami.2016.2577031)
18. [Open-vocabulary vs. Closed-set: Best Practice for Few-shot Object Detection Considering Text Describability](https://arxiv.org/html/2410.15315)
19. [Sun, Bo and colleagues (2021). FSCE: Few-Shot Object Detection via Contrastive Proposal Encoding. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2103.05950)
20. [Han, Guangxing and colleagues (2021). Meta Faster R-CNN: Towards Accurate Few-Shot Object Detection with Attentive Feature Alignment. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2104.07719)
21. [Detect Everything with Few Examples (DE-ViT)](https://arxiv.org/html/2309.12969v4)
22. [Few-Shot Learning in Video and 3D Object Detection: A Survey (ACM Computing Surveys)](https://dl.acm.org/doi/10.1145/3790093)
23. [Few-Shot Object Detection in Remote Sensing Image Interpretation: Opportunities and Challenges (Remote Sensing, 2022)](https://www.mdpi.com/2072-4292/14/18/4435)
24. [MDFAC: multi-dimensional feature adaptive calibration for generalized few-shot object detection (Complex & Intelligent Systems, 2025)](https://link.springer.com/article/10.1007/s40747-025-02053-x)
25. [A Comparative Review of Recent Few-Shot Object Detection Algorithms](https://ar5iv.labs.arxiv.org/html/2111.00201)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

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

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/few-shot-object-detection

English original: https://www.edgepedia.org/few-shot-object-detection
