You are on page 1of 33

CROP DISEASE DETECTION

A PROJECT REPORT

Submitted in partial fulfillment of the requirements for the award of the degree of

Bachelor of Technology

in

COMPUTER SCIENCE AND ENGINEERING

(21331A0515) (21331A0517)
BALLI AKANKSHA BANTUPALLI VARSHITHA
(21331A0539) (22335A0501)
DAVID JOSHUA RAJ G ADARI PHANENDRA

Under the Supervision of


Dr. P. Rama Santosh Naidu
Senior Assistant Professor

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


MAHARAJ VIJAYARAM GAJAPATHI RAJ COLLEGE OF ENGINEERING (Autonomous)
(Approved by AICTE, New Delhi, and permanently affiliated to JNTUGV, Vizianagaram), Listed u/s 2(f)
& 12(B) of UGC Act 1956.
Vijayaram Nagar Campus, Chintalavalasa,Vizianagaram-535005, Andhra Pradesh
APRIL, 2024

1
CERTIFICATE

This is to certify that the project report entitled “CROP DISEASE DETECTION” being
submitted by B.Akanksha(21331A0515), B.Varshitha(21331A0517), David Joshua Raj
G(21331A0537), A.Phanendra(22335A0501), B.Prudhvi Raj(19335A0503) in partial fulfillment
for the award of the degree of “Bachelor of Technology” in Computer Science and
Engineering is a record of bonafide work done by them under my supervision during the
academic year 2021-2022.

Dr. P. Rama Santosh Naidu Dr. T. Pavan Kumar


Senior Assistant professor, Associate Professor,
Supervisor, Head of the Department,
Department of CSE, Department of CSE,
MVGR College of Engineering(A), MVGR College of Engineering(A),
Vizianagaram. Vizianagaram.

External Examiner

2
DECLARATION

We hereby declare that the work done on the dissertation entitled “CROP DISEASE
DETECTION” has been carried out by us and submitted in partial fulfilment for the award of
credits in Bachelor of Technology in Computer Science and Engineering of MVGR College of
Engineering (Autonomous) and affiliated to JNTUGV, Vizianagaram. The various contents
incorporated in the dissertation have not been submitted for the award of any degree of any other
institution or university.

3
Bachelor of Technology 1
COMPUTER SCIENCE AND ENGINEERING 1
BY 1
Under the Supervision of 1
Dr. P. Rama Santosh Naidu 1
MAHARAJ VIJAYARAM GAJAPATHI RAJ COLLEGE OF ENGINEERING (Autonomous) 1
(Approved by AICTE, New Delhi, and permanently affiliated to JNTUGV, Vizianagaram),
Listed u/s 2(f) & 12(B) of UGC Act 1956. 1
Vijayaram Nagar Campus, Chintalavalasa,Vizianagaram-535005, Andhra Pradesh 1
APRIL, 2024 1
CHAPTER 1 2
INTRODUCTION 2
1.1 Identification of the seriousness of the problem 3
1.2 Problem definition 3
1.3 Objective 3
1.4 Existing models 3
CHAPTER 2 4
LITERATURE SURVEY 4
CHAPTER 3 5
THEORETICAL BACKGROUND 5
3.1 Machine learning Vs Deep learning 5
3.1.1 What is Machine Learning? 5
3.1.2 What is Deep Learning? 5
3.1.3 Why Deep Learning? 5
3.2 Image Recognition 6
3.2.1 What is image recognition? 6
3.2.2 How does image recognition work? 6
3.3 Convolutional Neural Network 7
3.3.1 What is Convolutional Neural Network? 7
3.3.2 CNN architecture 8
3.4 Google Net Architecture-CNN Model 11
3.4.1 Features of GoogleNet: 11
3.4.2 Global Average Pooling : 12
3.4.3 Inception Module: 12
3.4.4 Auxiliary Classifier for Training: 12
3.5 Metrics 13
3.5.1 Accuracy 13
3.5.2 Loss Function 13
CHAPTER 4 14
APPROACH DESCRIPTION 14
4.1. Approach Flow 14
Model Build 14
Framework Build 16

