1. Introduction
Guava fruit or also widely known locally in the Philippines as Bay-abas, which is known for its sweet flavor when ripe, while also giving various health benefits, together with its leaves. Guava leaves are also known to be healthy indicators that the tree has grown well [
1]. The guava fruit is vulnerable to various infectious leaf diseases that can lead to crop yield [
2]. Since guava fruit and guava leaf are intricately connected, they play crucial roles in the plant’s growth and development [
3].
Advancements in technology have enabled the automated use of computers and algorithms for classification tasks with high efficiency and accuracy. However, guava leaves are susceptible to common leaf diseases that are often difficult to distinguish based solely on their physical characteristics. Such challenges can lead to increased food waste and reduced crop yields. To address this issue, the researchers developed a system designed to classify guava leaf diseases in this study.
While previous studies have explored the classification of guava leaf diseases using earlier models, these approaches were limited in terms of computational power, speed, and accuracy when handling image processing tasks. In contrast, we developed a hybrid model that integrates Support Vector Machine (SVM) and YOLOv8. Manual classification of leaf diseases is time-consuming and prone to errors, further underscoring the need for automated solutions. The model highlights the importance of food security, particularly in fruit production, by providing farmers with a fast and reliable diagnostic tool capable of reducing crop losses. It also offers a foundation for future studies aimed at developing real-time disease classification systems and contributes to broader advancements in agricultural technology.
2. Literature Review
Infections affecting guava plants and fruits represent one of the greatest challenges to guava production, negatively impacting both yield and farmers’ socio-economic growth. Consequently, deep learning models, particularly convolutional neural networks, have been applied to the recognition of guava leaf diseases [
4,
5].
The Support Vector Machine (SVM) algorithm was adopted in this study due to its proven effectiveness in machine learning classification tasks, enabling accurate predictions across diverse domains, including human, animal, and vehicle classification [
6]. For instance, SVM has been used with an electronic nose to detect schizophrenia [
7], to determine ripeness in pineapples [
8], and to assess quality in cacao [
9].
You Only Look Once version 8 (YOLOv8), a deep learning model employed in this study, was selected for its improved accuracy and faster processing speed compared to earlier versions. The YOLO family of algorithms is widely recognized for its effectiveness in image processing tasks. For example, YOLOv5 has been applied to classify defects in coffee beans [
10], YOLOv3 has been used to identify whiteflies and fruit flies [
11], YOLO has been utilized to detect rice leaf diseases such as leaf blast and brown spot [
12], and Tiny-YOLOv4 has been applied to snail detection [
13].
The system developed in this study employs a Raspberry Pi 4 to classify guava leaf diseases using the hybrid SVM–YOLOv8 model. The custom dataset includes four categories: Algal Leaf Spot, Cercospora Leaf Spot, Bacterial Blight, and Healthy Leaf. Live classification is facilitated by the Raspberry Pi Camera Module V2. A confusion matrix was used to evaluate the accuracy of the proposed model. This system provides a basis for further research in image processing and classification, while the dataset created in this study can be expanded with additional images to support future investigations.
3. Methodology
3.1. System Design
We designed a system that captures guava leaf disease samples live using a Raspberry Pi 4 with a Raspberry Pi Camera V2 Module as the input. Afterwards, YOLOv8 was used for the feature extraction for the training of the proposed model, and for object detection. SVM was used as the classifier of the model. The handcrafted feature extraction included grayscale, and color thresholding segmentation was implemented for SVM. The accuracy of the classification was assessed through a confusion matrix, serving as the study’s output (
Figure 1).
3.2. Hardware Block Diagram
Figure 2 illustrates the relationship among the components of the proposed system. The hardware configuration consists of a power source, a Secure Digital card, a Raspberry Pi Camera Module 2, and a Raspberry Pi 4. The Raspberry Pi 4 functions as the microcontroller, managing the inputs and outputs of the system. All collected data are stored on the SD card, which supports the execution of the device’s operations by the Raspberry Pi 4. The Raspberry Pi Camera Module 2 is connected to the Raspberry Pi 4 to enable live image capture and classification. Additionally, the Raspberry Pi is linked to an LCD screen that displays the results of the image classification process. All of the necessary components used in the study are sourced from Makerlab Electronics based in Manila, Philippines using their online store. While the wood used that serves as the body and enclosure for the electronic components are sourced from a local woodshop.
3.3. Software Development
Figure 3 illustrates the overall process of the proposed system. The first stage involves capturing images of guava leaves using the developed hardware setup. The YOLOv8 layer performs feature extraction during model training and is responsible for generating bounding boxes for live detection. In parallel, handcrafted feature extraction techniques—such as grayscale conversion and color-threshold segmentation—are applied within the SVM framework to enhance classification by distinguishing among various guava leaf diseases. The SVM layer then executes the classification task, determining the specific disease affecting the leaves. Finally, the system’s graphical user interface (GUI) processes and displays the prediction results to the user. The overall custom dataset was arranged and organized using the Roboflow website for labeling the images and creating the bounding boxes. The training and validation process utilized Jupyter Notebook version 7.2.2 using Anaconda Navigator version 2.4.2 for both YOLOv8 and SVM. The GUI for the study was made using Visual Studio Code version 1.102.1 in Raspberry Pi 4. All software codes are created using Python version 3.11.2 programming language.
3.4. Experimental Setup
Figure 4 shows the experimental setup of the developed system. The guava leaves are placed on the base platform of the hardware system for the camera module to capture the guava leaf image for live classification. After the image processing, the software will go through the YOLOv8 model for detection and the SVM model for classification. The output will be shown on the GUI that is displayed on the LCD screen.
4. Results and Discussions
4.1. Data Gathering
Table 1 shows the number of images used for training, validation, and testing in the YOLOv8 + SVM Model training. We gathered a total of 600 sample images, with 150 sample images allocated for each class. 120 images were used for training, 30 images for validation, and 20 images for testing.
4.2. Statistical Analysis
The confusion matrix shown in
Table 2 illustrates the classification results of the trained YOLOv8 model in identifying guava leaf conditions. From the results, the model correctly classified 18 out of 20 algal leaf spot samples, 18 out of 20 samples for bacterial blight, 18 out of 20 samples for cercospora leaf spot as well, and lastly, all 20 healthy leaf samples were correctly classified without any misclassifications.
The accuracy of the proposed model is calculated using the formula presented in Equation (1). The numerator represents the summation of all correct predictions, or true positives, across the four classes, while the denominator corresponds to the total number of samples. As this study involves four guava leaf classes, which are the algal leaf spot, cercospora leaf spot, bacterial blight, and healthy leaf, the accuracy was computed by dividing the total number of correct predictions by the overall number of classifications within these classes.
5. Conclusions and Recommendation
We developed and tested a guava leaf disease classification system using SVM and YOLOv8. The YOLOv8 algorithm was employed for feature extraction from the convolutional backbone of the YOLOv8 network and for leaf detection within the system. In addition, handcrafted feature extraction techniques, such as grayscale conversion and color-threshold segmentation, were implemented to support the training of the proposed model. SVM served as the classifier for guava leaf disease identification. The proposed model achieved an accuracy of 92.5%, demonstrating reliable performance, though some misclassifications were observed.
The dataset needs to be expanded to improve the training of both SVM and YOLO models, thereby enhancing accuracy, reducing error margins, and ensuring greater diversity for training, validation, and testing. We also suggest revising the experimental setup to make it more portable, enabling on-site detection of guava leaf diseases. Furthermore, we propose exploring alternative algorithms for classifying other types of guava leaf diseases. In some cases, a standalone SVM or YOLOv8 algorithm may be sufficient for image classification tasks, as combining both models can introduce additional complexity and may be more challenging to implement.
Author Contributions
Conceptualization, P.J.C.R. and F.M.P.D.; methodology, P.J.C.R. and F.M.P.D.; software, P.J.C.R. and F.M.P.D.; validation, P.J.C.R., F.M.P.D. and A.N.Y.; formal analysis, A.N.Y.; investigation, P.J.C.R. and F.M.P.D.; resources, P.J.C.R. and F.M.P.D.; data curation, P.J.C.R. and F.M.P.D.; writing—original draft preparation, P.J.C.R. and F.M.P.D.; writing—review and editing, P.J.C.R., F.M.P.D. and A.N.Y.; visualization, P.J.C.R.; supervision, A.N.Y. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Dataset may be requested by sending an email to any of the authors.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| SVM | Support Vector Machine |
| YOLOv8 | You Only Look Once v8 |
| LCD | Liquid Crystal Display |
| GUI | Graphical User Interface |
References
- Panda, S.; Somani, V. Certain Investigations of Guava Leaf Disease Measurement in Necrotic Areas with Image Processing Techniques. In Proceedings of the 2022 International Conference on Sustainable Computing and Data Communication Systems (ICSCDS), Erode, India, 7–9 April 2022; pp. 1727–1733. [Google Scholar]
- Mustak Un Nobi, M.; Rifat, M.; Mridha, M.F.; Alfarhood, S.; Safran, M.; Che, D. GLD-Det: Guava Leaf Disease Detection in Real-Time Using Lightweight Deep Learning Approach Based on MobileNet. Agronomy 2023, 13, 2240. [Google Scholar] [CrossRef]
- Doutoum, A.S.; Eryigit, R.; Tugrul, B. Classification of Guava Leaf Disease using Deep Learning. WSEAS Trans. Inf. Sci. Appl. 2023, 20, 356–363. [Google Scholar] [CrossRef]
- Thangaraj, R.; Mohan, M.; Moulik, M.; Logeshwari, A.; Loganathan, T.; Koushika, P. A Comparative Study of Deep Learning Models for Guava Leaf Disease Detection. In Proceedings of the 2023 Third International Conference on Advances in Electrical, Computing, Communication and Sustainable Technologies (ICAECT), Bhilai, India, 5–6 January 2023. [Google Scholar]
- Howlader, M.R.; Habiba, U.; Faisal, R.H.; Rahman, M.M. Automatic Recognition of Guava Leaf Diseases using Deep Convolution Neural Network. In Proceedings of the 2019 International Conference on Electrical, Computer and Communication Engineering (ECCE), Cox’s Bazar, Bangladesh, 7–9 February 2019. [Google Scholar]
- Yumang, A.N.; Cruz, G.A.; Fontanilla, L.A. Combination of Acoustic and Vibration Sensor Data Using Support Vector Machines and One-Versus-All Technique Data Fusion for Detecting Objects. In Proceedings of the 2020 12th International Conference on Computer and Automation Engineering (ICCAE 2020), Syndey, Australia, 14–16 February 2020; pp. 56–59. [Google Scholar]
- Leal, R.V.; Quiming, A.X.C.; Villaverde, J.F.; Yumang, A.N.; Linsangan, N.B.; Caya, M.V.C. Determination of Schizophrenia Using Electronic Nose via Support Vector Machine. In Proceedings of the 2019 9th International Conference on Biomedical Engineering and Technology (ICBET ’19), Tokyo, Japan, 28–30 March 2019; pp. 13–17. [Google Scholar]
- Aguilar, E.J.L.; Borromeo, G.K.P.; Flores Villaverde, J. Determination of Pineapple Ripeness Using Support Vector Machine for Philippine Standards. In Proceedings of the 2021 IEEE 7th International Conference on Control Science and Systems Engineering (ICCSSE), Qingdao, China, 30 July–1 August 2021; pp. 283–287. [Google Scholar]
- Galindo, J.A.M.; Rosal, J.E.C.; Villaverde, J.F. Ripeness Classification of Cacao Using Cepstral-Based Statistical Features and Support Vector Machine. In Proceedings of the 2022 IEEE International Conference on Artificial Intelligence in Engineering and Technology (IICAIET), Kota Kinabalu, Malaysia, 13–15 September 2022. [Google Scholar]
- Luis, V.A.M.; Quinones, M.V.T.; Yumang, A.N. Classification of Defects in Robusta Green Coffee Beans Using YOLO. In Proceedings of the 2022 IEEE International Conference on Artificial Intelligence in Engineering and Technology (IICAIET), Kota Kinabalu, Malaysia, 13–15 September 2022. [Google Scholar]
- Legaspi, K.R.B.; Sison, N.W.S.; Villaverde, J.F. Detection and Classification of Whiteflies and Fruit Flies Using YOLO. In Proceedings of the 2021 13th International Conference on Computer and Automation Engineering (ICCAE), Melbourne, Australia, 20–22 March 2021; pp. 1–4. [Google Scholar]
- Agbulos, M.K.; Sarmiento, Y.; Villaverde, J. Identification of Leaf Blast and Brown Spot Diseases on Rice Leaf with YOLO Algorithm. In Proceedings of the 2021 IEEE 7th International Conference on Control Science and Systems Engineering (ICCSSE), Qingdao, China, 30 July–1 August 2021; pp. 307–312. [Google Scholar]
- Yumang, A.N.; Bautista, J.A.; Borreta, J.R.I. Snail Detection Using YOLO. In Proceedings of the IEEE 5th Eurasia Conference on IOT, Communication and Engineering (ECICE), Yunlin, Taiwan, 27–29 October 2023; pp. 792–795. [Google Scholar]
| 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. |