AgriVision: AI Diagnosis and Orchard Trade Hub

Computer Science

Description

AgriVision is a Flutter-based mobile application for fruit orchard owners and buyers in Pakistan. It combines AI-powered disease detection using EfficientNet-B0 CNN model with a transparent digital marketplace. Farmers can scan fruit/leaf images to detect diseases like Citrus Canker, Black Spot, and Greening, then receive weather-based spray recommendations. The platform allows farmers to manage orchards, create harvest listings, and track orders directly with buyers eliminating middlemen and ensuring fair pricing. Buyers can browse, filter, and place purchase requests through the marketplace. An admin web portal handles user management, listing moderation, and analytics. Backend uses Firebase with Hugging Face AI API and OpenWeatherMap integration.

Objectives

The primary objective of AgriVision is to modernize Pakistan's fruit orchard industry by providing an integrated, AI-driven mobile platform that addresses two critical challenges: accurate disease detection and direct market connectivity for farmers. Specific objectives include: - Provide AI-based fruit disease detection by allowing farmers to capture or upload images of leaves or fruits, analyzed by EfficientNet-B0 CNN model to return disease names and confidence scores. - Deliver weather-aware spray recommendations after disease detection, generating tailored spray plans with chemical names, dosage, application intervals, and safety warnings based on real-time weather data. - Enable farmers to maintain digital orchard records including location, fruit variety, size, and disease history for better crop management. - Allow farmers to create, update, and delete harvest listings specifying quantity, price, grade, and harvest date, published directly to the marketplace. - Provide buyers with a searchable, filterable marketplace to browse active listings by fruit type, price range, region, and quality grade, and place purchase requests directly with farmers. - Implement a transparent order lifecycle system tracking deals from Request through Accepted, Advance Paid, Harvested, and Completed with full payment history visible to both parties. - Empower administrators with a web-based control panel to manage user accounts, moderate listings, configure chemical spray guidelines, and view regional analytics. - Eliminate dependency on middlemen to ensure fair pricing and direct farmer-buyer interaction. - Ensure system security through Firebase Authentication, OTP-based registration, Role-Based Access Control (RBAC), and HTTPS/SSL encrypted communication.

Socio-economic benefit

AgriVision delivers significant socio-economic benefits across multiple dimensions: 1. Improved Farmer Income: By eliminating middlemen and enabling direct farmer-buyer connections, AgriVision ensures farmers receive fair market prices for their harvest, directly improving profitability and economic sustainability. 2. Early Disease Detection and Reduced Crop Losses: AI-powered diagnosis allows farmers to identify diseases such as Citrus Canker, Black Spot, and Greening at early stages, reducing yield losses and improving fruit quality. 3. Reduced Chemical Overuse: The weather-aware spray recommendation module ensures farmers apply chemicals only when conditions are suitable, preventing overuse of harmful pesticides and reducing environmental damage. 4. Market Accessibility for Rural Farmers: Farmers in remote areas who previously lacked market access can now list their harvests digitally and connect with buyers and exporters across regions. 5. Transparent Agricultural Trade: The order lifecycle and payment tracking system builds trust between farmers and buyers, encouraging accountability in agricultural business and reducing disputes. 6. Digital Empowerment of Farmers: The platform introduces digital tools to farmers with varying technical literacy through an intuitive, simplified mobile interface, promoting digital adoption in rural Pakistan. 7. Data-Driven Agricultural Decisions: Analytics dashboards for admins allow monitoring of disease trends and marketplace activity by region, supporting better resource allocation. 8. Support for National Food Security: By helping farmers improve crop health, reduce losses, and access fair markets, AgriVision contributes meaningfully to Pakistan's agricultural productivity and national food security goals.

Methodologies

