欢迎您访问《智慧农业(中英文)》官方网站! English

Smart Agriculture ›› 2024, Vol. 6 ›› Issue (6): 96-108.doi: 10.12133/j.smartag.SA202407019

• 专题--农业知识智能服务和智慧无人农场(上) • 上一篇    下一篇

基于改进CycleGAN的水稻叶片病害图像增强方法

严从宽1(), 朱德泉1, 孟凡凯1, 杨玉青1, 唐七星1, 张爱芳2, 廖娟1()   

  1. 1. 安徽农业大学 工学院,安徽 合肥 230036,中国
    2. 安徽省农业科学院 植物保护与农产品质量安全研究所,安徽 合肥 230031,中国
  • 收稿日期:2024-07-18 出版日期:2024-11-30
  • 基金项目:
    国家重点研发计划项目子课题(2022YFD2001801-3); 国家自然科学基金项目(32201665)
  • 作者简介:
    严从宽,研究方向为机器视觉、农作物病害识别等领域。E-mail:
  • 通信作者:
    廖 娟,博士,副教授,研究方向为机器视觉和农业智能信息处理。E-mail:

Rice Leaf Disease Image Enhancement Based on Improved CycleGAN

YAN Congkuan1(), ZHU Dequan1, MENG Fankai1, YANG Yuqing1, TANG Qixing1, ZHANG Aifang2, LIAO Juan1()   

  1. 1. School of Engineering, Anhui Agricultural University, Hefei 230036, China
    2. Institute of Plant Protection and Agricultural Product Quality and Safety, Anhui Academy of Agricultural Sciences, Hefei 230031, China
  • Received:2024-07-18 Online:2024-11-30
  • Foundation items:Sub-project of the National Key Research and Development Program(2022YFD2001801-3); National Natural Science Foundation of China Project(32201665)
  • About author:
    YAN Congkuan, E-mail:
  • Corresponding author:
    LIAO Juan, E-mail:

摘要:

目的/意义 针对水稻病害图像识别任务存在数据集获取困难、样本不足及不同类别病害样本不均衡等问题,提出了一种基于改进CycleGAN(Cycle-Consistent Adversarial Networks)的水稻叶片病害图像数据增强方法。 方法 以CycleGAN为基本框架,将CBAM(Convolution Block Attention Module)注意力机制嵌入到生成器的残差模块中,增强CycleGAN对病害特征的提取能力,使网络更准确地捕捉小目标病害或域间差异不明显的特征;在损失函数中引入感知图像相似度损失,以指导模型在训练过程中生成高质量的样本图像,并提高模型训练的稳定性。基于生成的水稻病害样本,在不同目标检测模型上进行迁移训练,通过比较迁移学习前后模型性能的变化,验证生成的病害图像数据的有效性。 结果和讨论 改进的CycleGAN网络生成的水稻叶片病害图像质量优于原始CycleGAN,病斑区域的视觉特征更加明显,结构相似性(Structural Similarity, SSIM)指标提升约3.15%,峰值信噪比(Peak Signal-to-Noise Ratio, PSNR)指标提升约8.19%。同时,使用YOLOv5s、YOLOv7-tiny和YOLOv8s这3种模型在生成的数据集上进行迁移学习后,模型的检测性能均有提升,如YOLOv5s模型的病害检测精度从79.7%提升至93.8%。 结论 本研究提出的方法有效解决了水稻病害图像数据集匮乏的问题,为水稻病害识别模型的训练提供了可靠的数据支撑。

关键词: 水稻叶片病害, 数据增强, CycleGAN, CBAM, 感知相似度损失, 迁移训练

Abstract:

