CAO Yuanjie,GAO Yuxiang,LIU Haibo,et al.Model Pruning Algorithm based on YOLOv4-Tiny[J].Journal of Chengdu University of Information Technology,2021,36(06):610-614.[doi:10.16836/j.cnki.jcuit.2021.06.005]
基于YOLOv4-Tiny模型剪枝算法
- Title:
- Model Pruning Algorithm based on YOLOv4-Tiny
- 文章编号:
- 2096-1618(2021)06-0610-05
- 关键词:
- 深度学习; 卷积神经网络; YOLOv4-Tiny; YOLOv3-Tiny; 模型剪枝; 稀疏训练
- Keywords:
- deep learning; convolutional neural network; YOLOv4-Tiny; YOLOv3-Tiny; model pruning; sparse training
- 分类号:
- TP183
- 文献标志码:
- A
- 摘要:
- 针对YOLO系列算法参数量大、算法复杂度高提出一种基于BN(batch normalization)层剪枝方法。该方法先通过对BN层的缩放系数γ以及平移系数β添加正则化约束训练,根据BN层参数以及卷积层各通道对网络贡献度等指标设定合适阈值进行剪枝。该方法在基本没有精度损失的前提下对YOLOv4-Tiny模型压缩11倍,计算量减少72%,在CPU和GPU处理器下推理速度分别增快44%和29%。实验结果表明,该剪枝方法能保持模型良好性能的前提下压缩模型,减少参数,降低算法复杂度。
- Abstract:
- Due to the large number of parameters and high complexity of YOLO series algorithms, a pruning method based on the BN(batch normalization)layer is proposed. The method first adds regularization constraint training to the scaling coefficient γ and translation coefficient β of the BN layer, According to the parameters of the BN layer and the contribution of each channel of the convolutional layer to the network, an appropriate threshold is set for pruning. The proposed method comppresses the YOLOv4-Tiny model by 11 times with almost no loss of precision, reduces the computation amount by 72%, and increases the inference speed by 44% and 29% respectively under CPU and GPU processor.Experimental results show that the pruning method can compress the model, reduce the parameters and reduce the complexity of the algorithm while maintaining the good performance of the model.
参考文献/References:
[1] Szegedy C,Liu W,Jia Y,et al.Going deeper with convolutions[C].Proceedings of the IEEE conference on computer vision and pattern recognition. 2015: 1-9.
[2] K He,X Zhang,S Ren,et al.Deep Residual Learning for Image Recognition[C].2016 IEEE Conference on Computer Vision and Pattern Recognition(CVPR),2016:770-778.
[3] Huang G,Liu Z,Van Der Maaten L, et al. Densely Connected Convolutional Networks[C].2017 IEEE Conference on Computer Vision and Pattern Recognition(CVPR). IEEE, 2017: 2261-2269.
[4] Howard A, Sandler M, Chu G, et al. Searching for MobileNetV3[C].2019 IEEE/CVF International Conference on Computer Vision(ICCV), 2019:1314-1324.
[5] Chollet F. Xception: Deep learning with depthwise separable convolutions[C].Proceedings of the IEEE conference on computer vision and pattern recognition. 2017: 1251-1258.
[6] Denil M,Shakibi B,Dinh L,et al.Predicting parameters in deep learning[C].Proceedings of the 26th International Conference on Neural Information Processing Systems-Volume 2,2013:2148-2156.
[7] Molchanov P, Mallya A, Tyree S, et al. Importance estimation for neural network pruning[C].2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR). IEEE, 2019: 11256-11264.
[8] Han S, Pool J, Tran J, et al. Learning both weights and connections for efficient neural networks[C].Proceedings of the 28th International Conference on Neural Information Processing Systems-Volume 1,2015:1135-1143.
[9] 叶会娟,刘向阳.基于稀疏卷积核的卷积神经网络研究及其应用[J].信息技术,2017,10(10):5-9.
[10] 姚巍巍,张洁.基于模型剪枝和半精度加速改进YOLOv3-tiny算法的实时司机违章行为检测[J].计算机系统应用,2020,29(4):41-47.
[11] Redmon J,Divvala S,Girshick R,et al. You Only Look Once:Unified,Real-Time Object Detection [C].2016 IEEE Conference on Computer Vision and Pattern Recognition(CVPR). IEEE,2016:779-788.
[12] Bochkovskiy A,Wang C Y,Liao H Y M.YOLOv4:Optimal Speed and Accuracy of Object Detection [J/OL]. arXiv,2020.
[13] Xu Z F,Jia R S,Liu Y B,et al.Fast method of detecting tomatoes in a complex scene for picking robots[J].IEEE Access,2020,8:55289-55299.
[14] Ioffe S, Szegedy C. Batch normalization: Accelerating deep network training by reducing internal covariate shift[C].International conference on machine learning. PMLR, 2015: 448-456.
[15] 曹远杰,高瑜翔.基于GhostNet残差结构的轻量化饮料识别网络[J/OL].https://doi.org/10.19678/j.issn.1000-3428.0059966.计算机工程,2021-04-18.
相似文献/References:
[1]蔡姣姣,何 嘉.基于混合自动编码器的分类应用[J].成都信息工程大学学报,2016,(增刊1):1.
[2]任 波,王录涛,邓 旭,等.一种改进深度学习网络结构的英文字符识别[J].成都信息工程大学学报,2017,(03):259.[doi:10.16836/j.cnki.jcuit.2017.03.005]
REN Bo,WANG Lu-tao,DENG Xu,et al.An Improved Deep Learning Network Structure for English Character Recognition[J].Journal of Chengdu University of Information Technology,2017,(06):259.[doi:10.16836/j.cnki.jcuit.2017.03.005]
[3]王 强,李孝杰,陈 俊.基于He-Net的卷积神经网络算法的图像分类研究[J].成都信息工程大学学报,2017,(05):503.[doi:10.16836/j.cnki.jcuit.2017.05.007]
WANG Qing,LI Xiao-jie,CHEN Jun.Research on Image Classification based on HE-Net Convolutional Neural Networks[J].Journal of Chengdu University of Information Technology,2017,(06):503.[doi:10.16836/j.cnki.jcuit.2017.05.007]
[4]黄 洁,王 燚.适用于侧信道分析的卷积神经网络结构的实验研究[J].成都信息工程大学学报,2019,(05):449.[doi:10.16836/j.cnki.jcuit.2019.05.001]
HUANG Jie,WANG Yi.Experimental Study on the Structure of Convolutional Neural Network Suitable for Side Channel Analysis[J].Journal of Chengdu University of Information Technology,2019,(06):449.[doi:10.16836/j.cnki.jcuit.2019.05.001]
[5]冯金慧,陶宏才.基于注意力的深度协同在线学习资源推荐模型[J].成都信息工程大学学报,2020,35(02):151.[doi:10.16836/j.cnki.jcuit.2020.02.005]
FENG Jinhui,TAO Hongcai.An Attention-based Deep Collaborative Filtering Model for Online Course Recommendation[J].Journal of Chengdu University of Information Technology,2020,35(06):151.[doi:10.16836/j.cnki.jcuit.2020.02.005]
[6]王文文,陶宏才.基于优化VGG19卷积神经网络的异常检测模型研究[J].成都信息工程大学学报,2020,35(03):253.[doi:10.16836/j.cnki.jcuit.2020.03.001]
WANG Wenwen,TAO Hongcai.Research on Anomaly Detection Model based on Optimized VGG19 Convolutional Neural Network[J].Journal of Chengdu University of Information Technology,2020,35(06):253.[doi:10.16836/j.cnki.jcuit.2020.03.001]
[7]杨 铭,文 斌.一种改进的YOLOv3-Tiny目标检测算法[J].成都信息工程大学学报,2020,35(05):531.[doi:10.16836/j.cnki.jcuit.2020.05.009]
YANG Ming,WEN Bin.An Improved YOLOv3-Tiny Target Detection Algorithm[J].Journal of Chengdu University of Information Technology,2020,35(06):531.[doi:10.16836/j.cnki.jcuit.2020.05.009]
[8]唐康健,文 展,李文藻.基于卷积神经网络的垃圾图像分类模型研究应用[J].成都信息工程大学学报,2021,36(04):374.[doi:10.16836/j.cnki.jcuit.2021.04.004]
TANG Kangjian,WEN Zhan,LI Wenzao.Research and Application of Garbage Image Classification Model based on Convolutional Neural Network[J].Journal of Chengdu University of Information Technology,2021,36(06):374.[doi:10.16836/j.cnki.jcuit.2021.04.004]
[9]晏美娟,魏 敏,文 武.一种高分辨率卫星图像道路提取方法[J].成都信息工程大学学报,2022,37(01):46.[doi:10.16836/j.cnki.jcuit.2022.01.008]
YAN Meijuan,WEI Min,WEN Wu.A Method of Road Extraction for High-Resolution Satellite Images[J].Journal of Chengdu University of Information Technology,2022,37(06):46.[doi:10.16836/j.cnki.jcuit.2022.01.008]
[10]蒲建飞,魏 维,吴帝勇,等.基于烟雾区域和轻量化模型的视频烟雾检测[J].成都信息工程大学学报,2023,38(03):281.[doi:10.16836/j.cnki.jcuit.2023.03.006]
PU Jianfei,WEI Wei,WU Diyong,et al.Video Smoke Detection based on Smoke Area and Lightweight Model[J].Journal of Chengdu University of Information Technology,2023,38(06):281.[doi:10.16836/j.cnki.jcuit.2023.03.006]
[11]张 斌,王 强.一种改进型卷积神经网络的图像分类方法[J].成都信息工程大学学报,2019,(01):39.[doi:10.16836/j.cnki.jcuit.2019.01.009]
ZHANG Bin,WANG Qiang.An Improved Convolution Neural Network Image Classification Method[J].Journal of Chengdu University of Information Technology,2019,(06):39.[doi:10.16836/j.cnki.jcuit.2019.01.009]
[12]唐明轩,李孝杰,周激流.基于Dense Connected深度卷积神经网络的
自动视网膜血管分割方法[J].成都信息工程大学学报,2018,(05):525.[doi:10.16836/j.cnki.jcuit.2018.05.007
]
TANG Ming-xuan,LI Xiao-jie,ZHOU Ji-liu.Automatic Retinal Vascular Segmentation Method based on
Densely Connected Convolution Neural Network[J].Journal of Chengdu University of Information Technology,2018,(06):525.[doi:10.16836/j.cnki.jcuit.2018.05.007
]
[13]曹远杰,高瑜翔,杜鑫昌,等.口罩佩戴识别中的Tiny-YOLOv3模型算法优化[J].成都信息工程大学学报,2021,36(02):154.[doi:10.16836/j.cnki.jcuit.2021.02.005]
CAOYuanjie,GAO Yuxiang,DU Xinchang,et al.Tiny-YOLOv3 Model Algorithm is Optimized for Mask Wearing Recognition[J].Journal of Chengdu University of Information Technology,2021,36(06):154.[doi:10.16836/j.cnki.jcuit.2021.02.005]
备注/Memo
收稿日期:2021-04-18
基金项目:四川省教育厅高校创新团队资助项目(15TD0022)