4
Interface 16
Backend 17
CHAPTER 5 18
DATASET DESCRIPTION 18
Sample Images 18
CHAPTER 6 20
RESULT 20
CHAPTER 7 23
CONCLUSIONS 23
REFERENCES 24
Appendix: A- Packages, Tools used & Working Process 25
Python Programming language 25
Libraries 25
NumPy 25
Pandas 26
Matplotlib 26
Sklearn 27
Tools Used Jupyter Notebooks: 29
Appendix: B 30
Sample Source Code with Execution 30
Paper Publications (if any) 31
Attach the complete published paper 31

5
ABSTRACT
Challenges faced in accurately identifying crop diseases, leads to substantial financial
losses and imposes economic burdens on both individual farmers and the broader agricultural
sector. The development of a robust and user-friendly system is needed which would empower
farmers with effective tools for disease detection, enabling them to make informed decisions and
take prompt actions to safeguard their crops. Here, we create a framework model that can be
accessed by the farmer which helps in the early detection of crop diseases. The model makes use
of the CNN computational algorithm which is used to train the machine learning model. The
farmer takes the image of the crop leaf and uploads it, the model will detect the type of disease in
the leaf if present, and in turn, will receive a status on the health of the plant. This system helps
farmers gain a swift and accurate means of identifying issues in their crop and they can timely
act on the condition caused before the crop rots away. It not only protects the crops but also
enhances overall agricultural productivity and food availability.

1
CHAPTER 1
INTRODUCTION
India, often referred to as an agrarian economy, is home to millions of farmers who play a vital
role in sustaining the nation's food security and rural livelihoods. With agriculture being the 34
primary source of livelihood for a significant portion of the population, farmers in India face a
myriad of challenges and opportunities that shape their lives and the agricultural landscape of the
country.India, the world's largest producer of bananas, holds this golden fruit close to its heart.
However, beneath the vibrant abundance lies a constant battle – the fight against a multitude of
diseases that threaten the livelihood of millions of banana farmers. These silent threats not only
impact yield but also erode profits and destabilize the entire banana cultivation ecosystem.These
diseases have a cascading effect. Reduced yields translate to lower income for farmers. The
quality of the harvested fruit also suffers, fetching lower prices in the market. Additionally, the
fight against these diseases requires fungicides and other control measures, adding to the
financial burden on farmers.

Figure 1.1: Leading producers of bananas worldwide, by country(in metric tons).

Figure 1.1 shows that India is the top producer of banana crops as of surveys done in 2024
where India produced a staggering 31000 metric tons of banana produce followed by China and
Indonesia.

2
1.1 Identification of the seriousness of the problem

Banana cultivation is a significant source of livelihood for millions of smallholder farmers in


India. Any threat to the crops, such as diseases or market fluctuations, directly affects the income
and food security of these farmers and their families. When their crops are affected by diseases
numerous challenges arise for farmers like reduced yields, poor fruit quality, and plant mortality
diminish farm profitability and threaten their livelihoods, particularly for smallholder farmers
heavily reliant on banana cultivation. The Indian Council of Agricultural Research (ICAR)
conducted a survey soon after farmers in Bihar and Uttar Pradesh complained of a mysterious
disease in 2017. Their initial mapping shows Panama Wilt disease has so far infected over 3,000
ha of plantations in Bihar and 8,474 ha in Uttar Pradesh. Worse, the outbreak has hit India, the
largest producer and consumer of the fruit, at a time when it was getting ready to take on the
export market. By 2018, the country’s total area under banana had doubled from 470,000 ha in
2000, says a market review published by FAO in February 2020. This disease forced many
farmers to give up banana altogether.

1.2 Problem definition

Farmers face financial losses due to difficulty in identifying crop diseases. A user-friendly
system is crucial for accurate detection, empowering farmers to make informed decisions and
protect their crops promptly before they rot and the disease may also spread to other crops.

1.3 Objective

Our objective is to build a user-friendly model that can identify the disease by merely taking an
image of it. This way the farmers gain a swift and accurate means of identifying issues in their
crop and they can timely act on the condition caused before the crop rots away, or the disease
gets spread to the nearby crops.

1.4 Existing models

There are many researchers and models previously and some are still going on to identify skin
diseases in different regions of a human being. But it doesn’t focus on certain issues to be
analyzed like family history, intensity of disease etc., and also prediction and classification with
good accuracy is also not so good.

3
CHAPTER 2
LITERATURE SURVEY

