CropScanAI is a web application that detects Ergot disease in pearl millet grains using Computer Vision and Deep Learning.
Ergot is a fungal disease caused by Claviceps fusiformis that can significantly reduce crop yield, affect grain quality, and pose health risks to humans and animals if contaminated grains are consumed.
Traditional disease detection often relies on manual inspection, which can be time-consuming, inconsistent, and difficult to perform at scale. CropScanAI provides a faster and more accessible solution by combining a Convolutional Neural Network (CNN) with a Flask-based web application.
Users can upload an image of pearl millet grains, and the system analyzes the image to determine whether the sample is healthy or infected. The project aims to assist farmers, researchers, and agricultural professionals in identifying Ergot infections early, reducing crop losses and improving agricultural decision-making.
Ergot disease is one of the most damaging fungal infections affecting pearl millet. Farmers often identify the disease only after visible symptoms become severe, leading to reduced crop quality and yield losses.
CropScanAI aims to:
- Reduce dependence on manual inspection
- Detect infection quickly and accurately
- Assist farmers in making timely decisions
- Improve accessibility through a web-based platform
- Promote technology-driven agriculture
- Upload pearl millet grain images for analysis
- AI-powered disease detection using CNN
- Real-time prediction through a Flask web application
- Confidence score for predictions
- Treatment recommendations for infected samples
- Downloadable PDF reports
- English and Hindi language support
- Farmer-friendly user interface
- Accessible through desktop and mobile web browsers
- Responsive user interface for multiple screen sizes
- User uploads an image of pearl millet grains.
- The image is preprocessed using OpenCV.
- The trained CNN model extracts visual features.
- The model predicts whether the sample is:
- Healthy
- Ergot Infected
- Results are displayed along with confidence scores and recommendations.
The CNN model was trained using TensorFlow and Keras on a dataset containing healthy and Ergot-infected pearl millet grain images.
| Metric | Value |
|---|---|
| Training Accuracy | 92% |
| Validation Accuracy | 90% |
| Epochs | 10 |
The model demonstrated strong performance and good generalization on unseen data.
- TensorFlow
- Keras
- OpenCV
- NumPy
- Flask
- Flask-Babel
- HTML
- CSS
- JavaScript
- Font Awesome
- Python
- Git
- VS Code
git clone https://github.com/yourusername/CropScanAI.git
cd CropScanAIpython -m venv venvActivate it:
Windows
venv\Scripts\activateMac/Linux
source venv/bin/activatepip install tensorflow flask flask-babel opencv-python matplotlib gdownpython train.pypython app.pyOpen:
http://127.0.0.1:5000
- English
- Hindi
The application uses Flask-Babel to provide multilingual support and improve accessibility for farmers.