|国家预印本平台
首页|基于改进残差网络模型的不同部位牦牛肉分类识别方法

基于改进残差网络模型的不同部位牦牛肉分类识别方法

中文摘要英文摘要

[目的/意义]为实现不同部位牦牛肉快速、准确识别,本研究提出了一种改进的残差网络模型,并开发了一种基于智能手机的牦牛肉部位识别软件。[方法]首先对于采集到的牦牛里脊、上脑、腱子、胸肉的原始图像数据集采用数据增强的方式对其进行扩充,共得到的牦牛肉部位图像17,640张;其次,采用在原网络模型残差块之后融入轻量级卷积块注意力模块(Convolutional Block Attention Module,CBAM),以加强对不同部位牦牛肉图像关键细节特征的提取;将原模型最后的全连接层进行改进,以减少后续网络层的连接数,防止出现过拟合,减少识别图像所需的时间;然后,采用不同的学习率、权重衰减系数和优化器来验证对网络收敛速度和准确率的影响;最后,开发了移动端App,将改进后的模型部署到移动端。[结果和讨论]通过消融实验,探究出在CBAM、SENet、NAM、SKNet四种注意力机制模块中,改进效果最好的是CBAM。将改进后的ResNet18_CBAM模型在包含牦牛里脊、上脑、腱子、胸肉4种不同牦牛肉部位的数据集上进行了试验测试,结果表明,改进后的残差网络模型在测试集上的识别准确率为96.31%,比改进前的原网络模型提高了2.88%。在手机端的实际场景测试中,牦牛里脊、上脑、腱子、胸肉的识别准确率分别达到了96.30%、94.92%、98.04%、96.49%。该结果表明,改进后的ResNet18_CBAM模型可在实际应用中识别不同部位牦牛肉且具有良好的结果。[结论]本研究成果有助于保障牦牛肉产业的食品质量安全,也为青藏高原地区的牦牛肉产业智能化发展提供技术支撑。

Objective]Conducting research on the recognition of yak meat parts can help avoid confusion and substandard parts during the productionand sales of yak meat, improve the transparency and traceability of the yak meat industry, and ensure food safety. To achievefast and accurate recognition of different parts of yak meat, this study proposed an improved residual network model and developed asmartphone based yak meat part recognition software.[Methods]Firstly, the original data set of 1960 yak tenderloin, high rib, shank and brisket were expanded by 8 different data enhancementmethods, including horizontal flip, vertical flip, random direction rotation 30, random direction rotation 120, random directionrotation 300 , contrast adjustment, saturation adjustment and hue adjustment. After expansion, 17,640 yak meat images of differentparts were obtained. The expanded yak meat images of different parts were divided according to the 4:1 ratio, resulting in 14,112 yakmeat sample images in the training set and 3528 yak meat sample images in the test set. Secondly, the convolutional block attentionmodule (CBAM) was integrated into each residual block of the original network model to enhance the extraction of key detail featuresof yak images in different parts. At the same time, introducing this mechanism into the network model could achieve greater accuracyimprovement with less computational overhead and fewer parameters. In addition, in the original network model, the full connectionlayer was directly added after all residual blocks instead of global average pooling and global maximum pooling, which could improvethe accuracy of the network model, prevent overfitting, reduce the number of connections in subsequent network layers, acceleratethe execution speed of the network model, and reduce the computing time when the mobile phone recognized images. Thirdly, differentlearning rates, weight attenuation coefficients and optimizers were used to verify the influence of the improvedResNet18_CBAM network model on convergence speed and accuracy. According to the experiments, the stochastic gradient descent(SGD) algorithm was adopted as the optimizer, and when the learning rate was 0.001 and the weight attenuation coefficient was 0, theimproved ReaNet18_CBAM network model had the fastest convergence speed and the highest recognition accuracy on different partsof yak data sets. Finally, the PyTorch Mobile module in PyTorch deep learning framework was used to convert the trainedResNet18_CBAM network model into TorchScript model and saved it in *.ptl. Then, the yak part recognition App was developed usingthe Android Studio development environment, which included two parts: Front-end interface and back-end processing. The frontendof the App uses *.xml for a variety of price control layout, and the back-end used Java language development. Then TorchScriptmodel in *.ptl was used to identify different parts of yak meat.[Results and Discussions] In this study, CBAM, SENet, NAM and SKNet, four popular attentional mechanism modules, were integratedinto the original ResNet18 network model and compared by ablation experiments. Their recognition accuracy on different partsof yak meat dataset were 96.31%, 94.12%, 92.51% and 93.85%, respectively. The results showed that among CBAM, SENet, NAMand SKNet, the recognition accuracy of ResNet18 CBAM network model was significantly higher than that of the other three attentionmechanism modules. Therefore, the CBAM attention mechanism module was chosen as the improvement module of the original networkmodel. The accuracy of the improved ResNet18_CBAM network model in the test set of 4 different parts of yak tenderloin, highrib, shank and brisket was 96.31%, which was 2.88% higher than the original network model. The recognition accuracy of the improvedResNet18_CBAM network model was compared with AlexNet, VGG11, ResNet34 and ResNet18 network models on differentparts of yak test set. The improved ResNet18_CBAM network model had the highest accuracy. In order to verify the actual results ofthe improved ResNet18_CBAM network model on mobile phones, the test conducted in Xining beef and mutton wholesale market. Inthe actual scenario testing on the mobile end, a total of 54, 59, 51, and 57 yak tenderloin, high rib, shank and brisket samples were collected,respectively. The number of correctly identified samples and the number of incorrectly identified samples were counted respectively.Finally, the recognition accuracy of tenderloin, high rib, shank and brisket of yak reached 96.30%, 94.92%, 98.04% and96.49%, respectively. The results showed that the improved ResNet18_CBAM network model could be used in practical applicationsfor identifying different parts of yak meat and has achieved good results.[Conclusions]The research results can help ensure the food quality and safety of the yak industry, improve the quality and safety levelof the yak industry, improve the yak trade efficiency, reduce the cost, and provide technical support for the intelligent developmentof the yak industry in the Qinghai-Tibet Plateau region.

朱海鹏、杨英魁、宋仁德、张玉安、王建文、李欢欢

畜牧、动物医学生物科学研究方法、生物科学研究技术计算技术、计算机技术

图像分类注意力机制残差网络移动端应用牦牛肉部位分类迁移学习

classificationattention mechanismresidual networkmobile applicationsrecognition of yak meat partstransfer learning

朱海鹏,杨英魁,宋仁德,张玉安,王建文,李欢欢.基于改进残差网络模型的不同部位牦牛肉分类识别方法[EB/OL].(2023-08-14)[2025-08-16].https://chinaxiv.org/abs/202308.00169.点此复制

评论