[1]Vision-based artificial intelligence (AI), machine learning (ML), and deep learning (DL)
techniques offer promising solutions. Conventional machine learning algorithms can’t learn
directly from the raw data. They need careful engineering to carefully extract features from raw
data and highly classified domain expertise, which are further used in internal representations to
identify these feature patterns. In Deep Learning, the first step of the machine learning procedure
is not present. This step is automated in deep learning. Deep Learning can extract new features
automatically from raw data.
[2]By applying ML techniques and models to image processing, it is possible to automate tasks
that were previously performed manually. In this context, and as an example, we have quality
control processes in production lines, where ML allows for the identification of defects in
products quickly and accurately, eliminating the need for human inspection, leading to an
increase in process efficiency, as well as to a reduction in errors inherent to the human factor and
costs.
[3] A systematic literature review (SLR) analyzed 176 studies from major academic databases,
focusing on methods for disease detection in various crops. Hyperspectral imagery and
vision-centered approaches were commonly employed, with Support Vector Machines (SVMs)
and Logistic Regression (LR) classifiers showing improved accuracy.
[4] Make use of an unlabeled instance of color histogram feature vectors (or a combination of
color histogram feature vectors with shape feature vectors) to a label. They make use of multiple
classifiers such as Nearest Neighbors, Decision tree, Random forest, Extremely Randomized
Trees.
[5] proposed a BananaSqueezeNet model performed exceptionally well in diagnosing banana
leaf diseases from the images with an overall accuracy of 96.25%, precision of 96.53%, recall of
96.25%, specificity of 98.75%, F1-score of 96.17%, and MCC of 95.13%. The
BananaSqueezeNet model outperforms some state-of-the-art convolutional neural networks that
include EfficientNetB0, MobileNetV3, ResNet-101, ResNet-50, InceptionNet-V3, and VGG16.

4
CHAPTER 3
THEORETICAL BACKGROUND

3.1 Machine learning Vs Deep learning

3.1.1 What is Machine Learning?

Machine learning is an application of AI that enables systems to learn and improve from
experience without being explicitly programmed. Machine learning focuses on developing
computer programs that can access data and use it to learn for themselves. Machine learning is
something that is capable to imitate the intelligence of the human behavior. Machine learning is
used to perform complex tasks in a way that humans solve the problems. Machine learning can
be descriptive it uses the data to explain, predictive, and prescription.

3.1.2 What is Deep Learning?

Deep learning is the subset of the machine learning technique. It is also known as deep neural
network because it uses the architecture of neural network. Deep learning eliminates some of
data preprocessing. This has one input layer and one output layer and more than one hidden
layer. This uses labeled data for training deep learning prediction is more accurate. Deep learning
is an element of data science, it includes statistics and predictive modeling. This approach is
beneficial to the person whose task are related to collecting, analyzing large amounts of data.

3.1.3 Why Deep Learning?

In the early researches, machine learning methods are used for image classification tasks. SVM
method can be used in multilabel image classification. Decision tree was also used for image
classification using hyperspectral images of plots of different tillage and received a 0.89
accuracy on classify tillage. In these traditional machine learning methods, it will firstly select
and construct the corresponding features from samples by manual. Then, the machine learning
process will work to fit these features to solve the classification tasks. However, these methods
have two main problems. One is that all the feature engineering is done by manually. This
requires operator to have a corresponding and enough background knowledge. Besides this,
when facing a big data sample, the cost of selecting features by manually will increase. Secondly,
the features selected manually are always the shallow features based on statistical methods.

5
Some deeply and contained more valid information features cannot be identified by manually
selecting. This reduces the accuracy of machine learning methods. Deep learning methods solve
above problems.Deep learning models are composed of multiple hidden layers. Each layer in
model has activation function. It is possible for deep learning model to learn a high-level abstract
information from the samples automatically according to the hidden layers. In this way, deep
learning methods have a significant advantage on feature processing rather than manual
processing. Therefore, in recent years, there have been many papers topic about the exploration
and improvement of deep learning. In image classification task, there are also many applications
of deep learning.

3.2 Image Recognition

3.2.1 What is image recognition?

Image recognition, in the context of machine vision, is the ability of software to identify objects,
places, people, writing and actions in digital images. Computers can use machine vision
technologies in combination with a camera and artificial intelligence (AI) software to achieve
image recognition.

