欢迎访问中国科学院大学学报,今天是
电子信息与计算机科学

不平衡样本下的SA-YOLO自适应损失目标检测算法

  • 苏亚鹏 ,
  • 陈高曙 ,
  • 赵彤
展开
  • 1. 中国科学院大学数学科学学院, 北京 100049;
    2. 浙江中正智能科技有限公司, 杭州 310021;
    3. 中国科学院大数据挖掘与知识管理重点实验室, 北京 100190

收稿日期: 2022-08-18

  修回日期: 2023-02-21

  网络出版日期: 2023-02-21

基金资助

国家自然科学基金(12271504,11991022)资助

SA-YOLO: self-adaptive loss object detection method under imbalance samples

  • SU Yapeng ,
  • CHEN Gaoshu ,
  • ZHAO Tong
Expand
  • 1. School of Mathematical Sciences, University of Chinese Academy of Sciences, Beijing 100049, China;
    2. Miaxis Biometrics Co., Ltd, Hangzhou 310021, China;
    3. Key Laboratory of Big Data Mining and Knowledge Management, Chinese Academy of Sciences, Beijing 100190, China

Received date: 2022-08-18

  Revised date: 2023-02-21

  Online published: 2023-02-21

摘要

样本不平衡现象是指在数据集中以背景为主的易样本数量较大,而以前景为主的难样本数量过少,即样本存在类间不平衡与难易不平衡问题。现有目标检测算法大多是基于候选区域的两阶段算法或基于回归的单阶段算法,当应用于不平衡样本时无法避免训练中产生的预测框对大量样本过度依赖,从而导致模型过拟合且检测精度低,准确性、泛化性差。为了在不平衡样本下实现高效精准的目标检测,提出一种全新的SA-YOLO自适应损失目标检测算法。(1)针对样本不平衡问题,提出SA-Focal Loss函数,能够针对不同数据集与训练阶段对损失进行自适应调节,以达到平衡类间样本与难易样本的效果。(2)在多尺度特征预测机制下构造CSPDarknet53-SP网络架构,增强困难小目标样本全局特征的提取能力,达到提升难样本检测精度的效果。为验证SA-YOLO算法的性能,分别在样本不平衡数据集与COCO数据集上进行了大量仿真实验。结果表明:相较于现有YOLO系列算法最优指标值,SA-YOLO在不平衡数据集中mAP可达91.46%,提升10.87%,各类目标AP50提升均在2%以上,有极强的专精性;在COCO数据集中mAP50提升1.58%,各项指标均不低于最优值,有良好的有效性。

本文引用格式

苏亚鹏 , 陈高曙 , 赵彤 . 不平衡样本下的SA-YOLO自适应损失目标检测算法[J]. 中国科学院大学学报, 2024 , 41(3) : 411 -426 . DOI: 10.7523/j.ucas.2023.013

Abstract

The phenomenon of sample imbalance refers to the excessive number of background easy samples in the dataset but too few foreground hard samples, which means the sample suffers from inter-class imbalance and hard-easy imbalance. Most of the existing object detection methods are two-stage detectors based on proposed regions or one-stage detectors based on regression. When applied to imbalanced samples, it is impossible to avoid the over-dependence of the prediction bounding box generated in training on a large number of negative samples, which leads to overfitting of the model and low detection accuracy, poor accuracy and generalization. In order to achieve efficient and accurate object detection under imbalanced samples, a new SA-YOLO self-adaptive loss object detection method is proposed in the paper. 1) To address the sample imbalance problem, we propose the SA-Focal Loss function, which adjusts the loss adaptively for different datasets and training stages to balance inter-class samples and hard-easy samples. 2) In this paper, we construct the CSPDarknet53-SP network architecture based on the multi-scale feature prediction mechanism, which enhances the extraction ability of global features of difficult small target samples and improves the detection accuracy of difficult samples. To verify the performance of the SA-YOLO method, extensive simulation experiments are conducted on the sample imbalance dataset and the COCO dataset respectively. The results show that compared with the optimal metrics of YOLO series method, SA-YOLO reaches 91.46% of mAP in the imbalance dataset, which improves 10.87%, and the enhancement of AP50 for all kinds of objects is more than 2%, with excellent specialization; mAP50 in the COCO dataset is upgraded by 1.58%, and all indexes are not lower than the optimal value, with good effectiveness.

参考文献

