计算机工程与应用 ›› 2023, Vol. 59 ›› Issue (20): 274-282.DOI: 10.3778/j.issn.1002-8331.2301-0015

• 工程与应用 • 上一篇    下一篇

改进YOLOX-s算法的自动贩卖机商品检测方法

张少林,姜吴瑾,李太福,杨杰   

  1. 1.重庆科技学院 电气工程学院,重庆 400030
    2.重庆科技学院 安全工程学院,重庆 400030
    3.重庆工贸职业技术学院 人工智能学院,重庆 408000
    4.重庆新制导智能科技研究院有限公司,重庆 400000
  • 出版日期:2023-10-15 发布日期:2023-10-15

Commodity Detection Method for Vending Machines Based on Improved YOLOX-s Algorithm

ZHANG Shaolin, JIANG Wujin, LI Taifu, YANG Jie   

  1. 1.School of Electrical Engineering, Chongqing University of Science and Technology, Chongqing 400030, China
    2.School of Safety Engineering, Chongqing University of Science and Technology, Chongqing 400030, China
    3.School of Artificial Intelligence, Chongqing Industry & Trade Polytechnic, Chongqing 408000, China
    4.Chongqing New Guidance Intelligent Technology Research Institute Company Limited, Chongqing 400000, China
  • Online:2023-10-15 Published:2023-10-15

摘要: 针对自动贩卖机商品检测中图片变形、遮挡及光线环境,导致各商品细粒度检测性能低问题,构建一种基于YOLOX-s网络改进的算法模型YOLOX-s-BGC。通过改进的双向特征金字塔网络(BiFPN-m),减小网络特征融合过程中特征信息的丢失,并提高了模型的推理速度;同时引入Ghost卷积降低参数量以减少网络计算开销;为了可以关注图像中更具区分度的特征信息,还提出了卷积块注意力模块(CBAM),提取出更具区分性的特征。在自动贩卖机商品检测数据集上的实验结果表明,YOLOX-s-BGC模型在商品检测的检测精度达到了99.57%,相比于原始YOLOX-s算法提高了1.91个百分点,且计算参数量和模型大小基本保持不变。同时与SSD、YOLOv3、Scaled YOLOv4、YOLOv5 Lite-g等目标检测算法相比,该改进算法具有一定的优越性,是在自动贩卖机商品检测中的理想模型。

关键词: 商品检测, 目标检测, YOLOX, 注意力机制, 轻量化网络

Abstract: In view of the low performance of fine-grained detection of goods caused by image deformation, occlusion and light environment in vending machine goods detection, an improved algorithm model YOLOX-s-BGC based on YOLOX-s network is constructed. The improved bi-directional feature pyramid network(BiFPN-m) reduces the loss of feature information in the process of network feature fusion, and improves the reasoning speed of the model. At the same time, ghost convolution is introduced to reduce the amount of parameters to reduce the network computing overhead. In order to focus on the more discriminative feature information in the image, the convolution block attention module(CBAM) is also proposed to extract more discriminative features. The experimental results on the vending machine commodity detection data set show that the detection accuracy of YOLOX-s-BGC model in commodity detection reaches 99.57%, which is 1.91 percentage points higher than the original YOLOX-s algorithm, and the calculation parameters and model size are basically unchanged. Comparing with SSD, YOLOv3, Scaled YOLOv4, YOLOv5 Lite-g and other target detection algorithms, the improved algorithm has certain advantages, and is an ideal model in vending machine commodity detection.

Key words: commodity detection, target detection, YOLOX, attention mechanism, lightweight network