Abstract:
Abstract: Accurate and timely detection of meat parts has gradually been highly demanding in meat consumption. However, the traditional image classification cannot clearly distinguish the similar color and texture characteristics for different mutton parts under different storage time, particularly with the low generalization and time-consuming. In this study, an improved ResNet18 network model was proposed to classify the different mutton parts, while, the corresponding mobile application software was developed using the optimal model. Firstly, 1 008 mutton images of loin, hind shank, and fore shank under different storage times (0-12 d) were collected, and then 9 types of data-augmentation were used to expand the dataset. After that, 6 000 images were randomly selected from the augmented dataset for modeling, where 80% of the images were used as the training dataset, and the remainder was used as the test dataset. Secondly, Additive Angular Margin Loss (ArcFace) and the depthwise separable convolution were introduced into the ResNet18 network for the improved one. Thirdly, the improved ResNet18 network was trained with the augmented images of different mutton parts. Meanwhile, an evaluation was made to determine the effect of different parameters on the convergence speed and accuracy of improved ResNet18. Optimizers of stochastic gradient descent (SGD) and adaptive moment estimation (Adam), the learning rate of 0.01 and 0.001, weight decay coefficient of 0 and 0.000 5 were adopted for experimental comparison. The optimal classification model was then determined for different mutton parts. Finally, a mobile application software was developed to transplant the TorchScript model that transformed from the improved ResNet18. The results showed that the ArcFace greatly improved the distinguishability of different mutton parts, while the depthwise separable convolution significantly reduced the parameters of the network. Furthermore, the improved ResNet18 network using SGD optimizer presented a higher accuracy and more stable performance than that using the Adam in the test phase. When the learning rate was set to 0.01, the weight decay coefficient was set to 0.000 5, and the SGD optimizer was used to train the improved ResNet18 network, only 25 images of different parts of lamb were classified incorrectly in the 1 200 test sets, where the classification accuracy of the model was 97.92%, while the average classification accuracies of the loin, hind shank, and fore shank were 97.00%, 98.00%, and 98.75%, respectively. Compared with the original, the classification accuracy of the improved ResNet18 was improved by 5.92 percentage points, while the classification accuracies of loin, hind shank, and fore shank were improved by 5.75, 5.50, and 6.50 percentage points, respectively. Compared with the MobileNet model, the classification accuracy of improved ResNet18 was improved by 13.34 percentage points, while the classification accuracies of loin, hind shank, and fore shank were improved by 13.50, 10.75, and 15.75 percentage points, respectively. Moreover, the software using the improved ResNet18 quickly and accurately classified different mutton parts, where the average detection time of each image was about 0.3 s. The finding can provide the technical and theoretical support to improve the level of intelligent detection of meat products for the fair competition of the meat market.