A Flutter mobile application that uses AI and environmental sensors to analyze crop health and provide eco-friendly treatment recommendations.
- Live Camera Preview: Capture high-quality images of crop leaves
- AI-Powered Analysis: Analyze leaf images for signs of disease, deficiency, or stress
- Environmental Monitoring: Real-time humidity and temperature tracking
- Risk Assessment: Comprehensive risk scoring based on visual and environmental factors
- Eco-Friendly Solutions: Organic and sustainable treatment recommendations
- Scan History: Track and review past analyses
- Offline Ready: Works without internet connection
- Healthy crops
- Early Fungal Stress
- Nitrogen Deficiency
- Bacterial Spot
- Viral Infection
- Potassium Deficiency
- Phosphorus Deficiency
- Magnesium Deficiency
- Flutter SDK (>=3.0.0)
- Android Studio or Xcode for mobile development
- Camera-enabled device for testing
- Clone the repository:
git clone <repository-url>
cd crop_health_app- Install dependencies:
flutter pub get- Generate Hive adapters:
flutter packages pub run build_runner build- Run the app:
flutter runThe app requires the following permissions:
- Camera: To capture leaf images
- Storage: To save analysis results
- Bluetooth: To connect to environmental sensors (optional)
- Location: For Bluetooth device discovery
- CaptureScreen: Camera interface with environmental controls
- ResultScreen: Analysis results with recommendations
- HistoryScreen: Past scan history
- AboutScreen: App information and sustainability focus
- TFLiteService: AI model integration for image analysis
- SensorService: Environmental sensor data management
- StorageService: Local data persistence with Hive
- ScanResult: Data model for storing analysis results
The app supports both simulated and real environmental sensors:
- Interactive sliders for humidity (0-100%) and temperature (10-40°C)
- Realistic value variations for testing
- Connects to ESP32-based environmental sensors
- Real-time humidity and temperature readings
- Automatic fallback to simulation if disconnected
This app promotes sustainable agriculture through:
- Early disease detection to prevent crop loss
- Organic treatment recommendations
- Reduced pesticide dependency
- Soil health preservation
- Cost-effective prevention strategies
- Update
assets/models/labels.txtwith new condition names - Add treatment recommendations to
assets/data/actions.json - Update the TFLiteService analysis logic
- Test with sample images
The app uses a nature-inspired color palette:
- Primary Green:
#4CAF50 - Dark Green:
#2E7D32 - Light Background:
#F8F9FA - Accent Colors: Blue (
#2196F3), Orange (#FF9800)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by nature's early warning systems
- Built with sustainability and farmer welfare in mind
- Designed for accessibility and ease of use