#
YOLO-AppleScab: A Deep Learning Approach for Efficient and Accurate Apple Scab Detection in Varied Lighting Conditions Using CARAFE-Enhanced YOLOv7^{ †}

^{1}

^{2}

^{3}

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

## 2. Material and Methodology of the Proposed Research

#### 2.1. You Only Look Once Series (YOLO Series)

#### 2.2. Rectangular Bounding Box and $\mathcal{L}\mathfrak{o}\mathfrak{s}\mathfrak{s}$ Function

#### 2.3. Content-Aware ReAssembly of Feature: $\mathbb{C}\mathbb{A}\mathbb{R}\mathbb{A}\mathbb{F}\mathbb{E}$

#### 2.4. Image Acquisition

#### 2.5. The Proposed YOLO-AppleScab Model

#### 2.6. Experiment Setup

^{®}Core™ i5-11400H, 64-bit 2.70 GHz dodeca-core CPUs and a NVIDIA GeForce RTX 3050 GPU, Santa Clara, CA, USA. Table 1 presents the basic configuration of the local computer.

## 3. Results and Discussion

#### 3.1. The Network Visualization

#### 3.2. Performance of the Proposed Model under Different Lighting Conditions

#### 3.3. Comparison of Different State-of-the-Art Algorithms

## 4. Conclusions

