Rice grains and grain impurity segmentation method based on a deep learning algorithm-NAM-EfficientNetv2

Qinghua Liu,Weikang Liu,Yishan Liu,Tiantian Zhe,Bochuan Ding,Zhenwei Liang
DOI: https://doi.org/10.1016/j.compag.2023.107824
IF: 8.3
2023-06-01
Computers and Electronics in Agriculture
Abstract:An appropriate image segmentation algorithm is required for discriminating between full grains and grain impurities. In this study, a lightweight fully convolutional segmentation algorithm based on NAM EfficientNetV2 was proposed to solve the problem of slow processing speed in mobile terminal equipment owing to limited computing resources and a large number of model parameters and improve the detection accuracy. First, a standardized NAM attention mechanism was introduced to replace the SE attention mechanism used in EfficientNetV2 and the improved NAM-EfficientNetV2 network was used as a feature extraction structure. Then, in the up-sampling process, the multi-scale features output by the shallow network are fused to effectively use low-level semantics to encode spatial details and fully convolutional pixel segmentation technology is used to achieve rice grain and impurity segmentation. Finally, compared with the baseline model, the detection accuracy of the model was further improved on a self-made dataset. The comprehensive evaluation index F1 of rice grain and its impurities were 95.26% and 93.27%, respectively, and the model parameter amount was 20.6 M. Combined with post-processing, detecting an image on the GPU device took an average of 0.103 s and 0.301 s on the CPU device. The experimental results showed that the improved algorithm is more lightweight, which provides a reference for the model to be deployed in mobile terminal equipment to realize the function of real-time detection of grain impurity in the combine harvester.
agriculture, multidisciplinary,computer science, interdisciplinary applications
What problem does this paper attempt to address?