A Hybrid CNN-Based Attention Model for Weed Recognition Under Variable Field Conditions with Edge Device Simulations
view PDF
view PDF

How to Cite

Kumar, Dharmendra, Sunil Dhankhar, Saroj Hiranwal, and Pushpendra Singh Sisodia. 2026. “A Hybrid CNN-Based Attention Model for Weed Recognition Under Variable Field Conditions With Edge Device Simulations”. Journal of Innovative Image Processing 8 (3): 938-54. https://doi.org/10.36548/jiip.2026.3.010.

Keywords

Crop Weed Classification
Deep Learning
Precision Agriculture
Attention Mechanism
and Computer Vision

Abstract

Biotic stress significantly affects agricultural productivity, and weed infestation remains a major factor limiting crop yields and resource-use efficiency. Traditional weed management tools and practices are less effective and labor-intensive at scale. Therefore, automated and intelligent weed identification and classification technologies are required to manage weed infestation. Recent deep learning studies have shown promising results for weed classification. Still, many deep learning architectures have large parameter counts and require high computational power, limiting their deployment in real-world agricultural environments. In this study, a novel lightweight deep learning model, Lightweight Hybrid Channel-Spatial Attention (L-HCSA), is presented for crop-weed image classification in a real-world agricultural environment. L-HCSA is built on a pre-trained MobileNetV2 backbone, enhanced with a hybrid channel-spatial attention module to handle background noise and enhance the discriminative power of weed features. The CWD30 database is used to benchmark the L-HCSA model. An ablation study was performed on five configurations, confirming that the HCSA attention block is the primary contributor to performance. The HCSA attention block adds 0.41 million parameters to the MobileNetV2 baseline (2.63 million parameters) and improves accuracy by 2.18%. The L-HCSA is compared against nine baseline models, including MobileNetV2, MobileNetV3-L, DenseNet-121, ResNet-50, ResNet-101, EfficientNetV2-M, EfficientNet-Lite, TinyViT, and EdgeNeXt. The L-HCSA model has only 3.04 million trainable parameters (12.1 MB) and achieves 77.34% accuracy with a ROC-AUC of 0.9955. A pairwise Wilcoxon signed-rank test with Bonferroni correction and Cohen’s d effect size was performed for statistical evaluation. The L-HCSA model is evaluated for real-time performance, meeting the >=10 FPS threshold in an embedded hardware simulation while maintaining competitive accuracy, achieving 22.0 FPS on the Google Coral Edge TPU.