3.2.2 How does image recognition work?

While animal and human brains recognize objects with ease, computers have difficulty with this
task. There are numerous ways to perform image processing, including deep learning and
machine learning models. However, the employed approach is determined by the use case. For
example, deep learning techniques are typically used to solve more complex problems than
machine learning models, such as worker safety in industrial automation and detecting cancer
through medical research. Typically, image recognition entails building deep neural networks
that analyze each image pixel. These networks are fed as many labeled images as possible to
train them to recognize related images.
This process is typically divided into the following three steps:

1. A data set with images and their labels is gathered. For instance, a dog image needs to be
identified as a "dog" or as something that people recognize.

6
2. A neural network will be fed and trained on these images. Convolutional neural network
processors perform well in these situations, as they can automatically detect the
significant features without any human supervision. In addition to multiple perceptron
layers, these networks also include convolutional layers and pooling layers.
3. Image recognition algorithms compare three-dimensional models and appearances from
various perspectives using edge detection. They're frequently trained using guided
machine learning on millions of labeled images.

Figure 3.1 Image Classification model architecture.

3.3 Convolutional Neural Network

3.3.1 What is Convolutional Neural Network?

A Convolutional Neural Network (CNN) is a type of Deep Learning neural network architecture
commonly used in Computer Vision. Computer vision is a field of Artificial Intelligence that
enables a computer to understand and interpret the image or visual data. When it comes to
Machine Learning, Artificial Neural Networks perform really well. Neural Networks are used in
various datasets like images, audio, and text. Different types of Neural Networks are used for
different purposes, for example for predicting the sequence of words we use Recurrent Neural

7
Networks more precisely an LSTM, similarly for image classification we use Convolution
Neural networks.
In a regular Neural Network there are three types of layers:
Input Layers: It’s the layer in which we give input to our model. The number of neurons in this
layer is equal to the total number of features in our data (number of pixels in the case of an
image).
Hidden Layer: The input from the Input layer is then fed into the hidden layer. There can be
many hidden layers depending on our model and data size. Each hidden layer can have different
numbers of neurons which are generally greater than the number of features. The output from
each layer is computed by matrix multiplication of the output of the previous layer with learnable
weights of that layer and then by the addition of learnable biases followed by activation function
which makes the network nonlinear.
Output Layer: The output from the hidden layer is then fed into a logistic function like sigmoid
or softmax which converts the output of each class into the probability score of each class.
The data is fed into the model and output from each layer is obtained from the above step is
called feedforward, we then calculate the error using an error function, some common error
functions are cross-entropy, square loss error, etc. The error function measures how well the
network is performing. After that, we backpropagate into the model by calculating the
derivatives. This step is called Backpropagation which basically is used to minimize the loss.

3.3.2 CNN architecture

Convolutional Neural Network consists of multiple layers like the input layer, Convolutional
layer, Pooling layer, and fully connected layers.

Figure 3.2 Layers in a CNN model.

8
The Convolutional layer applies filters to the input image to extract features, the Pooling layer
downsamples the image to reduce computation, and the fully connected layer makes the final
prediction. The network learns the optimal filters through backpropagation and gradient descent.
Activation Layer: By adding an activation function to the output of the preceding layer,
activation layers add nonlinearity to the network. it will apply an element-wise activation
function to the output of the convolution layer. Some common activation functions are RELU:
max(0, x), Tanh, Leaky RELU, etc. The volume remains unchanged hence output volume will
have dimensions 32 x 32 x 12.
Pooling layer: This layer is periodically inserted in the covnets and its main function is to reduce
the size of volume which makes the computation fast reduces memory and also prevents
overfitting. Two common types of pooling layers are max pooling and average pooling. If we use
a max pool with 2 x 2 filters and stride 2, the resultant volume will be of dimension 16x16x12.

Figure 3.3 Describing how max-pooling occurs.


Flattening: The resulting feature maps are flattened into a one-dimensional vector after the
convolution and pooling layers so they can be passed into a completely linked layer for
categorization or regression.
Fully Connected Layers: It takes the input from the previous layer and computes the final
classification or regression task.

9
Figure 3.4 Shows how the fully connected layer classifies the output.
Output Layer: The output from the fully connected layers is then fed into a logistic function for
classification tasks like sigmoid or softmax which converts the output of each class into the
probability score of each class.

