My GreenCheck Journey: Building AI-Powered Crop Disease Detection for Ghana
🌱 What Inspired Me
My journey with GreenCheck began during the Ghana AI Hackathon by Bridge Labs. As I researched agricultural challenges in Ghana, I discovered a heartbreaking statistic: farmers lose 20-40% of their crop yields annually to preventable diseases. I realized that while AI technology was advancing rapidly in urban centers, rural farmers who needed it most had limited access to agricultural expertise.
I envisioned a solution that would put expert agricultural knowledge in every farmer's pocket. The idea was simple yet powerful: what if farmers could diagnose crop diseases as easily as taking a photo with their phones?
🎯 What I Learned
Technical Discoveries
Model Architecture Journey: After experimenting with various architectures, I discovered EfficientNet-B1 was perfect for our needs. I was thrilled when I achieved:
- Cashew: 98.78% accuracy
- Tomato: 98.38% accuracy
- Cassava: 96.84% accuracy
- Maize: 92.40% accuracy
The Offline Challenge: I quickly learned that assuming internet connectivity in rural Ghana was naive. This realization led me to implement ONNX Runtime, allowing the app to work completely offline with models compressed to just ~28MB.
Beyond Classification: Integrating Groq's LLM API taught me how to transform a simple classifier into an intelligent farming assistant that provides contextual advice and answers questions.
Human-Centered Insights
Simplicity Matters: Through user research, I learned that complex interfaces would be barriers. I redesigned everything to work with a single tap.
Accessibility First: I implemented adjustable font sizes and high-contrast themes after realizing many farmers had varying literacy levels and visual needs.
Building Trust: I added confidence scores and multiple predictions because farmers needed to understand why the AI made certain recommendations.
🛠️ How I Built It
Architecture Design
I structured the project as three interconnected components:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Mobile App │ │ Web App │ │ Backend API │
│ (React Native) │────▶│ (Next.js) │────▶│ (FastAPI) │
│ ONNX Runtime │ │ Tailwind CSS │ │ PyTorch Models │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Offline Models │ │ AWS Services │
│ (ONNX Format) │ │ (S3 + Runner) │
└─────────────────┘ └─────────────────┘
My Development Process
- Training the Models
I started with the EfficientNet-B1 architecture, customizing it for each crop:
- Implementing Offline Capability
I created an ONNX inference service for the mobile app:
- Smart Connectivity Management
I built a system that intelligently switches between online and offline modes:
🚧 Challenges I Faced & How I Solved Them
Challenge 1: The Model Size Dilemma
Problem: My initial PyTorch models were over 100MB - way too large for mobile deployment.
My Solution: I spent days researching model compression techniques. Eventually, I implemented ONNX quantization and pruning, achieving a 75% size reduction with only 0.5% accuracy loss. It felt like magic!
Challenge 2: Unreliable Internet Connectivity
Problem: During field testing, I realized rural areas had extremely spotty internet, completely breaking the user experience.
My Solution: I built a comprehensive offline-first system:
- Downloadable ONNX models that work without internet
- A cached disease information database
- Smart synchronization when connectivity returns
Challenge 3: Slow Inference Times
Problem: My first implementation took 8-10 seconds to analyze an image - farmers were losing patience.
My Solution: I optimized everything:
- Rewrote the image preprocessing pipeline
- Implemented model warm-up on app launch
- Got inference time down to under 2 seconds!
🏆 What I'm Most Proud Of
- Achieving 92-99% Accuracy: The models perform better than I ever imagined
- True Offline Functionality: The app works perfectly without any internet
- Sub-3 Second Analysis: Even on low-end devices, farmers get quick results
- Scalable Cloud Architecture: Successfully deployed on AWS with auto-scaling
- Intuitive Interface: Farmers can use it with just one tap
🔮 My Vision for the Future
- Language Expansion: I plan to add support for Twi, Ga, and other local Ghanaian languages
- More Crops: I want to expand to cocoa, plantain, and other economically important crops
- Predictive Analytics: Using historical data to predict disease outbreaks before they happen
- Community Features: Allowing farmers to share their experiences and solutions
- Government Partnership: Working with agricultural extension services for wider reach
💡 Technical Innovations I'm Excited About
- Hybrid Inference: My system seamlessly switches between online API and offline ONNX models
- Progressive Enhancement: The web app works on any device, while the mobile app adds native features
- Smart Caching: I built intelligent caching for AI advice on common diseases
- Accessibility-First Design: Every feature was built considering farmers of all technical abilities
🌍 The Impact I Hope to Make
GreenCheck represents more than just a technical achievement for me - it's my contribution to agricultural transformation in Ghana. By making expert agricultural knowledge accessible to every farmer with a smartphone, I hope to help:
- Reduce crop losses by up to 40%
- Increase farmer incomes through better yields
- Promote sustainable farming practices
- Build resilience against climate change impacts
The true measure of GreenCheck's success won't be in downloads or API calls, but in the improved livelihoods of Ghanaian farmers and the strengthened food security of our nation.
This project taught me that technology's greatest power lies not in its sophistication, but in its ability to solve real human problems. Every line of code I wrote, every model I trained, and every feature I implemented was driven by the vision of a farmer somewhere in Ghana saving their crops with a simple photo.
Log in or sign up for Devpost to join the conversation.