Abstract
Weed detection in complex agricultural environments faces significant challenges due to drastic illumination variations, high visual similarity between crops and weeds, and strong background interference, which place strict requirements on both detection accuracy and real-time performance. Most existing object detection methods rely on non-maximum suppression (NMS) as a post-processing step. However, this mechanism suffers from threshold sensitivity, limited cross-scene adaptability, and accumulated inference latency in practical applications. To address these limitations, this paper proposes a lightweight adaptive transformer-based model, termed CEAM-DETR, under an end-to-end detection paradigm to achieve efficient and stable weed detection without relying on NMS. A cross-stage efficient attention backbone is first constructed by integrating cross-stage partial connections with single-head self-attention, where feature splitting and cross-stage shortcuts preserve lightweight information and gradient propagation paths, while attention is applied only to partial channels to reduce computational and memory overhead and enhance fine-grained representations of small-scale targets. On this basis, an adaptive sparse feature interaction module (ASFI) is introduced to dynamically fuse sparse and dense attention branches, thereby improving the concentration of discriminative information under complex backgrounds. Furthermore, a multi-scale dilated re-parameterization block (MSDRB) is designed to extract features using parallel convolutions with different dilation rates and to equivalently merge them into a single convolution layer during inference, which expands the receptive field without increasing computational burden and supplements multi-scale contextual information. Experimental results on public datasets demonstrate that CEAM-DETR outperforms state-of-the-art methods in terms of detection accuracy and robustness, validating its effectiveness in complex agricultural environments. Compared to the original RT-DETR, the proposed model increased by 1.5%, reduced Params by 36.5%, decreased GFLOPs by 26.0%, and improved FPS by 32.9%.
Similar content being viewed by others
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Competing of interest
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Zhang, C., Xiao, J. & Chang, Y. CEAM-DETR: An NMS-free lightweight transformer for weed detection in soybean fields under complex conditions. Sci Rep (2026). https://doi.org/10.1038/s41598-026-48148-4
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-026-48148-4


