IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v13y2025i17p2899-d1744745.html
   My bibliography  Save this article

A Lightweight Hybrid CNN-ViT Network for Weed Recognition in Paddy Fields

Author

Listed:
  • Tonglai Liu

    (College of Artificial Intelligence, Zhongkai University of Agriculture and Engineering, Guangzhou 510550, China)

  • Yixuan Wang

    (Department of Architecture and Civil Engineering, City University of Hong Kong, Hong Kong SAR 999077, China)

  • Chengcheng Yang

    (College of Artificial Intelligence, Zhongkai University of Agriculture and Engineering, Guangzhou 510550, China
    School of Computer Science and Engineering, Macau University of Science and Technology, Avenida Wai Long, Taipa, Macau SAR 999078, China)

  • Youliu Zhang

    (College of Engineering, South China Agricultural University, Guangzhou 510642, China)

  • Wanzhen Zhang

    (College of Artificial Intelligence, Zhongkai University of Agriculture and Engineering, Guangzhou 510550, China)

Abstract

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.

Suggested Citation

  • Tonglai Liu & Yixuan Wang & Chengcheng Yang & Youliu Zhang & Wanzhen Zhang, 2025. "A Lightweight Hybrid CNN-ViT Network for Weed Recognition in Paddy Fields," Mathematics, MDPI, vol. 13(17), pages 1-15, September.
  • Handle: RePEc:gam:jmathe:v:13:y:2025:i:17:p:2899-:d:1744745
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/13/17/2899/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/13/17/2899/
    Download Restriction: no
    ---><---

    More about this item

    Keywords

    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jmathe:v:13:y:2025:i:17:p:2899-:d:1744745. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.