The Smart Agriculture Assistant is an intelligent Android application that leverages Artificial Intelligence, Machine Learning, and Weather Analytics to help farmers make data-driven agricultural decisions.
This system integrates three core modules — Plant Disease Detection, Irrigation Advisory, and Weather Forecasting with Crop Yield Estimation — all designed to increase crop productivity, reduce losses, and optimize water usage.
- Uses a Convolutional Neural Network (CNN) trained on the PlantVillage dataset.
- Detects plant leaf diseases (e.g., tomato yellow leaf curl virus, wheat rust, etc.) from captured images.
- Provides instant classification results with disease names and severity insights.
- Calculates crop evapotranspiration (ETo) using the Hargreaves method.
- Analyzes rainfall forecasts, temperature trends, and humidity to determine irrigation needs.
- Suggests when and how much water should be applied to prevent over- or under-irrigation.
- Developed using FastAPI for real-time backend recommendations.
- Integrates OpenWeatherMap API for accurate multi-day weather forecasts.
- Predicts temperature, rainfall, and humidity to assist in planning agricultural activities.
- Estimates potential crop yield based on environmental and soil parameters.
Frontend (Android App):
- Developed in Java using Android Studio.
- User-friendly UI for entering city, crop type, and capturing plant images.
- Displays real-time predictions and recommendations.
Backend (AI + API Layer):
- Built with Python (FastAPI).
- Integrates:
- CNN model for disease detection (TensorFlow/Keras)
- Weather-based irrigation decision logic
- Forecast summarization and yield analysis
- Communicates with the Android app via REST API endpoints.
| Component | Technology Used |
|---|---|
| Frontend | Java, XML (Android) |
| Backend Framework | FastAPI |
| Machine Learning | TensorFlow, Keras |
| Data Processing | NumPy, Pandas |
| Weather Data | OpenWeatherMap API |
| Server | Uvicorn |
| IDE | Android Studio, VS Code |
- User Inputs: The user enters the crop type and city, or uploads a leaf image.
- Backend Processing:
- For disease detection → CNN model predicts disease name.
- For irrigation → Weather forecast + Hargreaves equation determines irrigation need.
- For yield estimation → Weather parameters are analyzed.
- Result Display: The app shows easy-to-understand recommendations like:
- “💧 Irrigation Needed”
- “✅ No Irrigation Required”
- “Detected Disease: Tomato Yellow Leaf Curl Virus”