3.4 Google Net Architecture-CNN Model

Google Net (or Inception V1) was proposed by research at Google (with the collaboration of
various universities) in 2014 in the research paper titled “Going Deeper with Convolutions”. This
architecture was the winner at the ILSVRC 2014 image classification challenge. It has provided
a significant decrease in error rate as compared to previous winners AlexNet (Winner of
ILSVRC 2012) and ZF-Net (Winner of ILSVRC 2013) and significantly less error rate than
VGG (2014 runner up). This architecture uses techniques such as 1×1 convolutions in the middle
of the architecture and global average pooling.

3.4.1 Features of GoogleNet:

The GoogLeNet architecture is very different from previous state-of-the-art architectures such as
AlexNet and ZF-Net. It uses many different kinds of methods such as 1×1 convolution and
global average pooling that enables it to create deeper architecture. In the architecture, we will
discuss some of these methods:
1×1 convolution : The inception architecture uses 1×1 convolution in its architecture. These
convolutions used to decrease the number of parameters (weights and biases) of the architecture.
For Example, If we want to perform 5×5 convolution having 48 filters without using 1×1
convolution as intermediate:

10
Figure 3.5.1 5X5 convolution without 1X1 convolution
Total Number of operations : (14 x 14 x 48) x (5 x 5 x 480) = 112.9 M
With 1×1 convolution :

Figure 3.5.2 5X5 convolution with 1X1 convolution as intermediate


(14 x 14 x 16) x (1 x 1 x 480) + (14 x 14 x 48) x (5 x 5 x 16) = 1.5M + 3.8M = 5.3M which is
much smaller than 112.9M.

3.4.2 Global Average Pooling :

In the architecture such as AlexNet, the fully connected layers are used at the end of the network.
These fully connected layers contain the majority of parameters of many architectures that
causes an increase in computation cost.
In GoogLeNet architecture, there is a method called global average pooling is used at the end of
the network. This layer takes a feature map of 7×7 and averages it to 1×1. This also decreases the
number of trainable parameters to 0 and improves the top-1 accuracy by 0.6%

3.4.3 Inception Module:

The inception module is different from previous architectures such as AlexNet, ZF-Net. In this
architecture, there is a fixed convolution size for each layer. In the Inception module 1×1, 3×3,
5×5 convolution and 3×3 max pooling performed in a parallel way at the input and the output of
these are stacked together to generated final output. The idea behind that convolution filters of
different sizes will handle objects at multiple scale better.

11
3.4.4 Auxiliary Classifier for Training:

Inception architecture used some intermediate classifier branches in the middle of the
architecture, these branches are used during training only. These branches consist of a 5×5
average pooling layer with a stride of 3, a 1×1 convolutions with 128 filters, two fully connected
layers of 1024 outputs and 1000 outputs and a softmax classification layer. The generated loss of
these layers added to total loss with a weight of 0.3. These layers help in combating gradient
vanishing problem and also provide regularization.
Model Architecture:

Figure 3.6 Layer by Layer architectural details of GoogLeNet.


3.5 Metrics
3.5.1 Accuracy
Accuracy is the most intuitive performance measure and it is simply a ratio of correctly predicted
observation to the total observations.
Accuracy = TP+TN/TP+FP+FN+TN
3.5.2 Loss Function
The purpose of loss functions is to compute the quantity that a model should seek to minimize
during training.We utilize categorical cross-entropy loss in multi-class classification tasks with
more than two mutually exclusive classes. Similarly to the binary, this type of cross-entropy loss
function quantifies the dissimilarity between the predicted probabilities and the true categorical
labels

12
CHAPTER 4
APPROACH DESCRIPTION

4.1. Approach Flow

Model Build

1. A proper dataset with a maximum number of disease classes is selected which will be
used to train the model.
2. We feed this data to the keras module from the TensorFlow library which is helps in
handling the layers without worrying about the pipeline. We do this by passing the data to
the keras.preprocessing.image_dataset_from_directory() function.

3. We extract the class names from the directory

13
4. We split the data into training, validation and test data. Where 80% is given to the
training data, 10% to validation data and 10% to test data..
5. We rescale and resize the data to match the model input schema and also add horizontal
and vertical rotations.

6. We then create the structure of our convolutional network according to the parameters set
by the GoogleNet architecture and build our model on the input_shape of the image
which is 512*512*3.

