| Literature DB >> 36160929 |
Antonio Bruno1, Davide Moroni1, Riccardo Dainelli2, Leandro Rocchi2, Silvia Morelli3, Emilio Ferrari3, Piero Toscano2, Massimo Martinelli1.
Abstract
A novel method for improving plant disease classification, a challenging and time-consuming process, is proposed. First, using as baseline EfficientNet, a recent and advanced family of architectures having an excellent accuracy/complexity trade-off, we have introduced, devised, and applied refined techniques based on transfer learning, regularization, stratification, weighted metrics, and advanced optimizers in order to achieve improved performance. Then, we go further by introducing adaptive minimal ensembling, which is a unique input to the knowledge base of the proposed solution. This represents a leap forward since it allows improving the accuracy with limited complexity using only two EfficientNet-b0 weak models, performing ensembling on feature vectors by a trainable layer instead of classic aggregation on outputs. To the best of our knowledge, such an approach to ensembling has never been used before in literature. Our method was tested on PlantVillage, a public reference dataset used for benchmarking models' performances for crop disease diagnostic, considering both its original and augmented versions. We noticeably improved the state of the art by achieving 100% accuracy in both the original and augmented datasets. Results were obtained using PyTorch to train, test, and validate the models; reproducibility is granted by providing exhaustive details, including hyperparameters used in the experimentation. A Web interface is also made publicly available to test the proposed methods.Entities:
Keywords: Convolutional Neural Networks (CNN); adaptive ensemble; deep learning-artificial neural network (DL-ANN); image classification; plant diseases
Year: 2022 PMID: 36160929 PMCID: PMC9499023 DOI: 10.3389/frai.2022.868926
Source DB: PubMed Journal: Front Artif Intell ISSN: 2624-8212
Figure 1Example of scaling types, from left to right: a baseline network example, conventional scaling methods that only increase one network dimension (width, depth, and resolution), and in the end the EfficientNet compound scaling method that uniformly scales all three dimensions with a fixed ratio. Image taken from the original article (Tan and Le, 2019).
Figure 2Ensemble by voting—the final label is obtained by picking the most frequent label among the weak models. In this way, the weak models are independent and the ensemble is effective with a high number of heterogeneous weak models. Weak models are CNN architectures since now represented by the sequence of Feature Extractor + Output module.
Figure 3Ensemble by output combination–an additional combination layer is fed with the outputs of the weak models and combines them, in this way, the weak models are no longer independent and the combination layer can be trained to better adapt to data.
Figure 4Our ensemble method—is an optimized version of the method shown in Figure 3 because we avoid redundancy and reduce complexity by deleting the output module (dark gray filled) of weak models and feeding the combination layer directly with the features extracted by each weak model. Feature extraction modules (light gray filled with dashed borders) have the parameters frozen during ensemble training.
Class labels distribution of PlantVillage dataset.
|
|
|
|
|
|---|---|---|---|
| Apple scab | 630 | Pepper healthy | 1,478 |
| Apple black rot | 621 | Potato early blight | 1,000 |
| Apple cedar apple rust | 275 | Potato healthy | 1,000 |
| Apple healthy | 16,45 | Potato late blight | 152 |
| Background without leaves | 1,143 | Raspberry healthy | 371 |
| Blueberry healthy | 1,502 | Soybean healthy | 5,090 |
| Cherry powdery mildew | 1,052 | Squash powdery mildew | 1,835 |
| Cherry healthy | 854 | Strawberry healthy | 1,109 |
| Corn gray leaf spot | 513 | Strawberry leaf scorch | 456 |
| Corn common rust | 1,192 | Tomato bacterial spot | 2,127 |
| Corn northern leaf blight | 985 | Tomato early blight | 1,000 |
| Corn healthy | 1,162 | Tomato healthy | 1,591 |
| Grape black rot | 1,180 | Tomato late blight | 1,909 |
| Grape black measles | 1,383 | Tomato leaf mold | 952 |
| Grape leaf blight | 985 | Tomato septoria leaf spot | 1,771 |
| Grape healthy | 1,162 | Tomato spider mites | 1,676 |
| Orange haunglongbing | 5,507 | Tomato target spot | 1,404 |
| Peach bacterial spot | 2,297 | Tomato mosaic virus | 373 |
| Peach healthy | 360 | Tomato yellow leaf curl virus | 5,357 |
| Pepper bacterial spot | 997 |
Some diseases are typical of particular plant phenotypes, there are also healthy leaf and background-only images. The frequency values refer to the standard dataset, while in the case of its augmented version only the classes with a size less than 1,000 were augmented to reach 1,000 images (classes having more images are not modified).
Figure 5Some PlantVillage image examples. From top to bottom: 3 examples of background, 3 examples of healthy leaves, and 3 examples of diseases.
Table with best Weighted F1-score results, for each EfficientNet variant, after the first phase of validation (i.e., end-to-end training).
|
|
| |||||
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
| EfficientNet-b0 | 99.6995 | 99.8454 | 99.9960 | 99.7832 | 99.8374 | 99.9982 |
| EfficientNet-b1 | 99.5793 | 99.8454 | 100.000 | 99.8916 | 99.8141 | 99.9928 |
| EfficientNet-b2 | 99.5192 | 99.7681 | 99.9140 | 99.7832 | 99.8374 | 99.9982 |
| EfficientNet-b3 | 99.6394 | 99.8712 | 99.9860 | 99.8374 | 99.9303 | 99.9964 |
| EfficientNet-b4 | 99.6995 | 99.8454 | 99.9980 | 99.5664 | 99.8606 | 99.9982 |
| EfficientNet-b5 | 99.7596 | 99.7939 | 99.9920 | 99.9458 | 99.8606 | 99.9982 |
| EfficientNet-b6 |
|
|
| 99.7290 | 99.8141 | 99.9675 |
| EfficientNet-b7 | 99.5192 | 99.8454 | 99.9960 |
|
|
|
The values of the best architectures are in bold.
Table with Weighted F1-score of the models (best to worst) of the 5 end-to-end training runs using EfficientNet-b0 variants only that will be the weak models of the simplest ensemble.
|
|
| |||||
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
| EfficientNet-b0 | 99.8197 | 99.9485 | 100.000 | 99.7832 | 100.000 | 100.000 |
| EfficientNet-b0 | 99.8197 | 99.8969 | 100.000 | 99.6748 | 99.8838 | 100.000 |
| EfficientNet-b0 | 99.7596 | 99.8454 | 100.000 | 99.8374 | 99.8374 | 99.9980 |
| EfficientNet-b0 | 99.7596 | 99.7423 | 100.000 | 99.8374 | 99.6515 | 100.000 |
| EfficientNet-b0 | 99.5793 | 99.9227 | 99.9960 | 99.7832 | 99.6747 | 100.000 |
Table with the Weighted F1-score of the 5 ensemble runs (best to worst) composed of the two best EfficientNet-b0 variants.
|
|
| |||||
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
| EfficientNet-b0 ensemble | 100.000 | 100.000 | 100.000 | 100.000 | 100.000 | 100.000 |
| EfficientNet-b0 ensemble | 100.000 | 100.000 | 100.000 | 100.000 | 100.000 | 100.000 |
| EfficientNet-b0 ensemble | 100.000 | 100.000 | 100.000 | 100.000 | 100.000 | 100.000 |
| EfficientNet-b0 ensemble | 100.000 | 100.000 | 100.000 | 100.000 | 100.000 | 100.000 |
| EfficientNet-b0 ensemble | 100.000 | 100.000 | 99.9980 | 100.000 | 99.9768 | 100.000 |
Table with best Weighted F1-score results, for each EfficientNet variant, after the second phase of validation (i.e., end-to-end training + fine-tuning).
|
|
| |||||
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
| EfficientNet-b0 | 99.6995 | 99.8454 | 100.000 | 99.8916 | 99.8838 | 100.000 |
| EfficientNet-b1 | 99.6995 | 99.8969 | 100.000 | 99.8916 | 99.8374 | 99.9982 |
| EfficientNet-b2 | 99.5793 | 99.8712 | 100.000 | 99.7832 | 99.9303 | 99.9982 |
| EfficientNet-b3 | 99.7596 | 99.8712 | 99.9900 | 99.8374 | 99.9303 | 99.9964 |
| EfficientNet-b4 | 99.6995 | 99.8454 | 99.9980 | 99.5664 | 99.8606 | 99.9982 |
| EfficientNet-b5 | 99.7596 | 99.7939 | 99.9920 | 99.9458 | 99.8606 | 99.9982 |
| EfficientNet-b6 | 99.8197 | 99.8712 | 99.9900 | 99.7290 | 99.8141 | 99.9675 |
| EfficientNet-b7 |
|
|
|
|
|
|
The values of the best architectures are in bold.
Table comparing complexity (measured as the number of parameters) of the SOTA models on PlantVillage task.
|
|
| |
|---|---|---|
|
|
| |
| Mohanty et al. ( | ≈ 7M | - |
| Too et al. ( | ≈ 7.9M | - |
| Chen et al. ( | ≈ 3.7M | - |
| Ümit Atila et al. ( | ≈ 30.5M | ≈ 19.5M |
| End-to-end (ours) | ≈ 43.2M | ≈ 66.7M |
| Fine-tuning (ours) | ≈ 66.7M (100k) | ≈ 66.7M (100k) |
| Minimal ensemble (ours) | ≈ 10M (100k) | ≈ 10M (100k) |
The minimal ensemble is the least complex because even if it has 10M parameters it can be considered as 5M because the weak models are independent and can be executed in parallel. Moreover, during training, only the 100k parameters of the combination layers are trained.
Table comparing accuracies (measured as correct prediction over the whole dataset) of the SOTA models on the PlantVillage task.
|
|
| |
|---|---|---|
|
|
| |
| Mohanty et al. ( | 99.3500% | - |
| Too et al. ( | 99.7500% | - |
| Chen et al. ( | 99.8500% | - |
| Ümit Atila et al. ( | 99.9100% | 99.9700% |
| End-to-end (ours) | 99.9729% | 99.9904% |
| Fine-tuning (ours) | 99.9856% | 99.9919% |
| Minimal ensemble (ours) | 100.000% | 100.000% |
Since the end-to-end phase, our study was shown to improve the SOTA.
Table showing the accuracies of the two weak models and the fine-tuning ensembling them, using a traditional 80/10/10 split.
|
|
| |||||
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
| EfficientNet-b0 weak1 | 99.8738 | 99.8557 | 100.000 | 99.8536 | 99.8536 | 100.000 |
| EfficientNet-b0 weak2 | 99.8377 | 99.9278 | 100.000 | 99.7886 | 99.9187 | 100.000 |
| Ensemble (weak1 + weak2) | 100.000 | 100.000 | 99.9864 | 100.000 | 100.000 | 100.000 |