Practical Review Report
Practical Review Report
LEARNING
A PROJECT REPORT
Submitted by
M.PARAMESH (810018104060)
M.SHANMUGAVEL (810018104087)
of
BACHELOR OF ENGINEERING
in
TIRUCHIRAPALLI-620024
JUNE 2022
i
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
Dr.G.ANNAPOORANI Mr.M.KRISHNAKUMAR
ii
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
DECLARATION
M.PARAMESH (810018104060)
M.SHANMUGAVEL (810018104087)
iii
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
ACKNOWLEDGEMENT
We would like to thank and express our deep sense of gratitude to our project
guide, Mr.M.Krishnakumar, Teaching fellow, Department of Information
Technology BIT Campus, Anna University, Tiruchirappalli, for her valuable
guidance throughout the project. We also extend our thanks to all other teaching
and non-teaching staff for their encouragement and support.
We thank our beloved parents and friends for their full support in the moral
development of this project.
iv
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
ABSTRACT
v
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
TABLE OF CONTENTS
ABSTRACT V
LIST OF FIGURES Ix
LIST OF TABLES X
LIST OF ABBREVIATIONS XI
1 INTRODUCTION 1
2 LITERATURE SURVEY 9
3 SYSTEM ANALYSIS 10
vi
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
3.1.1 Disadvantage 11
3.1.2 Limitation 11
4 SYSTEM SPECIFICATION 18
4.7.1 Python 20
4.8.2 Open CV 30
vii
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
5.2 Goals 36
6 MODULE DISCRIPTION 40
7 CONCLUSION 45
7.1 Conclusion 45
APPENDICES 46
REFERENCES 49
viii
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
LIST OF FIGURES
FIGURE NO TITLE PAGE
NO
ix
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
LIST OF TABLES
x
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
LIST OF ABBREVIATIONS
ML Machine Learning
xi
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
CHAPTER 1
1. INTRODUCTION
Benefits:
Reduce the human labour required to monitor the condition and health of crops,
minimizing human error and reducing labour costs. Maintain historical records of
1
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
2
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
Also, crops do not generally grow evenly across the field and consequently crop yield
can vary greatly from one spot in the field to another. These growth differences may
be a result of soil nutrient deficiencies or other forms of stress. Remote sensing allows
the farmer to identify areas within a field which are experiencing difficulties, so that
he can apply, for instance, the correct type and amount of fertilizer, pesticide or
herbicide. Using this approach, the farmer not only improves the productivity from his
land, but also reduces his farm input costs and minimizes environmental impacts.
There are many people involved in the trading, pricing, and selling of crops that never
actually set foot in a field. They need information regarding crop health worldwide to
set prices and to negotiate trade agreements. Many of these people rely on products
such as a crop assessment index to compare growth rates and productivity between
years and to see how well each country's agricultural industry is producing. This type
of information can also help target locations of future problems, for instance the
famine in Ethiopia in the late 1980's, caused by a significant drought which destroyed
many crops. Identifying such areas facilitates in planning and directing humanitarian
aid and relief efforts.
3
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
crop vigour as well as crop stress and crop damage. Remote sensing imagery also
gives the required spatial overview of the land. Recent advances in communication
and technology allow a farmer to observe images of his fields and make timely
decisions about managing the crops. Remote sensing can aid in identifying crops
affected by conditions that are too dry or wet, affected by insect, weed or fungal
infestations or weather related damage. Images can be obtained throughout the
growing season to not only detect problems, but also to monitor the success of the
treatment. In the example image given here, a tornado has destroyed/damaged crops
southwest of Winnipeg, Manitoba.
Healthy vegetation contains large quantities of chlorophyll, the substance that gives
most vegetation its distinctive green colour. In referring to healthy crops, reflectance in
the blue and red parts of the spectrum is low since chlorophyll absorbs this energy. In
contrast, reflectance in the green and near-infrared spectral regions is high. Stressed or
damaged crops experience a decrease in chlorophyll content and changes to the
internal leaf structure. The reduction in chlorophyll content results in a decrease in
reflectance in the green region and internal leaf damage results in a decrease in near-
infrared reflectance. These reductions in green and infrared reflectance provide early
detection of crop stress. Examining the ratio of reflected infrared to red wavelengths is
an excellent measure of vegetation health. This is the premise behind some vegetation
indices, such as the normalized differential vegetation index (NDVI) (Chapter 4).
Healthy plants have a high NDVI value because of their high reflectance of infrared
light, and relatively low reflectance of red light. Phenology and vigour are the main
factors in affecting NDVI. An excellent example is the difference between irrigated
crops and non-irrigated land. The irrigated crops appear bright green in a real-colour
simulated image. The darker areas are dry rangeland with minimal vegetation. In a
CIR (colour infrared simulated) image, where infrared reflectance is displayed in
4
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
red, the healthy vegetation appears bright red, while the rangeland remains quite low
in reflectance.
Examining variations in crop growth within one field is possible. Areas of consistently
healthy and vigorous crop would appear uniformly bright. Stressed vegetation would
appear dark amongst the brighter, healthier crop areas. If the data is georeferenced, and
if the farmer has a GPS (global position satellite) unit, he can find the exact area of the
problem very quickly, by matching the coordinates of his location to that on the image.
It is worth pondering how farmers have been managing crop health in recent
times as the demand for food is increasingly growing with an upsurge in the human
population. Previously, it was not considered much challenging to manage everything
manually, but with the growing production, population, and demand, it is now
becoming quite difficult for the farmers to keep a proper check on the quality of the
crops.
IoT in the farming sector is a significant advancement in terms of different sensors and
gateway connectivity. It is further attached to a user-friendly dashboard, which enables
an automated management system for simplified monitoring. Traditional crop health
management usually involves the use of fungicides, pesticides, manual labor, and
others. However, it is constantly changing due to scientific developments, financial
constraints, and societal pressures. The use of IoT technology is set to bring a
considerable change in the farming sector, involving development and improvements
concerning pest management and crop management programs. Crop management
integrates with pest monitoring to optimize plant health and profitable economic
returns, minimizing the negative effect on the environment. With the advent of IoT
technology, disease management has improved considerably. Farmers can now keep a
5
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
real-time check on various data parameters like nutrient effects, calcium, etc., to
ensure maximum yield and quality produce.
Machine learning (ML) is a type of artificial intelligence (AI) that allows software
applications to become more accurate at predicting outcomes without being explicitly
programmed to do so. Machine learning algorithms use historical data as input to
predict new output values. Recommendation engines are a common use case for
machine learning. Other popular uses include fraud detection, spam filtering, malware
threat detection, business process automation (BPA) and Predictive maintenance.
Machine learning is important because it gives enterprises a view of trends in customer
behavior and business operational patterns, as well as supports the development of
new products. Many of today's leading companies, such as Facebook, Google and
Uber, make machine learning a central part of their operations. Machine learning has
become a significant competitive differentiator for many companies. There are certain
advantages
6
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
Supervised learning:
In this type of machine learning, data scientists supply algorithms with labeled training
data and define the variables they want the algorithm to assess for correlations. Both
the input and the output of the algorithm is specified.
Unsupervised learning:
This type of machine learning involves algorithms that train on unlabeled data. The
algorithm scans through data sets looking for any meaningful connection. The data
that algorithms train on as well as the predictions or recommendations they output are
predetermined.
Semi-supervised learning:
This approach to machine learning involves a mix of the two preceding types. Data
scientists may feed an algorithm mostly labeled training data, but the model is free to
explore the data on its own and develop its own understanding of the data set.
Reinforcement learning:
7
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
to complete a task. But for the most part, the algorithm decides on its own what steps
to take along the way.
8
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
CHAPTER 2
LITERATURE SURVEY
9
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
CHAPTER 3
SYSTEM ANALYSIS
3.1 Existing System
Crop Health Monitoring System Using loT and Machine Learning Due to the inherent
agrarian aspect of the economy, the agricultural sector holds paramount importance in
many countries. Some countries have their GDP dependent on agriculture, but they
rely on manual crop monitoring, which is a system that is labor intensive and
ineffective. In comparison to this, in developing countries, many cutting-edge
technology based technologies are being used to increase crop yield with optimum
resource utilization. To this end, this invention suggested an integrated approach using
IoT, machine learning and drone technology for monitoring crop health. The
incorporation of these sensing modalities produces heterogeneous data which is not
only differing in absorbed parameter also in the temporal fidelity. The spatial
resolution of these approaches is also different, so the proposed scheme suggests the
optimum integration of these sensing modalities and their implementation in practice.
The proposed work is essentially an indigenous, technology-based agricultural solution
capable of providing important insights into crop health by extracting additional
features from the multi-modal data set and minimizing the effort to survey crops,
particularly useful when the agricultural land is large. Agriculture is the backbone of
our Nation. In olden days farmers used to guess the fertility of the soil and assumed to
grow which type of crop. They didn8t know about the moisture, level of water, and
particularly weather condition which terrifies a farmer more. They use pesticides based
on some assumptions which made leads to a serious effect on the crop if the
10
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
assumption is wrong. The productivity depends on the final stage of the crop on which
the farmer depends.
3.1.1 Disadvantages
1) Productivity may or may not be more
2) We cannot estimate weather conditions as pollution is increasing gradually etc
3.1.2 Limitations
11
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
12
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
13
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
14
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
Architecture diagram
15
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
Input documents
The input document is the database where all the predefined input files are
stored .The file stored will be checked for disease detection and classification
CSV File
16
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
Machine learning:
Machine learning (ML) is a type of artificial intelligence (AI) that allows software
applications to become more accurate at predicting outcomes without being explicitly
programmed to do so. Machine learning algorithms use historical data as input to
predict new output values. Recommendation engines are a common use case for
machine learning. Other popular uses include fraud detection, spam filtering, malware
threat detection, business process automation (BPA) and Predictive maintenance.
Machine learning is important because it gives enterprises a view of trends in customer
behavior and business operational patterns, as well as supports the development of
new products. Many of today's leading companies, such as Facebook, Google and
Uber, make machine learning a central part of their operations. Machine learning has
become a significant competitive differentiator for many companies
17
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
CHAPTER 4
SYSTEM SPECIFICATION
18
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
In this system following are the functional requirements: The Admin has to
login by using valid user name and password. After login Successful the admin gets
the input file and checks for any plagiarized content against all the available journals
in the database. The admin analysis the entire database and then proceeds with the
process of plagiarism detection.
19
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
Language Python
Database Csv.file
Hard disk 1 TB
RAM 4GB-6GB
4.7.1 Python
Python technology is both a programming language and a platform.
21
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
The significant change was its transformation making its development process
community based. The release of Python 3.0 took place during 2008. Python language
boasts of winning two awards by the TIOBE as the programming of language of the
year during 2007 and 2010, resulting to an increase in the popularity of the language
(Hetland 56).
Web programming using Python entails two major paradigms: server programming
and client programming (Beazley 90). Server programming entails the development of
web services that run on the web server, while client programming entails the
development of web services that that run on the client side (Hetland 90). There are
diverse approaches to server programming, examples include the WebFrameworks
22
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
used for development of server side services using Python; CgiScripts used to write
scripting applications in Python; Webservers, which are server solutions developed
using Python.
Web services developed in Python are primarily used to offer access and functionality
of the APIs via the web. On the client side, Python language can be used in a number
of ways including Web Browser Programming, Web Client Programming and Web
services. There are various libraries in Python for the development of web services;
examples include the Simple Object Access Protocol (SOAP) and the Web Services
Description Language (WSDL).
Python language has extensive in-built tools that can provide support to Internet
protocols, coupled with its code readability characteristic, Python is therefore one of
the most appropriate programming languages that can be used in the development of
dynamic web content using the concept of dynamic programming. Some of the in-built
facilities included in Python that can facilitate dynamic programming and development
of web services include (Beazley 123):
1. Python comes with HTTP 1.1 server implementations, which has both file
servers and CGI servers. An important feature of this characteristic is that their
customization is easy and they incorporate the concept of automation of web
tasks. HTTP 1.1 has tools for the implementation of HTTP requests. In addition,
HTTP 1.1 implements secure web services.
2. Another important feature of Python is that is has features used for parsing and
constructing of Uniform Resource Locators (URLs). This is used to facilitate the
handling of URLs by the web service in a more efficient manner.
3. Python also has an included HTML and SGML modules used for parsing
HTML tags during the development of web services. SGNL is a part of the
parent language of Python language.
23
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
4. Python can also support XML since it has in-built XML parsing features and
SAX libraries embedded in the standard library.
5. Python can also handle CGI requests, facilitating the process of developing
codes for handling CGI.
6. Low-level sockets serve to enhance network programming, which is an
important strategy in the development web based applications.
Python language uses web frameworks for the development of web services through
providing an avenue through which web developers can simply write codes basing on
some standards of conformity to that particular framework. This concept of web
service development in Python is known as plugging. Python language web
frameworks provide diverse activities such as the interpretation of requests, production
of responses and persistent data storage.
These processes are an integral part of the web services development (Beazley 67). An
example of Python web frameworks is the Full stack frameworks, which consists of
high-level components such as Django, Grok, Pylons and TurboGears. Python
language can support other full stack web frameworks. The ability of Python language
to support diverse web frameworks makes it one of the best programming languages
that can be used for web service development.
24
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
Often, programmers fall in love with Python because of the increased productivity it
provides. Since there is no compilation step, the edit-test-debug cycle is incredibly
fast. Debugging Python programs is easy: a bug or bad input will never cause a
segmentation fault. Instead, when the interpreter discovers an error, it raises an
exception. When the program doesn't catch the exception, the interpreter prints a stack
trace. A source level debugger allows inspection of local and global variables,
evaluation of arbitrary expressions, setting breakpoints, stepping through the code a
line at a time, and so on. The debugger is written in Python itself, testifying to Python's
introspective power. On the other hand, often the quickest way to debug a program is
to add a few print statements to the source: the fast edit-test-debug cycle makes this
simple approach very effective.
25
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
Python uses code modules that are interchangeable instead of a single long list
of instructions that was standard for functional programming languages. The
standard implementation of python is called 5cpython6
The Platform module is used to retrieve as much possible information about the
platform on which the program is being currently executed. Now by platform info, it
means information about the device, it8s OS, node, OS version, Python version, etc.
This module plays a crucial role when you want to check whether your program is
compatible with the python version installed on a particular system or whether the
hardware specifications meet the requirements of your program.
This module already exists in the python library and does not require any
installation using pip. Most commonly used python platforms
6. Jupyter.
7. Spyder.
8. Pydev.
In the late 1980s, history was about to be written. It was that time when working on
Python started. Soon after that, Guido Van Rossum began doing its application-based
work in December of 1989 at Centrum Wiskunde & Informatica (CWI) which is
situated in the Netherlands. It was started firstly as a hobby project because he was
looking for an interesting project to keep him occupied during Christmas. The
programming language in which Python is said to have succeeded is ABC
Programming Language, which had interfacing with the Amoeba Operating System
27
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
and had the feature of exception handling. He had already helped to create ABC
earlier in his career and he had seen some issues with ABC but liked most of the
features. After that what he did was really very clever. He had taken the syntax of
ABC, and some of its good features. It came with a lot of complaints too, so he fixed
those issues completely and had created a good scripting language that had removed
all the flaws. The inspiration for the name came from BBC8s TV Show 3 7Monty
Python8s Flying Circus8, as he was a big fan of the TV show and also he wanted a
short, unique and slightly mysterious name for his invention and hence he named it
Python! He was the 5Benevolent dictator for life6 (BDFL) until he stepped down
from the position as the leader on 12th July 2018. For quite some time he used to
work for Google, but currently, he is working at Dropbox.
The language was finally released in 1991. When it was released, it used a lot fewer
codes to express the concepts, when we compare it with Java, C++ & C. Its design
philosophy was quite good too. Its main objective is to provide code readability and
advanced developer productivity. When it was released it had more than enough
capability to provide classes with inheritance, several core data types exception
handling and functions. The two of the most used versions has to Python 2.x & 3.x.
There is a lot of competition between the two and both of them seem to have quite a
number of different fanbases.
For various purposes such as developing, scripting, generation, and software testing,
this language is utilized. Due to its elegance and simplicity, top technology
organizations like Dropbox, Google, Quora, Mozilla, Hewlett-Packard, Qualcomm,
IBM, and Cisco have implemented Python.
Python has come a long way to become the most popular coding language in the
world. Python has just turned 30 and just recently at pycon22(python confrence) a
new feature was released by Anaconda foundation it8s known as pyscript with this
now python can be written and run in the browser like javascript which was
previously not possible, but it still has that unknown charm & X factor which can be
28
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
clearly seen from the fact that Google users have consistently searched for Python
much more than they have searched for Kim Kardashian, Donald Trump, Tom
Cruise, etc.
Python has been an inspiration for many other coding languages such as Ruby,
Cobra, Boo, CoffeeScript ECMAScript, Groovy, Swift Go, OCaml, Julia, etc.
The Platform module is used to retrieve as much possible information about the
platform on which the program is being currently executed. Now by platform info, it
means information about the device, it8s OS, node, OS version, Python version, etc.
This module plays a crucial role when you want to check whether your program is
compatible with the python version installed on a particular system or whether the
hardware specifications meet the requirements of your program.
29
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
This module already exists in the python library and does not require any
installation using pip. Most commonly used python platforms
The library has more than 2500 optimized algorithms, which includes a comprehensive
set of both classic and state-of-the-art computer vision and machine learning
algorithms. These algorithms can be used to detect and recognize faces, identify
objects, classify human actions in videos, track camera movements, track moving
objects, extract 3D models of objects, produce 3D point clouds from stereo cameras,
stitch images together to produce a high resolution image of an entire scene, find
similar images from an image database, remove red eyes from images taken using
flash, follow eye movements, recognize scenery and establish markers to overlay it
with augmented reality, etc. Open CV has more than 47 thousand people of user
30
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
Along with well-established companies like Google, Yahoo, Microsoft, Intel, IBM,
Sony, Honda, Toyota that employ the library, there are many startups such as Applied
Minds, Video Surf, and Zeitera, that make extensive use of OpenCV. OpenCV8s
deployed uses span the range from stitching streetview images together, detecting
intrusions in surveillance video in Israel, monitoring mine equipment in China, helping
robots navigate and pick up objects at Willow Garage, detection of swimming pool
drowning accidents in Europe, running interactive art in Spain and New York,
checking runways for debris in Turkey, inspecting labels on products in factories
around the world on to rapid face detection in Japan.
The library has more than 2500 optimized algorithms, which includes a comprehensive
set of both classic and state-of-the-art computer vision and machine learning
algorithms. These algorithms can be used to detect and recognize faces, identify
objects, classify human actions in videos, track camera movements, track moving
objects, extract 3D models of objects, produce 3D point clouds from stereo cameras,
stitch images together to produce a high resolution image of an entire scene, find
similar images from an image database, remove red eyes from images taken using
flash, follow eye movements, recognize scenery and establish markers to overlay it
with augmented reality, etc. Open CV has more than 47 thousand people of user
community and estimated number of downloads exceeding 18 million. The library is
used extensively in companies, research groups and by governmental bodies.
Along with well-established companies like Google, Yahoo, Microsoft, Intel, IBM,
Sony, Honda, Toyota that employ the library, there are many startups such as Applied
Minds, Video Surf, and Zeitera, that make extensive use of OpenCV. OpenCV8s
deployed uses span the range from stitching streetview images together, detecting
intrusions in surveillance video in Israel, monitoring mine equipment in China, helping
31
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
robots navigate and pick up objects at Willow Garage, detection of swimming pool
drowning accidents in Europe, running interactive art in Spain and New York,
checking runways for debris in Turkey, inspecting labels on products in factories
around the world on to rapid face detection in Japan.
It has C++, Python, Java and MATLAB interfaces and supports Windows,
Linux, Android and Mac OS. OpenCV leans mostly towards real-time vision
applications and takes advantage of MMX and SSE instructions when available. A
full-featured CUDA and OpenCL interfaces are being actively developed right now.
There are over 500 algorithms and about 10 times as many functions that compose or
support those algorithms. OpenCV is written natively in C++ and has a templated
interface that works seamlessly with STL containers. OpenCV is the huge open-source
library for the computer vision, machine learning, and image processing and now it
plays a major role in real-time operation which is very important in today8s systems.
By using it, one can process images and videos to identify objects, faces, or even
handwriting of a human. When it integrated with various libraries, such as NumPy,
python is capable of processing the OpenCV array structure for analysis. To Identify
image pattern and its various features we use vector space and perform mathematical
operations on these features.
The first OpenCV version was 1.0. OpenCV is released under a BSD license and
hence it8s free for both academic and commercial use. It has C++, C, Python and Java
interfaces and supports Windows, Linux, Mac OS, iOS and Android. When OpenCV
was designed the main focus was real-time applications for computational efficiency.
All things are written in optimized C/C++ to take advantage of multi-core processing.
32
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
They are a feed-forward network that can extract topological features from images.
They recognize visual patterns directly from pixel images with minimal
preprocessing.
They are astonishingly powerful because they can easily recognize patterns that
have extreme variability. e.g., hand-writing.
CNNs have the neuronal cells in the visual cortex, making the base behind CNNs
and watches for particular features.
t has been very helpful in monitoring suspicious banking transactions, as well as
in video surveillance systems or CCTV.Figure 4: A typical CNN
architecture .Besides input and output layers, CNN has many hidden layers in
between which may be classified as-Convolutional Layer:- This layer performs
the core operations of training and forms the basis of CNN.
Each layer has a single set of weights for all neurons and each neuron is
responsible for processing a small part of the input space. Thus, the
33
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
convolutional layer is just an image convolution of the previous layer, where the
weights specify the convolution filter . Pooling Layer:- This layer also known as
downsampling layer, is placed after the convolutional layer. Pooling layer is
responsible for reducing the spatial size (Width x Height) of the Input Volume
which will be passed to the next convolutional Layer.
Fully Connected Layer:- This layer connects each neuron on previous layer with
all the neurons present on the next layer. Facial detection/Recognition using
CNN:- A human brain sees multiple images in a day and is able to distinguish
each one accurately without realizing how the processing is done.
But, there is a different case with machines because they have to recognize an
image on the basis of learning. Facial detection is a method to identify a person
or object based on their unique features and this process involves the detection
and extraction of the face from the original image or video. After this, the face
recognition takes place where different complex computer algorithms are used
to recognize a face.
Here, we will understand the entire process of face detection and recognition. A
face detection system involves two phases: Enrollment Phase. Face Detection.
In this phase, several pictures of the same person is captured to whom the
system should recognize as "known" with different facial expressions and head
positions.
Feature Extraction- In this step, different feature measures are applied which
can better describe a human face. There are different algorithms such as
Principal Component Analysis (PCA), Haar Features, Local Binary Pattern
(LBP) etc. available for the facial measurement. On the basis of these
measurements, CNN is trained for learning in future. Storing in Database- All
the extracted features are stored in a database so that they can be used further in
identification process.
Face Detection- When an image is admitted for identification, It is checked that
whether it matches with the captured and stored images from the database by
34
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
35
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
CHAPTER 5
36
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
37
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
LEVEL 0:
38
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
LEVEL 1:
39
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
CHAPTER 6
MODULE DESCRIPTION
For detecting disease in crop , it has three modules to test them functionality:
1. Dataset module
2. CNN module
3. Checking module
40
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
The first module is the database module here all the databases of crop are
collected and stored in csv.file format
41
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
Here all the crops are classified under CNN algorithm. CNN algorithm takes the input
from the user in the form of image or digital format and classify them according to
their similarities and differences
Here all the crops are differentiated and their loss and valency modes are
identified.
42
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
The crop is selected for disease is called as input file. Here the selected crop is
classified and detected
43
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
The output screen is displayed in the form of crop image. The graphical lines in
the crop shows the size of the crop. The biggest black spot refers the type of infection
in the crop.
44
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
CHAPTER 7
7.1 Conclusion
The presence of detection and classification of paddy disease can help the farmer to
identify the type of disease and take remedial measures based upon its
classification. This can prevent the over use of pesticides in the paddy field because
using large amount of pesticides in the field can damage the soil and water in the
field and its surrounding area. The mobile application provided to the farmer can
help them in taking best remedies for the affected crop.
7.2Future Enhancement
45
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
APPENDICES
import numpy as np
os.listdir("../input/new-plant-diseases-dataset/New Plant Diseases
Dataset(Augmented)/New Plant Diseases Dataset(Augmented)/train/") def
prediction(path):
img_to_array(img)
plt.figure(figsize = (5,5))
plt.imshow(img) plt.show()
im = preprocess_input(i)
img = np.expand_dims(im, axis = 0) pred =
np.argmax(model.predict(img))
print(f"CLASSIFICATION {ref[pred]}
from keras.layers import Dense, Flatten from
keras.models import Model
from keras.applications.vgg19 import VGG19
import keras
base_model = VGG19(input_shape=(256, 256,
3), include_top = False) for layer in
base_model.layers:
layer.trainable = False
X = Flatten()(base_model.output)
X = Dense(units = 38, activation = 'softmax')(X)
model = Model(base_model.input, X)
from keras.callbacks import ModelCheckpoint,
EarlyStopping
46
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
es = EarlyStopping(monitor = 'val_accuracy',
min_delta = 0.01, patience = 3, verbose = 1)
mc = ModelCheckpoint(filepath =
"best_model.h5", monitor = "val_accuracy",
min_delta = 0.01,
patience = 3,
verbose = 1, save_best_only = True)
cb = [es, mc]
his = model.fit_generator(train,
steps_per_epoch = 16,
epochs = 50,
verbose = 1, callbacks = cb, validation_data =
val,
validation_steps = 16)
47
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
prediction(path)
his = model.fit_generator(train,
steps_per_epoch = 16,
epochs = 50,
verbose = 1, callbacks = cb, validation_data =
val,
validation_steps = 16)
48
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
REFERENCES
49
Downloaded by Barb Olivia (barbolivia47@gmail.com)
lOMoARcPSD|44399087
[8]Gittaly Dhingra, Hem Dutt Joshi and Vinay Kumar, 5Study of digital image
processing techniques for leaf disease detection and classification,6Springer-
Science, 29 November.
[9]Guan Wang, Jianxin Wang and Yu Sun, 5Automatic Image-Based Plant Disease
Severity Estimation Using Deep Learning6 Hindawi Computational Intelligence
and Neuroscience Volume 2017.
50
Downloaded by Barb Olivia (barbolivia47@gmail.com)