《计算机应用》唯一官方网站 ›› 2022, Vol. 42 ›› Issue (5): 1417-1423.DOI: 10.11772/j.issn.1001-9081.2021030448

• 人工智能 • 上一篇    下一篇

工业场景下基于秩信息对YOLOv4的剪枝

秦晓1,2, 成苗1,2,3(), 张绍兵1,2,3, 何莲1,3, 石向文1,2, 王品学1,2, 曾尚1,2   

  1. 1.中国科学院 成都计算机应用研究所, 成都 610041
    2.中国科学院大学 计算机科学与技术学院, 北京 100049
    3.深圳市中钞科信金融科技有限公司, 广东 深圳 518206
  • 收稿日期:2021-03-24 修回日期:2021-07-28 接受日期:2021-07-29 发布日期:2022-06-11 出版日期:2022-05-10
  • 通讯作者: 成苗
  • 作者简介:秦晓(1995—),男,四川成都人,硕士研究生,主要研究方向:人工智能、机器视觉
    成苗(1983—),男,四川成都人,高级工程师,硕士,主要研究方向:人工智能、机器视觉 chengmiao@cbpm‑kexin.com
    张绍兵(1979—),男,四川成都人,正研级高级工程师,硕士,主要研究方向:高速图像处理、缺陷检测、深度学习
    何莲(1983—),女,四川西充人,高级工程师,博士,主要研究方向:人工智能、机器视觉
    石向文(1991—),男,湖南永州人,硕士研究生,主要研究方向:人工智能
    王品学(1993—),男,四川成都人,硕士研究生,CCF会员,主要研究方向:小样本学习、表面缺陷检测
    曾尚(1995—),男,湖北荆门人,硕士研究生,主要研究方向:人工智能。

Pruning of YOLOv4 based on rank information in industrial scenes

Xiao QIN1,2, Miao CHENG1,2,3(), Shaobing ZHANG1,2,3, Lian HE1,3, Xiangwen SHI1,2, Pinxue WANG1,2, Shang ZENG1,2   

  1. 1.Chengdu Institute of Computer Application,Chinese Academy of Sciences,Chengdu Sichuan 610041,China
    2.School of Computer Science and Technology,University of Chinese Academy of Sciences,Beijing 100049,China
    3.Shenzhen CBPM-KEXIN Banking Technology Company Limited,Shenzhen Guangdong 518206,China
  • Received:2021-03-24 Revised:2021-07-28 Accepted:2021-07-29 Online:2022-06-11 Published:2022-05-10
  • Contact: Miao CHENG
  • About author:QIN Xiao, born in 1995, M. S. candidate. His research interests include artificial intelligence, machine vision.
    CHENG Miao, born in 1983, M. S., senior engineer. His research interests include artificial intelligence, machine vision.
    ZHANG Shaobing, born in 1979, M. S., research senior engineer. His research interests include high-speed image processing, defect detection, deep learning.
    HE Lian, born in 1983, Ph. D., senior engineer. Her research interests include artificial intelligence, machine vision.
    SHI Xiangwen, born in 1991, M. S. candidate. His research interests include artificial intelligence.
    WANG Pinxue, born in 1993, M. S. candidate. His research interests include few-shot learning, surface defect detection.
    ZENG Shang, born in 1995, M. S. candidate. His research interests include artificial intelligence.

摘要:

在工业场景无线射频识别(RFID)实时缺陷检测任务中,为了保证检测精度以及速度常采用YOLO这类深度学习目标检测算法,然而这些算法仍然难以满足工业检测中的速度要求,且无法将相应的网络模型部署到资源受限的设备上。针对以上问题,需要对YOLO模型进行剪枝压缩,提出了一种基于秩信息的特征信息丰富性和特征信息多样性加权融合的新型网络剪枝方法。首先,加载未剪枝模型进行推理,并在前向传播中获取滤波器对应特征图的秩信息来衡量特征信息丰富性;然后,根据不同大小的剪枝率对秩信息进行聚类或者相似度计算来衡量特征信息的多样性;最后,加权融合得到对应滤波器的重要性程度并对其进行排序后,剪除重要性排序靠后的滤波器。实验结果表明,对于YOLOv4,在剪枝率为28.87%且特征信息丰富性权重为0.75的情况下,所提方法相较于单一使用特征图秩信息的方法提高了2.6%~8.9%的平均精度均值(mAP),所提方法剪枝后的模型甚至相较于未剪枝模型提高了0.4%的mAP并减少了35.0%的模型参数,表明该方法有利于模型部署。

关键词: 无线射频识别, YOLO, 网络剪枝, 特征信息丰富性, 特征信息多样性, 秩信息

Abstract:

In the Radio Frequency IDentification (RFID) real-time defect detection task in industrial scenes, the deep learning target detection algorithms such as You Only Look Once (YOLO) are often adopted in order to ensure the detection precision and speed. However, these algorithms are still difficult to meet the speed requirement of industrial detection, and the corresponding network models cannot be deployed on resource-constrained devices. To solve these problems, the YOLO model must be pruned and compressed. A new network pruning method of the weighted fusion of feature information richness and feature information diversity based on rank information was proposed. Firstly, the unpruned model was loaded and reasoned, and the rank information of the corresponding feature maps of the filters was obtained in forward propagation to measure the feature information richness. Secondly, according to the different pruning rates, the rank information was clustered or the similarity of the rank information was calculated to measure the feature information diversity. Finally, the importance degrees of the corresponding filters were obtained after the weighted fusion and were sorted, and the filters with low importance were cut off. Experimental results show that, for YOLOv4, when the pruning rate is 28.87% and the weight of feature information richness is 0.75, the proposed method has the mean Average Precision (mAP) improved by 2.6%-8.9% compared with the method that uses rank information of the feature maps alone, and the model pruned by the proposed method even has the mAP increased by 0.4% and the model parameters reduced by 35.0% compared with the unpruned model, indicating that the proposed method is conducive to the model deployment.

Key words: Radio Frequency IDentification (RFID), You Only Look Once (YOLO), network pruning, feature information richness, feature information diversity, rank information

中图分类号: