Inspiration

In rural Africa, millions of smallholder farmers still rely on tradition and instinct to decide what to plant. As climate change intensifies, this guesswork leads to poor yields and worsening food insecurity. Our inspiration came from speaking with local farmers in Rwanda and Chad who shared that even basic guidance like the right crop for the right season could transform their harvests.

We asked: What if an AI system could recommend the best crops using only the weather? That’s how AgriVision was born, a lightweight, AI-powered crop recommendation tool that works with just three variables: temperature, humidity, and rainfall.

What it does

-How to build and deploy an AI system in a resource-constrained context -How to use OpenWeatherMap and NASA POWER APIs for live and historical weather data -How to apply Random Forest models to real-world geospatial challenges -The importance of fallback mechanisms in unpredictable data environments

How we built it

The system consists of:

  • A FastAPI backend that serves the AI model and connects to weather APIs
  • A Random Forest Classifier trained on the Kaggle Crop Recommendation Dataset
  • A React + TypeScript frontend with a clean, mobile-ready UI
  • Weather data retrieved from OpenWeatherMap and NASA POWER
  • A smart logic layer that handles missing rainfall data by estimating it from historical monthly averages
  • All logic and predictions run server-side, ensuring low client requirements.

Challenges we ran into

Challenges We Faced 1- Real-time rainfall data was often missing or unreliable. We solved this by integrating NASA POWER as a historical backup. 2- Soil data (N, P, K, pH) wasn’t available in real time, so we dropped it—but optimized the model to work accurately with only three weather features. 3- Designing for low-connectivity regions meant minimizing data usage, simplifying UI, and planning for offline support in future versions. 4- Tuning the Random Forest model to maintain high accuracy (≈95%) even after dropping several features.

Accomplishments that we're proud of

🎯 Successfully built and deployed a complete AI-powered crop recommendation system using only three weather variables — temperature, humidity, and rainfall.

🌍 Created a fully functional web-based prototype accessible on any device, enabling farmers and policymakers to make climate-smart decisions. 🔗 Integrated real-time APIs (OpenWeatherMap and NASA POWER) with fallback mechanisms to ensure resilience in data-limited contexts. 🧠 Achieved ~95% model accuracy even after removing critical features like soil nutrients — proving the potential of minimal-data AI. ⚙️ Designed a backend that is ready to integrate with chatbots, SMS, and offline-first mobile apps for rural deployment.

What we learned

  • How to train and deploy ML models that work well with limited, real-world agricultural data.
  • The importance of building for resource-constrained users, especially in rural Africa, where internet, soil sensors, and smartphones are often unavailable.
  • How to combine live APIs with historical data to handle inconsistent input streams (e.g., rainfall gaps).
  • How to simplify complex systems into user-friendly tools that make a real impact.

What's next for AgriVision

1- 📱 Build an offline-first mobile version using Flutter or React Native for use in low-connectivity areas. 2- 🧪 Integrate soil sensors or open soil maps (pH, NPK) to improve recommendation precision. 3- 🧑‍🌾 Add a farmer feedback loop so users can report which crops succeeded or failed—enabling continuous AI model improvement. 4- 🐛 Include AI-powered pest and disease detection using smartphone cameras. 5- 🌍 Collaborate with local governments, cooperatives, and NGOs to roll out AgriVision in farming communities across Africa.

Built With

Share this project:

Updates