基于改进ShuffleNetV2的轻量化饲料原料种类识别模型
作者:
作者单位:

华中农业大学工学院/农业农村部智慧养殖技术重点实验室,武汉 430070

通讯作者:

刘梅英,E-mail:meiying_liu@mail.hzau.edu.cn

中图分类号:

S512.2;TP183

基金项目:

国家自然科学基金项目(32072765)田敏,E-mail:1683597935@qq.com


A lightweight model for identifying types of feed raw material based on improved ShuffleNetV2
Author:
Affiliation:

College of Engineering/Ministry of Agriculture and Rural Affairs Key Laboratory of Smart Farming for Agricultural Animals,Huazhong Agricultural University,Wuhan 430070,China

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • | |
  • 文章评论
    摘要:

    针对目前配合饲料加工过程中生产饲料原料入仓环节人工识别粉碎程度、颜色和形状相近的入仓原料时存在种类识别困难的问题,基于轻量化卷积神经网络模型ShuffleNetV2,提出一种识别精度更高、计算复杂度更小且适用于饲料原料图像种类识别的ShuffleNetV2-EH轻量化模型。首先在ShuffleNetV2网络模型结构中引入注意力机制ECA(efficient channel attention),根据输入自适应调整通道权重,提升网络模型对饲料原料图像重要特征的感知能力;其次将ReLU替换为HardSwish激活函数,在不增加额外的权重和偏置参数的前提下,提升模型的识别准确率;最后在保证模型识别精度的基础上,对ShuffleNetV2网络模型结构进行调整,减少模型的参数量以及计算量。结果显示,ShuffleNetV2-EH模型在8种饲料原料图像测试集上的识别准确率为99.13%,与原ShuffleNetV2模型相比提升1.38百分点,其精确率、召回率和F1分数分别提升1.45、1.63和1.62百分点,模型参数量和浮点运算量较之前分别减少352 092个和45.27×106;且综合性能优于经典卷积神经网络模型AlexNet、VggNet16、GoogLeNet和ResNet18。结果表明,改进后的ShuffleNetV2模型较好地平衡了模型的计算复杂度和识别精度,为入仓环节的饲料原料在线识别提供了算法基础。

    Abstract:

    A lightweight model of ShuffleNetV2-EH with higher accuracy of identification, lower complexity of computation, and suitable for identifying the types of feed raw material based on the lightweight convolutional neural network model ShuffleNetV2 to achieve rapid identification of warehousing feed raw materials and solve the difficulties in manually identifying the types of feed raw materials with similar crushing degree, color, and shape in currently processing and producing the combined feed raw materials. Firstly, the efficient channel attention(ECA) mechanism was introduced into the structure of ShuffleNetV2 network model, which adaptively adjusts channel weights based on input to enhance the ability of network model to percept important features in images of feed raw materials. Secondly, ReLU was replaced with HardSwish activation function to improve the recognition accuracy of the model without adding additional weights and parameters of bias. Finally, the structure of ShuffleNetV2 network model was adjusted to reduce the number of parameters and the complexity of computation in the model on the basis of ensuring the recognition accuracy of model. The results showed that the recognition accuracy of ShuffleNetV2-EH model on image sets from 8 types of feed raw materials was 99.13%, 1.38% higher than that of the original ShuffleNetV2 model. Its accuracy, recall, and F1 score increased by 1.45%, 1.63%, and 1.62 %, respectively. The number of model parameters and floating-point operations decreased by 352 092 and 45.27×106, compared to that of the original model. The overall performance was superior to classical convolutional neural network models including AlexNet, VggNet16, GoogLeNet, and ResNet18. It is indicated that the improved ShuffleNetV2 model well balances the complexity of computation and the recognition accuracy of the model, providing an algorithm foundation for online identification of feed raw materials in the warehousing process.

    图1 饲料原料自动取样识别装置Fig.1 Automatic sampling and identification device for feedstuffs
    图2 装置工作状态示意图Fig.2 Schematic diagram of device working status
    图3 部分饲料原料样品图像Fig.3 Images of some feed material samples
    图4 ShuffleNetV2单元Fig.4 ShuffleNetV2 unit
    图5 ShuffleNetV2模型结构Fig.5 ShuffleNetV2 model structure
    图6 ShuffleNetV2-EH网络模型结构Fig.6 ShuffleNetV2-EH network model structure
    图7 ECA结构示意图Fig.7 ECA structure diagram
    图8 不同改进模型在训练集上的损失值(A)和在验证集上的准确率(B)Fig.8 Loss values of different improved models on the training set(A) and accuracy of different improved models on the validation set(B)
    图9 饲料原料种类识别模型的混淆矩阵Fig.9 Confusion matrix of feed ingredient type identification model
    表 1 不同注意力机制对模型性能的影响Table 1 The impact of different attention mechanisms on model performance
    表 2 不同激活函数对模型性能的影响Table 2 The impact of different activation functions on model performance
    表 3 改进ShuffleNetV2模型的消融实验结果Table 3 Improved ablation test results of ShuffleNetV2 mode
    表 4 不同模型性能的对比试验结果Table 4 Comparative test results of different model performances
    参考文献
    相似文献
    引证文献
引用本文

田敏,牛智有,刘梅英.基于改进ShuffleNetV2的轻量化饲料原料种类识别模型[J].华中农业大学学报,2025,44(2):105-115

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2024-07-11
  • 在线发布日期: 2025-04-02
文章二维码