DOI : 10.17577/IJERTV15IS051716
- Open Access

- Authors : Dr. Ravi L S, Dr. Vishwanath B R, Somashekar L A, Keerthana Y U, Shashanka M R, Chandana A R
- Paper ID : IJERTV15IS051716
- Volume & Issue : Volume 15, Issue 05 , May – 2026
- Published (First Online): 19-05-2026
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License:
This work is licensed under a Creative Commons Attribution 4.0 International License
Plant Disease Prediction System using Raspberry PI and Image Processing
Dr. Ravi L S
Associate Professor Dept. Of ECE Rajeev Institute of Technology Hassan, India
Keerthana Y U
UG Scholar Dept. Of ECE Rajeev institute of technology Hassan, India
Dr. Vishwanath B R
Associate Professor Dept. Of ECE Rajeev Institute of Technology Hassan, India
Shashanka M R
UG Scholar Dept. Of ECE Rajeev institute of Technology Hassan, India
Somashekar L A
UG Scholar Dept. Of ECE Rajeev institute of Technology Hassan, India
Chandana A R
UG Scholar Dept. Of ECE Rajeev institute of Technology Hassan, India
Abstract – Agriculture plays a vital role in sustaining human life, as crop health directly impacts food security and economic development. One of the major challenges faced by farmers is the timely and accurate detection of plant diseases, especially leaf-based infections that spread quickly and significantly reduce crop yield. Conventional disease identification methods depend on manual inspection, which is time-consuming, labor-intensive, and requires expert knowledge. To overcome these limitations, this work proposes an automated real-time leaf disease detection and pesticide recommendation system using Raspberry Pi and deep learning techniques.
The system uses a CSI camera module to capture live images of plant leaves, which are analyzed through a custom-trained YOLOv5 model for accurate disease detection under different environmental conditions. When a disease is identified above a specified confidence threshold, the system retrieves suitable pesticide recommendations from a predefined database. The results are displayed on an I2C-based LCD module and recorded through terminal output. In addition, Twilio cloud communication service sends SMS alerts with disease details and pesticide suggestions, allowing farmers to receive notifications remotely.
The system also highlights infected leaf regions using bounding boxes and labels for easy visual interpretation. Developed using Python, OpenCV, and PyTorch, it is optimized for low power consumption, portability, and affordability. This solution reduces human error, supports early disease detection, and promotes precision agriculture and sustainable farming practices.
Keywords – Convolutional Neural Networks, You Only Look Once Version 5
-
INTRODUCTION
Agriculture is a crucial sector that supports global food production and sustains the livelihoods of millions of people. However, plant diseases remain a significant challenge, as they adversely affect crop yield, quality, and overall agricultural productivity. Conventional disease detection methods depend on manual observation by farmers or agricultural experts, which is often time-consuming, expensive, and prone to
inaccuracies. These challenges are more pronounced in rural regions where access to agricultural specialists is limited. Therefore, the development of an automated, accurate, and cost-effective plant disease detection system is essential for improving crop management and ensuring sustainable agricultural practices.
Recent advancements in artificial intelligence and computer vision have enabled the development of intelligent systems capable of analyzing plant images and identifying diseases with high accuracy. In particular, deep learning-based object detection algorithms such as YOLOv5 have demonstrated excellent performance in real-time image recognition applications. Leveraging these technologies, this paper presents a real-time leaf disease detection and pesticide recommendation system based on Raspberry Pi. The proposed system employs a CSI camera module to capture live images of plant leaves and processes them using a custom-trained YOLOv5 model to detect diseases under varying environmental conditions.
Once a disease is identified, the system provides suitable pesticide recommendations from a predefined database. The results are displayed locally on an LCD module and simultaneously logged through terminal output for monitoring purposes. Additionally, the system integrates Twilio SMS service to send real-time notifications containing disease details and recommended pesticides directly to the farmers mobile device. This ensures immediate communication even when the user is not physically present near the system.
The complete system is developed using Python, OpenCV, and PyTorch, creating an integrated standalone solution that is portable, affordable, and energy-efficient. By minimizing dependency on manual monitoring and enabling early disease detection, the proposed system enhances precision agriculture, supports timely intervention, and contributes to sustainable crop management.
-
LITERATURE REVIEW
The development of automated plant disease detection systems has gained significant attention in recent years due to
advancements in computer vision and deep learning. Several researchers have proposed effective methods for accurate and real-time identification of plant diseases, forming the foundation for intelligent agricultural monitoring systems.
Sharada P [1] presented a pioneering study on real-time leaf disease detection using deep learning. Their work demonstrated that deep convolutional neural networks (CNNs) can classify plant diseases from leaf images with high accuracy across multiple crop species. This research established the practical application of artificial intelligence in agriculture and highlighted the effectiveness of image-based disease diagnosis.
Konstantinos P [2] further extended this work by training deep learning models on large datasets containing both healthy and diseased plant leaves. The study achieved high classification accuracy and confirmed that CNN-based architectures are suitable for detecting complex disease patterns in crops. The work also emphasized the scalability of deep learning methods for agricultural applications.
The widely recognized PlantVillage Dataset introduced by Hughes and Salathé [3] has become a standard benchmark for plant disease detection research. It contains thousands of labeled plant leaf images and supports the development of transfer learning models for improving detection performance while reducing training complexity.
A major advancement in real-time object detection was introduced through YOLO by Joseph Redmon [4]. The algorithm performs object detection in a single pass, making it highly efficient for real-time applications. Advanced versions such as YOLOv5 are now widely adopted in agricultural disease detection systems because of their speed and accuracy.
In addition, J. K. Patil and R. Kumar [5] explored traditional image processing approaches involving segmentation, feature extraction, and pattern recognition. Although these methods achieved moderate performance, they demonstrated the progression from conventional image analysis to AI-based intelligent systems.
Research by S. R. Borkar and R. R. Borkar [6] highlighted the use of Raspberry Pi for smart agricultural monitoring. Their work proved that low-cost embedded platforms can support real-time sensing and automation, making them suitable for deploying disease detection systems in rural areas.
Furthermore, Anastasios Kamilaris [7] provided a comprehensive survey on deep learning for precision agriculture. Their study reviewed applications such as disease detection, crop monitoring, weed identification, and yield prediction, emphasizing the role of artificial intelligence in improving agricultural productivity and sustainability.
-
SYSTEM ARCHITECTURE
The proposed system integrates both hardware and software components to develop an automated plant disease prediction framework. The system is designed to identify plant leaf diseases using image processing and machine learning techniques. A Raspberry Pi with an integrated camera module is used to capture images of plant leaves, which are then analyzed to detect diseases based on visible symptoms. This approach enables early identification of plant diseases, assisting farmers in taking timely preventive measures and improving overall crop productivity.
Fig 1: System Architecture of the system
The proposed plant disease prediction system operates through a sequence of image acquisition, preprocessing, feature extraction, classification, and result notification stages. Initially, images of plant leaves are captured using a camera module connected to the Raspberry Pi, which serves as the central processing unit. The captured images are then preprocessed using digital image processing techniques to improve quality by removing noise and enhancing contrast. In this stage, RGB images may be converted into grayscale or HSV color space for better analysis.
Subsequently, the leaf region is segmented from the background, and edge detection methods are applied to identify infected portions of the leaf. Relevant features such as color, texture, and shape are extracted to characterize disease patterns. These processed images are then fed into a machine learning model, specifically a convolutional neural network (CNN) or YOLOv5, trained on a plant disease dataset for accurate classification.
Based on the prediction, the system identifies whether the leaf is healthy or affected by a specific disease. The detected disease name and corresponding treatment recommendations can be displayed on an LCD screen or transmitted to a mobile device. Additionally, the data may be stored in a cloud database for remote monitoring and analysis. The proposed system provides a low-cost, portable, and real-time solution for early plant disease detection, supporting smart agriculture and precision farming applications.
-
METHODOLOGY
The proposed leaf disease detection system follows a structured methodology to capture plant leaf images, identify diseases, and provide pesticide recommendations in real time. The system integrates hardware and software modules to ensure automated monitoring and accurate disease diagnosis.
Initially, the system initializes all required hardware and software components. The Raspberry Pi starts by loading essential libraries such as OpenCV, PyTorch, LCD drivers, and the Twilio API. The I2C LCD display is activated to indicate system readiness, and the custom-trained YOLOv5 model is loaded for disease detection.
The CSI camera module connected to the Raspberry Pi continuously captures real-time images of plant leaves. These
captured frames undergo preprocessing, where image formats are converted for compatibility with OpenCV and the deep learning model. The images are then passed to the YOLOv5 model, which detects diseased regions by generating bounding boxes, class labels, and confidence scores. To improve reliability, only detections above a predefined confidence threshold are considered valid.
Once a disease is identified, the corresponding disease label is matched with a predefined pesticide database to retrieve suitable treatment recommendations. The detected disease name and recommended pesticide are displayed on the LCD screen and simultaneously printed in the terminal for monitoring. Additionally, SMS notifications are sent to the users mobile phone through Twilio, enabling remote alerts with disease and pesticide details.
For visual interpretation, the system highlights infected leaf regions with bounding boxes and labels on the processed image. The entire process operates in a continuous monitoring loop, allowing real-time analysis of plant health. When the program is terminated, all resources, including the camera and display modules, are safely released, ensuring proper system shutdown.
Fig. 2: Flow of Working Methodology
The proposed plant disease prediction system utilizes image processing and deep learning techniques to automatically detect diseases in plant leaves. The system is designed using an integrated hardware and software framework consisting of a Raspberry Pi, camera module, image processing unit, and a trained prediction model. This architecture enables real-time disease identification and supports efficient agricultural monitoring.
Initially, the camera module connected to the Raspberry Pi captures images of plant leaves from the agricultural field. The Raspberry Pi functions as the central processing unit and receives the captured images for further analysis. Since the raw images may contain noise, background interference, and lighting variations, preprocessing operations such as resizing, filtering, enhancement, and color space conversion are performed to improve image quality and ensure accurate processing.
Following preprocessing, image segmentation techniques are applied to isolate the leaf region and identify potentially infected areas. Relevant features such as color, texture, shape,
and spot patterns are extracted from the segmented images to characterize disease symptoms. These features are then analyzed using a trained machine learning model, specifically a convolutional neural network (CNN) or YOLOv5, which compares the input image with a previously trained plant disease dataset to classify the leaf as healthy or diseased.
If a disease is detected, the system identifies the specific disease type and generates the corresponding output. The prediction results can be displayed on an LCD screen, monitor, or mobile application, enabling users to take immediate action. Additionally, the detected information may be stored in a cloud database for future monitoring and analysis. The proposed system assists farmers in early disease detection, minimizing crop damage and improving agricultural productivity through smart and automated monitoring.
-
RESULTS AND DISCUSSION
The developed leaf disease detection system was successfully implemented on the Raspberry Pi platform and evaluated under real-time operating conditions using the Pi Camera module. Experimental results demonstrated that the system was capable of capturing live images of plant leaves and processing them efficiently through the custom-trained YOLOv5 model. The detection process was performed in real time, confirming the suitability of the proposed system for practical agricultural applications.
During testing, the system accurately detected multiple types of leaf diseases with a high confidence level. The YOLOv5 model successfully classified the diseased leaves and generated bounding boxes around the infected regions, providing clear visual feedback for users. The use of a predefined confidence threshold improved reliability by minimizing false detections and enhancing overall system performance.
Once a disease was identified, the system retrieved the corresponding pesticide recommendations from the predefined database. The detected disease name and suggested pesticide were displayed on the 16×2 I2C LCD module in a clear and readable format. Simultaneously, the same information was printed in the terminal for continuous monitoring and verification.
In addition to local output, the system was integrated with Twilio API for remote notification. Whenever a disease was detected, an SMS containing the disease name and recommended pesticide was automatically sent to the users registered mobile device. Experimental observations showed that the SMS alerts were delivered reliably within a short response time, demonstrating the effectiveness of the communication module for remote agricultural monitoring.
Fig 3: Detected Leaf Disease with Bounding Box
This image illustrates the softwareimplementation of the proposed plant leaf disease detection system developed using Raspberry Pi 4 Model B, artificial intelligence, and computer vision technologies. The application is implemented in Python and executed in the Thonny environment. The program utilizes the Picamera2 library to initialize and control the Raspberry Pi camera module for capturing real-time images of plant leaves. The acquired images are processed using the custom-trained YOLOv5 deep learning model, which enables accurate identification and classification of various plant leaf diseases.
Fig 4: Real-Time Leaf Disease Detection System Output
Fig 4 illustrates the real-time operation of the proposed AI-based plant leaf disease detection system. The system successfully detects the disease identified as grape_black_measles and displays the prediction on the output screen along with the confidence score. A green bounding box is generated around the infected leaf region, indicating the accurate localization of the diseased area by the object detection model. The implementation is carried out on Raspberry Pi 4 Model B and utilizes the YOLOv5 deep learning algorithm for real-time disease classification and detection.
Fig 5 presents the hardware implementation of the proposed plant leaf disease detection system using Raspberry Pi 4 Model
B and a 16×2 LCD display module. The Raspberry Pi serves as the primary controller and processing unit of the system. The LCD module is interfaced with the Raspberry Pi through GPIO connections, enabling the transmission of control signals and display of output information. All hardware components are assembled on a wooden platform to ensure structural stability, portability, and ease of deployment in agricultural environments.
Fig 5: Detected Disease Display in LCD
REFERENCES
-
Mohanty, S. P., Hughes, D. P., & Salathé, M., Using Deep Learning for Image-Based Plant Disease Detection, Frontiers in Plant Science, vol. 7, 2016.
-
Ferentinos, K. P., Deep Learning Models for Plant Disease Detection and Diagnosis, Computers and Electronics in Agriculture, vol. 145, pp. 311318, 2018.
-
Hughes, D. P., & Salathé, M., An Open Access Repository of Images on Plant Health to Enable the Development of Mobile Disease Diagnostics, arXiv preprint arXiv:1511.08060, 2015.
-
Redmon, J., Divvala, S., Girshick, R., & Farhadi, A., You Only Look Once: Unified, Real-Time Object Detection, Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016.
-
Jocher, G., et al., YOLOv5 by Ultralytics, GitHub Repository, 2020.
Available: https://github.com/ultralytics/yolov5
-
Bradski, G., The OpenCV Library, Dr. Dobbs Journal of Software Tools, 2000.
-
Paszke, A., et al., PyTorch: An Imperative Style, High-Performance Deep Learning Library, Advances in Neural Information Processing Systems (NeurIPS), 2019.
-
Raspberry Pi Foundation, Raspberry Pi Documentation, Available:
https://www.raspberrypi.org/documentation/
-
Picamera2 Documentation, Libcamera-based Camera Stack for Raspberry Pi, Available: https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf
-
Borkar, S. R., & Borkar, R. R., Smart Farming Using Raspberry Pi and IoT, International Journal of Engineering Research and Technology (IJERT), 2017.
-
Twilio Inc., Twilio API for Messaging, Available:
https://www.twilio.com/docs/sms
