A Lightweight Hybrid CNN-ViT Network for Weed Recognition in Paddy Fields
Accurate identification of weed species is a fundamental task for promoting efficient farmland management. Existing recognition approaches are typically based on either conventional Convolutional Neural Networks (CNNs) or the more recent Vision Transformers (ViTs). CNNs demonstrate strong capability in capturing local spatial patterns, yet they are often limited in modeling long-range dependencies. In contrast, ViTs can effectively capture global contextual information through self-attention, but they may neglect fine-grained local features. These inherent shortcomings restrict the recognition performance of current models. To overcome these limitations, we propose a lightweight hybrid architecture, termed RepEfficientViT,which integrates convolutional operations with Transformer-based self-attention. This design enables the simultaneous aggregation of both local details and global dependencies. Furthermore, we employ a structural re-parameterization strategy to enhance the representational capacity of convolutional layers without introducing additional parameters or computational overhead. Experimental evaluations reveal that RepEfficientViT consistently surpasses state-of-the-art CNN and Transformer baselines. Specifically, the model achieves an accuracy of 94.77%, a precision of 94.75%, a recall of 94.93%, and an F1-score of 94.84%. In terms of efficiency, RepEfficientViT requires only 223.54 M FLOPs and 1.34 M parameters, while attaining an inference latency of merely 25.13 ms on CPU devices. These results demonstrate that the proposed model is well-suited for deployment in edge-computing scenarios subject to stringent computational and storage constraints.
Authors
- Tonglai Liu (ORCID: https://orcid.org/0000-0002-1845-5623)
- Yixuan Wang (ORCID: https://orcid.org/0009-0006-6716-700X)
- Chengcheng Yang (ORCID: https://orcid.org/0000-0003-4709-3024)
- Wanzhen Zhang
- Youliu Zhang
Institutions
- South China Agricultural University (CN)
- Macau University of Science and Technology (MO)
- City University of Hong Kong (HK)
- Zhongkai University of Agriculture and Engineering (CN)
Publication Details
- Journal
- Mathematics
- Published
- 2025-09-08
- DOI
- https://doi.org/10.3390/math13172899
- Primary Topic
- Smart Agriculture and AI
- Type
- article
- Field-Weighted Citation Impact
- 0.00