7. We now compile the model to show us the metrics of the compilation where we specify
the accuracy and the loss functions.

14
8. We finally fit the model using 50 epochs the training data and the validation data which
trains the data on the training set and uses the validation data to obtain the accuracy and
loss at each epoch.
9. After training the model we check its accuracy and save the model to the system which
can be used to access the model later.

Framework Build

Interface

We make use of the ReactJS frontend to build a robust system which takes input images from the
useer and passes it to the backend. We perform simple file validations and pass the data to the
endpoint where the prediction will be obtained. The interface is built in such a way which is user
friendly and modern.

15
Backend

We make use of the FastApi library in the backend to connect the model to the interface and to
also derive the output prediction from the model.

16
CHAPTER 5
DATASET DESCRIPTION

A large dataset of seven different banana classes—Healthy Leaf, Bract Mosaic Virus Disease,
Black Sigatoka, Insect Pest Diseases, Moko Disease, Panama Disease, and Yellow Sigatoka—is
shown in order to create machine vision-based algorithms. There are 408 images of bananas in
all, taken in actual fields. Then, in order to expand the number of data points, shifting, flipping,
zooming, shearing, brightness enhancement and rotation techniques are used to create a total of
2856 augmented images from these original images. This dataset is obtained from [6] which was
used to train the model on each of the seven classes mentioned. The size of each image is
512*512px.

Sample Images

(a)Image of black sigatoka disease

17
(b)Image of Insect Pest Disease

(c)Image of Moko Disease

(d) Image of Bract Mosaic Virus Disease

18
CHAPTER 6
RESULT

HOME PAGE

DETECTION PAGE

19
UPLOADING IMAGE

PREDICTION RESULT

20
ABOUT PAGE

CONTACT PAGE

21
CHAPTER 7
CONCLUSIONS
In conclusion, the GoogleNet model designed for detecting banana crop diseases presents a
significant advancement in agricultural technology. Through its intricate architecture and deep
learning capabilities, it demonstrates impressive accuracy in identifying various diseases
affecting banana crops. By leveraging large datasets and sophisticated algorithms, this model
offers farmers and agricultural experts a powerful tool for early detection and intervention,
ultimately aiding in the mitigation of crop loss and ensuring food security. As we continue to
refine and optimize such models, their potential to revolutionize agricultural practices and
contribute to sustainable farming practices becomes increasingly evident. With further
development and integration into agricultural systems, GoogleNet and similar models hold
promise for enhancing productivity, reducing environmental impact, and fostering resilience in
global food production systems.

Moreover, the scalability and accessibility of such AI-driven solutions hold promise for broader
adoption across diverse agricultural regions worldwide. By offering a user-friendly interface and
integrating with existing farming technologies, the GoogleNet model can empower farmers with
actionable insights, irrespective of their technological expertise. This democratization of
advanced agricultural technologies has the potential to narrow the productivity gap between
large-scale commercial farms and smallholder farmers, thereby contributing to inclusive
agricultural development and rural livelihood improvement.

22
REFERENCES
[1]https://dl.acm.org/doi/fullHtml/10.1145/3573428.3573691#:~:text=It%20is%20widely%20use
ful%20in,classification%20have%20been%20greatly%20improved.
[2]https://www.mdpi.com/2313-433X/9/10/207
[3]A_Systematic_Literature_Review_on_Plant_Disease_Detection_Motivations_Classification_
Techniques_Datasets_Challenges_and_Future_Trends
[4]https://www.researchgate.net/publication/333683045_Automated_Vision-Based_Diagnosis_of
_Banana_Bacterial_Wilt_Disease_and_Black_Sigatoka_Disease
[5]Md. Abdullahil Baki Bhuiyan , Hasan Muhammad Abdullah, Shifat E. Arman , Sayed
Saminur Rahman , Kaies Al Mahmud,BananaSqueezeNet: A very fast, lightweight convolutional
neural network for the diagnosis of three prominent banana leaf diseases
[5]https://www.downtoearth.org.in/news/agriculture/on-slippery-peel-can-india-s-banana-cultivat
ion-face-panama-wilt-73470
[6]https://www.kaggle.com/datasets/sujaykapadnis/banana-disease-recognition-dataset
[7]https://pib.gov.in/PressReleaseIframePage.aspx?PRID=1976245#:~:text=Andhra%20Pradesh
%20is%20the%20largest,the%20fiscal%20year%202022%2D23.

