Inspiration

Plant diseases cost the global economy over $220 billion annually, and invasive pests add $70 billion in damages (World Bank, 2023). Moreover, up to 40% of the world’s food supply is lost to crop pests and diseases each year (FAO). Smallholder farmers, who produce 80% of the world’s food, are the most affected by these losses.

In regions like sub-Saharan Africa, farmers lose up to 50% of their maize yield annually due to diseases. These staggering losses highlight the urgent need for accessible, affordable, and AI-powered solutions that help farmers diagnose crop diseases early, prevent outbreaks, and optimize their yields.

What It Does

FarmerPal is an AI-powered crop health management system that helps farmers detect diseases, pests, and other threats in real time. It uses AI image analysis, satellite mapping, and community-driven insights to provide farmers with instant, actionable data to optimize crop health and reduce losses.

Key features:

  • 🌍 Map View: Aerial farm overview with AI-powered pest/disease detection.
  • 🌱 Plant Analysis: Image-based AI diagnosis with treatment recommendations.
  • 🐞 Pest Analysis: AI-based pest detection with confidence scores and mitigation strategies.
  • 📍 Crop Plantation Planner: Helps farmers optimize planting locations using geolocation and AI.
  • 🚨 Alerts & Notifications: Real-time risk alerts for diseases, pests, and weather-related threats.
  • 📊 Community Insights: Farmers can share and access regional disease/pest trends.

How We Built It

Frontend:

  • Next.js 14 for the UI.
  • Google Maps API for mapping and visualizing farm data.
  • ShadCN for modern UI components.

Backend & AI Integration:

  • Next.js 14 App Router & Pages Routing for API endpoints.
  • Google Gemini API (gemini-1.5-flash model) for AI-based disease and pest detection.
  • Firestore (NoSQL DB) for storing predictions and user interactions.

Challenges We Ran Into

  • Image Analysis: Initially, we tried Google Cloud Vision API, but it required extensive post-processing. We switched to Gemini API (gemini-1.5-flash model), which provided better accuracy out-of-the-box.
  • Storage Optimization: We originally planned to upload images to Firestore, but storing large image files was inefficient. Instead, we converted images to Base64 and passed them directly to Gemini API for analysis, improving performance and reducing storage costs.

Accomplishments That We Are Proud Of

  • Successfully integrated real-time AI-driven disease and pest detection for farmers.
  • Created a seamless mapping and alert system using Google Maps API.
  • Optimized image processing efficiency by switching to Base64 conversion.
  • Built a scalable and affordable solution for smallholder farmers.

What We Learned

  • AI image processing optimizations—choosing the right model for different tasks.
  • Scalability considerations for a global audience, especially in developing regions.
  • Importance of user feedback—validating the concept with real farmers.
  • Cloud storage trade-offs—deciding between Firestore and direct image processing.

What's Next for FarmerPal

🚀 Future Roadmap:
✔️ Mobile App Development: Integrate image uploads and geolocation tracking.
✔️ Specialized AI Model Training: Improve accuracy by training models on region-specific plant diseases and pests.
✔️ Field Testing with Real Farmers: Deploy our proof of concept and gather feedback from farmers to refine our solution.
✔️ IoT Sensor Integration: Connect with farm sensors for real-time environmental monitoring.
✔️ Marketplace Integration: Help farmers access treatment solutions based on AI recommendations.

Built With

Share this project:

Updates