Abstract
The accurate and timely detection of leaf diseases is essential in helping farmers take necessary corrective actions to prevent disease spread that can lead to significant crop losses, reduced yield, and economic losses. A real-time Raspberry Pi 5-based prototype classification of tobacco leaf diseases using You Only Look Once Version 8 (YOLOv8n) and a Deep Convolutional Neural Network (DCNN) was developed to assist farmers with their crop disease identification. The calibration was performed by adjusting the camera mounting height and the lux level to achieve the system’s optimal performance. It was evaluated using 24 fresh tobacco leaves upon identifying the system’s optimal setting. Under optimal settings, the prototype achieved an overall accuracy of 93%, with per-class accuracies of 100% for frogeye classification, 100% for TMV classification, 94% for wildfire classification, and 78% for healthy leaves.
1. Introduction
In the Philippines, tobacco cultivation is an essential industry that supports thousands of Filipinos and makes a substantial economic contribution. At least 2.1 million people are employed in the industry, including about 430,000 farmers, farm laborers, and their families. The three primary tobacco varieties farmed locally are Virginia, Burley, and Native, and they are all grown in various parts of the nation. Ilocos, Cagayan Valley, Central Luzon, and Occidental Mindoro are the best tobacco-growth places.
Despite its importance, tobacco growers face problems such as leaf diseases that reduce production and profits. Traditional methods of identifying illnesses are time-consuming and prone to errors. To solve this, a sickness detection tool that is accessible, accurate, and affordable is needed. While recent advances in image processing and machine learning have shown promise, the existing models’ accuracy is still low.
In this study, we developed a system to identify diseases in Virginia tobacco leaves through a two-stage pipeline of You Only Look Once (YOLO) and a Deep Convolutional Neural Network (DCNN) on a Raspberry Pi 5. The system identifies and classifies the health of leaves in real-time. Three hundred and twelve samples were utilized, including 96 fresh, 96 dried Virginia tobacco leaves, and 120 non-tobacco leaves. Fresh leaves were only used for disease identification, as they reflect realistic growing conditions more accurately.
The prototype detects three prevalent diseases: Frog-eye Spot, Wildfire, and Tobacco Mosaic Virus (TMV). It excludes other types of tobacco due to their varying features. The tests are conducted under uniform lighting and background conditions, and the system does not accommodate environmental changes or mixed-object situations.
This study aims to create a tobacco leaf disease detection device using the Raspberry Pi 5 platform to incorporate the YOLOv8n and DCNN models for tobacco leaf disease detection, calibrate the camera height and optimal illumination for the highest prediction accuracy, evaluate the system’s detection and classification using a test set of fresh tobacco leaves, and the system’s detection will also be assessed using mixed testing objects.
2. Literature Review
2.1. Image Processing
Image processing is conducted to transform an image into a digital format and extract useful information. The image processing system treats each image as a 2D signal when specific predefined signal processing algorithms are being used [1]. Recent developments have focused on the application of deep learning for image processing. In medical imaging, illness diagnosis, picture categorization, and object identification, CNNs have demonstrated remarkable outcomes [2].
2.2. YOLO Architecture
A real-time object identification technique called YOLO is used to identify, categorize, and label items in pictures. The YOLO algorithm splits an image into a grid of cells and predicts a bounding box and class probability for each cell. YOLO is a single neural network that anticipates several bounding boxes. It is a single model focusing on object detection [3]. The YoloV5 algorithm was used to build a model for detecting leaf blight disease in plant pictures. Of the 400 photographs in the training dataset, 10 were background pictures, and 390 depicted the leaf blight disease. A random selection was made to use 75% of the data for training, 22% for validation, and 3% for testing [4].
2.3. DCNN
DCNN has many layers. Image analysis is the most common use for artificial neural networks. It has five components: a pooling layer, a fully connected layer, a dropout layer, an activation function layer, a convolution and rectified linear unit layer. CNN performs visual comparisons piece by piece. Features are a set of numerical MxM matrices that are sought [5].
3. Methodology
3.1. Systrem Development
The developed system conducts data acquisition, capturing images of tobacco leaves with the prototype webcam to ensure consistent illumination and minimize background noise. The acquired images serve as input data for processing and model training. Next, data annotation is conducted using the Roboflow platform, where each object is labeled with bounding boxes to help the model localize the specific area of the tobacco leaf during training. The platform also augments the dataset to achieve 500 images per leaf classification (Figure 1).
Figure 1.
System process.
The dataset undergoes image processing to enhance image quality and consistency, including resizing images, normalizing pixel intensity, and applying image augmentation to increase variability and improve model prediction accuracy. The system uses images from an external webcam connected to the Raspberry Pi 5 (Raspberry Pi Ltd., Cambridge, UK) for classification. Preprocessing prepares the images for the YOLOv8 (Ultralytics, London, UK) and DCNN models. The system outputs predictions from the trained models displayed on a graphical user interface.
3.2. Hardware Development
The system hardware includes a dedicated computing platform, an image acquisition device, a controlled illumination system, and independent power sources, all essential for achieving stable and accurate system performance (Figure 2).
Figure 2.
System component.
The Raspberry Pi 5 serves as the primary processing unit. It executes trained deep learning models, manages communication with peripheral devices, and performs real-time image processing tasks. Image acquisition is achieved using a 1440-pixel webcam connected to the Raspberry Pi through USB. The high-resolution capability of the webcam ensures clear and detailed capture of leaf samples within the prototype enclosure. The camera is mounted on an adjustable overhead rig inside the compartment, allowing for variable height settings of 9, 13, and 17 inches.
3.3. Software Development
The software is created for image acquisition to final classification. Upon receiving an image, the identifier model first determines whether the sample is a recognized tobacco leaf. If classified as unknown, the processing terminates. If identified, the system proceeds to disease detection using the YOLO model, which determines whether the leaf is healthy. In such cases, the system assigns the healthy label and recommends no intervention. If the leaf is classified as unhealthy, the image is forwarded to the DCNN model for further analysis and disease classification. The DCNN applies its algorithms to identify specific diseases, including frogeye spot, TMV, or wildfire. Following classification, the system outputs the predicted disease and provides an appropriate intervention strategy based on the condition of the tobacco leaf (Figure 3).
Figure 3.
Process of system software.
3.4. Experiment
Testing was conducted to evaluate the system’s performance using real tobacco leaves under controlled but realistic conditions. Two variables were examined: camera height and illumination level. The camera was positioned at 9, 13, and 17 inches, while illumination was adjusted to 1.67, 8.33, and 10.83 lux (Figure 4).
Figure 4.
(a) Dimension of camera mount and camera height positions. (b) Actual prototype.
4. Results and Discussion
4.1. Calibration
Three calibration trials were conducted using 24 leaves, with six samples allocated to each class. Detection accuracy for healthy leaves ranged from 0.00 to 77.78%, indicating difficulty in distinguishing them from diseased samples. Frogeye spot classification achieved the highest performance, reaching 100.00% accuracy in most settings, although some trials dropped to 0.00% and 16.67%. Accuracy for TMV varied widely, from 0.00 to 100%, depending on calibration conditions. Wildfire classification also exhibited variability, with accuracy ranging between 0.00% and 88.89% (Table 1). The optimal configuration was observed at a camera height of 13 inches and an illumination level of 10.83 lux, which yielded consistent results across all trials.
Table 1.
Per-class calibration results.
4.2. Testing Validation
Testing Validation Using Fresh Tobacco Leaves Only
A validation test was conducted in three trials using 24 fresh tobacco leaves, with six leaves per class and one sample per leaf. The validation was performed under the optimal camera height and illumination settings, yielding an overall accuracy of 93.06%. The system achieved 100% accuracy in identifying frogeye spot and TMV, while wildfire was detected with 94.44% accuracy. The healthy class exhibited the lowest accuracy at 77.78% (Table 2).
Table 2.
Testing validation result for fresh-tobacco-leaf-only samples.
More testing and validation with an expanded sample size were carried out to assess the prototype’s ability to classify tobacco leaves and distinguish them from non-tobacco items. The evaluation included 78 objects and 312 samples, comprising fresh and dried Virginia tobacco leaves, fresh and dried leaves of non-tobacco plants, damaged leaves, artificial leaves, and non-leaf objects. For each object, four images were captured from different angles: front–horizontal, front–vertical, back–horizontal, and back–vertical (Table 3).
Table 3.
Testing summary for fresh tobacco leaves.
The system demonstrated high accuracy for fresh tobacco leaves across three trials, with an overall accuracy of 91.67%, consistent with the training dataset composed of fresh leaves. However, accuracy declined markedly to 25% for dried tobacco leaves, indicating limited generalization due to the absence of dried samples in the training data (Table 4 and Table 5).
Table 4.
Testing summary for dried tobacco leaves.
Table 5.
Testing summary for non-tobacco leaves.
5. Conclusions and Recommendation
We developed a prototype for detecting and classifying diseases in Virginia tobacco leaves. Utilizing the YOLOv8n model in combination with DCNN, the system identified frogeye spot, TMV, and wildfire, and provided corresponding intervention recommendations. Optimal calibration settings—a camera height of 13 inches and an illumination of 10.83 lux—resulted in a prediction accuracy of 93% for fresh tobacco leaf samples. For mixed datasets, the system achieved 91% accuracy for fresh tobacco leaves, 25% for dried tobacco leaves, and 93.33% for non-tobacco samples. Future improvements should focus on the integration of more advanced deep learning models, the use of enhanced hardware such as high-resolution cameras and AI-compatible devices, and the development of portable, weather-resistant designs suitable for field deployment under diverse environmental conditions.
Author Contributions
Conceptualization, M.M. and J.C.; methodology, M.M. and J.C.; software, J.C. and M.M.; validation, M.M., J.C. and J.T.S.; formal analysis, M.M., J.C. and J.T.S.; investigation, M.M. and J.C.; resources, M.M. and J.C.; data curation, M.M. and J.C.; writing—original draft preparation, M.M. and J.C.; writing—review and editing, M.M., J.C., and J.T.S.; visualization, M.M. and J.C.; supervision, J.T.S.; project administration, M.M., J.C. and J.T.S.; funding acquisition, NA. 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
Data is contained within the article.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Simplilearn. What Is Image Processing: Overview, Applications, Benefits, and More. Available online: https://www.simplilearn.com/image-processing-article#what_is_image_processing (accessed on 10 September 2025).
- Sanchez, R.B.; Esteves, J.A.C.; Linsangan, N.B. Determination of Sugar Apple Ripeness via Image Processing Using Convolutional Neural Network. In Proceedings of the 15th International Conference on Computer and Automation Engineering (ICCAE), Sydney, Australia, 3–5 March 2023. [Google Scholar]
- Chairma Lakshmi, K.R.; Praveena, B.; Sahaana, G.; Nithya Jenev, J.; Gnanasekaran, T.; Hashim, M. Yolo for Detecting Plant Diseases. In Proceedings of the Third International Conference on Artificial Intelligence and Smart Energy (ICAIS), Coimbatore, India, 2–4 February 2023. [Google Scholar]
- Hanopol, G.L.; Dela Cruz, J.C. Design and Development of a Leaf Blight Detection System Using Image Processing with Intrusion Notification via SMS. In Proceedings of the IEEE 14th Control and System Graduate Research Colloquium (ICSGRC), Shah Alam, Malaysia, 5 August 2023. [Google Scholar]
- Built In. Deep Convolutional Neural Networks (DCNN) Explained. Available online: https://builtin.com/articles/dcnn (accessed on 11 September 2025).
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. |
© 2026 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.



