An AI-based Plant Disease Detection System using Raspberry Pi, Python, OpenCV, Flask, and TensorFlow Lite for real-time plant disease prediction.
This project uses a Raspberry Pi camera or uploaded leaf images to detect plant diseases using a TensorFlow Lite model. The captured image is preprocessed and passed to the AI model, which predicts the disease along with a confidence score. The result is displayed on a Flask web application and an OLED display.
To develop a low-cost, portable, and intelligent plant disease detection system that enables farmers and researchers to identify plant diseases quickly and accurately using Raspberry Pi and Artificial Intelligence.
- Real-time image capture using Raspberry Pi Camera
- Image upload through Flask web application
- TensorFlow Lite model for fast prediction
- Displays disease name and confidence score
- OLED display support
- Lightweight and suitable for edge AI applications
- Raspberry Pi 4 / Raspberry Pi 5 (used Raspberry Pi 4 Model B)
- Raspberry Pi Camera Module
- SSD1306 OLED Display (Optional)
- Micro SD Card (32GB or above)
- Power Adapter
- Raspberry Pi OS
- Python 3
- Flask
- OpenCV
- TensorFlow Lite Runtime
- NumPy
- Pillow
Plant-Disease-Detection-Using-Raspberry-Pi/
│
├── app.py
├── model.tflite
├── labels.txt
├── requirements.txt
├── README.md
│
├── templates/
│ └── index.html
│
├── static/
│ ├── style.css
│ └── uploads/
│
└── images/
└── output.png
Clone the repository
git clone https://github.com/TejaswhiKY/Plant-Disease-Detection-Using-Raspberry-Pi.gitGo to the project folder
cd Plant-Disease-Detection-Using-Raspberry-PiInstall dependencies
pip install -r requirements.txtRun the Flask application
python3 app.pyOpen your browser and visit
http://localhost:5000
or
http://<RaspberryPi-IP>:5000
- Capture image using Raspberry Pi Camera or upload an image.
- Image is resized and normalized.
- TensorFlow Lite model processes the image.
- Disease name and confidence score are predicted.
- Result is displayed on Flask webpage.
- OLED displays the prediction.
- Uploaded/Captured Leaf Image
- Predicted Disease Name
- Confidence Score
- OLED Display Output
- Python
- Raspberry Pi
- Flask
- OpenCV
- TensorFlow Lite
- HTML
- CSS
- Support multiple crop diseases
- Mobile application integration
- Cloud database storage
- Disease treatment recommendations
- IoT monitoring dashboard
Tejaswhi K Y
Electronics and Communication Engineering
Bapuji Institute of Engineering and Technology
This project is licensed under the MIT License.