0% found this document useful (0 votes)
0 views

Major Project Report

The document is a major project report submitted by students at Loknayak Jai Prakash Institute of Technology, detailing their project titled 'AI-Powered Plant Disease Classifier: Smart Detection for Healthy Crops.' The project aims to develop an AI-driven system for automated plant disease detection using deep learning techniques, providing farmers with real-time diagnosis and treatment suggestions through a web and mobile application. The report includes sections on the project's introduction, methodology, hardware and software requirements, and acknowledgments, highlighting the significance of technology in modern agriculture.

Uploaded by

avijeet.roy62
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Major Project Report

The document is a major project report submitted by students at Loknayak Jai Prakash Institute of Technology, detailing their project titled 'AI-Powered Plant Disease Classifier: Smart Detection for Healthy Crops.' The project aims to develop an AI-driven system for automated plant disease detection using deep learning techniques, providing farmers with real-time diagnosis and treatment suggestions through a web and mobile application. The report includes sections on the project's introduction, methodology, hardware and software requirements, and acknowledgments, highlighting the significance of technology in modern agriculture.

Uploaded by

avijeet.roy62
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 42

BIHAR ENGINEERING UNIVERSITY, PATNA

(Under Govt. of Bihar)

Loknayak Jai Prakash Institute of Technology


CHAPRA - 841302

Session: 2021-2025
8th Semester
Major Project Report
On
“AI-POWERED PLANT DISEASE CLASSIFIER: SMART DETECTION FOR HEALTY CROPS “
Submitted in Partial fulfilment of the requirement for the degree of
Bachelor of Technology
In
Computer Science & Engineering
Submitted by

Name Registration No.


Ankit Kumar Singh 21105117054
Supriya Singh 21105117043
Mayank 21105117051
Varun Kumar 21105117033

Under the Supervision of


Asst. Prof. JITENDRA KUMAR
(Asst. Professor, Department of C.S.E)
1
Page
DECLARATION BY THE CANDIDATES

I the undersigned solemnly declare that the report of the project work entitles “AI-
Powered Plant Disease Classifier: Smart Detection for Healthy Crops” is based on my
own work carried out during the course of my study under the guidance of JITENDRA
KUMAR (Asst. Prof.) Department of computer Science & Engineering, Lok Nayak Jai
Prakash Institute of Technology, Chapra.

I further declare the statements made and conclusion drawn are an outcome of my
project work.

(Signature of Student) (Signature of Student)


Ankit Kumar Singh Supriya Singh
Reg. No. - 21105117054 Reg. No. – 21105117043

(Signature of Student) (Signature of Student)


Mayank Varun Kumar
Reg. No. - 21105117051 Reg. No. – 21105117033
2
Page
CERTIFICATE BY GUIDE

This is to certify that the project entitled “AI-Powered Plant Disease Classifier: Smart
Detection for Healthy Crops” is a record of work carried out by Ankit Kumar Singh -
21105117054, Supriya Singh - 21105117043, Mayank - 21105117051, Varun Kumar
– 21105117033 being Under my guidance and supervision for the award of the
Degree of Bachelor of Technology, Lok Nayak Jai Prakash Institute of Technology,
Chapra, Bihar, India.

To the best of my knowledge and belief the Project


i. Embodies the work of the candidate him/herself.
ii. Has not been submitted for the award of any degree.
ii. Fulfils the requirement of the Ordinance relating to the B.TECH. degree of
the University.
iv. Is up to the desired standard in respect of contents and is being referred
to the examiners.

(Signature of the Guide)


JITENDRA KUMAR
(Asst. Prof. Dept of CSE)
(L.N.J.P.I.T., Chapra)
3
Page
Recommendation

The Project work as mentioned is above here by being recommended and forwarded
for examination and evaluation.

(Signature of the Guide)

JITENDRA KUMAR
(Asst. Prof. Dept of CSE)
(L.N.J.P.I.T , Chapra)

4
Page
CERTIFICATE BY THE EXAMINERS

This is to certify that the project work “AI-Powered Plant Disease Classifier:
Smart Detection for Healthy Crops” is a record of work carried out by Ankit Kumar
Singh - 21105117054, Supriya Singh - 21105117043, Mayank - 21105117051, Varun
Kumar – 21105117033 have been completed under the guidance of JITENDRA
KUMAR (Asst. Prof.) Department of Computer Science & Engineering, Lok Nayak Jai
Prakash Institute of Technology, has been examined by the undersigned as a part of
the examination for the award of Bachelor of Technology degree in Computer
Science & Engineering branch in Bihar Engineering University, PATNA

“ Project Examined and Approved “

