面向新增缺陷类别的免训练增量工业缺陷检测方法
Training-Free Incremental Industrial Defect Detection Method for Emerging Defect Categories
摘要: 针对柔性产线缺陷类型频繁新增时传统闭集检测需重新采集标注并完整重训练、耗时长且导致已部署类别性能退化的问题,提出一种面向新增缺陷类别的免训练增量工业缺陷检测方法。该方法将缺陷定位与类别识别解耦:以轻量级检测器作类别无关定位器,按原图逐区域裁剪编码以保留微小缺陷纹理;分类端以每类少量已确认样片在CLIP视觉嵌入空间构造类别参照,并以类内近邻打分替代均值原型以缓解类内多模态饱和;无样片时退化为三层分层提示融合生成的文本参照,配合LoRA低秩适配器与推理期λ缩放插值,构成零样本兜底路径。在NEU-DET与GC10-DET上,每类50张样片时调和平均分别达92.73%与84.25%、总体准确率92.93%与84.26%,零样本兜底(K = 0)为29.41%与64.94%;样片扩展无需反向传播与权重更新,端到端耗时3.35 s与12.76 s,较重新训练快63~525倍。
Abstract: Traditional closed-set detection requires costly re-collection, re-labeling and full retraining when new defect types emerge in flexible production lines, which is time-consuming and degrades deployed categories. A training-free incremental detection method for emerging defect categories is proposed. Detection is decoupled from classification: a lightweight detector acts as a class-agnostic localizer, and region-wise cropping from the original image preserves the texture of tiny defects. Category references are built in the CLIP visual embedding space from a few confirmed samples per class, and an intra-class nearest-neighbor score replaces the mean prototype to mitigate the saturation caused by intra-class multimodality. With no samples, the reference degrades to text representations from a three-layer hierarchical prompt fusion, forming a zero-shot fallback together with a LoRA adapter and an inference-time λ-scaling interpolation. On NEU-DET and GC10-DET, with 50 samples per class, the harmonic means reach 92.73% and 84.25% and the overall accuracies 92.93% and 84.26%, while the zero-shot fallback (K = 0) achieves 29.41% and 64.94%. Sample extension requires neither back-propagation nor weight update, taking 3.35 s and 12.76 s, i.e. 63~525 times faster than retraining, without catastrophic forgetting.
文章引用:侯钧宝, 李莉, 周杰. 面向新增缺陷类别的免训练增量工业缺陷检测方法[J]. 人工智能与机器人研究, 2026, 15(6): 1606-1618. https://doi.org/10.12677/airr.2026.156144

参考文献

