Please wait a minute...
Journal of Integrative Agriculture
Advanced Online Publication | Current Issue | Archive | Adv Search
Research on lightweight detection of cotton leaf diseases based on self-supervised contrastive representation learning

Meiqi Zhong, Linjing Wei#, Henghui Mo

College of Information Science and Technology, Gansu Agricultural University, Lanzhou 730070, China

 Highlights 

1. Self-supervised contrastive pretraining on unlabeled imagery and StyleGAN3 synthesis effectively mitigate data imbalance.

2. Decoupled Focused Self-Attention factorizes 2D attention to suppress background noise and highlight fine-grained lesion details.

3. A structured pruning and multi-stage distillation pipeline strikes an optimal balance between accuracy and edge-device efficiency.

Download:  PDF in ScienceDirect  
Export:  BibTeX | EndNote (RIS)      
摘要  

棉花叶斑病、叶枯病、枯萎病等叶部病害在田间环境中难以被可靠检测,原因在于病斑往往尺度小、对比度低,且易被复杂背景遮挡。本文提出面向真实端侧部署的轻量化检测器 RT-DETR-SDSL。我们的核心研究路线是一条互补的三段式流水线,用于协同提升表征质量、病斑敏感性与边缘端效率:(i)在无标注田间图像上采用 MoCo v2 自监督预训练对骨干网络进行初始化,在标注稀缺条件下显著提升数据利用效率与特征表征能力;(ii)提出 解耦聚焦自注意力(Decoupled Focused Self-Attention, DFSA) 模块,将二维注意力沿高度与宽度方向进行因式分解,并在每个轴上引入 一维膨胀深度卷积,在抑制背景响应的同时扩大对细粒度纹理的有效感受野;(iii)构建与 结构化通道剪枝 联动的 教师–助教–学生 知识蒸馏框架,在降低参数量与存储开销的同时尽可能保持检测精度。为缓解类别不均衡与稀有病斑样本不足,我们引入高保真 StyleGAN3 合成数据与针对性增强策略,并使用 Grad-CAM++ 对决策证据进行可视化以增强可解释性。实验结果表明,RT-DETR-SDSL 在具有挑战性的田间数据集上取得 90.32% 的准确率、87.52% 的召回率与 88.47% 的 mAP50,优于多种强基线方法。可部署模型大小为 17.8 MB,在 NVIDIA Jetson Xavier NX 上可达 14 fps,在精度与效率之间实现了适用于精准农业的实用平衡。



Abstract  

Cotton leaf diseases such as leaf spot, blight, and wilt are difficult to detect reliably in the field because lesions are small, low-contrast, and often obscured by complex backgrounds. We present RT-DETR-SDSL, a lightweight detector designed for real-world on-device deployment. Our main research line is a complementary three-part pipeline that aligns representation quality, lesion sensitivity, and edge efficiency: (i) we adopt MoCo v2 self-supervised pretraining on unlabeled field imagery to initialize the backbone and improve data efficiency under scarce labels; (ii) we propose a Decoupled Focused Self-Attention (DFSA) module that factorizes 2D attention along height and width and augments each axis with 1D dilated depthwise convolution, enlarging the effective receptive field around fine textures while suppressing background responses; and (iii) we propose a Teacher–Assistant–Student distillation framework coupled with a structured channel-pruning schedule to preserve accuracy while reducing parameters and storage for edge devices. To mitigate class imbalance and rare-lesion scarcity, we incorporate high-fidelity StyleGAN3 synthesis and targeted augmentations, and we use Grad-CAM++ to visualize decision evidence for interpretability. On challenging field datasets, RT-DETR-SDSL attains precision of 90.32%, recall of 87.52%, and mAP50 of 88.47%, outperforming strong baselines. The deployable model is 17.8 MB and runs at 14 fps on an NVIDIA Jetson Xavier NX, striking a practical balance between accuracy and efficiency for precision agriculture.

Keywords:  leaf disease detection       self-supervised learning       attention mechanism       model pruning       knowledge distillation  
Online: 22 December 2025  
Fund: 

This work was supported by the 2025 Gansu Provincial Science and Technology Innovation Talent Project (25RCKAO15), the Ministry of Science and Technology’s National Foreign Experts Project (G2022042005L), the Gansu Province Higher Education Industry Support Project (2023CYZC-54), the Gansu Province Key R&D Plan (23YFWA0013), the Lanzhou Talent Innovation and Entrepreneurship Project (2021-RC-47), the 2020 Gansu Agricultural University Graduate Education Research Project (2020-19), the Gansu Agricultural University-level “Three-dimensional Education” Pilot Extension Teaching Research Project (2022-9), and the Gansu Agricultural University-level Comprehensive Professional Reform Project (2021-4).