Internal Examiner External Examiner


Date : Date :

5
Page
ACKNOWLEDGEMENT

At every outset we express our gratitude to almighty lord for showering his
grace and blessing upon us to complete this project.
Although our name appears on the cover of this project, many people had
contributed in some form or the other form to this project development. We could
not do this project without the assistance or support of each of the following we
thank you all.
We wish to place on our record our deep sense of gratitude to our project
guide JITENDRA KUMAR (Asst. Prof.) Department of C.S.E. and our project in charge
SUDHIR KUMAR PANDEY (Asst. Prof.) Department of C.S.E, (L.N.J.P.I.T., Chapra) for
their constant motivation and valuable help through the project work. For his
valuable suggestion and advices throughout the course. We also extend our thanks
to other faculties for their cooperation during our course.
Finally, we would like to thank our friends for their cooperation to complete this project.

(Signature of Student) (Signature of Student)


Ankit Kumar Singh Supriya Singh
Reg. No. - 21105117054 Reg. No. – 21105117043

(Signature of Student) (Signature of Student)


Mayank Varun Kumar
Reg. No. - 21105117051 Reg. No. – 21105117033
6
Page
Abstract

Agriculture plays a crucial role in the economy and food supply of nations around the
world. However, plant diseases pose a significant threat to crop yield and quality. This
project, AI-Powered Plant Disease Classifier: Smart Detection for Healthy Crops, aims to
assist farmers and agriculturists by providing a reliable, automated solution using artificial
intelligence (GenAI).

The system utilizes a publicly available dataset from Kaggle containing over 87,000 labeled
images of plant leaves across 38 classes of diseases and healthy conditions. The system
makes use of image processing methods for noise reduction and feature enhancement,
followed by deep learning-based classification using Convolutional Neural Networks (CNNs).
The application architecture follows a modular design, with a React frontend, a FastAPI
backend, and a TensorFlow-trained model for prediction. To maximize accessibility, the
system also includes a mobile application built in Java using Android Studio, allowing users
to click or upload a photo and receive immediate disease diagnosis and treatment
suggestions using GenAI.

The proposed system aims to revolutionize plant disease detection by leveraging artificial
intelligence to assist farmers and agricultural experts in identifying crop diseases quickly
and accurately. By integrating deep learning and generative AI, the system not only detects
diseases from plant leaf images but also provides intelligent recommendations for cure and
management. The implementation demonstrates the feasibility of deploying advanced
machine learning and GenAI technologies in both web and mobile applications, offering a
practical solution for enhancing agricultural productivity and promoting smarter, tech-
driven farming practices.
7
Page
Table of Contents

Chapter 1. Introduction.....................................................10

1.1 Introduction to the Project

1.2 Problem Definition

1.3 Aim

1.4 Objective

1.5 Goal

1.6 Need of our Project

Chapter 2. Hardware and Software requirement................15

2.1 Introduction
2.2 System Environment
2.3 Software requirement
2.4 Hardware requirement

Chapter 3. Literature Review...............................................18

3.1 Literature Review

Chapter 4. Methodology......................................................22

4.1 Overview of Methodology


4.2 Data Collection and Dataset Description
4.3 Image Preprocessing and Augmentation
4.4 Model Architecture (Convolutional Neural Network)
4.5 Model Training
8

5 Image Normalization and Scaling


Page
6 Feature Extraction
7 Facial Recognition Using Face Graph

Chapter 5. Result and Conclusion............................................30

7.1 Result
7.2 Archives
7.3 Face Recognition Results
7.4 Conclusion
7.5 Bibliography

9
Page
CHAPTER # 1

Introduction

Contents:
1.1 Introduction to the Project
1.2 Problem Definition
1.3 Aim
1.4 Objective
1.5 Goal
1.6 Need of our Project

10
Page
1.1 Introduction to the Project:

Plant disease detection is a critical aspect of modern agriculture, directly influencing crop
health, yield, and food security. Traditionally, the identification of plant diseases has relied
on manual inspection by agricultural experts or farmers, which is often time-consuming,
subjective, and prone to error. As the scale of farming operations increases and the demand
for efficient agricultural practices grows, there is a pressing need for a more reliable,
accurate, and automated solution to detect and manage plant diseases.

This project, "AI-Powered Plant Disease Classifier: Smart Detection for Healthy Crops", aims to
develop a smart, AI-driven system capable of identifying various plant diseases through
image-based analysis. The solution is built using a combination of cutting-edge technologies
— including TensorFlow for deep learning, FastAPI for backend services, and React for the
web frontend. A custom-trained image classification model analyzes leaf images to detect
disease presence, while Google's Gemini (GenAI) is integrated to provide personalized
recommendations for disease management and treatment based on the prediction results.

The system is designed to be accessible across platforms, including a dedicated Android mobile
application developed using Java and Android Studio, enabling farmers to capture leaf
images directly from the field and receive instant feedback. The application provides an
intuitive interface for uploading images, viewing prediction results, and accessing treatment
guidance, making it a powerful tool for both novice and experienced users.

By addressing the limitations of traditional plant disease detection methods, this project
demonstrates the potential of integrating machine learning and generative AI into
agricultural practices. It not only reduces the reliance on manual diagnosis but also
empowers users with actionable insights, thereby contributing to smarter farming, higher
productivity, and better crop management.
11
Page
1.2 Problem Definition

In agriculture, early and accurate detection of plant diseases is essential for maintaining
crop health, ensuring food security, and minimizing economic losses. Traditionally, farmers
and agricultural workers rely on visual inspection and expert consultation to identify
diseases. While this approach may work in limited settings, it poses significant challenges
when scaled to large farms or when timely expert support is unavailable.

Manual disease detection is not only time-consuming but also highly subjective and prone to
inaccuracies. Misidentification can lead to the use of incorrect treatments, further damaging
crops and increasing costs. Additionally, remote or rural farmers often lack access to
agronomists or diagnostic labs, delaying intervention and allowing diseases to spread
unchecked. As climate variability and crop diversity grow, the complexity of disease
management has also increased, making traditional practices insufficient to meet modern
agricultural demands.

Given these challenges, there is a pressing need for a technology-driven, intelligent plant
disease detection system that is accurate, scalable, and easy to use. Such a system should
offer instant diagnostics based on image inputs, reduce dependency on human judgment,
and support farmers with actionable recommendations to manage diseases effectively.

This project addresses these challenges by developing an AI-Powered Plant Disease


Classifier that leverages deep learning to detect plant diseases from leaf images. The model
is trained using TensorFlow on a large dataset of diseased and healthy plant leaves. The
system includes a responsive web application built using React and FastAPI, which allows
users to upload images and receive predictions in real time. Furthermore, it integrates
GenAI (Gemini) to provide intelligent treatment suggestions based on the diagnosis. For
field-level accessibility, a dedicated Android application built with Java and Android Studio
allows farmers to use the system directly from their mobile devices. This unified, AI-driven
approach offers a reliable and efficient alternative to traditional disease identification
methods, empowering users with the tools they need to maintain healthy crops.
12
Page
1.3 Aim

The aim of this project is to develop an intelligent, AI-powered system for automated plant
disease detection using deep learning and image recognition techniques. The system is
designed to accurately identify various plant diseases from leaf images and provide real-
time treatment suggestions through an integrated generative AI module. Accessible via
both a responsive web application and a mobile Android app, the solution aims to minimize
the reliance on manual inspection, reduce diagnostic errors, and empower farmers with a
fast, reliable, and user-friendly tool for effective crop health management.

1.4 Objective

The objective of this project is to develop an AI-powered system for plant disease detection
that leverages deep learning and image processing to accurately identify diseases from
plant leaf images. By utilizing a TensorFlow-based classification model trained on a
comprehensive dataset, the system aims to automate the disease diagnosis process,
reducing the dependency on manual inspection and expert consultation. The solution is
designed to be accessible via both a web application and an Android mobile app, providing
users with a seamless experience to capture, upload, and analyze leaf images. Additionally,
the integration of GenAI (Gemini) offers intelligent treatment suggestions based on the
diagnosis, enhancing decision-making for farmers. The system ultimately aims to improve
crop management, minimize losses, and promote sustainable agricultural practices through
technology-driven innovation.

1.5 Goal

The primary goal of this project is to develop a reliable, intelligent, and user-friendly
system for detecting plant diseases that can:
 Develop an AI-based system that accurately detects plant diseases from leaf images
using deep learning techniques.
 Integrate GenAI (Gemini) to provide smart, real-time suggestions for disease
treatment and management.
 Ensure accessibility through both a web platform and an Android mobile app,
enabling users to diagnose plant diseases anytime, anywhere.
13
Page
1.6 Need of our Project

The need for the project “AI-Powered Plant Disease Classifier: Smart Detection for Healthy
Crops” arises from the growing demand for timely and accurate plant disease
identification in agriculture. Traditional methods are often time-consuming, error-prone,
and inaccessible for many farmers. This project addresses those challenges through AI-
driven automation and accessibility. Below are the key needs that justify the development
of this system:

1. Automation:
 Eliminates the need for manual disease identification by automating the
