Advancing Rice Grain Impurity Segmentation with an Enhanced SegFormer and Multi-Scale Feature Integration
Xiulin Qiu1, Hongzhi Yao2, Qinghua Liu1
1School of Automation, Jiangsu University of Science and Technology, Zhenjiang 212100, China.
Entropy (Basel, Switzerland)
|January 24, 2025
Summary
This study introduces an improved SegFormer network for precise rice impurity segmentation during harvesting. The new algorithm enhances accuracy in distinguishing rice grains from straw and leaves, aiding real-time monitoring systems.
Area of Science:
- Agricultural Engineering
- Computer Vision
- Machine Learning
Background:
- Accurate identification of rice grains versus impurities (straw, leaves) is challenging during harvesting due to occlusion and adhesion.
- Existing methods struggle with precise segmentation in complex agricultural environments.
Purpose of the Study:
- To develop a lightweight semantic segmentation algorithm for improved impurity detection in rice harvesting.
- To enhance the accuracy and efficiency of distinguishing rice grains from contaminants.
Main Methods:
- An improved SegFormer network was designed for lightweight semantic segmentation.
- The decoder was redesigned incorporating Feature Pyramid Network (FPN) for feature fusion.
- A Part Large Kernel Attention (Part-LKA) module and Bottleneck Recursive Gated Convolution (B-gnConv) were introduced for enhanced feature focus and spatial interaction.
Main Results:
- The improved model demonstrated increased accuracy in segmenting rice grains and impurities.
- Pixel accuracy (PA) increased by 1.6%, and the F1 score improved by 3.1% compared to the original SegFormer model.
- The algorithm achieved effective segmentation, simplifying the model and accelerating computation.
Conclusions:
- The proposed lightweight semantic segmentation algorithm offers a valuable solution for real-time impurity monitoring in rice combine harvesters.
- The enhanced SegFormer network provides a robust algorithmic reference for agricultural automation and quality control.


