# 基于内容的图像检索

基于内容的图像检索（Content-based image retrieval，CBIR）是一种计算机视觉技术，它使用颜色、纹理和形状等视觉特征，而不是文本标注，在图像数据库中搜索与查询相似的图像。查询通常是一张示例图像，系统按图像距离度量返回排序后的图像：距离为零表示完全匹配，数值越大表示相似程度越低。<sup>[1](https://courses.cs.washington.edu/courses/cse576/book/ch8.pdf)</sup> 这项技术之所以出现，是因为人工标注无法跟上图像数量的增长；例如，美国国家航空航天局（NASA）的地球观测系统（Earth Observing System）全面运行时，预计每天产生约1太字节图像数据。<sup>[2](https://dl.acm.org/doi/10.1109/2.410145)</sup> 大多数网络搜索引擎则通过依赖说明文字和元数据的基于文本的方法来检索图像；这类方法可能返回不相关的图像，因为人工标签与人类视觉感知并不一致，而且对于包含数百万张图像的档案库来说，标注几乎不可能完成。<sup>[3](https://onlinelibrary.wiley.com/doi/10.1155/2019/9658350)</sup>

| 关键事实 | 细节 |
|---|---|
| 输出 | 按图像距离排序的数据库图像列表；距离为零表示完全匹配<sup>[1](https://courses.cs.washington.edu/courses/cse576/book/ch8.pdf)</sup> |
| 术语最早使用 | “基于内容的图像检索”这一术语最早见于加藤（Kato）1992年按颜色和形状特征进行检索的实验文献<sup>[4](https://www.inf.fu-berlin.de/lehre/WS00/webIS/reader/WebIR/imageRetrievalOverview.pdf)</sup> |
| 奠基性商业系统 | IBM阿尔马登的QBIC，其特征向量常常维度很高，例如64维<sup>[5](https://dl.acm.org/doi/10.1145/568271.223888)</sup> |
| 核心失效模式 | 低层视觉特征与高层语义之间的语义鸿沟<sup>[6](https://thesai.org/Downloads/Volume8No5/Paper_21-A_Survey_on_content_based_Image_Retrieval.pdf)</sup> |
| 基准数据 | Holidays数据集：图像级CNN输入达到70.53% mAP；块级输入增加8.29个百分点<sup>[7](https://arxiv.org/pdf/2101.11282)</sup> |
| 规模前沿 | ILIAS基准：1,000个对象，对抗来自YFCC100M的1亿张图像干扰集<sup>[8](https://openaccess.thecvf.com/content/CVPR2025/papers/Kordopatis-Zilos_ILIAS_Instance-Level_Image_retrieval_At_Scale_CVPR_2025_paper.pdf)</sup> |
| 索引速度 | FAISS在15毫秒内插入10,000个向量，并在1毫秒内回答查询；pgvector完成同样插入需要14.9秒<sup>[9](https://www.frontiersin.org/journals/computer-science/articles/10.3389/fcomp.2026.1819991/full)</sup> |

## 工作原理

CBIR依赖三个基本要素：特征的选择、提取和表示，所用属性包括颜色、纹理、形状和描述符。<sup>[10](https://ieeexplore.ieee.org/document/10230238)</sup> 数据库中的每张图像都被简化为一个特征向量，查询向量与数据库向量之间的相似度用距离或相似度度量计算。颜色直方图匹配是经典方法，它建立在迈克尔·J·斯温（Michael J. Swain）和达纳·H·巴拉德（Dana H. Ballard）的颜色索引方法之上；该方法于1991年发表在《[国际计算机视觉杂志](https://www.edgepedia.org/zh/international-journal-of-computer-vision)》（International Journal of Computer Vision）上。<sup>[11](https://doi.org/10.1007/bf00130487)</sup> 其区分能力是有限的：对于64箱直方图，实验表明在合理条件下，图像间的区分能力大约限于25,000张图像；而联合直方图可在250,000张图像之间提供区分能力，对于同一场景的两张照片，在前10个最佳结果中达到80%的召回率。<sup>[12](https://ivi.fnwi.uva.nl/isis/publications/2000/SmeuldersTPAMI2000/SmeuldersTPAMI2000.pdf)</sup>

概念上的限制是语义鸿沟。伊金斯（Eakins）和格雷厄姆（Graham）将查询分为三个复杂度递增的层次：第1层是颜色、纹理、形状和空间位置等原始特征；第2层是派生的对象特征；第3层是抽象语义属性。由于系统只在原始特征层运行，其有效性必然有限，而层次之间的距离就是语义鸿沟。<sup>[4](https://www.inf.fu-berlin.de/lehre/WS00/webIS/reader/WebIR/imageRetrievalOverview.pdf)</sup> 在深度学习时代，同一个鸿沟被称为关键挑战，即机器捕获的低层图像像素与人类感知的高层语义概念之间的鸿沟。<sup>[13](https://psycnet.apa.org/doi/10.1145/2647868.2654948)</sup>

## 实现方式

典型的CBIR系统分两个阶段运行。离线阶段从数据库图像中提取并存储视觉特征向量；在线阶段接受用户的查询图像并返回视觉上相关的图像。<sup>[6](https://thesai.org/Downloads/Volume8No5/Paper_21-A_Survey_on_content_based_Image_Retrieval.pdf)</sup> 在经典的QBIC设计中，检索基于相似度而非完全匹配，相似度由数值特征向量计算，这些向量的维度常常在64左右；系统采用若干过滤方法来提高查询效率。<sup>[5](https://dl.acm.org/doi/10.1145/568271.223888)</sup> QBIC还允许按颜色百分比查询，例如40%红色、30%黄色和10%黑色；在该模式下，颜色的位置不是考虑因素；纹理相似度通过网格化纹理距离计算，即对每个网格单元的纹理距离求和。<sup>[1](https://courses.cs.washington.edu/courses/cse576/book/ch8.pdf)</sup>

索引使大型数据库保持可处理：QBIC的索引子系统首先使用KLT降维，然后使用R*树作为多维索引结构；<sup>[14](https://www.cs.princeton.edu/courses/archive/spr05/cos598E/bib/rui99_cbir_survey.pdf)</sup> [R树](https://www.edgepedia.org/zh/r-tree)用一个\( n \)维最小外接矩形来索引数据对象。<sup>[1](https://courses.cs.washington.edu/courses/cse576/book/ch8.pdf)</sup> 在实践中，FAISS、Milvus、Qdrant和pgvector等向量数据库现在提供索引层，并报告了延迟与召回率之间的权衡。<sup>[9](https://www.frontiersin.org/journals/computer-science/articles/10.3389/fcomp.2026.1819991/full)</sup> 现代深度实例检索流程分为三个阶段：深度特征提取（单遍，或多遍并伴随区域提取）、特征嵌入并聚合为全局或局部特征，以及返回排序列表的特征匹配。全局匹配通过[欧几里得距离](https://www.edgepedia.org/zh/euclidean-distance)高效计算，而局部特征通过RANSAC进行空间验证，对排名靠前的结果重新排序。<sup>[7](https://arxiv.org/pdf/2101.11282)</sup> 相关反馈让用户能够交互式地细化结果。<sup>[15](https://link.springer.com/chapter/10.1007/978-3-662-05300-3_1)</sup> [评估](https://www.edgepedia.org/zh/evaluation)使用精确率，即检索到的相关图像数与检索到的图像总数之比，以及召回率，即检索到的相关图像数与数据库中相关图像总数之比，此外还使用特异度、F度量、类别准确率、ROC曲线和精确率-召回率曲线。<sup>[10](https://ieeexplore.ieee.org/document/10230238)</sup>

## 起源

该领域所依托的最早工作是张宁三（Ning-San Chang）和[傅京孙](https://www.edgepedia.org/zh/king-sun-fu)（King-Sun Fu）的“图像示例查询”（Query-by-Pictorial-Example），于1980年发表在《IEEE软件工程汇刊》（IEEE Transactions on Software Engineering）上。<sup>[16](https://doi.org/10.1109/tse.1980.230801)</sup><sup> • </sup><sup>[4](https://www.inf.fu-berlin.de/lehre/WS00/webIS/reader/WebIR/imageRetrievalOverview.pdf)</sup><sup> • </sup><sup>[17](http://sigmod.org/publications/dblp/db/conf/edbt/HirataK92.html)</sup>

奠基性系统集中在1993—1996年前后。QBIC由IBM阿尔马登研究中心（IBM Almaden Research Center）开发，由M. 弗利克纳（M. Flickner）及其同事于1995年在《Computer》期刊上报道<sup>[18](https://doi.org/10.1109/2.410146)</sup>，并在综述文献中被描述为第一个商业化的基于内容的图像检索系统，其框架深刻影响了后来的系统。<sup>[14](https://www.cs.princeton.edu/courses/archive/spr05/cos598E/bib/rui99_cbir_survey.pdf)</sup> [Photobook](https://www.edgepedia.org/zh/photobook)是一套用于浏览和搜索图像的交互式工具，直接利用图像内容而非文本标注，并使用外观、二维形状和纹理描述。<sup>[19](https://link.springer.com/article/10.1007/BF00123143)</sup> Virage支持按颜色、构图、纹理和结构进行查询，并通过支持这些原子查询的任意加权组合而超越了QBIC。<sup>[14](https://www.cs.princeton.edu/courses/archive/spr05/cos598E/bib/rui99_cbir_survey.pdf)</sup> 截至1999年，已有三种商业系统可用：IBM的QBIC、Virage的VIR图像引擎（VIR Image Engine）和Excalibur的Image RetrievalWare。<sup>[4](https://www.inf.fu-berlin.de/lehre/WS00/webIS/reader/WebIR/imageRetrievalOverview.pdf)</sup>

## 变体

CBIR按查询类型和目标划分。使用图像作为查询称为反向图像搜索（Reverse Image Search，RIS），也称为示例查询；当查询只是图像的一小块时，该任务是子图像检索（sub-image retrieval，s-CBIR）。<sup>[20](https://pmc.ncbi.nlm.nih.gov/articles/PMC11322435/)</sup> 按目标划分，方法可分为类别级图像检索（Category level Image Retrieval，CIR），即找到与查询属于同一类别的任意图像，以及实例级图像检索（Instance level Image Retrieval，IIR），即找到在不同观看距离、角度、背景、光照和天气条件下包含同一实例的图像。<sup>[7](https://arxiv.org/pdf/2101.11282)</sup>

基于草图的图像检索（Sketch-based image retrieval，SBIR）在没有示例图像时使用所绘草图的边缘或轮廓，并且比CBIR更难。<sup>[3](https://onlinelibrary.wiley.com/doi/10.1155/2019/9658350)</sup> 该任务的一个具名深度变体是刘力（Li Liu）及其同事的《深度草图哈希：快速手绘草图图像检索》（Deep Sketch Hashing: Fast Free-hand Sketch-Based Image Retrieval），于2017年发布在arXiv上。<sup>[21](https://doi.org/10.48550/arxiv.1703.05605)</sup> 跨模态图像检索（Cross-modality image retrieval，CMIR）以两种方式处理模态之间的域差距：特征空间迁移，通常使用对比损失；以及图像域迁移，用生成网络将一种模态转换为另一种模态。一种方法在不同模态的对齐图像对上用对比损失并行训练两个CNN，产生对比多模态图像表示（contrastive multimodal image representations，CoMIRs），随后使用[SURF](https://www.edgepedia.org/zh/speeded-up-robust-features)特征、用余弦相似度进行词袋匹配并重新排序；该方法在用于组织病理学的BF和SHG显微图像上进行了评估。<sup>[20](https://pmc.ncbi.nlm.nih.gov/articles/PMC11322435/)</sup>

## 应用

CBIR和特征提取应用于医学图像分析、遥感、犯罪检测、视频分析、军事监视和纺织工业。<sup>[3](https://onlinelibrary.wiley.com/doi/10.1155/2019/9658350)</sup> 较早的综述还补充了通过指纹和人脸识别进行犯罪预防、商标注册、新闻与广告视频资产管理以及网络搜索，并指出MPEG-7是CBIR查询规范和元数据描述方面最重要的新兴标准。<sup>[4](https://www.inf.fu-berlin.de/lehre/WS00/webIS/reader/WebIR/imageRetrievalOverview.pdf)</sup> 在规模前沿，ILIAS基准使用来自[YFCC100M](https://www.edgepedia.org/zh/yfcc100m)的1亿张图像干扰集来评估实例级检索。<sup>[8](https://openaccess.thecvf.com/content/CVPR2025/papers/Kordopatis-Zilos_ILIAS_Instance-Level_Image_retrieval_At_Scale_CVPR_2025_paper.pdf)</sup>

## 局限与替代方案

CBIR的主要缺点在于假设视觉相似性反映语义相似性；由于高层含义与低层视觉特征之间存在语义鸿沟，这一假设会失效。<sup>[6](https://thesai.org/Downloads/Volume8No5/Paper_21-A_Survey_on_content_based_Image_Retrieval.pdf)</sup> 基于形状的检索在形状相似度度量之前还需要区域识别或分割步骤，而分割被描述为阻碍广泛可用性的关键未解决问题。<sup>[1](https://courses.cs.washington.edu/courses/cse576/book/ch8.pdf)</sup> 在深度系统中，为分类而预训练的模型面临模型迁移或域偏移挑战，因为分类训练得到的特征可能不足以用于检索；微调则使用孪生网络（Siamese networks）的成对排序损失和三元组网络（triplet networks）的三元组约束。<sup>[7](https://arxiv.org/pdf/2101.11282)</sup> 即便是多模态大语言模型（LLM）重排序器也有典型失效情形：它们对尺度变化、遮挡和杂乱背景具有稳健性，却容易受光照变化和运动模糊影响。<sup>[22](https://openaccess.thecvf.com/content/CVPR2026F/papers/Tharwat_Indexing_Multimodal_Language_Models_for_Large-scale_Image_Retrieval_CVPRF_2026_paper.pdf)</sup>

相对于基于文本的检索，CBIR避免依赖说明文字和元数据；在数百万张图像的规模上，人工标注无法提供这些信息，而且它们常常与人类视觉感知不一致。<sup>[3](https://onlinelibrary.wiley.com/doi/10.1155/2019/9658350)</sup>

## References

1. [Image Database Retrieval chapter (Shapiro & Stockman textbook, UW CSE 576)](https://courses.cs.washington.edu/courses/cse576/book/ch8.pdf)
2. [Content-Based Image Retrieval Systems (Gudivada & Raghavan, Computer, 1995)](https://dl.acm.org/doi/10.1109/2.410145)
3. [Content-Based Image Retrieval and Feature Extraction: A Comprehensive Review (Wiley, 2019)](https://onlinelibrary.wiley.com/doi/10.1155/2019/9658350)
4. [Content-based Image Retrieval (Eakins & Graham, JISC Technology Applications Programme Report 39)](https://www.inf.fu-berlin.de/lehre/WS00/webIS/reader/WebIR/imageRetrievalOverview.pdf)
5. [The Query By Image Content (QBIC) System](https://dl.acm.org/doi/10.1145/568271.223888)
6. [A Survey on Content-based Image Retrieval (IJACSA Vol. 8 No. 5, 2017)](https://thesai.org/Downloads/Volume8No5/Paper_21-A_Survey_on_content_based_Image_Retrieval.pdf)
7. [Deep Learning for Instance-level Image Retrieval: A Survey (arXiv 2101.11282)](https://arxiv.org/pdf/2101.11282)
8. [ILIAS: Instance-Level Image retrieval At Scale (CVPR 2025)](https://openaccess.thecvf.com/content/CVPR2025/papers/Kordopatis-Zilos_ILIAS_Instance-Level_Image_retrieval_At_Scale_CVPR_2025_paper.pdf)
9. [A unified benchmarking framework for vector databases in scalable embedding-based image retrieval systems](https://www.frontiersin.org/journals/computer-science/articles/10.3389/fcomp.2026.1819991/full)
10. [Content-Based Image Retrieval: A Survey on Local and Global Features Selection, Extraction, Representation, and Evaluation Parameters](https://ieeexplore.ieee.org/document/10230238)
11. [Michael J. Swain, Dana H. Ballard (1991). Color indexing. International Journal of Computer Vision.](https://doi.org/10.1007/bf00130487)
12. [Content-Based Image Retrieval at the End of the Early Years (Smeulders et al., IEEE TPAMI 2000)](https://ivi.fnwi.uva.nl/isis/publications/2000/SmeuldersTPAMI2000/SmeuldersTPAMI2000.pdf)
13. [Deep Learning for Content-Based Image Retrieval (ACM Multimedia 2014, Wan et al.), publisher DOI record](https://psycnet.apa.org/doi/10.1145/2647868.2654948)
14. [Image Retrieval: Current Techniques, Promising Directions, and Open Issues (Rui, Huang, Chang 1999)](https://www.cs.princeton.edu/courses/archive/spr05/cos598E/bib/rui99_cbir_survey.pdf)
15. [Fundamentals of Content-Based Image Retrieval (Springer chapter)](https://link.springer.com/chapter/10.1007/978-3-662-05300-3_1)
16. [Ning-San Chang, King-Sun Fu (1980). Query-by-Pictorial-Example. IEEE Transactions on Software Engineering.](https://doi.org/10.1109/tse.1980.230801)
17. [Query by Visual Example - Content based Image Retrieval (DBLP record)](http://sigmod.org/publications/dblp/db/conf/edbt/HirataK92.html)
18. [M. Flickner and colleagues (1995). Query by image and video content: the QBIC system. Computer.](https://doi.org/10.1109/2.410146)
19. [Photobook: Content-based manipulation of image databases (International Journal of Computer Vision)](https://link.springer.com/article/10.1007/BF00123143)
20. [Cross-modality sub-image retrieval using contrastive multimodal image representations (Scientific Reports, PMC11322435)](https://pmc.ncbi.nlm.nih.gov/articles/PMC11322435/)
21. [Liu, Li and colleagues (2017). Deep Sketch Hashing: Fast Free-hand Sketch-Based Image Retrieval. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1703.05605)
22. [Indexing Multimodal Language Models for Large-scale Image Retrieval (CVPR 2026)](https://openaccess.thecvf.com/content/CVPR2026F/papers/Tharwat_Indexing_Multimodal_Language_Models_for_Large-scale_Image_Retrieval_CVPRF_2026_paper.pdf)

---
*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/content-based-image-retrieval

English original: https://www.edgepedia.org/content-based-image-retrieval