AgriVision was developed following structured software engineering methodologies: 1. Requirements Engineering: Thorough requirements gathering produced a formal SRS covering 15 functional requirements and detailed non-functional constraints for all three user roles. 2. Use Case-Driven Design: Twelve detailed use case specifications were documented covering all system interactions from registration and disease scanning to marketplace browsing, order management, and admin analytics. 3. Iterative Development: Development was carried out in iterative phases authentication and profiles (30%), AI detection, weather and marketplace (70%), advisory module and admin panel (85%). 4. Multi-Tier Architecture: Three-tier structure Presentation Layer (Flutter app and Admin Web Portal), Application Layer (Firebase, AI API, Weather API), and Data Layer (Firebase Firestore and Authentication). 5. AI Model Integration: EfficientNet-B0 CNN model hosted on Hugging Face was integrated via API. Images are uploaded from the mobile app and predictions are returned in real time. 6. Role-Based Access Control (RBAC): Farmers, Buyers, and Admins have strictly defined permissions enforced at every module level. 7. UML Modeling: Comprehensive UML diagrams produced including Use Case, Class, Sequence Diagrams for all three roles, State Machine Diagrams, Package Diagrams, and Deployment Diagrams. 8. Security Implementation: HTTPS/SSL encrypts all communications. Firebase Authentication handles OTP-based registration and all third-party API calls use authenticated channels. 9. Testing: Unit testing applied to individual modules, followed by integration testing and full system testing across all 15 functional requirements.

Outcome

AgriVision successfully delivers a fully functional AI-powered mobile platform for Pakistani fruit farmers and buyers. Key outcomes include: 1. Functional AI Disease Detection: Farmers can capture or upload fruit/leaf images and receive accurate disease diagnoses with confidence scores via EfficientNet-B0 model hosted on Hugging Face, with results saved to disease history. 2. Weather-Aware Spray Recommendations: After disease detection, the system fetches real-time weather data from OpenWeatherMap and generates tailored spray plans with chemical names, dosage, and timing, or issues safety warnings when conditions are unsuitable. 3. Digital Orchard Management: Farmers can maintain complete digital records of orchards including location, fruit variety, size, and disease history. 4. Live Marketplace for Direct Trade: A fully operational marketplace allows buyers to browse, search, and filter harvest listings and contact farmers directly, eliminating middlemen. 5. Complete Order and Deal Tracking: Both farmers and buyers can track the full order lifecycle from Request through Accepted, Advance Paid, Harvested, to Completed, with payment records visible at every stage. 6. Admin Web Portal: A dedicated web-based admin dashboard displays platform statistics, supports user management, listing moderation, spray guideline configuration, and visual analytics for disease trends and trading volume. 7. Secure and Scalable System: Firebase Authentication with OTP verification, RBAC, HTTPS encryption, and Firebase Cloud Messaging for push notifications ensure the platform is secure and reliable. 8. Farmer-Friendly Design: Intuitive UI with bottom navigation, card-based listings, and color-coded order statuses makes it accessible to farmers with low to moderate technical literacy. 9. Real-World Deployable Solution: Delivered as a complete Android APK targeting Pakistan's citrus farming sector, with future expansion planned for additional crops, Urdu language support, iOS, and drone-based field mapping.

Gallery

More from Computer Science

Ustad Go: An AI-Powered Mobile and Web Ecosystem for Verified Local Service Provision in P…

Computer Science

Ustad Go is a dual-platform solution bridging the gap between skilled local service providers and households.…

Supervisor: Dr. Wasif Nisar

Sales Distribution Hub

Computer Science

The Sales Distribution Hub is a web-based management system designed for Masood & Company to automate and stre…

Supervisor: Dr. Wasif Nisar.

AI Based Road Damage Detection System

Computer Science

AI Based Road Damage Detection System is a smart application that uses YOLOv8 and computer vision techniques t…

Supervisor: Mehwish Mukhtar

EvaluTech: AI-Powered Hiring & Job Platform for Employers and Applicants

Computer Science

EvaluTech is an intelligent recruitment management platform that streamlines the complete hiring lifecycle fro…

Supervisor: Dr. Wasif Nisar