CADLGI: content-aware dynamic local–global interaction for lightweight classification of imperfect barley grains
Accurate classification of imperfect barley grains is essential for automated grain-quality inspection. However, subtle surface defects, variations in kernel morphology, and the coexistence of local textural and global structural information pose challenges to fine-grained recognition. To address these issues, we propose a Content-Aware Dynamic Local–Global Interaction (CADLGI) framework that integrates content-adaptive prototype representations with local–global feature interaction. The proposed framework employs Content-Aware Dynamic Prototype Activation (CADPA) to construct an input-adaptive prototype memory and Adaptive Local–Global Fusion (ALGF) to enhance the query representation through local texture and global contextual information. These complementary representations are integrated through cross-attention. Experiments were conducted on a dataset comprising 40,000 images across six barley-grain categories using Swin-T and RepViT-M1.0 backbones. CADLGI-Swin achieved an accuracy of 95.25% and a Macro-F1 of 0.9426, compared with 91.68% and 0.8919 for Swin-T. The lightweight CADLGI-Rep achieved 94.40% accuracy and a Macro-F1 of 0.9304, compared with 93.15% and 0.9146 for RepViT-M1.0, with a theoretical computational cost of 1.25 GFLOPs. Ablation experiments further supported the complementary contributions of CADPA and ALGF. CADLGI improves fine-grained barley-grain classification by combining adaptive prototype representations with local–global feature enhancement. The lightweight configuration achieves improved classification performance with relatively low theoretical computational requirements, indicating its potential for automated grain-quality inspection.
Authors
- Pengtao Lv (ORCID: https://orcid.org/0000-0002-8323-2581)
- Teng Li (ORCID: https://orcid.org/0000-0002-3224-0477)
- Ming Chen (ORCID: https://orcid.org/0000-0002-6239-5015)
- Mengya Zhang (ORCID: https://orcid.org/0000-0003-4992-1209)
- Yuyang Jiang
- Panpan Wang (ORCID: https://orcid.org/0009-0000-2844-6272)
- Chengyao Wang
- Xiaobo Wen
- Shuming Zhou
- Qi Shen
Institutions
- Beijing Union University (CN)
- University of Electronic Science and Technology of China (CN)
- Zhengzhou University of Light Industry (CN)
- Henan University of Technology (CN)
- Tongling University (CN)
Publication Details
- Journal
- BMC Plant Biology
- Published
- 2026-12-02
- DOI
- https://doi.org/10.1186/s12870-026-10344-9
- Primary Topic
- Smart Agriculture and AI
- Type
- article
- Field-Weighted Citation Impact
- 0.00