About author:  Meiqi Zhong, E-mail: 1073324120879@st.gsau.edu.cn; #Correspondence Linjing Wei, E-mail: wlj@gsau.edu.cn

Cite this article: 

Meiqi Zhong, Linjing Wei, Henghui Mo. 2025. Research on lightweight detection of cotton leaf diseases based on self-supervised contrastive representation learning. Journal of Integrative Agriculture, Doi:10.1016/j.jia.2025.12.041

Alibani M, Acito N, Corsini G. 2024. Multispectral satellite image generation using stylegan3. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 17, 4379–4391.

Alves A N, Souza W S, Borges D L. 2020. Cotton pests classification in field-based images using deep residual networks. Computers and Electronics in Agriculture, 174, 105488.

Banu T, VRs M. 2020. Cotton crop monitoring system using CNN. Journal of Xi’an University of Architecture Technology, 12(2).

Bhagyalaxmi K, Dwarakanath B, Reddy P V. 2024. Ensemble of deep learning models and machine learning classifiers for the classification of brain tumors. In: 2024 2nd International Conference on Computer, Communication and Control (IC4), 1–6. IEEE.

Cai Z, Vasconcelos N. 2018. Cascade R-CNN: Delving into high quality object detection. In: 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, 6154–6162. IEEE.

Caldeira R F, Santiago W E, Teruel B. 2021. Soft computational techniques to identify cotton leaf damage. Australian Journal of Crop Science, 15, 1177–1185.

Cao Y, Sun G, Yuan Y, Chen L. 2025a. Small-sample cucumber disease identification based on multimodal self-supervised learning. Crop Protection, 188, 107006.

Chai A Y H, Lee S H, Tay F S, Bonnet P, Joly A. 2024. Beyond supervision: Harnessing self-supervised learning in unseen plant disease recognition. Neurocomputing, 610, 128608.

Charoenpanyakul R, Kittichai V, Eiamsamang S, Sriwichai P, Pinetsuksai N, Naing K M, Tongloy T, Boonsang S, Chuwongin S. 2024. Enhancing mosquito classification through self-supervised learning. Scientific Reports, 14, 78260.

Chattopadhay A, Sarkar A, Howlader P, Balasubramanian V N. 2018. Grad-CAM++: Generalized gradient-based visual explanations for deep convolutional networks. In: 2018 IEEE Winter Conference on Applications of Computer Vision (WACV). IEEE.

Che Azemin M Z, Mohd Tamrin M I, Hilmi M R, Mohd Kamal K. 2024. Assessing the efficacy of StyleGAN3 in generating realistic medical images with limited data availability. In: Proceedings of the 2024 13th International Conference on Software and Computer Applications (ICSCA 2024), 192–197. ACM.

Chen L, Yang Y, Wang Z, Zhang J, Zhou S, Wu L. 2023. Underwater target detection lightweight algorithm based on multi-scale feature fusion. Journal of Marine Science and Engineering, 11, 320.

Chen L-B, Huang G-Z, Huang X-R, Wang W-C. 2022. A self-supervised learning-based intelligent greenhouse orchid growth inspection system for precision agriculture. IEEE Sensors Journal, 22, 24567–24577.

Edozie E, Shuaibu A N, John U K, Sadiq B O. 2025. Comprehensive review of recent developments in visual object detection based on deep learning. Artificial Intelligence Review, 58(9).

Fang Z, Zhang T, Fan X. 2022. A VitDet-based dual-source fusion object detection method of UAV. In: 2022 International Conference on Image Processing, Computer Vision and Machine Learning (ICICML), 628–633. IEEE.

Feng L, Chi B-J, Dong H-Z. 2022. Cotton cultivation technology with Chinese characteristics has driven the 70-year development of cotton production in China. Journal of Integrative Agriculture, 21, 597–609.

Gao F, Fu L, Zhang X, Majeed Y, Li R, Karkee M, Zhang Q. 2020. Multi-class fruit-on-plant detection for apple in SNAP system using Faster R-CNN. Computers and Electronics in Agriculture, 176, 105634.

Gao R, Dong Z, Wang Y, Cui Z, Ye M, Dong B, Lu Y, Wang X, Song Y, Yan S. 2024. Intelligent cotton pest and disease detection: Edge computing solutions with transformer technology and knowledge graphs. Agriculture, 14, 247.