23
Appendix: A- Packages, Tools used & Working Process

Python Programming language

Python is a high-level Interpreter based programming language used especially for


general-purpose programming. Python features a dynamic type of system and supports automatic
memory management.
It supports multiple programming paradigms, including object-oriented, functional and
Procedural and also has its a large and comprehensive standard library. Python is of two
versions. They are Python 2 and Python 3.
This project uses the latest version of Python, i.e., Python 3. This python language uses different
types of memory management techniques such as reference counting and a cycle-detecting
garbage collector for memory management. One of its features is late binding (dynamic name
resolution), which binds method and variable names during program execution.
Python's offers a design that supports some of things that are used for functional programming in
the Lisp tradition. It has vast usage of functions for faster results such as filter, map, split, list
comprehensions, dictionaries, sets and expressions. The standard library of python language has
two modules like itertools and functools that implement functional tools taken from Standard
machine learning.

Libraries

NumPy

Numpy is the basic package for scientific calculations and computations used along with Python.
NumPy was created in 2005 by Travis Oliphant. It is open source so can be used freely. NumPy
stands for Numerical Python. And it is used for working with arrays and mathematical
computations.
Using NumPy in Python gives you much more functional behavior comparable to MATLAB
because they both are interpreted, and they both allows the users to quickly write fast programs
as far as most of the operations work on arrays, matrices instead of scalars. Numpy is a library
consisting of array objects and a collection of those routines for processing those arrays.

24
Numpy has also functions that mostly works upon linear algebra, Fourier transform, arrays and
matrices. In general scenario the working of NumPy in the code involves searching, join, split,
reshaping etc. operations using NumPy.
The syntax for importing the NumPy package is → import NumPy as np indicates NumPy is
imported alias np.

Matplotlib

Matplotlib is a library used for plotting in the Python programming language and it is a
numerical mathematical extension of NumPy. Matplotlib is most commonly used for
visualization and data exploration in a way that statistics can be known clearly using different
visual structures by creating the basic graphs like bar plots, scatter plots, histograms etc.
Matplotlib is a foundation for every visualizing library and the library also offers a great
flexibility with regards to formatting and styling plots. We can choose freely certain assumptions
like ways to display labels, grids, legends etc.

Keras

Keras is a deep learning API written in Python and capable of running on top of either JAX,
TensorFlow, or PyTorch.

Keras is:

● Simple – but not simplistic. Keras reduces developer cognitive load to free you to focus
on the parts of the problem that really matter.
● Flexible – Keras adopts the principle of progressive disclosure of complexity: simple
workflows should be quick and easy, while arbitrarily advanced workflows should be
possible via a clear path that builds upon what you've already learned.
● Powerful – Keras provides industry-strength performance and scalability: it is used by
organizations including NASA, YouTube, or Waymo.

FAST API

FastAPI is a modern, fast (high-performance), web framework for building APIs with Python
3.8+ based on standard Python type hints.

25
The key features are:

● Fast: Very high performance, on par with NodeJS and Go (thanks to Starlette and
Pydantic). One of the fastest Python frameworks available.
● Fast to code: Increase the speed to develop features by about 200% to 300%. *
● Fewer bugs: Reduce about 40% of human (developer) induced errors. *
● Intuitive: Great editor support. Completion everywhere. Less time debugging.
● Easy: Designed to be easy to use and learn. Less time reading docs.
● Short: Minimize code duplication. Multiple features from each parameter
declaration. Fewer bugs.

REACT

React (also known as React.js or ReactJS) is a free and open-source front-end JavaScript library
for building user interfaces based on components. It is maintained by Meta (formerly Facebook)
and a community of individual developers and companies.

React can be used to develop single-page, mobile, or server-rendered applications with


frameworks like Next.js. Because React is only concerned with the user interface and rendering
components to the DOM, React applications often rely on libraries for routing and other
client-side functionality. A key advantage of React is that it only rerenders those parts of the
page that have changed, avoiding unnecessary rerendering of unchanged DOM elements.

26
Appendix: B
Sample Source Code with Execution

27
Paper Publications (if any)
Attach the complete published paper

28

You might also like