## Supplementary Materials

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Lu, Y.; Lu, R. Non-Destructive Defect Detection of Apples by Spectroscopic and Imaging Technologies: A Review. Trans. ASABE
**2017**, 60, 1765–1790. [Google Scholar] [CrossRef] - Savary, S.; Willocquet, L.; Pethybridge, S.J.; Esker, P.; McRoberts, N.; Nelson, A. The Global Burden of Pathogens and Pests on Major Food Crops. Nat. Ecol. Evol.
**2019**, 3, 430–439. [Google Scholar] [CrossRef] [PubMed] - Varshney, R.K.; Pandey, M.K.; Bohra, A.; Singh, V.K.; Thudi, M.; Saxena, R.K. Toward the Sequence-Based Breeding in Legumes in the Post-Genome Sequencing Era. Theor. Appl. Genet.
**2019**, 132, 797–816. [Google Scholar] [CrossRef] [PubMed] - Sikati, J.; Nouaze, J.C. YOLO-NPK: A Lightweight Deep Network for Lettuce Nutrient Deficiency Classification Based on Improved YOLOv8 Nano. Eng. Proc.
**2023**, 58, 31. [Google Scholar] [CrossRef] - Ali, A.; Imran, M. Remotely Sensed Real-Time Quantification of Biophysical and Biochemical Traits of Citrus (Citrus sinensis L.) Fruit Orchards—A Review. Sci. Hortic.
**2021**, 282, 110024. [Google Scholar] [CrossRef] - He, W.; Liu, M.; Qin, X.; Liang, A.; Chen, Y.; Yin, Y.; Qin, K.; Mu, Z. Genome-Wide Identification and Expression Analysis of the Aquaporin Gene Family in Lycium Barbarum during Fruit Ripening and Seedling Response to Heat Stress. Curr. Issues Mol. Biol.
**2022**, 44, 5933–5948. [Google Scholar] [CrossRef] - Nouaze, J.C.; Kim, J.H.; Jeon, G.R.; Kim, J.H. Monitoring of Indoor Farming of Lettuce Leaves for 16 Hours Using Electrical Impedance Spectroscopy (EIS) and Double-Shell Model (DSM). Sensors
**2022**, 22, 9671. [Google Scholar] [CrossRef] - Liu, G.; Nouaze, J.C.; Touko Mbouembe, P.L.; Kim, J.H. YOLO-Tomato: A Robust Algorithm for Tomato Detection Based on YOLOv3. Sensors
**2020**, 20, 2145. [Google Scholar] [CrossRef] - Cubero, S.; Marco-Noales, E.; Aleixos, N.; Barbé, S.; Blasco, J. RobHortic: A Field Robot to Detect Pests and Diseases in Horticultural Crops by Proximal Sensing. Agriculture
**2020**, 10, 276. [Google Scholar] [CrossRef] - Tian, Y.; Li, E.; Liang, Z.; Tan, M.; He, X. Diagnosis of Typical Apple Diseases: A Deep Learning Method Based on Multi-Scale Dense Classification Network. Front. Plant Sci.
**2021**, 12, 698474. [Google Scholar] [CrossRef] - Zou, X.-b.; Zhao, J.-w.; Li, Y.; Holmes, M. In-Line Detection of Apple Defects Using Three Color Cameras System. Comput. Electron. Agric.
**2010**, 70, 129–134. [Google Scholar] [CrossRef] - Zarifneshat, S.; Rohani, A.; Ghassemzadeh, H.R.; Sadeghi, M.; Ahmadi, E.; Zarifneshat, M. Predictions of Apple Bruise Volume Using Artificial Neural Network. Comput. Electron. Agric.
**2012**, 82, 75–86. [Google Scholar] [CrossRef] - Omrani, E.; Khoshnevisan, B.; Shamshirband, S.; Saboohi, H.; Anuar, N.B.; Nasir, M.H.N.M. Potential of Radial Basis Function-Based Support Vector Regression for Apple Disease Detection. Measurement
**2014**, 55, 512–519. [Google Scholar] [CrossRef] - Rumpf, T.; Mahlein, A.-K.; Steiner, U.; Oerke, E.-C.; Dehne, H.-W.; Plümer, L. Early Detection and Classification of Plant Diseases with Support Vector Machines Based on Hyperspectral Reflectance. Comput. Electron. Agric.
**2010**, 74, 91–99. [Google Scholar] [CrossRef] - Gongal, A.; Amatya, S.; Karkee, M.; Zhang, Q.; Lewis, K. Sensors and Systems for Fruit Detection and Localization: A Review. Comput. Electron. Agric.
**2015**, 116, 8–19. [Google Scholar] [CrossRef] - Kzizhevsky, A.; Sutskever, I.; Hinton, G.E. ImageNet Classification with Deep Convolutional Neural Networks|Communications of the ACM. Assoc. Comput. Mach.
**2017**, 60, 84–90. [Google Scholar] [CrossRef] - Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going Deeper with Convolutions. In Proceedings of the 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 1–9. [Google Scholar]
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv
**2014**, arXiv:1409.1556. [Google Scholar] - Xie, S.; Girshick, R.; Dollár, P.; Tu, Z.; He, K. Aggregated Residual Transformations for Deep Neural Networks. In Proceedings of the IEEE Computer Society, Honolulu, HI, USA, 21–26 July 2017; pp. 5987–5995. [Google Scholar]
- Zhang, K.; Wu, Q.; Liu, A.; Meng, X. Can Deep Learning Identify Tomato Leaf Disease? Adv. Multimed.
**2018**, 2018, 10. [Google Scholar] [CrossRef] - Bhange, M.A.; Hingoliwala, H.A. A Review of Image Processing for Pomegranate Disease Detection. Int. J. Comput. Sci. Inf. Technol.
**2014**, 6, 92–94. [Google Scholar] - Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You Only Look Once: Unified, Real-Time Object Detection. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 779–788. [Google Scholar]
- Redmon, J.; Farhadi, A. YOLO9000: Better, Faster, Stronger. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 6517–6525. [Google Scholar]
- Bochkovskiy, A.; Wang, C.-Y.; Liao, H.-Y.M. YOLOv4: Optimal Speed and Accuracy of Object Detection. arXiv
**2020**, arXiv:2004.10934. [Google Scholar] - Wan, S.; Goudos, S. Faster R-CNN for Multi-Class Fruit Detection Using a Robotic Vision System. Comput. Netw.
**2019**, 168, 107036. [Google Scholar] [CrossRef] - Redmon, J.; Farhadi, A. YOLOv3: An Incremental Improvement. arXiv
**2018**, arXiv:1804.02767. [Google Scholar] - Wang, C.-Y.; Bochkovskiy, A.; Liao, H.-Y.M. YOLOv7: Trainable Bag-of-Freebies Sets New State-of-the-Art for Real-Time Object Detectors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 18–24 June 2022. [Google Scholar]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. In Advances in Neural Information Processing Systems; Curran Associates, Inc.: Red Hook, NY, USA, 2015; Volume 28. [Google Scholar]
- Kodors, S.; Lacis, G.; Sokolova, O.; Zhukovs, V.; Apeinans, I.; Bartulsons, T. AppleScabFDs Dataset. Available online: https://www.kaggle.com/datasets/projectlzp201910094/applescabfds (accessed on 17 February 2023).

**Figure 1.**YOLO model detection. The classification task is addressed while dealing with regression. Therefore, each interested class (Healthy, Scab) is represented under different colors to illustrate the YOLO detection model.

**Figure 2.**Prediction of bounding box. YOLOv7 will predict the width and height of the box as offsets from cluster centroids and center coordinates of the box relative to the location of the filter application using a sigmoid function. The red dotted indicates the prior anchor, and the blue square is the prediction.

**Figure 3.**Apple fruit samples from dataset AppleScabLDs: (

**a**) healthy apple fruit, and (

**b**) infected apple by scab disease.

**Figure 4.**An overview of the proposed model of $\mathbb{C}\mathbb{A}\mathbb{R}\mathbb{A}\mathbb{F}\mathbb{E}$ architecture incorporated in YOLOv7 network architecture.