diagnosis process through image analysis.
 Reduces dependency on agricultural experts for initial disease detection.
2. Accuracy:
 Enhances diagnostic precision using a deep learning model trained on a
diverse dataset of plant diseases.
 Minimizes misdiagnosis and enables faster, more confident decision-
making.
3. Efficiency:
 Provides quick results through an AI model, saving critical time during early
stages of infection.
 Helps in reducing crop losses by enabling timely intervention.
4. Accessibility:
 Offers a responsive web app and a dedicated Android mobile app,
ensuring usability in both rural and urban settings.
 Allows farmers to upload images and receive instant feedback from
anywhere.
5. Smart Support:
 Integrates GenAI (Gemini) to provide intelligent recommendations for
disease management and treatment.
 Empowers farmers with knowledge typically available only through expert
consultation.
6. Scalability:
 Capable of supporting multiple plant types and disease classes as more
data is added.
 Easily extendable to support future updates and integrations with
14

agricultural systems.
Page
CHAPTER # 2

Hardware and Software Requirement


Contents:
2.1 Introduction
2.2 System Environment
2.3 Software Requirement
2.4 Hardware Requirement

15
Page
2.1 Introduction

The successful implementation of the AI-Powered Plant Disease Classifier requires the
integration of both hardware and software components designed to support deep learning-
based image analysis and cross-platform accessibility. On the hardware side, the system
requires standard computing devices or Android smartphones equipped with a functional
camera capable of capturing clear images of plant leaves. These images serve as input for
the AI model, and sufficient processing power and internet connectivity are needed to
ensure smooth operation of both the web and mobile applications.

On the software side, the project is built using a combination of modern technologies. The
frontend is developed using React, providing a responsive and interactive user interface
for image upload and disease detection. The backend is powered by FastAPI, a high-
performance Python web framework, which manages requests, communicates with the
model, and returns predictions. The deep learning model, trained using TensorFlow, is
responsible for classifying plant diseases from images, based on the Kaggle dataset "New
Plant Diseases Dataset". Additionally, the system integrates GenAI (Gemini) to generate
detailed treatment suggestions and disease management tips.

For mobile accessibility, a dedicated Android application is built using Java and Android
Studio, allowing farmers to capture and upload leaf images directly from the field.
Together, these components create a robust and scalable solution that leverages AI to
support sustainable farming and improve crop health management.
16
Page
2.2 System Environment:

The system environment for the AI-Powered Plant Disease Classifier is designed to
function efficiently within both agricultural and digital settings, leveraging web and mobile
technologies to ensure accessibility and usability for a wide range of users, including
farmers and agricultural professionals. The solution operates across two main platforms: a
web application developed using React for desktop or browser-based access, and a mobile
application built using Java and Android Studio, allowing users to capture and upload leaf
images directly from the field.

The core image analysis and disease classification functionalities are handled on the server-
side using a FastAPI backend integrated with a machine learning model. The server
processes incoming image data, performs predictions, and returns results to the user
interface. To further enhance utility, the system integrates GenAI (Gemini), which provides
intelligent treatment and management suggestions based on the predicted disease.

Hardware and Software Specification

2.3 Software Requirements:

 Android Studio
 Java Development Kit (JDK)
 Gradle
 TensorFlow Lite
 XML
 Git
 Android SDK
 Python
 React

2.4 Hardware Requirements:

 Android Device
 Computer/Laptop
 Stable Internet Connection
 Power Supply
17
Page
CHAPTER # 3

Literature Review
Contents:
3.1 Literature Review

18
Page
3.1 Literature Review

1. Deep learning technique for plant disease detection

Authors: Adekunle et al.

Year: 2024

Focus: Proposal of an efficient, lightweight deep learning framework called E-GreenNet,


based on MobileNetV3Small, for real-time and accurate detection of plant leaf diseases using
image data.

Contribution: Adekunle et al. (2024) present a study on the application of DL techniques for
plant disease detection. Their research involves training and testing DL models on datasets
comprising images of healthy and diseased plants. The results indicate that DL models,
particularly those based on CNNs, achieve high accuracy in detecting and classifying plant
diseases.

Techniques/Features Used
 Traditional ML techniques: SVM, Decision Trees, Random Forest, KNN
 Feature Extraction: GLCM, Gabor filters, LBP, DLQP, HSV transform, Harris detector
 Deep Learning:
o CNN-based architectures (AlexNet, VGGNet, ResNet, MobileNetV1/V3,
EfficientNet)
o E-GreenNet: MobileNetV3Small-based custom lightweight architecture with
NAS (Neural Architecture Search) and h-swish activation for efficient edge-
device inference.

Dataset Details
 PlantVillage (PV): 54,415 images
 DRLI: 4,602 images
 PC (Composite): 59,707 images
17
Page
Accuracy/Performance
 PV: 100%, DRLI: 96%, PC: 100% accuracy
 High precision and F1-scores across datasets
 Outperformed larger models with fewer parameters

Key Findings/Challenges
 Findings:
o E-GreenNet provides high accuracy and low computational cost, suitable for
edge devices.
o Robust against image noise, variation in size, color, and lighting conditions.
o Effective for real-time alert systems in agriculture.
 Challenges:
o Existing ML/DL models suffer from overfitting with unfamiliar data.
o DL models still need improvement in detection accuracy with noisy or distorted
samples.
o Implementation on edge devices (e.g., Jetson Nano) requires optimization due
to resource constraints.

2. Leaf Analysis-Based Early Plant Disease Detection Using IoT, Machine Learning, and
Deep Learning: A Comprehensive Review

Authors: Prasad S. R., Thyagaraju G. S.

Year: 2024

Focus: Comprehensive analysis of various AI, IoT, and image processing methods for early
detection of plant diseases, including leaf, fruit, and soil-borne diseases.

Contribution: Prasad and Thyagaraju (2024) [6] present a comprehensive review of early
plant disease detection using IoT, ML, and DL. They emphasize the integration of these
technologies to enhance the accuracy and efficiency of disease detection. IoT devices collect
real-time data from plant leaves, which are then analyzed using ML and DL algorithms to
20

identify disease symptoms at an early stage.


Page
Techniques/Features Used

 IoT-Based Detection:

o Sensors used: Temperature (DHT11), humidity, moisture, and color sensors


(TCS3200).

o Parameters monitored: Leaf color, surface temperature, humidity, and


environmental factors.

o Data analysed via cloud platforms for disease identification and alert generation.

 Digital Image Processing (DIP) + Machine Learning (ML):

o Image pre-processing, segmentation (K-means, Fuzzy C-means), feature


extraction (GLCM, CCM, shape/color features).

o Classification using SVM and Random Forest.

 Deep Learning (DL):

o CNNs for spatial feature extraction.

o Transfer Learning with pre-trained models (e.g., VGG-16, ResNet).

o Recurrent Neural Networks (RNNs), including LSTM and GRU, for sequence-based
disease progression analysis.

o Hybrid models combining CNN + RNN with attention mechanisms for enhanced
performance.

Dataset Details

 Image Sources:

o Real-time images from plant fields, PlantVillage dataset, hyperspectral image


databases, smartphone/digital camera images.

o Examples include datasets on potato, tomato, banana, grape, citrus, etc.

 Sensors for IoT:

o DHT11 (temperature & humidity), TCS3200 (color), soil moisture sensors.


Accuracy/Performance

 Up to 99.5% accuracy with hybrid DL models

 SVM: ~95–97% on specific crops (banana, tomato, grape)

 Hyperspectral Imaging: ~94.8% (potato)

Key Findings/Challenges

 Findings:

o Combining IoT with DL enhances early disease detection.

o Transfer learning improves performance on small, domain-specific datasets.

o CNN-RNN hybrids boost classification by focusing on spatial + sequential


patterns.

o Real-time alert systems and mobile applications improve accessibility.

 Challenges:

o Sensor placement and power issues in IoT systems.

o Environmental variability affects sensor/image data.

o Generalization across plant species and conditions.

o Need for labeled data and data diversity.

o High cost of advanced sensors (e.g., hyperspectral).

o Training required for farmers to adopt AI solutions.

3. Deep Learning for Plant Disease Detection

Authors: Munaf Mudheher Khalid, Oguz Karan

Year: 2024

Focus: Comparison of CNN and MobileNet for plant disease classification using a large image
dataset; introduces Grad-CAM for interpretability.
Contribution: Khalid and Karan (2024) [2] focus on the use of DL for plant disease detection,
exploring different DL architectures such as convolutional neural networks (CNNs) and
recurrent neural networks (RNNs). Their study demonstrates the high accuracy and
robustness of DL models in identifying various plant diseases from image data.

Techniques/Features Used

 DL Models Used:

o CNN (custom architecture with dropout, pooling, dense layers)

o MobileNetV2 (pre-trained, fine-tuned with custom classifier layers)

 XAI: Grad-CAM used for visual explanations of model decisions

 Preprocessing: Image resizing (224x224), normalization, data balancing, label selection


(20 classes)

Dataset Details

 Source: Kaggle public dataset

 Size: ~87,000 RGB leaf images

 Classes: 38 total; 20 selected for training

 Split: 80% training, 20% validation + a separate prediction set (33 images)

Accuracy/Performance

 CNN: 89% accuracy

 MobileNetV2: 96% accuracy (outperformed CNN)

 Best result: Grape_Esca – 100%

 Weakest result: Tomato_Early_Blight – lower precision & recall

Key Findings/Challenges

 Findings:
o MobileNet outperformed CNN in accuracy and consistency

o Grad-CAM helped interpret disease localization in leaves

o Robust model for real-time and image-based disease diagnosis

 Challenges:

o Some classes (e.g., Tomato_Early_Blight) showed lower performance

o Need for improvement in generalizability and real-time deployment


CHAPTER # 4

Methodology
Contents:
4.1 Overview of Methodology
4.2 Data Collection and Dataset Description
4.3 Image Preprocessing and Augmentation
4.4 Model Architecture
4.5 Model Training
4.6 Image Normalization and Scaling
4.7 Feature Extraction
4.8 Facial Recognition Using Face Graph

22
Page
4.1 Overview of Methodology

In this project, a Convolutional Neural Network (CNN) was designed and trained to classify and
predict diseases in plants using leaf images. The methodology follows a systematic approach
beginning with dataset collection, data preprocessing, image augmentation, model design,
training and validation, and finally, evaluation. This structured pipeline ensures accuracy,
generalizability, and scalability in real-world agricultural scenarios .

The project flow can be broadly categorized into the following stages:

 Data Collection

 Image Preprocessing and Augmentation

 CNN Model Design

 Model Training

 Web Platform/Mobile App Development

 Testing & Evaluation

This methodology ensures that the system developed is robust enough to handle variations in
lighting, leaf orientation, background noise, and other real-world challenges.

23

Fig 1. Overview of Methodology


Page
4.2 Data Collection and Dataset Description

The dataset used for training the CNN model was sourced from the New Plant Disease
dataset, which consists of over 87,000 high-quality images categorized into 38 distinct
classes. These classes represent healthy and diseased conditions across different plant
species.

The dataset was selected due to its large volume, diversity of plant diseases, and
availability in a structured format. Each image is labeled, allowing for supervised
learning techniques.

Key features of the dataset:

 Images are of consistent size (256x256 pixels)

 Contain RGB color information

 Include multiple plant species and various disease types

Challenges addressed:

 Some images contained background noise or shadows

 Class imbalance in certain disease categories

 Variability in image sharpness and contrast


24
Page
Fig 2. Sample images of New Plant Disease Dataset

 Dataset summary with columns: Class Name, No. of Images, Category


(Healthy/Diseased)

S.No. Class Name No. of Images Category


1 Apple Scab 630 Diseased
2 Apple Black Rot 621 Diseased
3 Apple Cedar Rust 275 Diseased
4 Apple Healthy 1645 Healthy
5 Blueberry Healthy 1502 Healthy
6 Cherry Powdery Mildew 1052 Diseased
7 Cherry Healthy 1056 Healthy
8 Corn Cercospora Leaf Spot 513 Diseased
9 Corn Common Rust 1192 Diseased
10 Corn Northern Leaf Blight 985 Diseased
11 Corn Healthy 1162 Healthy
12 Grape Black Rot 1180 Diseased
13 Grape Esca (Black Measles) 1383 Diseased
14 Grape Leaf Blight 1076 Diseased
15 Grape Healthy 1384 Healthy
16 Orange Haunglongbing (Citrus Greening) 550 Diseased
17 Peach Bacterial Spot 2297 Diseased
18 Peach Healthy 2229 Healthy
19 Pepper Bell Bacterial Spot 998 Diseased
20 Pepper Bell Healthy 1477 Healthy
21 Potato Early Blight 1000 Diseased
22 Potato Late Blight 1000 Diseased
23 Potato Healthy 1000 Healthy
24 Raspberry Healthy 371 Healthy
25 Soybean Healthy 5090 Healthy
26 Squash Powdery Mildew 1835 Diseased
27 Strawberry Leaf Scorch 1109 Diseased
28 Strawberry Healthy 1068 Healthy
29 Tomato Bacterial Spot 2127 Diseased
30 Tomato Early Blight 1000 Diseased
31 Tomato Late Blight 1909 Diseased
32 Tomato Leaf Mold 952 Diseased
33 Tomato Septoria Leaf Spot 1771 Diseased
34 Tomato Spider Mites (Two-Spotted) 1676 Diseased
35 Tomato Target Spot 1404 Diseased
36 Tomato Mosaic Virus 373 Diseased
37 Tomato Yellow Leaf Curl Virus 5357 Diseased
38 Tomato Healthy 1591 Healthy

4.3 Image Preprocessing and Augmentation


Before feeding the images into the CNN model, preprocessing steps are applied to
standardize the input and improve model learning. These include resizing,
normalization, and image augmentation.

Preprocessing Techniques:

 Resizing: All images resized to 128x128 to reduce computational cost

 Normalization: Pixel values scaled between 0 and 1

 Noise Removal: Basic denoising filters applied where needed

Augmentation Techniques:

 To prevent overfitting and enrich the dataset, we apply:

 Random Rotation (±15°)

 Horizontal and Vertical Flip

 Zoom and Shear Transformation

 Brightness Adjustment

These techniques simulate real-world variations, helping the model generalize better.

4.4 Model Architecture (Convolutional Neural Network)

In our project, we used a Convolutional Neural Network (CNN) to identify whether a plant
leaf is healthy or has a disease. CNN is a type of artificial intelligence model that is really good
at looking at pictures and finding patterns in them — just like how our eyes and brain work
together to recognize objects.

4.4.1 What is a CNN?


We can think of a CNN like a smart camera that learns from lots of images. It can learn to
recognize:
 Shapes

 Colors

 Patterns (like spots or edges on leaves)

Instead of us telling the computer what to look for, the CNN figures it out on its own by
learning from many images.

4.4.2 How Our Model Works? (Step by Step)


Here’s a step-by-step explanation of what our CNN model does:
1. Input: The model takes an image of a plant leaf (we resized all images to 128x128
pixels).

2. Convolution: It scans the image using small filters to find edges, lines, or colors.

3. ReLU Activation: This helps the model understand more complex shapes.

4. Pooling: It reduces the size of the image to make learning faster.

5. Repeat Convolution + Pooling: This happens a few times to find deeper patterns.

6. Flattening: The image data is turned into a list of numbers.

7. Dense Layer: These are like decision-makers that use the image data to guess the
disease.

8. Output Layer: This gives the final result — which disease the leaf has (or if it’s healthy).

Think of this process like zooming into the image to find small details, then combining all that
information to make a smart guess.

4.4.2 Why We Used CNN?


 CNNs work best for image-related problems, like identifying diseases from leaf
photos.

 They learn patterns automatically. We don’t need to manually tell the model what to
look for.

 It’s a proven method used in many real-world plant disease detection systems.
4.5 Model Training

Once we designed our CNN model architecture, the next important step was to train the
model — which means helping it learn how to recognize healthy and diseased leaves using
the images in our dataset.

4.5.1 Training Dataset

We used a dataset that contains more than 70,000 images of plant leaves, belonging to 38
different classes (some healthy, others with different diseases).

Each image is labeled, which means we know the actual disease type for every image. This
makes it a supervised learning task.

Fig 3.

Sample images of potato leaf diseases

4.5.2 Data Preprocessing Before Training

Before giving images to the model, we applied preprocessing to make learning easier:

 Resize all images to 128x128 pixels.

 Normalize pixel values (between 0 and 1) so the model trains faster and more
accurately.

 Convert labels into numbers (using one-hot encoding).


25

 Split data into training (80%), validation (10%), and testing (10%) sets.
Page
4.5.3 Training the CNN

We used TensorFlow (a deep learning library) to train the CNN. Here’s how it worked:

 We ran the training process for 25–30 epochs (i.e., cycles of learning).

 The model learned from the training images and checked its performance on
validation data.

 The model’s performance was measured using loss (how wrong it is) and accuracy
(how right it is).

4.5.4 Model Accuracy

After training, our model achieved high accuracy on both the training and test datasets. For
example:

Training Accuracy: 98%

Validation Accuracy: 96%

Test Accuracy: 95%


26

This means the model can correctly predict diseases in most new plant images.
Page
The image is processing using image segmentation method and then searching it for
contours before each segment is correlated with existing face model to identifying
specific coordinated where the feature exists. The image below gives an example of
templates used to generate face models that is then used of feature extraction.

Fig 8. Face Model Templates

4.6 Facial Recognition Using Face Graph

Upon successful identification of face of interest and processing it to extract


coordinates of specific features of interest, one now has to make calculations of
displacement of these points from one another to develop face graph for the face
in question.

To perform the task of face recognition the detect face first has to complete the
process of feature extraction. Using landmarks approach, one is limited to a
maximum of twelve mention fiducial point:

- Left Eye
- Right Eye
- Nose Base
- Left Cheek
- Right Cheek
- Left Mouth
- Bottom Mouth
- Right Mouth
- Left Ear
- Left Ear Tip
- Right Ear
- Right Tip Fig 9. All Features
27
Page
These fiducial Points would return a particular point on the image which contain
both an “X” as well “Y” value. These values could be used to identify where
each feature is on the image.

The values do not reveal the full picture and subsequent use for face recognition.
The values have to be compared with each other to tell the displacement of each to
one another.

Fig 10. Features with Displacements

28
Page
Fig 11. Project Activities
29
Page
CHAPTER # 5

Result and Conclusion


Contents:
5.1 Result
5.2 Archives
5.3 Face Recognition Results
5.4 Conclusion
5.5 Bibliography

30
Page
5.1 Result

The first objective of the project is to implement face detection on android smart phone.
This part of the project has been successfully concluded with results shown in the
images below.

31
Page
32
Page
5.2 Archives

33
Page
5.3 Face Recognition Results

Upon the acquisition of individual faces using the results from the face detection process, the view is
then switched the face recognition platform to start the process of face recognition.

Fig 18. Feature Identification

Fig 19. Coordinate Displacement


34
Page
5.4 Conclusion

The development of the Classroom Attendance System using Face Recognition Android
Application addresses the critical need for a more efficient, accurate, and secure method of
attendance tracking in educational institutions. By leveraging advanced facial recognition
technology through the MobileFaceNet model and integrating it into a user-friendly
Android application, this project offers a modern solution that overcomes the limitations of
traditional attendance methods.

Throughout the project, we have demonstrated the feasibility of deploying lightweight, on-
device machine learning models that can accurately and reliably identify students in real-
time. The system's ability to automate attendance recording not only reduces the
administrative burden on educators but also ensures that attendance data is captured with
greater precision and integrity. Additional features such as attendance history tracking,
data synchronization, and real-time notifications further enhance the usability and
practicality of the application in real-world educational settings.

Despite the challenges encountered, including the need for optimized performance on
mobile devices and the consideration of privacy and security concerns, the project
successfully showcases the potential of integrating AI-driven solutions into everyday
educational practices. As educational institutions continue to evolve in response to
technological advancements, the implementation of systems like this one will play a crucial
role in enhancing the efficiency and effectiveness of academic administration.
Future work may focus on further improving the system's accuracy, expanding its scalability
to support larger institutions, and incorporating additional features such as multi-device
synchronization and advanced analytics. Overall, this project contributes to the ongoing
efforts to modernize and improve attendance management systems, providing a robust
foundation for future innovations in the field.
35
Page
5.5 Bibliography

 Abate, A. F., Nappi, M., Riccio, D., & Sabatino, G. (2007).


2D and 3D face recognition: A survey. Pattern Recognition
Letters, 28(14), 1885-1906.
https://doi.org/10.1016/j.patrec.2007.04.018

 Android Developers. (n.d.). Build your first app.


Retrieved from
https://developer.android.com/training/basics/fir
stapp

 Chai, Z., Shan, S., & Chen, X. (2019). MobileFaceNets: Efficient


CNNs for accurate real-time face verification on mobile devices. In
Proceedings of the Chinese Conference on Biometric Recognition
(pp. 428-438). Springer. https://doi.org/10.1007/978-3-030-20138-
7_48

 Delac, K., Grgic, M., & Liatsis, P. (2005). A survey of biometric


recognition methods. Proceedings of the 46th International
Symposium Electronics in Marine (ELMAR-2004), Zadar, Croatia, 16-
18.

 Dey, S., & Samanta, D. (2010). Improving face recognition using


PCA and SVM. International Journal of Computer Applications,
10(8), 22-25. https://doi.org/10.5120/1501-2008

 Firebase. (n.d.). Firebase documentation.


Retrieved from
https://firebase.google.com/docs

 Guo, G., & Zhang, N. (2019). A survey on deep learning-based


face recognition. Computer Vision and Image Understanding,
189, 102805. https://doi.org/10.1016/j.cviu.2019.102805

 Kumar, A., & Kumar, A. (2020). Smart attendance system using


face recognition. International Journal of Engineering Research &
Technology, 9(4), 1-5. https://doi.org/10.17577/IJERTV9IS040006

 TensorFlow Lite. (n.d.). TensorFlow Lite documentation.


Retrieved from https://www.tensorflow.org/lite

 Walia, E., & Chaba, Y. (2016). Face detection and recognition using
deep learning. Proceedings of the International Conference on
Computational Science and Computational Intelligence (CSCI), Las
36

Vegas, NV, USA, 1417-1420.


https://doi.org/10.1109/CSCI.2016.0284
Page

You might also like