[1] Ren, S., He, K., Girshick, R. and Sun, J. (2017) Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39, 1137-1149.
https://doi.org/10.1109/tpami.2016.2577031
[2] Redmon, J., Divvala, S., Girshick, R. and Farhadi, A. (2016) You Only Look Once: Unified, Real-Time Object Detection. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, 27-30 June 2016, 779-788.
https://doi.org/10.1109/cvpr.2016.91
[3] Bochkovskiy, A., Wang, C.Y. and Liao, H.Y.M. (2020) YOLOv4: Optimal Speed and Accuracy of Object Detection. arXiv:2004.10934.
[4] Jocher, G., Chaurasia, A. and Qiu, J. (2023) Ultralytics YOLOv8.
https://github.com/ultralytics/ultralytics
[5] Redmon, J. and Farhadi, A. (2018) YOLOv3: An Incremental Improvement. arXiv:1804.02767.
[6] 崔克彬, 焦静颐. 基于MCB-FAH-YOLOv8的钢材表面缺陷检测算法[J]. 图学学报, 2024, 45(1): 112-125.
[7] 赵云亮, 唐东林, 何媛媛, 等. 基于CNN融合PGW-Attention的金属表面缺陷识别方法[J]. 电子测量与仪器学报, 2024, 38(8): 46-55.
[8] 赵佰亭, 张晨, 贾晓芬. ECC-YOLO: 一种改进的钢材表面缺陷检测方法[J]. 电子测量与仪器学报, 2024, 38(4): 108-116.
[9] Radford, A., Kim, J.W., Hallacy, C., et al. (2021) Learning Transferable Visual Models from Natural Language Supervision. Proceedings of the 38th International Conference on Machine Learning, Virtual Event, 18-24 July 2021, 8748-8763.
[10] Li, J., Li, D., Sava Rese, S., et al. (2023) BLIP-2: Bootstrapping Language-Image Pre-Training with Frozen Image Encoders and Large Language Models. Proceedings of the 40th International Conference on Machine Learning, Honolulu, 23-29 July 2023, 19730-19742.
[11] Zhou, Q., Pang, G., Tian, Y., et al. (2024) AnomalyCLIP: Object-Agnostic Prompt Learning for Zero-Shot Anomaly Detection. International Conference on Learning Representations, Vienna, 7-11 May 2024.
[12] Zhou, K., Yang, J., Loy, C.C. and Liu, Z. (2022) Learning to Prompt for Vision-Language Models. International Journal of Computer Vision, 130, 2337-2348.
https://doi.org/10.1007/s11263-022-01653-1
[13] Zhou, K., Yang, J., Loy, C.C. and Liu, Z. (2022) Conditional Prompt Learning for Vision-Language Models. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, 18-24 June 2022, 16816-16825.
https://doi.org/10.1109/cvpr52688.2022.01631
[14] Jeong, J., Zou, Y., Kim, T., Zhang, D., Ravichandran, A. and Dabeer, O. (2023) WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation. 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, 17-24 June 2023, 19606-19616.
https://doi.org/10.1109/cvpr52729.2023.01878
[15] Zhong, Y., Yang, J., Zhang, P., Li, C., Codella, N., Li, L.H., et al. (2022) RegionCLIP: Region-Based Language-Image Pretraining. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, 18-24 June 2022, 16772-16782.
https://doi.org/10.1109/cvpr52688.2022.01629
[16] Jeong, K., Heo, J., Son, J., et al. (2026) Domain Adaptation of Attention Heads for Zero-Shot Anomaly Detection. Computer Vision and Image Understanding, 268, Article 104751.
https://doi.org/10.1016/j.cviu.2026.104751
[17] Gao, B., Zhou, Y., Yan, J., Cai, Y., Zhang, W., Wang, M., et al. (2026) AdaptCLIP: Adapting CLIP for Universal Visual Anomaly Detection. Proceedings of the AAAI Conference on Artificial Intelligence, 40, 4095-4103.
https://doi.org/10.1609/aaai.v40i6.42404
[18] Cheng, T., Song, L., Ge, Y., Liu, W., Wang, X. and Shan, Y. (2024) YOLO-World: Real-Time Open-Vocabulary Object Detection. 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, 16-22 June 2024, 16901-16911.
https://doi.org/10.1109/cvpr52733.2024.01599
[19] Zang, Y., Li, W., Zhou, K., Huang, C. and Loy, C.C. (2022) Open-Vocabulary DETR with Conditional Matching. In: Avidan, S., Brostow, G., Cissé, M., Farinella, G.M. and Hassner, T., Eds., Lecture Notes in Computer Science, Springer, 106-122.
https://doi.org/10.1007/978-3-031-20077-9_7
[20] Hu, E.J., Shen, Y., Wallis, P., et al. (2022) LoRA: Low-Rank Adaptation of Large Language Models. International Conference on Learning Representations, Virtual Event, 25-29 April 2022.
[21] Dosovitskiy, A., Beyer, L., Kolesnikov, A., et al. (2021) An Image Is Worth 16 × 16 Words: Transformers for Image Recognition at Scale. International Conference on Learning Representations, Virtual Event, 3-7 May 2021.
[22] Wortsman, M., Ilharco, G., Kim, J.W., Li, M., Kornblith, S., Roelofs, R., et al. (2022) Robust Fine-Tuning of Zero-Shot Models. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, 18-24 June 2022, 7959-7971.
https://doi.org/10.1109/cvpr52688.2022.00780
[23] Jia, C., Yang, Y., Xia, Y., et al. (2021) Scaling Up Visual and Vision-Language Representation Learning with Noisy Text Supervision. Proceedings of the 38th International Conference on Machine Learning, Virtual Event, 18-24 July 2021, 4904-4916.