**Figure 5.**Feature maps activation in Upsample and $\mathbb{C}\mathbb{A}\mathbb{R}\mathbb{A}\mathbb{F}\mathbb{E}$ layers. (

**a**,

**d**) YOLOv7 prediction; (

**b**,

**e**) stage 53 Upsample feature maps; (

**c**,

**f**) stage 65 Upsample feature maps; (

**g**,

**j**) YOLO-AppleScab prediction; (

**h**,

**k**) stage 53 $\mathbb{C}\mathbb{A}\mathbb{R}\mathbb{A}\mathbb{F}\mathbb{E}$ feature maps; (

**i**,

**l**) stage 65 $\mathbb{C}\mathbb{A}\mathbb{R}\mathbb{A}\mathbb{F}\mathbb{E}$ feature maps. Each color represents a distinct outcome of the convoluted feature map at the present layer.

Computer Configuration | Specific Parameters |
---|---|

CPU | 11th Gen Intel^{®} Core™ i5-11400H |

GPU | NVIDIA Geforce RTX 3050 |

Operating system | Ubuntu 22.04.1 LTS |

Random Access Memory | 16 GB |

Illumination | Class | GT | Correctly Identified | Falsely Identified | Missed | |||
---|---|---|---|---|---|---|---|---|

Amount | Rate | Amount | Rate | Amount | Rate | |||

Strong Light | Healthy | 20 | 18 | 90% | 1 | 5% | 1 | 5% |

Scab | 28 | 27 | 96.43% | 1 | 0% | 0 | 3.57% | |

Soft Light | Healthy | 29 | 22 | 75.86% | 2 | 6.87% | 5 | 17.24% |

Scab | 27 | 23 | 85.18% | 2 | 7.41% | 2 | 7.4% |

**Table 3.**Classification metrics. Comparison with different SOTA of YOLOv3, YOLOv4, YOLOv7 and the proposed method for the two studied classes (healthy and scab) that apple represents. The input image size is 416 $\times $ 416.

Model | Healthy | Scab | ||||||||
---|---|---|---|---|---|---|---|---|---|---|

Precision (%) | Recall (%) | F1 (%) | ${\mathit{m}\mathit{A}\mathit{P}}_{0.5}$ (%) | ${\mathit{m}\mathit{A}\mathit{P}}_{0.5-0.95}$(%) | Precision (%) | Recall (%) | F1 (%) | ${\mathit{m}\mathit{A}\mathit{P}}_{0.5}$(%) | ${\mathit{m}\mathit{A}\mathit{P}}_{0.5-0.95}$(%) | |

Yolov3 | 88.38 | 56.64 | 69.04 | 68.60 | 41.60 | 68.20 | 91.80 | 78.23 | 92.10 | 69.80 |

yolov4 | 89.90 | 67.30 | 76.98 | 79.40 | 53.90 | 89.40 | 95.90 | 92.54 | 92.70 | 70,30 |

Yolov7 | 85.40 | 74.50 | 79.58 | 80.10 | 51,60 | 91.80 | 90.90 | 91.35 | 93.40 | 72.70 |

Yolo-Applescab | 100 | 74.50 | 85.39 | 83.30 | 54.80 | 89.50 | 95.90 | 92.58 | 94.70 | 73.20 |

**Table 4.**Classification metrics. Comparison with different SOTA of YOLOv3, YOLOv4, YOLOv7 and Faster R-CNN is used for benchmarking. The input image size is 416 $\times $ 416. The $mA{P}_{0.5-0.95}\text{}$are expressed in percentages. Two classes (healthy and scab) represent the apple condition.

Model | Healthy | Scab |
---|---|---|

${\mathit{m}\mathit{A}\mathit{P}}_{0.5-0.95}$ (%) | ${\mathit{m}\mathit{A}\mathit{P}}_{0.5-0.95}$ (%) | |

YOLOv3 | 41.60 | 69.80 |

YOLOv4 | 53.90 | 70.30 |

YOLOv7 | 51.60 | 72.70 |

Faster R-CNN | 47.03 | 59.79 |

YOLO-AppleScab | 54.80 | 73.20 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Nouaze, J.C.; Sikati, J.
YOLO-AppleScab: A Deep Learning Approach for Efficient and Accurate Apple Scab Detection in Varied Lighting Conditions Using CARAFE-Enhanced YOLOv7. *Biol. Life Sci. Forum* **2024**, *30*, 6.
https://doi.org/10.3390/IOCAG2023-16688

**AMA Style**

Nouaze JC, Sikati J.
YOLO-AppleScab: A Deep Learning Approach for Efficient and Accurate Apple Scab Detection in Varied Lighting Conditions Using CARAFE-Enhanced YOLOv7. *Biology and Life Sciences Forum*. 2024; 30(1):6.
https://doi.org/10.3390/IOCAG2023-16688

**Chicago/Turabian Style**

Nouaze, Joseph Christian, and Jordane Sikati.
2024. "YOLO-AppleScab: A Deep Learning Approach for Efficient and Accurate Apple Scab Detection in Varied Lighting Conditions Using CARAFE-Enhanced YOLOv7" *Biology and Life Sciences Forum* 30, no. 1: 6.
https://doi.org/10.3390/IOCAG2023-16688