Skip to content

Rohan-Ramkumar/commstem-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crop Health Analyzer

A Flutter mobile application that uses AI and environmental sensors to analyze crop health and provide eco-friendly treatment recommendations.

Features

  • 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

Supported Conditions

  • Healthy crops
  • Early Fungal Stress
  • Nitrogen Deficiency
  • Bacterial Spot
  • Viral Infection
  • Potassium Deficiency
  • Phosphorus Deficiency
  • Magnesium Deficiency

Getting Started

Prerequisites

  • Flutter SDK (>=3.0.0)
  • Android Studio or Xcode for mobile development
  • Camera-enabled device for testing

Installation

  1. Clone the repository:
git clone <repository-url>
cd crop_health_app
  1. Install dependencies:
flutter pub get
  1. Generate Hive adapters:
flutter packages pub run build_runner build
  1. Run the app:
flutter run

Permissions

The 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

Architecture

Screens

  • CaptureScreen: Camera interface with environmental controls
  • ResultScreen: Analysis results with recommendations
  • HistoryScreen: Past scan history
  • AboutScreen: App information and sustainability focus

Services

  • TFLiteService: AI model integration for image analysis
  • SensorService: Environmental sensor data management
  • StorageService: Local data persistence with Hive

Models

  • ScanResult: Data model for storing analysis results

Environmental Sensors

The app supports both simulated and real environmental sensors:

Simulated Mode (Default)

  • Interactive sliders for humidity (0-100%) and temperature (10-40°C)
  • Realistic value variations for testing

Bluetooth Sensors (Optional)

  • Connects to ESP32-based environmental sensors
  • Real-time humidity and temperature readings
  • Automatic fallback to simulation if disconnected

Sustainability Focus

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

Development

Adding New Conditions

  1. Update assets/models/labels.txt with new condition names
  2. Add treatment recommendations to assets/data/actions.json
  3. Update the TFLiteService analysis logic
  4. Test with sample images

Customizing UI Theme

The app uses a nature-inspired color palette:

  • Primary Green: #4CAF50
  • Dark Green: #2E7D32
  • Light Background: #F8F9FA
  • Accent Colors: Blue (#2196F3), Orange (#FF9800)

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Inspired by nature's early warning systems
  • Built with sustainability and farmer welfare in mind
  • Designed for accessibility and ease of use

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors