Detection of unknown strawberry diseases based on OpenMatch and two-head network for continual learning

Kan Jiang, Jie You, Ulzii-Orshikh Dorj, Hyongsuk Kim, Joonwhoan LeeFrontiers in Plant Science 2022 · DOI

This paper, published in Frontiers in Plant Science, tackles a critical hurdle in agricultural AI: how to move beyond "closed-set" models that fail when they encounter a disease they haven't seen before.

TL;DR

Researchers developed a robust framework for detecting unknown strawberry diseases by aligning and enhancing two deep learning strategies: OpenMatch and two-head networks. By incorporating "outlier exposure" and contrastive regularization, they achieved over 90% accuracy in both classifying known diseases and identifying novel ones, providing a necessary "I don't know" button for continual learning systems.

What Problem Does This Paper Address?

Most current plant disease recognition models operate under Closed Set Recognition (CSR). In this setup, a model trained to recognize five specific diseases is forced to pick one of those five, even if it is shown a sixth, completely different disease. This leads to confident but wrong predictions.

To build a system that can actually work in the field and improve over time (Continual Learning), the AI must first be able to distinguish between "known" diseases and "unknown" ones. This is typically handled by two fields: Open Set Recognition (OSR), which identifies classes not seen during training, and Out-of-Distribution (OoD) detection, which identifies data that doesn't belong to the training distribution at all. The challenge is that plant diseases are "fine-grained"—different diseases often look very similar—making it incredibly difficult for standard OSR/OoD methods to draw a clear line between them.

Methods

The authors compared and modified two primary architectures to make them suitable for fine-grained disease detection:

  1. Two-Head Network: This model uses two separate "heads" (classifiers) sharing a single backbone. During training, the heads are encouraged to agree on known data but are fine-tuned to maximize their "discrepancy" (disagreement) when shown outlier data.
  2. OpenMatch: A semi-supervised OSR framework that uses One-vs-All (OVA) classifiers to determine if a sample belongs to a known class or is an outlier.

The Innovation: The researchers found that standard OSR (which assumes no outliers are available during training) performs poorly on similar-looking plant diseases. They modified the training procedures to include Outlier Exposure—intentionally showing the model some "known unknowns" (like healthy leaves or irrelevant images) during training.

Furthermore, they integrated FixMatch with Contrastive Regularization (CR). This technique uses data augmentation to ensure the model produces consistent features for the same image and pushes different classes further apart in the mathematical "feature space," making the clusters of known diseases tighter and easier to distinguish from unknowns.

Datasets

The study utilized a custom-built dataset of strawberry images:

  • Known Classes: 8 specific strawberry diseases (e.g., Angular leafspot, Gray mold, Powdery mildew).
  • OoD/Unknown Data: This included three types:
  • Irrelevant: Images of bugs, food, or trees from ImageNet.
  • Normal: Healthy strawberry parts (leaves, fruit, flowers).
  • Unknown Diseases: Actual strawberry diseases that were intentionally withheld from the "known" training set.
  • Total Volume: 13,089 images captured across six different greenhouses via mobile phones.

Key Insights and Ideas

  • Outlier Exposure is Essential: The "aha moment" was realizing that for fine-grained tasks like plant pathology, the model must see some outliers during training to learn what a "non-disease" looks like. Without this, the model struggles to differentiate between a new disease and a variation of a known one.
  • Hard Outliers Matter More: Training the model on "bugs and trees" (irrelevant data) didn't help nearly as much as training it on healthy strawberry leaves or other plant parts. These "hard outliers" forced the model to learn the subtle nuances of strawberry anatomy.
  • Contrastive Regularization is the "Secret Sauce": Adding contrastive loss significantly improved the "compactness" of the disease clusters. In the t-SNE visualizations (spatial maps of how the AI "sees" the data), the diseases formed much tighter groups, leaving more "empty space" for unknowns to be detected.

Key Results

  • Classification Accuracy: The improved two-head network reached 92.4% accuracy in classifying strawberry diseases.
  • Unknown Detection: The model achieved an AUROC of 0.972 for detecting unknown diseases, a significant jump over standard OSR methods like OpenMax (which scored 0.812).
  • Recall: For the "Unknown" category specifically, the model achieved a 94.9% recall, meaning it successfully flagged almost all novel diseases as "unknown" rather than misclassifying them as a known disease.

Limitations and Future Work

  • Image Quality: The authors noted that bad lighting and blurring in the field still caused false positives. The model sometimes flagged a known disease as "unknown" simply because the photo was poor.
  • Small Symptoms: Diseases with very small, early-stage spots remain difficult to differentiate, even for the improved model.
  • Closing the Loop: While the paper successfully detects unknowns, the next step for "continual learning" is to automate the process of clustering those detected unknowns and labeling them (perhaps with minimal human help) to automatically update the model for a "second round" of training.

Summary updated

Abstract

For continual learning in the process of plant disease recognition it is necessary to first distinguish between unknown diseases from those of known diseases. This paper deals with two different but related deep learning techniques for the detection of unknown plant diseases; Open Set Recognition (OSR) and Out-of-Distribution (OoD) detection. Despite the significant progress in OSR, it is still premature to apply it to fine-grained recognition tasks without outlier exposure that a certain part of OoD data (also called known unknowns) are prepared for training. On the other hand, OoD detection requires intentionally prepared outlier data during training. This paper analyzes two-head network included in OoD detection models, and semi-supervised OpenMatch associated with OSR technology, which explicitly and implicitly assume outlier exposure, respectively. For the experiment, we built an image dataset of eight strawberry diseases. In general, a two-head network and OpenMatch cannot be compared due to different training settings. In our experiment, we changed their training procedures to make them similar for comparison and show that modified training procedures resulted in reasonable performance, including more than 90% accuracy for strawberry disease classification as well as detection of unknown diseases. Accurate detection of unknown diseases is an important prerequisite for continued learning.
BibTeX
@inproceedings{jiang2022detection,
  author = {Kan Jiang and Jie You and Ulzii-Orshikh Dorj and Hyongsuk Kim and Joonwhoan Lee},
  title = {{Detection of unknown strawberry diseases based on OpenMatch and two-head network for continual learning}},
  booktitle = {Frontiers in Plant Science},
  year = {2022},
  doi = {10.3389/fpls.2022.989086},
}
Figure