Image-Based Hot Pepper Disease and Pest Diagnosis Using Transfer Learning and Fine-Tuning

Yeong Hyeon Gu, Helin Yin, Jin Dong, J. Park, Seong Joon YooFrontiers in Plant Science 2021 · DOI

Abstract Past studies of plant disease and pest recognition used classification methods that presented a singular recognition result to the user. Unfortunately, incorrect recognition results may be output, which may lead to further crop damage. To address this issue, there is a need for a system that suggest several candidate results and allow the user to make the final decision. In this study, we propose a method for diagnosing plant diseases and identifying pests using deep features based on transfer learning. To extract deep features, we employ pre-trained VGG and ResNet 50 architectures based on the ImageNet dataset, and output disease and pest images similar to a query image via a k-nearest-neighbor algorithm. In this study, we use a total of 23,868 images of 19 types of hot-pepper diseases and pests, for which, the proposed model achieves accuracies of 96.02 and 99.61%, respectively. We also measure the effects of fine-tuning and distance metrics. The results show that the use of fine-tuning-based deep features increases accuracy by approximately 0.7-7.38%, and the Bray-Curtis distance achieves an accuracy of approximately 0.65-1.51% higher than the Euclidean distance.

Introduction

In precision agriculture, an accurate diagnosis of plant pathology is critical. Most existing AI models for plant pathology utilize standard classification techniques that provide a single label. However, if the model provides an incorrect diagnosis, farmers may apply the wrong pesticides or treatments, leading to wasted resources and potential crop loss. This research addresses this "black-box" limitation by proposing a "human-in-the-loop" diagnostic system based on Content-Based Image Retrieval (CBIR). Instead of providing a single definitive answer, the system identifies and presents the five most visually similar images from a verified database, allowing the user to make the final decision based on comparative evidence.

Materials and Methods

The study utilized a comprehensive dataset provided by the National Institute of Horticultural and Herbal Science in South Korea. The dataset consists of 23,868 images covering 19 distinct categories of hot pepper issues, including 9 diseases and 10 pests.

Examples of hot pepper diseases (A) and pests (B) included in the study dataset.

The proposed diagnostic pipeline consists of four primary stages:

  1. Image Pre-processing: To ensure the model focuses on relevant pathological features, original images were manually cropped to isolate diseased areas or pests. These cropped images were then resized and normalized for consistency across the training set.
  2. Transfer Learning and Fine-Tuning: The researchers employed architectures pre-trained on the ImageNet dataset, specifically VGG16, VGG19, and ResNet50. Two fine-tuning strategies were evaluated: tuning only the final dense layers versus tuning both the last convolutional layer and the dense layers.
  3. Feature Extraction: After fine-tuning, the final softmax classification layer was removed. The model then functioned as a feature extractor, converting input images into high-dimensional vectors (512 dimensions for VGG and 2,048 for ResNet50).
  4. Similarity Search (kNN): For a new query image, the system calculates its feature vector and identifies the five closest matches in the database using a $k$-nearest-neighbor algorithm. The researchers compared the performance of the standard Euclidean distance against the Bray–Curtis distance metric.
The manual cropping process used to isolate symptomatic regions for more accurate feature extraction.

Results and Discussion

The experimental results demonstrated high diagnostic accuracy across both diseases and pests.

  • Architecture Performance: ResNet50 emerged as the most effective architecture, likely due to its deeper structure and the use of residual blocks, which mitigate the vanishing gradient problem during fine-tuning. It achieved a precision of 96.14% for diseases and 99.61% for pests.
  • Impact of Fine-Tuning: Fine-tuning the last convolutional layer proved essential. This approach yielded a performance increase of 0.7% to 7.38% compared to tuning only the dense layers. This suggests that the visual features of plant diseases (textures, spot patterns) are sufficiently different from general ImageNet objects to require adjustment of the feature extraction filters.
  • Distance Metrics: The Bray–Curtis distance, often used in ecological studies to compare species composition, consistently outperformed the Euclidean distance by 0.65% to 1.51%.
  • Disease vs. Pest Identification: The models performed significantly better on pests than on diseases. This is attributed to the fact that pests often have distinct, discrete morphological shapes, whereas different diseases can manifest as very similar-looking necrotic spots or discolorations on leaves.

Conclusion

This study demonstrates that a CBIR-based approach combined with fine-tuned deep learning models provides a robust and reliable tool for hot pepper diagnosis. By providing multiple candidate results, the system offers a safety net against single-prediction errors. The primary limitation remains the manual cropping required for high accuracy. Future research will focus on automating this process through object detection and segmentation, enabling the development of fully automated field-ready mobile applications.

Summary updated

Abstract

Past studies of plant disease and pest recognition used classification methods that presented a singular recognition result to the user. Unfortunately, incorrect recognition results may be output, which may lead to further crop damage. To address this issue, there is a need for a system that suggest several candidate results and allow the user to make the final decision. In this study, we propose a method for diagnosing plant diseases and identifying pests using deep features based on transfer learning. To extract deep features, we employ pre-trained VGG and ResNet 50 architectures based on the ImageNet dataset, and output disease and pest images similar to a query image <i>via</i> a <i>k</i>-nearest-neighbor algorithm. In this study, we use a total of 23,868 images of 19 types of hot-pepper diseases and pests, for which, the proposed model achieves accuracies of 96.02 and 99.61%, respectively. We also measure the effects of fine-tuning and distance metrics. The results show that the use of fine-tuning-based deep features increases accuracy by approximately 0.7-7.38%, and the Bray-Curtis distance achieves an accuracy of approximately 0.65-1.51% higher than the Euclidean distance.
BibTeX
@inproceedings{gu2021image,
  author = {Yeong Hyeon Gu and Helin Yin and Jin Dong and J. Park and Seong Joon Yoo},
  title = {{Image-Based Hot Pepper Disease and Pest Diagnosis Using Transfer Learning and Fine-Tuning}},
  booktitle = {Frontiers in Plant Science},
  year = {2021},
  doi = {10.3389/fpls.2021.724487},
}
Figure