TomatoLeafAI is a deep learning image classifier to detect diseases in tomato plant leaves. It uses a custom Convolutional Neural Network (CNN) to classify images into Early Blight, Late Blight, or Healthy categories. This project is a part of Project Kisan – an AI initiative to assist farmers with crop disease detection and other services.
- Detects:
- Early Blight
- Late Blight
- Healthy Leaves
- CNN model trained with high accuracy
- Deployment-ready for mobile (TensorFlow Lite) and cloud (Firebase)
- Simple Python code for learning and customization
- Python 3
- TensorFlow / Keras
- OpenCV
- tqdm
- Flask
project-kisan-disease/
├── raw_tomato_dataset/
│ ├── Tomato___Early_blight/
│ ├── Tomato___Late_blight/
│ └── Tomato___healthy/
├── dataset/
│ ├── train/
│ └── val/
├── test_images/
│ └── test_image.jpg
├── images/
│ └── tomatoleafai_workflow.jpg
├── static/
│ ├── uploads/
│ └── style.css
├── templates/
│ └── index.html
├── app.py
├── plant_disease_model.py
├── test_prediction.py
├── plant_disease_model.keras
├── requirements.txt
└── split_dataset.py
- Upload an image of a tomato leaf using the web interface.
- The model predicts the disease class.
- Displays the result and treatment info (if available).
git clone https://github.com/yourusername/TomatoLeafAI.git
cd TomatoLeafAIpip install -r requirements.txtDownload and place folders inside raw_tomato_dataset/:
- Tomato___Early_blight/
- Tomato___Late_blight/
- Tomato___healthy/
Then run:
python split_dataset.pypython plant_disease_model.pypython app.pyGo to http://127.0.0.1:5000 in your browser.
Add a leaf image in test_images/, update path in test_prediction.py, and run:
python test_prediction.py- Email: ankitabcd1718@gmail.com
- GitHub: github.com/ankit-prabhavak
- LinkedIn: linkedin.com/in/ankit-prabhavak