[1] Girshick R, Donahue J, Darrell T, et al. Rich feature hierarchies for accurate object detection and semantic segmentation[C]//2014 IEEE Conference on Computer Vision and Pattern Recognition. June 23-28, 2014, Columbus, OH, USA. IEEE, 2014: 580-587. DOI:10.1109/CVPR.2014.81.
[2] Girshick R. Fast R-CNN[C]//2015 IEEE International Conference on Computer Vision(ICCV). December 7-13, 2015, Santiago, Chile. IEEE, 2016: 1440-1448. DOI:10.1109/ICCV.2015.169.
[3] Ren S Q, He K M, Girshick R, et al. Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137-1149. DOI:10.1109/TPAMI.2016.2577031.
[4] Redmon J, Divvala S, Girshick R, et al. You only look once: unified, real-time object detection[C]//2016 IEEE Conference on Computer Vision and Pattern Recognition(CVPR). June 27-30, 2016, Las Vegas, NV, USA. IEEE, 2016: 779-788. DOI:10.1109/CVPR.2016.91.
[5] Redmon J, Farhadi A. YOLOv3: an incremental improvement[EB/OL]. 2018, arXiv: 1804.02767. (2018-04-08)[2022-12-15].https://arxiv.org/abs/1804.02767.
[6] Bochkovskiy A, Wang C Y, Liao H Y M. YOLOv4: optimal speed and accuracy of object detection[EB/OL]. 2020, arXiv: 2004.10934. (2020-04-23)[2022-12-15].https://arxiv.org/abs/2004.10934.
[7] Wang C Y, Bochkovskiy A, Liao H Y M. YOLOv7: trainable bag-of-freebies sets new state-of-the-art for real-time object detectors[EB/OL]. 2022, arXiv: 2207.02696. (2022-07-06)[2022-12-15]. https://arxiv.org/abs/2207.02696.
[8] Redmon J, Farhadi A. YOLO9000: better, faster, stronger[C]//2017 IEEE Conference on Computer Vision and Pattern Recognition(CVPR). July 21-26, 2017, Honolulu, HI, USA. IEEE, 2017: 6517-6525. DOI:10.1109/CVPR.2017.690.
[9] Li B, Yao Y Q, Tan J R, et al. Equalized focal loss for dense long-tailed object detection [EB/OL]. 2022, arXiv: 2201.02593. (2022-06-30)[2022-12-15]. https://arxiv.org/abs/2201.02593.
[10] Zhu X G, Li L, Zhang W G, et al. Dependency exploitation: a unified CNN-RNN approach for visual emotion recognition[C]//Proceedings of the 26th International Joint Conference on Artificial Intelligence. August 19-25, 2017, Melbourne, Australia. New York: ACM, 2017: 3595-3601. DOI:10.5555/3172077.3172392.
[11] 周志华. 机器学习[M]. 北京:清华大学出版社, 2016.
[12] Shrivastava A, Gupta A, Girshick R. Training region-based object detectors with online hard example mining[C]//2016 IEEE Conference on Computer Vision and Pattern Recognition(CVPR). June 27-30, 2016, Las Vegas, NV, USA. IEEE, 2016: 761-769. DOI:10.1109/CVPR.2016.89.
[13] Pang J M, Chen K, Shi J P, et al. Libra R-CNN: towards balanced learning for object detection[C]//2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR). June 15-20, 2019, Long Beach, CA, USA. IEEE, 2020: 821-830. DOI:10.1109/CVPR.2019.00091.
[14] Lin T Y, Goyal P, Girshick R, et al. Focal loss for dense object detection[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020, 42(2):318-327. DOI:10.1109/TPAMI.2018.2858826.
[15] 张胜男, 许燕斌, 董峰. 自适应阈值收缩算子的稀疏正则化图像重建算法[J]. 中国科学院大学学报, 2020, 37(2): 242-247. DOI:10.7523/j.issn.2095-6134.2020. 02.014.
[16] Krizhevsky A, Sutskever I, Hinton G E. ImageNet classification with deep convolutional neural networks[C]//Proceedings of the 25th International Conference on Neural Information Processing Systems-Volume 1. December 3-6, 2012, Lake Tahoe, Nevada. New York: ACM, 2012: 1097-1105. DOI: 10.5555/2999134.2999257.
[17] Uijlings J R, van de Sande K E A, Gevers T, et al. Selective search for object recognition[J]. International Journal of Computer Vision, 2013, 104(2): 154-171. DOI:10.1007/s11263-013-0620-5.
[18] 矫腾章, 胡玉新, 吕鹏, 等. 一种在轨海上多运动舰船目标检测和跟踪方法[J]. 中国科学院大学学报, 2020, 37(3): 368-378. DOI:10.7523/j.issn.2095-6134.2020. 03.010.
[19] Tang J, Hou H J, Sheng G H, et al. Transformer fault diagnosis model with unbalanced samples based on SMOTE algorithm and focal loss[C]//2021 4th International Conference on Energy, Electrical and Power Engineering(CEEPE). April 23-25, 2021, Chongqing, China. IEEE, 2021: 693-697. DOI:10.1109/CEEPE51765.2021.9475 723.
[20] 肖振久, 孔祥旭, 宗佳旭, 等. 自适应聚焦损失的图像目标检测算法[J]. 计算机工程与应用, 2021, 57(23): 185-192. DOI:10.3778/j.issn.1002-8331.2104-0321.
[21] 傅博文, 唐向宏, 肖涛. Focal损失在图像情感分析上的应用研究[J]. 计算机工程与应用, 2020, 56(10): 179-184. DOI:10.3778/j.issn.1002-8331.2003-0028.
[22] 孟曦婷, 计璐艳, 赵永超, 等. 基于深度学习的多尺度导弹发射井目标检测[J]. 中国科学院大学学报, 2021, 38(6): 800-808. DOI:10.7523/j.issn.2095-6134.2021. 06.010.
[23] 李彬, 汪诚, 丁相玉, 等. 改进YOLOv4的表面缺陷检测算法[J/OL]. 北京航空航天大学学报, 2023,49(3):710-717. DOI:10.13700/j.bh.1001-5965.2021.0301.
[24] 王俊岭, 邓玉莲, 李英, 等. 排水管道检测与缺陷识别技术综述[J].科学技术与工程, 2020, 20(33): 13520-13528. DOI:10.3969/j.issn.1671-1815.2020.33.002.
[25] 王庆, 姚俊, 谭文禄, 等. 基于Faster R-CNN的排水管道缺陷检测研究[J]. 软件导刊, 2019, 18(10): 40-44, 49. DOI:10.11907/rjdk.191817.
[26] 中华人民共和国住房和城乡建设部. 城镇排水管道检测与评估技术规程: CJJ 181—2012[S]. 北京: 中国建筑工业出版社, 2012.
文章导航

/