
The Story Behind the Solution
Every year, tomato farmers worldwide lose billions in crop yield due to various plant diseases. Early detection is crucial, but traditional methods often require expert knowledge and can be time-consuming. What if technology could empower farmers to identify diseases instantly, regardless of their expertise level?
Tomato Disease Detection was born from this challenge. Using the power of deep learning and computer vision, I have created an easy-to-use tool that can identify common tomato diseases from a simple photograph, helping farmers take immediate action to protect their crops.
What It Does
This application uses a trained convolutional neural network to identify five common tomato plant conditions:
- Bacterial spot
- Early blight
- Late blight
- Mosaic virus
- Healthy plants
Simply upload an image of your tomato plant leaf, and within seconds you'll receive an accurate diagnosis with confidence score.

🚀 Getting Started
Prerequisites
- Python 3.12+
- Node.js 20+
- NPM or Yarn
Backend Setup
-
Navigate to the backend directory:
cd backend
-
Install dependencies:
uv sync
-
Start the FastAPI server:
uv run main.py
http://localhost:8001
Frontend Setup
-
Navigate to the frontend directory:
cd frontend
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
http://localhost:3000
🧠 Model Training
tensorflow v2.19
. The dataset includes various lighting conditions, angles, and disease progression stages to ensure the model works in real-world conditions.training/training.ipynb
.📊 Technical Details
- Backend: FastAPI
- Frontend: Next.js with TypeScript
- AI Model: CNN built with TensorFlow/Keras
- Dataset: Plant Village dataset with augmentations. The dataset was originally sourced from Kaggle Plant Village Dataset
🌱 Future Enhancements
- Additional crop disease detection
- Mobile app for offline usage
- Treatment recommendations based on detected diseases
- Integration with weather data to provide preventive advice
📝 License
This project is open-source and available under the MIT License.
📬 Contact
Have questions, suggestions, or want to contribute? I'd love to hear from you!
- Email: shashanksrajak@gmail.com
- Website: shashankrajak.in
- Project Website: Project Webpage
Feel free to open an issue or submit a pull request if you have ideas for improvements or have found a bug.
Helping farmers grow healthier crops, one image at a time. 🌿
Interested in this project?
Check out the full source code and documentation on GitHub.