Gower R M, Loizou N, Qian X, et al. 2019. SGD: General analysis and improved rates. In: Proceedings of the 36th International Conference on Machine Learning, 5200–5209.

Guan H, Fu C, Zhang G, Li K, Wang P, Zhu Z. 2023. A lightweight model for efficient identification of plant diseases and pests based on deep learning. Frontiers in Plant Science, 14.

Huan X, Chen B, Zhou H. 2025. A unified self-supervised framework for plant disease detection on laboratory and in-field images. Electronics, 14, 3410.

Huang K, Lertniphonphan K, Chen F, Li J, Wang Z. 2023. Multi-object tracking by self-supervised learning appearance model. In: 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), 3163–3169. IEEE.

Iqbal U, Davies T, Perez P. 2024. A review of recent hardware and software advances in GPU-accelerated edge-computing single-board computers (SBCs) for computer vision. Sensors, 24, 4830.

Kar S, Nagasubramanian K, Elango D, Carroll M E, Abel C A, Nair A, Mueller D S, O’Neal M E, Singh A K, Sarkar S, Ganapathysubramanian B, Singh A. 2023. Self-supervised learning improves classification of agriculturally important insect pests in plants. The Plant Phenome Journal, 6, e20079.

Kar S, Nagasubramanian K, Elango D, Nair A, Mueller D, O’Neal M, Singh A, Sarkar S, Ganapathysubramanian B, Singh A. 2021. Self-supervised agricultural insect pest classification. Earth and Space Science Open Archive preprint.

Kokane D, Chandrakant M. 2016. A review: To detect and identify cotton leaf disease based on pattern recognition technique. International Journal of Engineering and Computer Science.

Kortli Y, Gabsi S, Voon L F L Y, Jridi M, Merzougui M, Atri M. 2022. Deep embedded hybrid CNN–LSTM network for lane detection on NVIDIA Jetson Xavier NX. Knowledge-Based Systems, 240, 107941.

Liu B, Jia Y, Liu L, Dang Y, Song S. 2023a. Skip DETR: End-to-end skip connection model for small object detection in forestry pest dataset. Frontiers in Plant Science, 14.

Liu H, Zhan Y, Xia H, Mao Q, Tan Y. 2022. Self-supervised transformer-based pre-training method using latent semantic masking autoencoder for pest and disease classification. Computers and Electronics in Agriculture, 203, 107448.

Liu J-J, Hou Q, Liu Z-A, Cheng M-M. 2023b. PoolNet+: Exploring the potential of pooling for salient object detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45, 887–904.

Manavalan R. 2022. Towards an intelligent approaches for cotton diseases detection: A review. Computers and Electronics in Agriculture, 200, 107255.

Mo H, Wei L. 2025a. Lightweight detection of cotton leaf diseases using StyleGAN2-ADA and decoupled focused self-attention. Journal of King Saud University Computer and Information Sciences, 37(4).

Mo H, Wei L. 2025b. Tomato yellow leaf curl virus detection based on cross-domain shared attention and enhanced BiFPN. Ecological Informatics, 85, 102912.

Muthukannan K, Latha P. 2018. A GAFFNN algorithm applied for classification in diseased plant leaf system. Multimedia Tools and Applications, 77, 24387–24403.

Muzammul M, Li X, Li X. 2025. Enhancing tiny object detection without fine tuning: Dynamic adaptive guided object inference slicing framework with latest YOLO models and RT-DETR transformer. SSRN Electronic Journal.

Pei M, Peng W, Pei M. 2024. Research on plant pest and disease classification based on self-supervised learning. In: 2024 Asia-Pacific Conference on Image Processing, Electronics and Computers (IPEC), 398–402. IEEE.

Qiang J, Liu W, Li X, Guan P, Du Y, Liu B, Xiao G. 2023. Detection of citrus pests in double backbone network based on single shot multibox detector. Computers and Electronics in Agriculture, 212, 108158.

Ren S, He K, Girshick R, Sun J. 2017. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39, 1137–1149.

Revathi P, Hemalatha M. 2011. Categorize the quality of cotton seeds based on the different germination of the cotton using machine knowledge approach. International Journal of Advanced Science and Technology, 36, 9–14.

Shoaib M, Shah B, El-Sappagh S, Ali A, Ullah A, Alenezi F, Gechev T, Hussain T, Ali F. 2023. An advanced deep learning models-based plant disease detection: A review of recent research. Frontiers in Plant Science, 14.

Sivasangari A, Priya K, Indira K. 2014. Cotton leaf disease detection and recovery using genetic algorithm. International Journal of Engineering Research and General Science, 3, 117–123.

