计算机工程与应用 ›› 2022, Vol. 58 ›› Issue (13): 210-216.DOI: 10.3778/j.issn.1002-8331.2107-0317

• 图形图像处理 • 上一篇    下一篇

基于NVIDIA TX2的喷码字符检测算法

李帆,胡维平,刘北北,刘雨戈   

  1. 1.广西师范大学 电子工程学院,广西 桂林 541000
    2.中国科学院 自动化研究所 苏州研究院,江苏 苏州 215000
  • 出版日期:2022-07-01 发布日期:2022-07-01

NVIDIA TX2-Based Inkjet Character Detection Algorithm

 LI Fan, HU Weiping, LIU Beibei, LIU Yuge   

  1. 1.School of Electronic Engineering, Guangxi Normal University, Guilin, Guangxi 541000, China
    2.Suzhou Research Institute, Institute of Automation, Chinese Academy of Sciences, Suzhou, Jiangsu 215000, China
  • Online:2022-07-01 Published:2022-07-01

摘要: 针对复杂商品背景下喷码字符漏喷、重叠、缺失等现象,提出一种基于YOLOv5+CRNN的喷码字符检测算法。喷码字符定位算法以YOLOv5为基础网络,结合注意力机制提高其检测精度,再通过稀疏训练和通道剪枝降低模型参数量与复杂度,最终检测精度提高了3.4个百分点,模型参数量降低了6.7?MB。对定位后的字符区域进行背景擦除和透视变换处理后送入CRNN网络实现喷码字符识别,最终将改进后的算法部署至NVIDIA TX2嵌入式平台。通过在食品包装工厂生产流水线实测,检测速度达到28?frame/s,字符定位精度99.4%,识别率95%,且具有很好的鲁棒性。

关键词: YOLOv5算法, CRNN网络, 目标检测, 字符识别, 嵌入式, 模型量化

Abstract: Aiming at the phenomenon of spray leakage, re-spray, deficiency of inkjet characters under the background of complex commodities, an inkjet character detection algorithm based on YOLOv5+CRNN is proposed. The inkjet character positioning algorithm is based on YOLOv5, combined with the attention mechanism to improve its detection accuracy. Then, the number and complexity of model parameters are reduced through sparse training and channel pruning, so that the final detection accuracy is increased by 3.4?percentage points, and the amount of model parameters is reduced by 6.7?MB. After erasing background and perspective transformation, the positioned character area is send to the CRNN network to complete the recognition of inkjet character. Finally, the improved algorithm is deployed to the NVIDIA TX2 embedded platform. Through the actual measurement in the production lines of the food packaging factory, the testing speed of the model reaches 28?frame/s, the accuracy of character-localization is 99.4%, and the recognition rate is 95% with good robustness.

Key words: YOLOv5 algorithm, convolutional recurrent neual network(CRNN), target detection, character recognition, embedded, model quantization