计算机科学 ›› 2024, Vol. 51 ›› Issue (6A): 230900021-6.doi: 10.11896/jsjkx.230900021

• 图像处理&多媒体技术 • 上一篇    下一篇

基于轻量化YOLOv5s的集装箱锁孔识别算法

李源鑫, 郭忠峰, 杨钧麟   

  1. 沈阳工业大学机械工程学院 沈阳 110870
  • 发布日期:2024-06-06
  • 通讯作者: 郭忠峰(guozf@sut.edu.cn)
  • 作者简介:(lyx775764462@smail.sut.edu.cn)
  • 基金资助:
    辽宁省教育厅2021年度科学研究经费项目(面上项目)(LJKZ0114)

Container Lock Hole Recognition Algorithm Based on Lightweight YOLOv5s

LI Yuanxin, GUO Zhongfeng, YANG Junlin   

  1. School of Mechanical Engineering,Shenyang University of Technology,Shenyang 110870,China
  • Published:2024-06-06
  • About author:LI Yuanxin,born in 1995,postgra-duate.His main research interests include machine vision and deep learning.
    GUO Zhongfeng,born in 1978,Ph.D,associate professor.His main research interests include robot mechanism design,artificial intelligence machine vision inspection,etc.
  • Supported by:
    2021 Scientific Research Funding Project of Liaoning Provincial Department of Education(LJKZ0114).

摘要: 为提高现有集装箱的锁孔识别检测效率,减少算法参数量以及减小模型大小,提出了一种基于轻量化YOLOv5s的集装箱锁孔识别算法。该算法将YOLOv5s的Backbone主干特征提取网络部分更换为轻量级神经网络模型MobileNetV3,并对neck部分的特征融合结构进行进一步的优化,减少了模型的参数量和计算量,并提高了检测速度。引入注意力机制SimAM层,提高了检测的准确率和效率。使用不同的改进方法对模型进行重构后,在自建的集装箱锁孔数据集上进行训练和测试,并与改进的YOLOv5s进行对比实验。结果表明,改进后的模型大小仅为2.4MB,每幅图像的平均检测时间仅为5.1ms,平均检测精度达97.3%;与原始目标检测模型相比,该模型的大小减小了82.8%,检测速度提高了39%,在确保高检测精度的前提下展现出了较强的算法实时性。

关键词: 机器视觉, 集装箱锁孔, YOLOv5s, 轻量化, 深度学习

Abstract: In order to improve the efficiency of container lock hole recognition and reduce the number of algorithm parameters and model size,a container lock hole recognition algorithm based on lightweight YOLOv5s is proposed.This algorithm replaces the Backbone feature extraction network of YOLOv5s with a lightweight neural network model MobileNetV3,and further optimizes the feature fusion structure of the neck part,which reduces the number of parameters and calculation amount of the model and improves the detection speed.The accuracy and efficiency of detection are improved by introducing the attention mechanism SimAM layer.After the model is reconstructed with different improvement methods,the training and testing are carried out on the self-built container lock hole data set,and the comparison test is carried out with the improved YOLOv5s.The results show that the size of the improved model is only 2.4MB,the average detection time of each image is 5.1ms,and the average detection accuracy is 97.3%.Compared with the original target detection model,the size of the model is reduced by 82.8%,and the detection speed is increased by 39%,showing strong real-time algorithm on the premise of ensuring high detection accuracy.

Key words: Machine vision, Container lock hole, YOLOv5s, Lightweight, Deep learning

中图分类号: 

  • TP181
[1]CHANG Y M,ZHU X N,WANG L.Review on integratedscheduling of container terminal[J].Journal of Transportation Engineering,2019,12(1):136-146.
[2]DONG M W,HUANG L F,GU Y.Review on green job scheduling optimization of container terminals[J].Journal of Chongqing Jiaotong University(Natural Science Edition),2022,41(11):7-14.
[3]MI W J,ZHANG Z W,MI C.Study on container hanging holesrecognition algorithm based on machine vision[J].Chinese Journal of Construction Machinery,2016,14(5):399-402.
[4]HAO Y S,LU B,LIU F,et al.Key point smoothing tracking ofcontainer keyhole based on centernet[J].Journal of Control Engineering,2021,28(11):2108-2113.
[5]ZHANG J,DIAO Y F,CHENG W M,et al.Container keyholetracking and center positioning based on video stream[J].Journal of Computer Applications,2019,39(S2):216-220.
[6]KUNIMITSU S,ASAMA H,KAWABATA K,et al.Development of crane vision for positioning container[J].Journal of Robotics and Mechatronics,2004(2):16.
[7]MI C,WANG J,MI W,et al.Research on regional clustering and two-stage SVM method for container truck recognition[J].Discrete & Continuous Dynamical Systems,2018,12(4):1117-1133.
[8]JOCHER G,STOKEN A,BOROVEC J,et al.Ultralytics/yolov5:v3.1-Bug fixes and performance improvements(Version v3.1)[EB/OL].(2020-10-29)[2021-01-19].https://gitlab.com/ultralytics/yolov5/-/releases/v3.1.
[9]REDMON J,FARHADI A.YOLOv3:An incremental improvement[J].arXiv:1804.02767,2018.
[10]BOCHKOVSKIY A,WANG C Y,LIAO H Y M.YOLOv4:Optimal speed and accuracy of object detection[J].arXiv:2004.10934,2020.
[11]HOWARD A,SANDLER M,CHEN B,et al.Searching for mobilenetv3[C]//2019 IEEE/CVF International Conference on Computer Vision(ICCV).Seoul,Korea(South).New York:IEEE Press,2019:1314-1324.
[12]SIFRE L,MALLAT,STEPHANE.Rigid-Motion scattering for texture classification[J].arXiv:1403.1687,2014.
[13]HU J,SHEN L,ALBANIE S,et al.Squeeze-and-excitation networks[J].IEEE Transactions on Pattern Analysis And Machine Intelligence,2020,42(8):2011-2023.
[14]GLOROT X,BORDES A,BENGIO Y.Deep sparse rectifierneural networks[J].Journal of Machine Learning Research,2011,15:315-323.
[15]ZI B,YIN Z Q,LI Y C,et al.Fast mobile component location method for cable-driven parallel robots based on yolo model[J].Chinese Journal of Mechanical Engineering,2019,55(3):64-72.
[16]YANG Y,DENG H.GC-YOLOv3:you only look once withglobal context block[J].Electronics,2020,9(8):1235.
[17]WOO S,PARK J,LEE J Y,et al.CBAM:convolutional block attention module[C]//2018 15th European Conference on Computer Vision.Munich,Germany,2018:3-19.
[18]YANG L,ZHANG R Y,LI L,et al.SimAM:A simple parameter-free attention module for convolutional neural networks[C]//International Conference on Machine Learning.PMLR.2021.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!