FarmFriend is an intelligent agricultural solution designed to empower farmers by leveraging modern technology. This project integrates deep learning for accurate plant disease detection and machine learning for efficient irrigation scheduling, providing actionable insights through a user-friendly interface.
Link : FarmFriend
- Real-time Disease Detection: Instantly identify plant diseases by uploading an image. Our system uses a high-accuracy deep learning model to provide a quick diagnosis.
- Intelligent Irrigation Scheduling: Get smart recommendations on whether to irrigate your crops. The system analyzes key environmental and soil data to help conserve water and ensure optimal plant health.
- User-Friendly Interface: A clean and intuitive web application built with React and Vite for seamless user interaction.
- Scalable Backend: Powered by a robust Flask API, ensuring secure and efficient communication between the frontend and the machine learning models.
The system operates on a simple and effective architecture: a React frontend interacts with a Flask backend API, which hosts and serves predictions from the two core machine learning models.
- Frontend: React, Vite, TypeScript
- Backend: Python, Flask
- Machine Learning: TensorFlow, Keras, Scikit-learn
- Primary Dataset Source: Kaggle
This module uses a deep convolutional neural network to classify plant diseases from images.
- Model: MobileNetV2 with Transfer Learning.
- Why MobileNetV2? It was chosen for its excellent balance of high accuracy and low computational cost, making it ideal for deployment on edge devices or mobile platforms.
- Architecture: The pre-trained MobileNetV2 base is augmented with
GlobalAveragePooling2D,Dense,BatchNormalization, andDropoutlayers, culminating in aSoftmaxoutput layer for multi-class classification. - Performance: Achieved approximately 90% accuracy on the PlantVillage dataset.
- Training: Optimized using the Adam optimizer with a Categorical Crossentropy loss function.
This module predicts the need for irrigation using a binary classification model.
- Model: Logistic Regression.
- Why Logistic Regression? It's highly interpretable, fast, and efficient, making it perfect for real-time decision-making based on sensor-like data.
- Features: The model is trained on a tabular dataset including features like temperature, humidity, rainfall, and soil moisture.
- Output: A binary prediction:
Irrigation RequiredorIrrigation Not Required. - Performance: Achieved approximately 85% accuracy.
To ensure the best model selection, several alternatives were evaluated:
- ResNet50: Achieved the highest accuracy (95%) for disease detection but was deemed too heavyweight for a lightweight application.
- VGG16: Resulted in lower accuracy compared to other CNN architectures.
- Random Forest: Considered for irrigation scheduling and useful for feature importance, but was computationally heavier than Logistic Regression.
- SVM & Naive Bayes: While fast, they were less accurate for the given datasets.
We plan to enhance FarmFriend with the following features:
- IoT Sensor Integration: Incorporate real-time data from soil moisture, temperature, and humidity sensors for hyper-accurate irrigation predictions.
- Mobile Application: Develop a dedicated mobile app for on-the-go access and convenience.
- Advanced Analytics Dashboard: Implement a dashboard to visualize historical data, track disease trends, and monitor crop health over time.
- Cloud Deployment: Migrate the application to a cloud platform (like AWS or GCP) for improved scalability and accessibility.
- Dev Patel - @devpatel0005
- Hari Patel - @haripatel07
- Het Patel - @ihetpatel


