Inspiration
Agriculture remains the backbone of Ghana's economy, yet crop losses due to leaf diseases are significant—impacting yields, food security, and farmers’ income. Many farmers lack access to expert agronomists, and misdiagnosis can lead to ineffective treatments.
What it does
App flow:
- Upload an image.
- Preprocess it to match model input.
- Model predicts class label.
- Prediction.
How we built it
We trained a Convolutional Neural Network (CNN) using TensorFlow on a curated dataset of diseased and healthy crop leaves. We resized images to (224 \times 224) pixels and normalized them before feeding into the model.
Technologies used:
TensorFlow / Keras, CNNNumPy,Pandas- Flask, HTML, CSS
Challenges we ran into
- Data Collection: Sourcing quality annotated images for multiple diseases per crop was tough.
- Deployment issues: Static files weren’t loading due to path issues with Flask (
url_forwas key!). - UI Responsiveness: Making the frontend work well across devices took iteration.
- Prediction time: Optimized model size to reduce latency on local machines.
Accomplishments that we're proud of
- Transfer learning using pretrained CNNs for image classification.
- Building and deploying AI models using Flask and TensorFlow.
What we learned
- 🌱 The unique disease symptoms for crops like cassava mosaic virus and maize rust.
- 🧠 Transfer learning using pretrained CNNs for image classification.
- 🎨 Frontend styling and dynamic form handling.
- ⚠️ The importance of model explainability and user feedback loops.
What's next for Smart Agriculture: Crop Disease Detection
• Train with real-world, noisy, low-resolution images • Integrate into a mobile app using TensorFlow Lite • Enable geo-tagging and disease tracking over time • Add explainability with Grad-CAM visualizations
Built With
- cnn
- imageclassification
- tensorflow
Log in or sign up for Devpost to join the conversation.