基于改进MobileNetV3-Large的鸡蛋新鲜度识别模型

    Recognizing egg freshness using an improved MobileNetV3-Large

    • 摘要: 鸡蛋在运输贮存过程中一直伴随着品质的不断衰减,如何快速、准确地识别鸡蛋新鲜度是业界和学者们共同关注的话题。针对鸡蛋内部气室和蛋黄等新鲜度特征差异不显著的问题,该研究提出一种基于改进MobileNetV3-Large的轻量级鸡蛋新鲜度识别模型。首先在深度可分离卷积中引入动态卷积(Dynamic Convolution, DC)模块,改进后的深度可分离动态卷积模块能够为不同的鸡蛋图像动态生成卷积核参数,提高模型特征提取能力;其次在注意力模块中引入坐标注意力(Coordinate Attention, CA)模块,增强模型对位置信息的感知能力;最后采用3 276张鸡蛋图像训练并测试改进的MobileNetV3-DA模型。试验结果表明,MobileNetV3-DA模型在测试集上的准确率为97.26%,分别比ResNet18、VGG19和ShuffleNetV2模型高5.19、0.84和5.91个百分点;模型参数量和计算量分别比MobileNetV3-Large减少1.03和78.64 M;在实际应用中,MobileNetV3-DA模型精确率、召回率和加权分数的平均值分别为95.95%、95.48%和97.82%,达到了理想的识别效果。改进的MobileNetV3-DA模型为鸡蛋供应链各环节进行鸡蛋新鲜度快速、准确识别提供了算法支持。

       

      Abstract: Eggs, a highly nutritious food, can provide the human body with essential nutrients, such as protein, fat, minerals, and vitamins. However, fresh eggs are easily deteriorating products during production, processing, sales and distribution, resulting in nutritional and economic losses to the industry, and potential health and safety hazards to the consumers. Therefore, it is of great significance to study a fast, low-cost, and reliable egg freshness recognition. In this study, an improved MobileNetV3-DA recognition model was proposed to rapidly and accurately extract the characteristics of air chambers and yolks in egg images. The egg freshness was predicted to incorporate dynamic convolution (DC) and coordinate attention (CA). Some images of eggs with different freshness were collected to simulate the domestic eggs storage scenery. The data augmentation was utilized to increase the diversity of images, in order to prevent the overfitting of the model. The backbone was selected as the MobileNetV3-Large model with fewer parameters and stronger feature extraction. As such, the improved MobileNetV3-DA model was constructed for the more effective recognition of egg freshness. Firstly, a DC module was introduced into the depthwise separable convolution of the MobileNetV3-Large model, in order to extract the small difference features in the egg images. The improved module of depth separable dynamic convolution was dynamically generating convolutional kernel parameters for the different egg images, particularly for the accurate identification of freshness. Secondly, the CA module was introduced in the attention module to enhance the perception of overall information, with emphasis on the relative position information in the egg images. Accordingly, the region of interest (ROI) was effectively positioned to concentrate on the air chamber and yolk area in the pixel coordinate system. After that, the weight of important features increased further to strengthen the freshness features, and suppressed the influence of interfering information. Finally, the improved MobileNetV3-DA model was trained and tested using 3 276 images of three levels of egg freshness. The results showed that the recognition accuracy of the improved MobilenetV3-DA model reached 97.26%, which was 4.55 percentage points higher than that of MobileNetV3-Large. The Precision, Recall, and F1-score of MobileNetV3-DA all reached more than 93% on the various freshness images. Therefore, the MobileNetV3-Large model with the DC and CA module can be widely expected to improve the recognition accuracy and the generalization of the model. In addition, the number of parameters and the computation of the MobileNetV3-DA model were 4.45 and 149.07 MFLOPs, respectively, which were 1.03 M and 78.64 M lower than those before the improvement. A more stable convergence and fewer parameters were achieved in the improved model than before. The accuracies in the test were 5.19, 0.84 and 5.91 percentage points higher than those of ResNet18, VGG19, and ShuffleNetV2 models. Furthermore, the recognition accuracy of the trained MobileNetV3-DA model reached 95.67 % in the practical application. the average values of precision, recall and F1-score of MobileNetV3-DA model were 95.95%, 95.48% and 97.82%, respectively. The findings can provide basic support for the efficient recognition of egg freshness using lightweight models. The improved model can be expected to serve as the practical usage on portable terminals for timely freshness recognition along egg industry chains.

       

    /

    返回文章
    返回