Computer Engineering and Applications ›› 2023, Vol. 59 ›› Issue (18): 129-136.DOI: 10.3778/j.issn.1002-8331.2205-0553

• Pattern Recognition and Artificial Intelligence • Previous Articles     Next Articles

Driver’s Mobile Phone Usage Detection Model:Optimizing Yolov5n Algorithm

WANG Xinpeng, WANG Xiaoqiang, LIN Hao, LI Leixiao, LI Kecen, TAO Yihao   

  1. 1.College of Information Engineering, Inner Mongolia University of Technology, Hohhot 010080, China
    2.College of Computer Science and Engineering, Tianjin University of Technology, Tianjin 300384, China
    3.College of Data Science and Application, Inner Mongolia University of Technology, Hohhot 010080, China
  • Online:2023-09-15 Published:2023-09-15

驾驶员手机使用检测模型:优化Yolov5n算法

王鑫鹏,王晓强,林浩,李雷孝,李科岑,陶乙豪   

  1. 1.内蒙古工业大学 信息工程学院,呼和浩特 010080
    2.天津理工大学 计算机科学与工程学院,天津 300384
    3.内蒙古工业大学 数据科学与应用学院,呼和浩特 010080

Abstract: In order to further realize the real-time detection of mobile phone usage violations on mobile devices or embedded devices, this paper proposes a lightweight, high-precision and real-time detection model by optimizing Yolov5n algorithm. Firstly, Focal-EIoU Loss and FocalL1 Loss are combined to obtain more accurate frame positioning and faster convergence of loss function. Secondly, the slimming pruning algorithm is used to further improve the lightweight and computational efficiency of the model. During the fine-tuning of the model, the data augmentation technology is used to guide the fine-tuning operation, so as to improve the performance of the model. Finally, the improved methods is used to perform ablation experiments on the mobile phone dataset to further verify the effectiveness of the detection model. Experiments show that the detection accuracy of the optimized model on the mobile phone usage dataset and Pascal VOC 2012 dataset is improved by 0.2 and 12.3 percentage points respectively, the parameter quantity is reduced by 44.4%, and the calculation amount is reduced by 45.2% and 40% respectively, which is conducive to the further real-time detection of the model on mobile devices and embedded devices.

Key words: Yolov5n algorithm optimization, Slimming pruning, Focal-EIoU Loss, FocalL1 Loss, data augmentation

摘要: 为进一步实现在移动设备或嵌入式设备上对手机使用的违法行为进行实时检测,通过优化Yolov5n算法提出了一种轻量化、高精度、实时性的检测模型。将Focal-EIoU Loss与FocalL1 Loss相结合来获得更加精确的框定位以及损失函数的更快收敛。利用Slimming剪枝算法来进一步提高模型的轻量化及计算效率。在模型微调时利用数据增强技术对微调操作进行指导,从而使模型能够获得更好的性能提升。在手机使用数据集上对改进方法进行消融实验,进一步验证检测模型的有效性。实验表明,优化后的模型在手机使用数据集及Pascal VOC 2012数据集上的检测精度分别提高了0.2、12.3个百分点,参数量减少44.4%,计算量分别减小45.2%、40%,有利于模型进一步在移动设备及嵌入式设备上的实时性检测。

关键词: Yolov5n算法优化, Slimming剪枝, Focal-EIoU Loss, FocalL1 Loss, 数据增强