Susa J A B, Nombrefia W C, Abustan A S, Macalisang J, Maaliw R R. 2022. Deep learning technique detection for cotton and leaf classification using the YOLO algorithm. In: 2022 International Conference on Smart Information Systems and Technologies (SIST), 1–6. IEEE.

Thivya Lakshmi R, Katiravan J, Visu P. 2024. CoDet: A novel deep learning pipeline for cotton plant detection and disease identification. Automatika, 65, 662–674.

Upadhyay A, Chandel N S, Singh K P, Chakraborty S K, Nandede B M, Kumar M, Subeesh A, Upendar K, Salem A, Elbeltagi A. 2025a. Deep learning and computer vision in plant disease detection: A comprehensive review of techniques, models, and trends in precision agriculture. Artificial Intelligence Review, 58(3).

Upadhyay A, Chandel N S, Singh K P, Chakraborty S K, Nandede B M, Kumar M, Subeesh A, Upendar K, Salem A, Elbeltagi A. 2025b. Deep learning and computer vision in plant disease detection: A comprehensive review of techniques, models, and trends in precision agriculture. Artificial Intelligence Review, 58(3).

Vaswani A, Ramachandran P, Srinivas A, Parmar N, Hechtman B, Shlens J. 2021. Scaling local self-attention for parameter efficient visual backbones. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 12894–12904.

Wang H, Zhu Y, Green B, Adam H, Yuille A, Chen L-C. 2020. Axial-DeepLab: Stand-alone axial-attention for panoptic segmentation. In: European Conference on Computer Vision, 108–126. Springer.

Wang X, Zhang C, Zhang S-W, et al. 2018. Forecasting of cotton diseases and pests based on adaptive discriminant deep belief network. Unspecified Journal.

Wang Y, Yin Y, Li Y, Qu T, Guo Z, Peng M, Jia S, Wang Q, Zhang W, Li F. 2024a. Classification of plant leaf disease recognition based on self-supervised learning. Agronomy, 14, 500.

Xie X, Cheng G, Wang J, et al. 2021. Oriented R-CNN for object detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision, 3520–3529.

Yang Z, Yang W, Yi J, Liu R. 2024. WH-DETR: An efficient network architecture for wheat spike detection in complex backgrounds. Agriculture, 14, 961.

Yilma G, Dagne M, Ahmed M K, Bellam R B. 2025. Attentive self-supervised contrastive learning (ASCL) for plant disease classification. Results in Engineering, 25, 103922.

Ying G, Miao L, Yuan Y, Hu Z. 2009. A study on the method of image pre-processing for recognition of crop diseases. In: 2009 International Conference on Advanced Computer Control, 202–206. IEEE.

Yu Y, Zhang W, Deng Y. 2021. Fréchet inception distance (FID) for evaluating GANs. Technical Report, China University of Mining Technology (Beijing) Graduate School, 3(11).

Yun Y, Yu Q, Yang Z, An X, Li D, Huang J, Zheng D, Feng Q, Ma D. 2024. Research on a method for identification of peanut pests and diseases based on a lightweight LSCDNet model. Phytopathology, 114, 2162–2175.

Zhang J, Kuang F, Wang J, et al. 2018. Cotton disease recognition model based on improved VGG convolutional neural network. Journal of China Agricultural University, 23, 161–171.

Zhang M, Chen W, Gao P, Li Y, Tan F, Zhang Y, Ruan S, Xing P, Guo L. 2024. YOLO SSPD: A small target cotton boll detection model during the boll-spitting period based on space-to-depth convolution. Frontiers in Plant Science, 15.

Zhang Y, Lv C. 2024. TinySegFormer: A lightweight visual segmentation model for real-time agricultural pest detection. Computers and Electronics in Agriculture, 218, 108740.

Zhang Y, Ma B, Hu Y, Li C, Li Y. 2022. Accurate cotton diseases and pests detection in complex background based on an improved YOLOX model. Computers and Electronics in Agriculture, 203, 107484.

Zhao R, Zhu Y, Li Y. 2023. CLA: A self-supervised contrastive learning method for leaf disease identification with domain adaptation. Computers and Electronics in Agriculture, 211, 107967.

[1] SONG Chao-yu, ZHANG Fan, LI Jian-sheng, XIE Jin-yi, YANG Chen, ZHOU Hang, ZHANG Jun-xiong. Detection of maize tassels for UAV remote sensing image with an improved YOLOX Model[J]. >Journal of Integrative Agriculture, 2023, 22(6): 1671-1683.
No Suggested Reading articles found!