References

  1. Chand, Ramesh, Pramod Joshi, and Shyam Khadka. Indian Agriculture Towards 2030. Springer Nature Singapore, 2022. p. 311.
  2. Ashokkumar, B., and Akkamahadevi Naik. "Transforming Indian Agriculture with Digital Technologies." Asian Journal of Agricultural Extension, Economics & Sociology 39, no. 6 (2021): 76-90.
  3. Sahu, Bhimeshwari, Vijay K. Choudhary, M. P. Sahu, K. Kiran Kumar, G. K. Sujayanand, R. Gopi, V. Prakasam et al. "Biotic Stress Management." In Trajectory of 75 years of Indian Agriculture after Independence, Singapore: Springer Nature Singapore, 2023, 619-653.
  4. Gharde, Yogita, P. K. Singh, R. P. Dubey, and P. K. Gupta. "Assessment of Yield and Economic Losses in Agriculture due To Weeds in India." Crop Protection 107 (2018): 12-18.
  5. Mishra, Abhishek, Naushad Khan, M. Z. Siddiqui, Pradeep Kumar, Janardan Prasad Bagri, Kushal Sachan, and Vivek Pandey. "Influence of Tillage and Weed Management Practices on Growth Performance and Soil Nutrient Status of Wheat (Triticum aestivum L.) in Central Plains of Uttar Pradesh." Journal of Scientific Research and Reports 31, no. 10 (2025): 641-653.
  6. Aarif KO, Mohammed, Afroj Alam, and Yousuf Hotak. "Smart Sensor Technologies Shaping the Future of Precision Agriculture: Recent Advances and Future Outlooks." Journal of Sensors 2025, no. 1 (2025): 2460098.
  7. Ergün, Ebru. "Harnessing Deep Learning for Multi-Class Weed Species Identification in Agriculture." Niğde Ömer Halisdemir Üniversitesi Mühendislik Bilimleri Dergisi 14, no. 1 (2025): 251-262.
  8. Li, Weili, Wenpeng Zhu, Jinxu Wang, Kang Han, Xiaojun Jin, and Jialin Yu. "Precision Weed Detection and Mapping in Vegetables Using Deep Learning." Weed Science 73, no. 1 (2025): e69.
  9. Murad, Nafeesa Yousuf, Tariq Mahmood, Abdur Rahim Mohammad Forkan, Ahsan Morshed, Prem Prakash Jayaraman, and Muhammad Shoaib Siddiqui. "Weed Detection Using Deep Learning: A Systematic Literature Review." Sensors 23, no. 7 (2023): 3670.
  10. He, Kaiming, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. "Deep Residual Learning for Image Recognition." In Proceedings of the IEEE conference on computer vision and pattern recognition, 2016, 770-778.
  11. Sandler, Mark, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. "Mobilenetv2: Inverted Residuals and Linear Bottlenecks." In Proceedings of the IEEE conference on computer vision and pattern recognition, 2018, 4510-4520.
  12. Howard, Andrew, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang et al. "Searching for Mobilenetv3." In Proceedings of the IEEE/CVF international conference on computer vision, 2019, 1314-1324.
  13. Tan, Mingxing, and Quoc Le. "Efficientnetv2: Smaller Models and Faster Training." In International conference on machine learning, PMLR, 2021, 10096-10106.
  14. Vellaichamy, A. S., Swaminathan, A., Varun, C., & S, K. (2021). Multiple Plant Leaf Disease Classification Using DENSENET-121 Architecture. INTERNATIONAL JOURNAL OF ELECTRICAL ENGINEERING AND TECHNOLOGY, 12(5).
  15. Koonce, B. “ResNet. In Convolutional Neural Networks with Swift for Tensorflow: Image Recognition and Dataset Categorization,” 50 (2021), 63–72.
  16. Wang, Ching-Chen, Ching-Te Chiu, and Jheng-Yi Chang. "Efficientnet-Elite: Extremely Lightweight and Efficient Cnn Models for Edge Devices by Network Candidate Search." Journal of Signal Processing Systems 95, no. 5 (2023): 657-669.
  17. Wu, Kan, Jinnian Zhang, Houwen Peng, Mengchen Liu, Bin Xiao, Jianlong Fu, and Lu Yuan. "Tinyvit: Fast Pretraining Distillation for Small Vision Transformers." In European conference on computer vision, Cham: Springer Nature Switzerland, 2022, 68-85.
  18. Maaz, Muhammad, Abdelrahman Shaker, Hisham Cholakkal, Salman Khan, Syed Waqas Zamir, Rao Muhammad Anwer, and Fahad Shahbaz Khan. "Edgenext: Efficiently Amalgamated Cnn-Transformer Architecture for Mobile Vision Applications." In European conference on computer vision, Cham: Springer Nature Switzerland, 2022, 3-20.
  19. Khan, Ameer Tamoor, Signe Marie Jensen, and Abdul Rehman Khan. "Advancing precision agriculture: A Comparative Analysis of YOLOv8 for Multi-Class Weed Detection in Cotton Cultivation." Artificial Intelligence in Agriculture 15, no. 2 (2025): 182-191.
  20. Talha Ilyas and Dewa Made Sri Arsa and Khubaib Ahmad and Jonghoon Lee and Okjae Won and Hyeonsu Lee and Hyongsuk Kim and Dong Sun Park “CWD30: A New Benchmark Dataset for Crop Weed Recognition in Precision Agriculture”. Computers and Electronics in Agriculture, 229, Article 109737. (2025). 109737.
  21. Ahmad, Aanis, Dharmendra Saraswat, Varun Aggarwal, Aaron Etienne, and Benjamin Hancock. "Performance of Deep Learning Models for Classifying and Detecting Common Weeds in Corn and Soybean Production Systems." Computers and Electronics in Agriculture 184 (2021): 106081.
  22. Upadhyay, Arjun, Maria Villamil Mahecha, Joseph Mettler, Kirk Howatt, William Aderholdt, Michael Ostlie, and Xin Sun. "Weed-Crop Dataset in Precision Agriculture: Resource for AI-Based Robotic Weed Control Systems." Data in Brief 60 (2025): 111486.
  23. Yağ, İlayda, and Aytaç Altan. "Artificial Intelligence-Based Robust Hybrid Algorithm Design and Implementation for Real-Time Detection of Plant Diseases in Agricultural Environments." Biology 11, no. 12 (2022): 1732.
  24. KA, Neena, and Anil Kumar MN. "Haar-Initialized Parametric Wavelet Compression with Attention-Driven Lightweight CNN For Brain Tumor Classification on Edge Devices." Biomedical Physics & Engineering Express 12, no. 1 (2026): 015051.
  25. Panchananam, Lakshmi Srinivas, Praveen Kumar Chandaliya, Zahid Akhtar, Kishor Upla, and Raghavendra Ramachandra. "WaveletFusion: Enhancing Plant Leaf Disease Classification with Multi-Scale Feature Extraction and Explainable AI." Expert Systems with Applications 285 (2025): 127947.
  26. https://github.com/Mr-TalhaIlyas/CWD30