AI-Powered Global Agriculture Pocket Assistant π
SmartFarm AI is a global AI-powered agriculture pocket assistant that analyzes crop diseases and seed quality from images and delivers actionable insights with voice support using Gemini multimodal AI.
It is designed to help farmers, researchers, and agri-tech innovators make faster and smarter decisionsβanywhere in the world.
- Upload a crop leaf image
- Identify crop type and possible disease
- Confidence score (0β1)
- Clear disease description
- Treatment & pesticide recommendations
- Farmer-friendly guidance
- Upload seed images
- Detect seed quality (High / Medium / Low)
- Visual observations (damage, color, defects)
- Sowing recommendations
- Confidence-based assessment
- AI-generated guidance converted into audio
- Hands-free and field-friendly usage
- Supports multilingual expansion
- Built with Streamlit
- Light & Dark theme support
- Clean, professional SmartFarm branding
- Image preview and audio playback
SmartFarm AI uses Gemini 3 Vision (gemini-3-flash-preview) as its core intelligence.
Gemini is used to:
- Analyze images (crop leaves & seeds)
- Reason about diseases and quality
- Generate structured JSON responses
- Produce farmer-friendly advice text
- Enable downstream voice generation
flowchart TD
A[**User**<br/>Browser / Mobile] --> B[**Streamlit UI**<br/>SmartFarm AI Dashboard]
B -->|Upload Image + Optional Data| C[**FastAPI Backend**]
C --> D[**Image Validation**<br/>Format β’ Size β’ Quality]
D --> E[**Image Preprocessing**<br/>Resize β’ Normalize β’ Enhance]
E --> F[**Gemini AI Client**<br/>Vision + Reasoning]
F --> G[**Crop / Seed Analysis**<br/>Disease β’ Growth β’ Recommendations]
G --> H[**JSON Structured Response**<br/>Confidence β’ Insights β’ Actions]
H --> I[**Text Response**<br/>Farmer-Friendly Explanation]
H --> J[**Voice Generation**<br/>gTTS / Audio Service]
I --> K[**Final API Response / UI Output**<br/>Text + Confidence + Audio]
J --> K
K --> L[**Farmer Decision Support**<br/>Smart Farming Insights ]
- Python
- FastAPI
- Google Gemini 3 API
- Pillow (Image Processing)
- gTTS (Text-to-Speech)
- python-dotenv
- Streamlit
- Custom CSS
- Light / Dark Mode
- REST API Integration
smartfarm-ai/
β
βββ backend/
β βββ app/
β βββ __init__.py
β βββ api/
β β βββ __init__.py
β β βββ routes.py
β β βββ schemas.py
β β
β βββ services/
β β βββ __init__.py
β β βββ gemini_client.py
β β βββ image_processing.py
β β βββ voice_service.py
β β
β βββ test-data/
β
βββ frontend/
β βββ __init__.py
β βββ streamlit_app.py
β
βββ assets/
β βββ banner.png
β βββ team_logo.png
β βββ smartfarm_logo.png
|
βββ .env
βββ .gitignore
βββ LICENSE
βββ README.md
βββ requirements.txt
βββ run_all.py
| Name | Role & Contribution | GitHub |
|---|---|---|
| Moneka Meghwar | Team Lead, Frontend Developer | https://github.com/mmoneka11 |
| Kashmala Saddiqui | Backend Developer, API Integration | https://github.com/kashmalaasif |
| Umaima Rizwan | Documentation Lead, Development Support | https://github.com/umaim691 |
- .env is ignored via .gitignore
- API keys are never exposed
- Mobile App (Flutter)
- Multi-language farmer support
- Offline AI inference
- Crop advisory dashboard
We would like to thank the Google Gemini 3 Hackathon hosted on Devpost for providing the platform and opportunity to build and showcase SmartFarm AI. The hackathon inspired us to explore the capabilities of Gemini 3 multimodal AI for solving real-world agricultural challenges and advancing sustainable farming practices worldwide.
We are grateful for the opportunity to collaborate, learn, and contribute β and for the encouragement to build practical, impact-driven AI for farmers everywhere. π±π
Our sincere thanks to the communities and projects that made this work possible:
- Google Gemini AI β https://ai.google.dev/
- FastAPI Community β https://fastapi.tiangolo.com/
- Streamlit Team β https://streamlit.io/
- Open-source contributors β Thank you to the many maintainers and authors of libraries we used.
These communities, tools, and events inspired and enabled the development of SmartFarm AI, helping us bring practical AI solutions to agriculture worldwide
We welcome contributions! Please open issues or pull requests.
β Support this project: If you find this project useful, please star the repo!
This project is for educational, research, and demonstration purposes | MIT License
πΎ Developed with β€οΈ by the IGOGs Team
Building AI for Sustainable Agriculture β¨
