欢迎访问中国科学院大学学报,今天是

中国科学院大学学报 ›› 2024, Vol. 41 ›› Issue (3): 411-426.DOI: 10.7523/j.ucas.2023.013

• 电子信息与计算机科学 • 上一篇    下一篇

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

苏亚鹏1, 陈高曙2, 赵彤1,3   

  1. 1. 中国科学院大学数学科学学院, 北京 100049;
    2. 浙江中正智能科技有限公司, 杭州 310021;
    3. 中国科学院大数据挖掘与知识管理重点实验室, 北京 100190
  • 收稿日期:2022-08-18 修回日期:2023-02-21 发布日期:2023-03-21
  • 通讯作者: 赵彤,E-mail:zhaotong@ucas.ac.cn
  • 基金资助:
    国家自然科学基金(12271504,11991022)资助

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

SU Yapeng1, CHEN Gaoshu2, ZHAO Tong1,3   

  1. 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:2022-08-18 Revised:2023-02-21 Published:2023-03-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算法, SA-Focal Loss函数, CSPDarknet53-SP网络架构

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.

Key words: imbalanced sample, self-adaptive loss, SA-YOLO algorithm, SA-Focal Loss function, CSPDarknet53-SP network architecture

中图分类号: