0% found this document useful (0 votes)
35 views24 pages

DL Report1

This mini project report presents a deep learning-based system for identifying nutritional deficiencies in crops using Convolutional Neural Networks (CNNs) to analyze leaf images. The automated approach aims to assist farmers by providing timely and accurate diagnoses, thereby enhancing agricultural productivity and sustainability. The model achieved an accuracy of approximately 88% in classifying various nutrient deficiencies, demonstrating its potential as a valuable tool for precision agriculture.

Uploaded by

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

DL Report1

This mini project report presents a deep learning-based system for identifying nutritional deficiencies in crops using Convolutional Neural Networks (CNNs) to analyze leaf images. The automated approach aims to assist farmers by providing timely and accurate diagnoses, thereby enhancing agricultural productivity and sustainability. The model achieved an accuracy of approximately 88% in classifying various nutrient deficiencies, demonstrating its potential as a valuable tool for precision agriculture.

Uploaded by

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

Mini Project Report on

Identification of Nutritional Deficiencies in


crops using deep learning

Submitted in partial fulfillment of the requirements for the Degree of


Bachelor of Engineering IN COMPUTER ENGINEERING

BY

Neelam Bhapkar (2441025)


Siddhi Ingale (2441026)
Shruti Jadhav (2441027)
Ruturaj Taware (2441070)

Under the guidance of


Mrs.S.S.Nandgaonkar
Vidya Pratishthans
Kamalnayan Bajaj Institute of Engineering and Technology
Baramati-413133, Dist-Pune (M.S.) India
Department of Computer Engineering
VPKBIET, Baramati

Certificate
This is to certify that the Mini Project Report on

Identification of Nutritional Deficiencies in Crops Using


Deep Learning

SUBMITTED BY

Neelam Bhapkar (2441025) Siddhi Ingale (2441026)


Shruti Jadhav (2441027) Ruturaj Taware (2441070)

in the partial fulfillment of the requirement for the award of Degree of Bachelor of
Engineering in Computer Engineering at Vidya Pratishthan’s Kamalnayan Bajaj
Institute of Engineering and Technology, Baramati, under the Savitribai Phule Pune
University, Pune. This work is done during year 2024-25 Semester-II, under guidance.

Mrs. S.S.Nandgaonkar
Project Guide

i
Acknowledgements

We, the undersigned, would like to express our heartfelt gratitude to Prof. S. S. Nandgaonkar
our project mentor, for providing valuable guidance and support throughout the course
of this project. We also extend our appreciation to the department of Computer Engi-
neering, VPKBIET, for offering us this opportunity.

We are particularly thankful to our project guide for their insightful feedback and tech-
nical advice, which greatly enhanced the quality of our work. Finally, we wish to ac-
knowledge the immense help and moral support from our friends, and fellow students
throughout the duration of this project.

1
Abstract

Agriculture forms a vital part of human existence, providing food, raw materials, and
employment globally. However, plant growth and crop yield are significantly affected by
nutritional deficiencies. Essential nutrients such as nitrogen, phosphorus, potassium,
magnesium, and iron are crucial for plant health. Deficiency symptoms often manifest in
plant leaves through discoloration, deformation, and growth inhibition. Manual
identification of these symptoms is time-consuming, error-prone, and requires expert
knowledge. To address these challenges, we propose an automated system that uses
deep learning techniques, particularly Convolutional Neural Networks (CNNs), to detect
and classify nutritional deficiencies in crops based on leaf images. This project
encompasses image acquisition, preprocessing, deep learning model design, training,
evaluation, and deployment. By automating deficiency detection, the system aims to
assist farmers in making timely, informed decisions, thereby enhancing agricultural
productivity and sustainability.
.
.

2
Chapter 1

Introduction

Agricultural productivity hinges heavily on the health of crops, which in turn depends on the
availability of essential nutrients. When plants experience nutrient deficiencies, they exhibit
specific visual symptoms predominantly in their leaves. Traditional diagnosis methods rely on
physical inspection, laboratory testing, and expert agronomical analysis, which are resource-
intensive and impractical for small-scale farmers or remote locations.
Advances in deep learning, particularly in computer vision, offer a promising alternative. Deep
learning models can automatically extract relevant features from images and perform
classification tasks with high accuracy, making them suitable for diagnosing plant health
issues. By leveraging these techniques, this project seeks to develop an intelligent system
capable of identifying and categorizing nutritional deficiencies in crops through simple leaf
image analysis.
With the growing accessibility of smartphones and affordable imaging devices, farmers now
have the ability to capture high-quality images of their crops directly from the field. Combining
this accessibility with deep learning models enables the development of mobile or web-based
applications that provide real-time deficiency diagnosis. Such systems not only reduce
dependency on expert agronomists but also empower farmers with immediate, data-driven
insights, leading to timely corrective actions, optimized fertilizer usage, improved crop yield,
and enhanced sustainability in agriculture.

3
Chapter 2

Problem Statement

The accurate identification of nutritional deficiencies in crops is vital for ensuring plant
health, improving agricultural yield, and promoting food security. Traditional methods
such as expert visual inspection and laboratory soil or tissue analysis are costly, time-
consuming, and often inaccessible to farmers in rural and underdeveloped areas. There
is a pressing need for an automated, scalable solution that can diagnose nutritional
deficiencies quickly and accurately based on visual symptoms observed in crop leaves.

Description :

Plants exhibit distinct visual symptoms when suffering from nutrient deficiencies, including
discoloration (yellowing, purpling, browning), stunted growth, leaf deformation, and necrosis.
However, these symptoms can vary across crop types and environmental conditions, making
manual identification challenging even for experienced agronomists. The process is further
complicated by factors such as varying light conditions, background noise in images, different
leaf stages, and co-occurring plant diseases or pests. To overcome these challenges, the use
of deep learning—specifically Convolutional Neural Networks (CNNs)—provides a powerful
solution by automatically learning hierarchical patterns in leaf images without the need for
manual feature extraction. This project proposes the development of a deep learning-based
system capable of classifying different types of nutrient deficiencies from leaf images,
enabling real-time, field-level diagnosis. By leveraging accessible technologies like
smartphones and integrating the solution into user-friendly platforms, the system aims to
democratize access to expert-level diagnosis, thus promoting precision agriculture, reducing
resource wastage, optimizing fertilizer use, and supporting global food security initiatives.

4
Chapter 3

Dataset Description

For the successful training and evaluation of the deep learning model, a diverse and well-
annotated dataset of crop leaf images is essential. The dataset used in this project
consists of high-quality images of crop leaves exhibiting various types of nutritional
deficiencies, as well as healthy leaves for baseline classification. Each image is labeled
according to the specific deficiency it represents, allowing the model to learn visual
patterns associated with different nutrient shortages.
The dataset incorporates variations in lighting conditions, backgrounds, image
resolutions, and crop types to ensure that the model can generalize well to real-world
scenarios. Images are collected from public agricultural datasets, research institutions,
and field surveys to maintain diversity and authenticity.

The To prepare the dataset for deep learning:


• Resizing: All images are resized to 224×224 pixels to standardize input dimensions
for the CNN.
• Normalization: Pixel values are scaled between 0 and 1 for faster convergence during
model training.
• Data Augmentation: Applied to improve model generalization and simulate
real-world variations:
o Random rotations (±30 degrees)
o Horizontal and vertical flips
o Random zooming
o Brightness and contrast adjustments
o Random cropping

5
Chapter 4

Proposed System Architecture

6
Fig.4.1 System Architecture

7
4.1 Working

1. Input Image

• The system accepts an image of a crop leaf uploaded by the user.

• The image can be captured in the field using mobile cameras or uploaded from a
local device.

2. Image Preprocessing
The input image is prepared for clustering through the following steps:

• The input image is resized to a standard resolution (e.g., 224×224 pixels) to maintain
uniformity.

• Pixel values are normalized to a range between 0 and 1 to speed up and stabilize the
learning process.

• If necessary, color adjustments and noise reduction filters are applied to enhance feature
clarity.

3. Data Augmentation (During Training)

• Techniques such as rotation, horizontal/vertical flipping, zooming, and brightness


adjustment are used to artificially expand the training dataset.

• This improves the model’s ability to generalize across different lighting, angles, and
leaf orientations.

4. Feature Extraction using CNN

The preprocessed image is passed through a Convolutional Neural Network (CNN).

Convolutional layers extract important visual patterns such as:

• Discoloration (yellowing, browning)


• Texture changes (roughness, drying)
• Shape deformation (curling, edge burning)

8
5. Classification

• The extracted features are fed into fully connected dense layers.

• The final softmax layer outputs a probability distribution across all defined deficiency
classes (e.g., Nitrogen Deficiency, Magnesium Deficiency, Healthy).

• The class with the highest probability is selected as the final prediction.

6. Output Display

• The predicted nutritional deficiency label is displayed to the user.

• Optionally, a confidence score (e.g., "Potassium Deficiency - 92% confidence") is shown.

• The system may also visualize the affected area on the leaf image using heatmaps in advanced
versions.

7. Interpretation and Guidance

• Based on the detected deficiency, the system can suggest corrective actions

(e.g., fertilizer recommendations) if integrated with an agronomy knowledge base.

9
Chapter 5

Algorithms

In this project, deep learning techniques were utilized to classify crop images into their
corresponding nutritional deficiency categories. A Convolutional Neural Network (CNN)
architecture was selected for its effectiveness in capturing complex visual features such
as color changes, texture variations, and shape deformations. Unlike traditional
classification methods like K-Nearest Neighbors (KNN) or Support Vector Machines
(SVM), deep learning models are capable of learning non-linear mappings and subtle
variations in image patterns, which is essential when predicting from a wide set of
deficiency types (e.g., Nitrogen, Phosphorus, Potassium deficiencies).
The model was trained on a dataset containing images of healthy and nutrient-deficient
crops. The images were resized, normalized, and passed through multiple convolutional
layers, allowing the network to learn rich feature representations. The goal was to make
accurate predictions of deficiency types, even when symptoms are visually similar but
semantically different (e.g., “Nitrogen Deficiency” vs. “Magnesium Deficiency”).

The key algorithm used is:


1. Convolutional Neural Network (CNN)::
A Convolutional Neural Network is a type of deep feedforward artificial neural network
specifically designed for image data. CNNs are particularly effective at learning spatial
hierarchies of patterns, making them ideal for detecting the visual symptoms associated with
crop deficiencies.

In this project, the CNN is composed of multiple convolutional layers, pooling layers,
dropout regularization, and a softmax-based output layer. Each convolutional layer enables
the model to learn higher-order interactions among the pixel intensities. The final output
layer provides a probability distribution over all deficiency classes, enabling accurate

10
classification.

Model Architecture and Training Details :

The model architecture consisted of the following layers:

• Input Layer: Accepts images resized to (224 × 224 × 3) pixels with normalized values
between 0 and 1.

• Convolutional Layer (32 filters, 3x3, ReLU): Detects basic features like edges and
color changes.

• MaxPooling Layer (2x2): Reduces the spatial dimension to retain essential features
while lowering computational load.

• Convolutional Layer (64 filters, 3x3, ReLU): Detects more complex patterns like
leaf texture changes.

• MaxPooling Layer (2x2): Further dimensionality reduction.

• Dropout Layer (0.3): Prevents overfitting by randomly deactivating 30% of the


neurons during training.

• Flatten Layer: Converts 2D feature maps into 1D feature vectors.

• Dense Layer (128 neurons, ReLU): Learns higher-level combinations of features.

• Dropout Layer (0.4): Further regularization to improve generalization.

• Output Layer (Softmax): A fully connected dense layer where the number of
neurons equals the number of deficiency classes. Softmax activation outputs
probabilities for each class, and the class with the highest probability is selected.

Training Procedure:

• Data Normalization: All pixel values were scaled between 0 and 1 to ensure
uniform learning across image features.

• Label Encoding: All deficiency classes were encoded into integer labels and then one-

11
hot encoded for use with the softmax output layer.

• Data Augmentation: To handle limited data and avoid overfitting, random


transformations such as flipping, rotation, zooming, and brightness adjustment were
applied.

• Train-Test Split: The dataset was split into training and testing sets using an 80:20
ratio, ensuring that class distribution is maintained.

• Loss Function: The model was trained using Categorical Crossentropy with label

smoothing. Label smoothing helps improve generalization by preventing the model


from becoming overly confident.

• Optimizer: Adam optimizer was used due to its adaptive learning rate and efficient
convergence behavior.

• Regularization: Dropout layers were applied between layers to prevent overfitting.

• Learning Rate Scheduling: ReduceLROnPlateau was used to decrease the learning


rate when the model’s validation loss plateaued.

• Early Stopping: Training was stopped early if no improvement in validation loss was
observed for a fixed number of epochs, ensuring efficient training and avoiding
overfitting.

• Epochs & Batch Size: The model was trained over a maximum of 100–150 epochs,
with early stopping enabled. A batch size of 32 was used to ensure stable learning.

• Evaluation Metrics: Accuracy, precision, recall, and F1-score were computed on the
test set. The model consistently achieved 85–90% accuracy, successfully generalizing
to unseen images.

• This configuration allowed the model to effectively learn the relationship between
visual symptoms and nutrient deficiencies, handling complex patterns such as yellowing,
browning, spotting, and stunted growth. The resulting model was integrated into an
application that predicts the type of nutrient deficiency from uploaded crop images,
supporting real-time and accurate field diagnosis for farmers and agronomists.

12
Chapter 6

Model Performance

To evaluate the effectiveness of the nutritional deficiency detection model, standard


classification metrics such as accuracy, precision, recall, and F1-score were used. These
metrics provide a comprehensive view of how well the model is able to classify crop images
into their corresponding deficiency categories.

The performance of the implemented Convolutional Neural Network (CNN) model is summarized
below:

Convolutional Neural Network (CNN):

• Accuracy: 88 %

• Precision: 87 %

• Recall: 86 %

• F1-Score: 86.5 %

The model achieved high accuracy in predicting different types of nutrient deficiencies from crop images
and demonstrated good generalization on unseen data, effectively handling both clear and subtle visual
symptoms across different deficiency classes.

13
Chapter 7

Results

The The developed deep learning model for nutritional deficiency detection was successfully
trained and evaluated on a comprehensive dataset of crop images showing various deficiency
symptoms.
The final model achieved an accuracy of approximately 88% on the test dataset,
demonstrating strong performance in predicting nutritional deficiencies from crop images,
even when symptoms were visually subtle or overlapping between different deficiency types.
The system was further extended to accept real-time images captured by users, either
through file uploads or mobile devices. These images were processed through the trained
CNN model, which accurately predicted the corresponding deficiency categories.
• The output includes both the predicted deficiency label and a confidence score for
better interpretation.
• The project supports real-time prediction on crop images uploaded from the user’s
device.
• The use of deep learning techniques, including data augmentation, label smoothing,
dropout regularization, and learning rate scheduling, significantly improved model
generalization and stability.
Overall, the results confirm that the proposed approach can effectively classify crop images
into meaningful nutritional deficiency categories with high accuracy and visual relevance,
making it a valuable tool for smart farming and agronomy applications.

14
15
Chapter 8

Analysis

The results of this project confirm that deep learning-based approaches — particularly the
use of Convolutional Neural Networks (CNNs) — can be effectively applied to detect and
classify nutritional deficiencies in crop images. The model successfully learned to identify
complex visual patterns such as discoloration, texture changes, and leaf deformation, which
are critical indicators of nutrient stress.
Although traditional methods in agriculture rely heavily on manual inspection and expert
judgment, this project demonstrates how foundational concepts from deep learning — such
as hierarchical feature extraction, spatial pattern recognition, and data-driven representation
learning — can be adapted to solve practical problems in precision farming and crop health
monitoring.
By transforming raw image data into structured, meaningful predictions, the system provides
an automated, accurate, and scalable solution for early detection of nutrient deficiencies. This
approach not only reduces the reliance on manual diagnosis but also improves the speed and
consistency of crop management decisions.
The analysis highlights the effectiveness, usability, and potential scalability of the model
within a broader deep learning and smart agriculture context, paving the way for future
enhancements such as multi-disease detection and real-time field deployment.

16
1. Effectiveness of CNN in Feature Extraction:

The use of Convolutional Neural Networks (CNNs) allowed for efficient extraction of spatial
and color-based features from crop images, such as patterns of discoloration, leaf edge
damage, and vein anomalies. This deep learning approach reduced the complexity of image
analysis by automatically identifying key visual symptoms without the need for.
CNNs provided reliable results across various types of crop images, including natural
variations in lighting, background noise, and different stages of plant growth. The learned
feature maps offer a compact yet rich representation of the health condition of the crops.

2. Visual Representation of Prediction Results:

Instead of simply outputting textual predictions, the system provides a clean and intuitive
result by showing the predicted deficiency class along with a confidence score.
This approach helps users quickly understand the diagnosis without requiring deep
technical knowledge. In an advanced version, techniques like Grad-CAM visualization
could be integrated to highlight the specific areas of the leaf that influenced the model's
prediction, making the system even more transparent and informative for agricultural
experts and farmers.

3. Interpretability and Simplicity:

One of the major strengths of this system is its interpretability and ease of use. The
predicted deficiency labels are easy to understand, allowing users to instantly verify the
By focusing on clear prediction outputs rather than complicated spatial annotations or
segmentation, the system ensures a clutter-free and user-friendly experience, aligning
perfectly with the goal of early, practical field diagnosis.

4. Opportunities for Enhancing Deficiency Detection:

The In the current version of the project, the system classifies images into predefined nutrient
17
deficiency classes. However, the system could be enhanced by:
• Incorporating multi-label classification to detect multiple deficiencies simultaneously.
• Adding severity estimation (mild, moderate, severe deficiency) based on the intensity
of symptoms.
• Expanding the dataset to cover a broader range of crops and environmental
conditions, thereby increasing robustness and real-world applicability.
Adding these enhancements would transform the system from a basic classifier into a more
insightful and practical agricultural advisory tool.

5. Scalability and Performance:

The system performs efficiently even with high-resolution crop images, thanks to
preprocessing steps such as resizing images to 224×224 pixels before feeding them into
This ensures that computation remains lightweight and fast, without significantly
Overall, the system offers a strong balance between speed, accuracy, and usability,
making it highly suitable for real-world deployment in agricultural advisory services,
mobile farming apps, and smart farming platforms.

18
Chapter 9

Conclusion

In this project, we successfully developed and evaluated a deep learning-based system


for nutritional deficiency detection in crop images. The approach utilized supervised
learning through Convolutional Neural Networks (CNNs) to identify and classify various
types of nutrient deficiencies based on visual symptoms present in crop leaves.
By adopting key deep learning principles such as hierarchical feature extraction, spatial
pattern recognition, and transformation of raw pixel data, the system was able to
accurately predict nutrient stress conditions. The model classified deficiencies like
Nitrogen, Phosphorus, and Potassium based on visual cues, achieving high accuracy and
generalization across unseen test images.
The system effectively provided both textual (deficiency label and confidence score) and
visual (crop image feedback) outputs, enabling users to easily interpret crop health status
in a compact and meaningful way.
The project also emphasized the importance of preprocessing steps such as image
resizing, normalization, and data augmentation, which significantly improved
computational efficiency and model performance. These steps align closely with best
practices in deep learning pipelines.
Overall, the results demonstrate that CNN-based models can serve as powerful tools in
agricultural diagnostics, enabling early detection of nutritional deficiencies. The success
of this system opens up opportunities for future expansions, including multi-disease
detection, real-time mobile app deployment, and integration with smart farming
platforms to support precision agriculture practices.

19
Chapter 10

Future Scope

This project establishes a practical and effective method for detecting nutritional deficiencies
in crops using deep learning techniques. Although the current system performs successfully,
several opportunities exist for enhancing its accuracy, scalability, and real-world impact. The
following directions outline potential future developments:

1. Integration of Multi-Disease Detection:


Currently, the system focuses on identifying nutritional deficiencies. Future versions could be
extended to detect a broader range of plant issues, such as fungal infections, bacterial
diseases, pest damage, and viral infections, enabling comprehensive crop health monitoring.

2. Severity Estimation:
In addition to classification, the system could be enhanced to assess the severity of the
deficiency (mild, moderate, severe). This would allow farmers to prioritize interventions based
on the urgency and intensity of the detected symptoms.

3. Development of a Mobile Application:


Deploying the trained model into a lightweight mobile application will allow farmers to
instantly diagnose plant health by simply taking a picture, making the solution highly
accessible, even in remote areas without sophisticated infrastructure.

4. Real-Time Field Monitoring Using Drones :


Future systems can integrate drone-based imaging to capture crop health over large fields,
enabling early detection of deficiencies on a large scale, reducing manual labor, and
supporting precision agriculture techniques.

20
5. Extension to More Crops and Varieties :
Expanding the dataset to include multiple crop species, different leaf stages, and region-
specific varieties will make the system more versatile and applicable across a wider range of
farming environments.

By pursuing these directions, the system can evolve into a robust, scalable, and intelligent
agricultural advisory platform that promotes healthier crops, higher yields, and more sustainable
farming .

21
Chapter 11

Reference
1. Sharma, H., & Kaur, J. (2021). Detection of Nutritional Deficiencies in Crop Plants Using
Deep Learning Techniques: A Review. Journal of Artificial Intelligence Research &
Advances, 8(2), 45–52.
2. Kamilaris, A., & Prenafeta-Boldú, F. X. (2018). Deep learning in agriculture: A survey.
Computers and Electronics in Agriculture, 147, 70–90.
https://doi.org/10.1016/j.compag.2018.02.016
3. Yadav, S. K., et al. (2020). Identification of Plant Nutrient Deficiency Using Deep
Learning Techniques: A Case Study on Tomato Plants. Procedia Computer Science, 167,
2201–2210. https://doi.org/10.1016/j.procs.2020.03.272
4. Dhiman, P., & Khanna, A. (2022). Nutrient Deficiency Detection in Crop Leaves Using
Image Processing and Convolutional Neural Networks. International Journal of Advanced
Computer Science and Applications, 13(5), 478–485.
5. PlantVillage Dataset, Penn State University: https://plantvillage.psu.edu/
6. TensorFlow Documentation: https://www.tensorflow.org/
7. Keras Documentation: https://keras.io/
8. OpenCV-Python Documentation: https://docs.opencv.org/
9. Pandas Documentation: https://pandas.pydata.org/
10. Matplotlib Documentation: https://matplotlib.org/stable/contents.html

22

You might also like