Abstract:Aiming to address the challenges of balancing accuracy and efficiency, and the difficulty of embedded deployment, in high-throughput detection of densely clustered wheat grains, a lightweight LMA-DEIM-based model for detecting densely clustered wheat grains was proposed. Firstly, a WSD dataset containing 230,000 grain target boxes from five wheat varieties was constructed to provide a data foundation for model training and evaluation. Secondly, based on the DEIM framework, a lightweight global modeling backbone network, Lite-Mamba, was designed to enhance the ability to distinguish clustered regions with linear computational complexity. A MIFI module based on selective state space was proposed to replace the original AIFI module, achieving efficient feature interaction and reduced computational complexity. A lightweight downsampling module, ADown, was introduced to mitigate detail loss during downsampling and improve the ability to preserve detailed features. Experimental results showed that the LMA-DEIM model achieved precision, recall, and mAP@50 of 92.7%, 91.5%, and 92.0% on the WSD test set, respectively, with an inference speed of 143.1 f/s and an average relative counting error of only 3.08% on the high-density test subset. Compared with the original DEIM framework, the proposed method significantly improved accuracy while reducing the number of parameters by 66.9% and increasing speed by 240%, meeting the deployment requirements of embedded devices for high-throughput, real-time, and high-precision grain detection.