Computer Engineering and Applications ›› 2022, Vol. 58 ›› Issue (22): 172-178.DOI: 10.3778/j.issn.1002-8331.2104-0424

• Pattern Recognition and Artificial Intelligence • Previous Articles     Next Articles

Research on Lightweight Workpiece Detection by Improved RetinaNet

MEI Boping, ZHAO Hao, YANG Shan, LI Linjing, ZHANG Jing, ZHANG Hua   

  1. 1.School of Information Engineering, Southwest University of Science and Technology, Mianyang, Sichuan 621010, China
    2.School of Information Science and Technology, University of Science and Technology of China, Hefei 230026, China
  • Online:2022-11-15 Published:2022-11-15

改进RetinaNet的轻量化工件检测算法研究

梅菠萍,赵皓,阳珊,李林静,张静,张华   

  1. 1.西南科技大学 信息工程学院,四川 绵阳 621010
    2.中国科学技术大学 信息科学技术学院,合肥 230026

Abstract: Aiming at the problem that the traditional object detection model has a huge amount of parameters, which restricts the deployment of algorithms and the real-time performance of model inference, this paper proposes a lightweight real-time object detection network based on the improved RetinaNet detection model. Use MobileNet-V2 to replace the ResNet backbone network in the RetinaNet model to reduce the amount of parameters of the overall model. Design an anchor frame guided sampling mechanism, generate a region of interest mask based on the feature pyramid output feature layer, decrease redundant anchor frames in the background area, and reduce computational complexity in the postprocessing. Introduce GFocalLossV2 loss function to calculate the distribution characteristics of the prediction frame, optimize the quality of the prediction frame and improve the classification accuracy. The model in this paper is validated on the self-made multi-category workpiece datasets WP and Pascal VOC public datasets. The detection accuracy of the improved model reaches 99.5% and 80.5%, and the detection speed reaches 39.8 FPS and 38.3 FPS respectively. Experimental results show that the lightweight target detection model proposed in this paper can achieve real-time detection while ensuring detection accuracy.

Key words: RetinaNet, MobileNet-V2, guided sampling, GFocalLossV2

摘要: 针对传统目标检测模型参数量巨大,制约算法部署与模型推理实时性的问题,提出一种基于改进RetinaNet检测模型的轻量化实时目标检测网络。使用MobileNet-V2代替RetinaNet模型中的ResNet骨干网络,降低整体模型的参数量;设计锚框引导采样机制,基于特征金字塔输出特征层生成感兴趣区域掩码,减少背景区域冗余锚框,降低后处理过程中的计算复杂度;引入GFocalLossV2损失函数统计预测边框分布特征,优化预测边框质量以及提升分类准确度。该模型在自制多类别工件数据集WP和Pascal VOC公开数据集上进行验证实验,改进模型的检测准确率分别达到99.5%、80.5%,检测速度分别达到39.8?FPS、38.3?FPS。实验结果表明,该轻量级目标检测模型能够实现实时检测,同时保证了检测精度。

关键词: RetinaNet, MobileNet-V2, 引导采样, GFocalLossV2