P.E.S.
COLLEGE OF ENGINEERING
MANDYA, 571401
(An Autonomous Institution under VTU, Belgaum)
A Mini-Project Report
on
Agri Hub – End to End Agriculture Management Platform
In partial fulfillment of the requirement for the award of the Degree
In
Computer Science and Engineering (AI & ML)
Under the guidance of
Prof. Chetan Kumar V
Assistant Professor
Department of CS&E(AI & ML)
P.E.S.C.E, Mandya
Submitted by
PAVAN GOWDA K R [4PS23CI041]
PRAVEENA M [4PS24CI404]
MANOJ D M [4PS23CI031]
VISHWANATHA S PATEL [4PS23CI061]
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING (AI & ML)
P. E.S. COLLEGE OF ENGINEERING, MANDYA-571401
2025-2026
P.E.S. COLLEGE OF ENGINEERING
MANDYA, 571401
(An Autonomous Institution under VTU, Belgaum)
CERTIFICATE
This is to certify that Pavan Gowda K R [4PS23CI041], Praveena M [4PS24CI404], Manoj D
M [4PS2CI031], Vishwanatha S Patel [4PS23CI061] is a bonafide students of Bachelor of
Engineering in CSE(AI&ML) course of the Department of CSE(AI&ML) OF [Link] of
Engineering, Mandya, affiliated to Visvesvaraya Technological University, Belagavi. Mini-
Project report on “Agri Hub – End to END Agriculture Management Platform ” is prepared
by them under the guidance of Prof. Chetan Kumar V, for partial fulfillment of the
requirements for the award of the degree of CSE(AI&ML) of Visvesvaraya Technological
University, Belagavi, Karnataka.
------------------------------- ---------------------------------
Signature of internal guide Signature of Head of the Dept.
Chetan Kumar V [Link] Kaluti
Assistant Professor Professor & Head
CSE-AIML [Link] CSE-AIML
PESCE,Mandya PESCE,Mandya
External examiners
1)
2)
ii
ABSTRACT
Agriculture is the primary livelihood source for a significant portion of the global population, yet
it remains highly susceptible to environmental fluctuations, soil degradation, and crop disease
outbreaks. Traditional farming methods, while rich in empirical wisdom, often lack the precision
required to maximize yield and minimize input costs under volatile climate patterns. This project
introduces AGRI HUB, an end-to-end, artificial intelligence-powered agriculture management
platform designed to revolutionize modern precision farming by integrating predictive machine
learning, deep learning-based computer vision, and natural language processing.
The AGRI HUB platform consists of three core intelligent subsystems. First, the AI Crop
Recommendation module leverages a retrained Random Forest classification model to suggest
the most suitable and profitable crops for a given patch of land based on critical soil parameters
(Nitrogen, Phosphorus, Potassium, and pH levels) and environmental conditions (Rainfall,
Temperature, and Humidity). This model achieves a state-of-the-art accuracy of 99.55% across
22 distinct crop profiles, significantly mitigating the risk of crop-land mismatch. Second, the
Soil Optimizer AI detects nutrient deficiencies through biochemical soil data analysis and
generates precise biochemical balancing prescriptions, detailing target fertilizers to restore soil
health. Third, the Disease Detection AI utilizes a Convolutional Neural Network (CNN) trained
on extensive leaf imagery (the Plant Village dataset) to classify 38 unique diseases across major
crop categories. Upon classification, the system offers automated treatment protocols, pesticide
application guidance, and ecological mitigation strategies.
To ensure accessibility, AGRI HUB integrates a 24/7 expert conversational agent
powered by the Google Gemini Large Language Model, providing farmers with real-time
agronomic guidance in natural language. The system also pulls live meteorological feeds via the
OpenWeatherMap API, delivering 7-day predictive weather alerts tailored to localized planting
schedules. Economic evaluations indicate that deploying AGRI HUB results in an average yield
increase of 15% and a decrease in input costs by 12% through targeted fertilization and proactive
disease containment. This comprehensive digital ecosystem successfully bridges the gap
between scientific agronomic theory and practical on-field application, paving the way for
sustainable, high-yield agricultural practices.
iii
TABLE OF CONTENTS
I. INTRODUCTION.................. .................................................................. .............................1
II. LITERATURE SURVEY.... ................................................................................................2
A. Traditional Agronomic Practices vs. AI ... ..........................................................................2
B. Review of Random Forest in Crop Recommendation ........................................................ 3
C. Review of Convolutional Neural Networks (CNN) in Plant Pathology ............................. 3
D. Comparative Analysis of Existing Solutions ...................................................................... 3
III. REQUIREMENT SPECIFICATIONS ............................................................................ 4
A. Hardware Requirements ...................................................................................................... 4
B. Software Requirements ....................................................................................................... 4
C. Dataset Specifications ......................................................................................................... 5
IV. SYSTEM DESIGN AND ARCHITECTURE .................................................................. 7
A. System Architecture Overview ........................................................................................... 7
B. Soil Optimizer and Crop Recommendation Modules ......................................................... 8
C. Disease Detection Pipeline .................................................................................................. 8
D. Data Flow Diagrams (DFD)................................................................................................ 9
V. PROPOSED SYSTEM METHODOLOGY .................................................................... 10
A. Random Forest Algorithm Implementation for Crop Prediction ...................................... 10
B. Deep Learning CNN Architecture for Leaf Disease Detection......................................... 11
C. Soil Optimizer Nutrient Balancing Formulae ................................................................... 13
D. Large Language Model (Google Gemini API) Integration ............................................... 13
VI. IMPLEMENTATION DETAILS ................................................................................... 14
A. Directory Structure ............................................................................................................ 14
B. Crop Recommendation Implementation ........................................................................... 14
C. Disease Detection Implementation.................................................................................... 15
D. Flask API and Frontend Integration .................................................................................. 15
VII. RESULTS AND DISCUSSION ..................................................................................... 16
A. Performance Benchmarking (99.55% Recommendation Accuracy ................................. 16
B. Disease Classification Confusion Matrices ....................................................................... 17
C. Economic Impact & Yield Optimization Case Studies ..................................................... 18
VIII. CONCLUSION AND FUTURE WORK ..................................................................... 19
REFERENCES ........................................................................................................................ 20
iv
LIST OF FIGURES
Figure 4.1: System Architecture Diagram .................................................................................. 7
Figure 4.2: DFD Level 0 (Context Diagram) and Level 1 DFD ................................................. 9
Figure 5.1: Random Forest Ensemble Structure ....................................................................... 10
Figure 5.2: CNN Layer-by-Layer Architectural Flow .............................................................. 12
Figure 7.1: Model Accuracy Benchmarking Chart ................................................................... 16
v
LIST OF TABLES
Table 3.1: Hardware Specifications ............................................................................................ 4
Table 3.2: Software Environment Requirements ........................................................................ 5
Table 3.3: Crop Recommendation Dataset Parameter Ranges ................................................... 6
Table 5.1: CNN Layer Parameters and Dimensions ................................................................. 12
Table 7.1: Model Metrics for Major Crop Recommendations ................................................. 16
vi
LIST OF FIGURES
Figure 4.1: System Architecture Diagram .................................................................................. 7
Figure 4.2: DFD Level 0 (Context Diagram) and Level 1 DFD ................................................. 9
Figure 5.1: Random Forest Ensemble Structure ....................................................................... 10
Figure 5.2: CNN Layer-by-Layer Architectural Flow .............................................................. 12
Figure 7.1: Model Accuracy Benchmarking Chart ................................................................... 16
LIST OF TABLES
Table 3.1: Hardware Specifications ............................................................................................ 4
Table 3.2: Software Environment Requirements ........................................................................ 5
Table 3.3: Crop Recommendation Dataset Parameter Ranges ................................................... 6
Table 5.1: CNN Layer Parameters and Dimensions ................................................................. 12
Table 7.1: Model Metrics for Major Crop Recommendations ................................................. 16
vii
viii
9