Objective Rice diseases significantly impact both the yield and quality of rice production. Automatic recognition of rice diseases using computer vision is crucial for ensuring high yields, quality, and efficiency. However, rice disease image recognition faces challenges such as limited availability of datasets, insufficient sample sizes, and imbalanced sample distributions across different disease categories. To address these challenges, a data augmentation method for rice leaf disease images was proposed based on an improved CycleGAN model in this reseach which aimed to expand disease image datasets by generating disease features, thereby alleviating the burden of collecting real disease data and providing more comprehensive and diverse data to support automatic rice disease recognition. Methods The proposed approach built upon the CycleGAN framework, with a key modification being the integration of a convolutional block attention module (CBAM) into the generator's residual module. This enhancement strengthened the network's ability to extract both local key features and global contextual information pertaining to rice disease-affected areas. The model increased its sensitivity to small-scale disease targets and subtle variations between healthy and diseased domains. This design effectively mitigated the potential loss of critical feature information during the image generation process, ensuring higher fidelity in the resulting images. Additionally, skip connections were introduced between the residual modules and the CBAM. These connections facilitate improved information flow between different layers of the network, addressing common issues such as gradient vanishing during the training of deep networks. Furthermore, a perception similarity loss function, designed to align with the human visual system, was incorporated into the overall loss function. This addition enabled the deep learning model to more accurately measure perceptual differences between the generated images and real images, thereby guiding the network towards producing higher-quality samples. This adjustment also helped to reduce visual artifacts and excessive smoothing, while concurrently improving the stability of the model during the training process. To comprehensively evaluate the quality of the rice disease images generated by the proposed model and to assess its impact on disease recognition performance, both subjective and objective evaluation metrics were utilized. These included user perception evaluation (UPE), structural similarity index (SSIM), peak signal-to-noise ratio (PSNR), and the performance of disease recognition within object detection frameworks. Comparative experiments were conducted across multiple GAN models, enabling a thorough assessment of the proposed model's performance in generating rice disease images. Additionally, different attention mechanisms, including efficient channel attention (ECA), coordinate attention (CA), and CBAM, were individually embedded into the generator's residual module. These variations allowed for a detailed comparison of the effects of different attention mechanisms on network performance and the visual quality of the generated images. Ablation studies were further performed to validate the effectiveness of the CBAM residual module and the perception similarity loss function in the network's overall architecture. Based on the generated rice disease samples, transfer learning experiments were conducted using various object detection models. By comparing the performance of these models before and after transfer learning, the effectiveness of the generated disease image data in enhancing the performance of object detection models was empirically verified. Results and Discussions The rice disease images generated by the improved CycleGAN model surpassed those produced by other GAN variants in terms of image detail clarity and the prominence of disease-specific features. In terms of objective quality metrics, the proposed model exhibited a 3.15% improvement in SSIM and an 8.19% enhancement in PSNR compared to the original CycleGAN model, underscoring its significant advantage in structural similarity and signal-to-noise ratio. The comparative experiments involving different attention mechanisms and ablation studies revealed that embedding the CBAM into the generator effectively increased the network's focus on critical disease-related features, resulting in more realistic and clearly defined disease-affected regions in the generated images. Furthermore, the introduction of the perception similarity loss function substantially enhanced the network's ability to perceive and represent disease-related information, thereby improving the visual fidelity and realism of the generated images. Additionally, transfer learning applied to object detection models such as YOLOv5s, YOLOv7-tiny, and YOLOv8s led to significant improvements in disease detection performance on the augmented dataset. Notably, the detection accuracy of the YOLOv5s model increased from 79.7% to 93.8%, representing a considerable enhancement in both generalization ability and robustness. This improvement also effectively reduced the rates of false positives and false negatives, resulting in more stable and reliable performance in rice disease detection tasks. Conclusions The rice leaf disease image generation method based on the improved CycleGAN model, as proposed in this study, effectively transforms images of healthy leaves into those depicting disease symptoms. By addressing the challenge of insufficient disease samples, this method significantly improves the disease recognition capabilities of object detection models. Therefore, it holds considerable application potential in the domain of leaf disease image augmentation and offers a promising new direction for expanding datasets of disease images for other crops.

Key words: rice leaf disease, data enhancement, CycleGAN, CBAM, perceptual similarity loss, transfer learning

中图分类号: