Nothing Special   »   [go: up one dir, main page]

4338 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/358912150

Raspberry Pi (Python AI) for Plant Disease Detection

Article · February 2022


DOI: 10.31782/IJCRR.2022.14307

CITATIONS READS
7 7,006

4 authors:

Shagufta Aftab Chaman Lal


NED University of Engineering and Technology, Karachi Indus Institute of Higher Education
4 PUBLICATIONS 11 CITATIONS 11 PUBLICATIONS 23 CITATIONS

SEE PROFILE SEE PROFILE

Suresh Kumar Ambreen Fatima


Indus Institute of Higher Education Indus Institute of Higher Education
4 PUBLICATIONS 11 CITATIONS 2 PUBLICATIONS 7 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Chaman Lal on 28 February 2022.

The user has requested enhancement of the downloaded file.


International Journal of Current Research and Review Research Article
DOI: http://dx.doi.org/10.31782/IJCRR.2022.14307

Raspberry Pi (Python AI) for Plant Disease


Detection
IJCRR
Section: Life Shagufta Aftab1, Chaman Lal2, Suresh Kumar Beejal1, Ambreen Fatima2
Sciences
ISI Impact Factor
(2020-21): 1.899
Department of Computing, Indus University Karachi, Pakistan; 2Department of Science and Technology, Indus University Karachi, Pakistan.
1

IC Value (2020): 91.47


SJIF (2020) = 7.893

Copyright@IJCRR

ABSTRACT
The diagnosis of diseases at an early stage is the main goal of this paper. We concentrate on image processing techniques in
this research. This entails a range of processes ranging from taking a picture of the leaves to using Raspberry PI to diagnose
the condition. The Raspberry PI is used to connect the camera to the display device, from which the data is sent to the cloud.
Various procedures, such as acquisition, pre-processing, segmentation, and clustering, are used to examine the acquired im-
ages. As a result, the demand for labour in big farm areas is reduced. Also, the cost and effort are reduced, whereas productivity
is increased. Various procedures, such as acquisition, pre-processing, segmentation, and clustering, are used to examine the
acquired images. As a result, the demand for labour on huge farmlands is reduced. Costs and efforts are also minimized, while
production is raised.
Key Words: Raspberry PI, segmentation, Image-processing, Artificial intelligence, Clustering, Disease detection

INTRODUCTION eases exhibit themselves in the visible spectrum, a skilled


professional’s naked eye examination is the primary method
This current paper provides motivation and a brief over- for detecting plant diseases in practice. A plant pathologist
view of our study. In terms of monitoring the crops of large must have good observation skills to recognize distinctive
farms with minimum staff, presently, technology adoption symptoms to diagnose plant diseases accurately7. In this re-
in farming has shown quantitative outcomes in agricultural gard, an automated system that can identify plant illnesses
productivity. The agriculture sector has been changed by the based on the look and visual symptoms of the plant might
Internet of Things (IoT), Cloud Computing, Artificial In- be extremely useful to both amateur gardeners and skilled
telligence, and Computer Vision, which have all helped to professionals as a disease diagnosis verification system. An
boost productivity over time with minimal investment. The automated system that could identify plant illnesses based
failure to diagnose agricultural diseases in their early stages on the appearance and visual symptoms of the plant might
is a key worry that has a negative impact on crop output. In be extremely useful to both amateur gardeners and skilled
most cases, crop disease identification is done manually. In professionals as a disease diagnosis verification system.
general, crop disease detection is done by hand, and it is im-
possible to identify crop illnesses without the help of experts The suggested approach uses machine learning to detect
who have acquired knowledge about the signs and causes of and classify various plant leaf diseases3, 10. There are four
the diseases. primary steps in the plan. The segmentation process begins
with the creation of a colour transformation structure for the
The importance of accurate and timely illness detection, input RGB image, followed by the masking and removal of
as well as early prevention, has never been greater in this the green pixels using a certain threshold value, and finally
changing world. Plant diseases can be detected in a variety the segmentation process. For the effective segments, texture
of methods. Some diseases have no visible symptoms, or the statistics are generated, and the retrieved features are then
damage becomes apparent too late to intervene, necessitat- fed to the classifier.
ing a thorough investigation. However, because most dis-

Corresponding Author:
Chaman Lal, Lecturer in S&T, Indus University Karachi, Sindh, Pakistan.
Email: chaman.lal@indus.edu.pk
ISSN: 2231-2196 (Print) ISSN: 0975-5241 (Online)
Received: 29.08.2021 Revised: 12.10.2021 Accepted: 03.11.2021 Published: 01.02.2022

Int J Cur Res Rev | Vol 14 • Issue 03 • February 2022 36


Aftab et al: Raspberry Pi (Python AI) for plant disease detection

BACKGROUND 7. COLOR CO-OCCURENCE METHOD:


The texture features are produced from the statistical distri-
There has been a slew of earlier studies on plant categori- bution of observed intensities at specified points in the im-
zation using picture data and technologies like Probabilis- age.
tic Neural Networks (PNN) and Support Vector Machines
(SVM). Using image processing techniques15, plant diseases
8. EVALUATE THE TEXTURE STATISTICS:
can be detected. A digital camera is used to capture photo-
For the color content of the image, the contrast, local homo-
graphs of the plant, which is connected to the Raspberry Pi
geneity, energy, and correlation are computed. The contrast
board4. To obtain the features for further analysis, various
function returns the difference in intensity between a pixel
image processing techniques are applied to the acquired im-
and its neighbors.
age13. A series of processes are included in this image pro-
cessing procedure mentioned below.
RELATED WORK
1. IMAGE ACQUISITION: Plant diseases have a significant impact on the growth of
The camera module captures the RGB photos from the plant. their individual species, hence early detection is essential.
Because the camera has a resolution of 21 mega pixels, the Machine Learning (ML) models have been used to detect
RGB photographs are quite clear. and classify plant illnesses1,6,9. but with recent advances in
a subset of ML, Deep Learning (DL) 2, this area of research
appears to have a lot of promise in terms of improved accu-
2. TRANSFORMING A RGB IMAGE TO HSV
racy. To detect and classify the symptoms of plant illnesses,
FORMAT: several developed/modified DL architectures 14, as well as
The RGB pictures are transformed to Hue Saturation Value,
many visualization techniques, are used. In addition, these
a colour space that is an excellent tool for colour perception.
architectures/techniques are evaluated using a variety of per-
RGB is used as an ideal representation for colour creation.
formance measures. The DL models used to illustrate numer-
Like the observer’s perseverance, the hue is nothing more
ous plant diseases are thoroughly explained in this article 5, 8.
than a colour characteristic that expresses pure colour. Satu-
Furthermore, several research gaps have been uncovered, al-
ration, also known as relative purity, is the representation of
lowing for increased transparency in detecting plant illnesses
the quantity of white light added to the hue of the image. The
even before symptoms show.
amplitude of light is referred to as its value. The Hue compo-
nent is included in the analysis, but the Saturation and Value Laboratory-based tests are used in direct detection approach-
components are excluded because they do not contribute any es. Indirect methods, on the other hand, rely on sophisticated
further information. methodologies with a focus on imaging tool integration.

3. PIXEL MASKING IN GREEN: Indirect approaches rely on the on-site integration of sensors
Masking is the process of altering a pixel’s background value and smart devices to give a faster and more accurate method
to zero or any other value in a picture. This step detects the of illness identification. Early detection of apparent plant ill-
pixels that are mostly green in colour. nesses is critical, as it allows farmers to take the necessary
actions to save the damaged plant. If early detection is possi-
ble, the percentage of damaged fruits can be reduced dramat-
4. REMOVING GREEM PIXEL MASKS:
ically while still maintaining excellent production standards.
The green pixels are then set to zero based on the provided
threshold value computed for the pixels. RGB component
mapping assigns a value of zero to the pixel’s red, green, and a. DIRECT METHODS
blue components. Because the healthy portions of the leaf When a pathogen infects a plant, the DNA of the plant is
are represented by green-colored pixels, they do not aid in altered, and the pathogen produces and introduces a specific
disease identification. type of protein molecule to the plant. Direct methods use
molecular and serological techniques to look for pathogen
5. COMPONENT SEGMENTATION: DNA or pathogen-produced protein molecules in the plant’s
The contaminated area of the leaf is excised and split into biological structure. Polymerase chain reaction (PCR) and
several equal-sized segments. enzyme-linked immunosorbent assay (ELIA) are two often-
used procedures (ELISA). The genetic material (DNA) of
6. COLLECTING THE IMPORTANT SECTIONS FROM the bacteria causing the disease is extracted utilizing PCR-
THE PROCESS IMAGE: based disease detection. After the DNA has been purified
There is no relevant information in any of the portions. For and amplified, it is run through gel electrophoresis. After the
analysis, only segments with a significant amount of data are DNA has been purified and amplified, gel electrophoresis is
chosen. carried out. The presence of a specific brand in the gel elec-

37 Int J Cur Res Rev | Vol 14 • Issue 03 • February 2022


Aftab et al: Raspberry Pi (Python AI) for plant disease detection

trophoresis verifies the existence of the plant disease organ-


ism 13.

Figure 2: Summary of the Evolution of Deep Learning from


1943-2006.

c. CONVOLUTIONAL NEURAL NETWORK


Using deep learning approaches, convolutional neural net-
work models were constructed to detect and diagnose plant
diseases using simple leaf photos of healthy and ill plants.
The models were trained using an open collection of 87,848
photos, which included 25 different plants in 58 different
Figure 1: Different methods of plant disease methods. classes of [plant, illness] pairs, including healthy plants. Sev-
Although these procedures are reliable and accurate in de- eral model architectures were trained, with the top perform-
tecting plant diseases [fig: 1], they have several disadvan- ing one achieving a success rate of 99.53 percent in detecting
tages. These methods rely largely on expensive laboratory the corresponding [plant, illness] pair (or healthy plant). The
equipment and lengthy experiments, both of which can be model’s high success rate makes it valuable advising or early
time-consuming and labor-intensive. To ensure trustworthy warning tool, as well as a technique that might be expanded
and precise results, sample preparation takes a significant to support an integrated plant disease diagnosis system that
amount of time and work. Because of the usage of consum- can operate in real-world situations.
able reagents that are individually formulated for each patho-
gen, these procedures are also quite expensive 12. As a pre-
liminary screening tool for processing huge numbers of plant SYSTEM REQUIREMENT
samples, better and faster disease detection technologies are
required. a. OPEN CV
Open CV is a cross-platform library for developing real-time
b. INDIRECT METHODS computer vision apps. It primarily focuses on image process-
It was studied whether new automated non-destructive tech- ing, video recording, and analysis, including capabilities
nologies could be used to detect plant disease symptoms such as face and object detection. It is critical in real-time
early and with high sensitivity to specific diseases. These operation, which is critical in today’s systems. It may be used
technologies should be able to detect illnesses and stressors to process photos and videos to recognize items, faces, and
in real time in the field. The imaging technique is a popular even human handwriting.
method.
Researchers applied deep learning architectures [fig: 2] to b. TENSOR FLOW
image recognition and classification as they evolved over The feature extraction network must accurately extract the
time 11. These structures have been used in a variety of agri- properties of the disease image to achieve a high disease
cultural applications as well. The performance of an author- recognition rate. Tensor flow is used to do this. The con-
modified CNN and Random Forest (RF) classifier was tested volutional neural network, as a deep learning model, is ca-
through CA at 97.3 percent in the classification of leaves pable of hierarchical learning and excels at feature extrac-
among 32 species. tion. The Tensor flow Object Detection API is used in our
project.

Int J Cur Res Rev | Vol 14 • Issue 03 • February 2022 38


Aftab et al: Raspberry Pi (Python AI) for plant disease detection

Tensor flow’s object detection API provides a framework


for building a deep learning network that can tackle object
detection challenges. In their framework, which they call
Model Zoo, there are already pertained models. This com-
prises models that have been pre-trained using the COCO,
KITTI, and Open Images datasets. If we’re solely interested
in categories, these models can be employed for inference
this collection of information. They’re also useful for train-
ing on a new dataset and initializing your models.
For a clear image, we employ a 5-megapixel camera that
concentrates on plants. It connects to the Raspberry PI 4
board via USB. Figure 4: Main GUI.

This is the main graphical user interface [fig: 4], through


which the user can choose from a variety of settings.
METHODOLOGY

a. DATA COLLECTION
The disease’s exact location is then retrieved from the image
and saved as an XML file.

b. MODEL IMPLEMENTATION
The information is fed into the API, which employs the
Mobile-NET SSD (Single Shot MultiBox Detector) feature
extractor for real-time detection and the FASTER RCNN for
single image detection. The API will iterate over the image
until we’re happy with the outcome.
Figure 5: selecting a leaf image.
c. MODEL TESTING
By clicking on the open picture button, the user can choose a
The model is then tested using testing photos when the train-
leaf image [fig: 5], as illustrated in figure.
ing is done.

RESULT AND ANALYSIS

Figure 6: Running Detection on an image.

This window will appear if you touch/click the “Run Detec-


tion” button. To begin detecting the image you just opened
above, press “No” [figure: 6].
Figure 3: Login/Signup Window.
When the detection is finished, you will be asked if you wish
If the user hasn’t already logged in, this is the first window
to view the image that was detected or not. To see what the
that will open [fig: 3]. This has two primary buttons login
system detects, press “Yes” in [figure: 7].
and signup, which allow users to log in or register to enjoy
the system’s features.

39 Int J Cur Res Rev | Vol 14 • Issue 03 • February 2022


Aftab et al: Raspberry Pi (Python AI) for plant disease detection

Keep developing tubers covered with soil.


Protectant fungicides, like chlorothalonil and fixed copper,
can help protect foliage if applied prior to infection.

Figure 7: View Detection

Figure 10: Bacterial Spot-on Pepper Bell

Small, yellow-green lesions on young leaves that are fre-


quently distorted and twisted, or black, water-soaked,
greasy-appearing lesions on older foliage [fig: 10], are the
first signs. The steps below should be followed:

Select resistant varieties


Seed and transplants that are disease-free should be pur-
chased. Soak seeds in a 10% chlorine bleach solution for 2
minutes to treat them (1 part bleach; 9 parts water). Before
Figure 8: Detection Result
planting, thoroughly rinse and dry the seeds.
In [figure: 8], shows, the system detects the plant and the
Plants should be mulched deeply with a thick organic sub-
type of disease it has.
stance such as newspaper coated in straw or grass clippings.
Avoid overhead watering.
At the conclusion of the season, remove and destroy any sick
plant parts as well as all trash.
To inhibit the spread of infection, spray with fixed copper
(organic fungicide) every 10-14 days.
If infections are severe, move peppers to a different site and
cover the soil with black plastic mulch or black landscape
cloth before planting.
These are some of the plant disease detection results.

A. DATAFLOW DIAGRAM
Figure 9: Late Blight on Potato [Figure: 11] shows a data flow diagram that explains the sys-
tem’s operation. When the system starts, it sends a command
Small, light to dark green, round to irregularly shaped water-
to capture an image, then image processing begins, and the
soaked dots are the earliest signs of late blight in the field
illness name is shown.
[fig: 9]. Although the symptoms are similar, the treatment
method differs. The steps below should be followed:
Always purchase new seed potatoes that are certified, dis-
ease-free.

Int J Cur Res Rev | Vol 14 • Issue 03 • February 2022 40


Aftab et al: Raspberry Pi (Python AI) for plant disease detection

• The system is user-friendly; we can quickly obtain


data from collected images.
• The recognized image is saved in the system’s data-
base for future usage.
• The accuracy of the system can be improved by data
entry and picture processing of big data sets.
• With further modifications, this system will benefit
society in the future.
• The system has a 99.99 percent accuracy level.

CONCLUSION
We developed a classification approach for picture-based
plant identification and content-based image retrieval chal-
lenges in this research. To detect plant diseases, the Tensor
flow Object Detection API is employed. Two alternative
models, Faster RCNN for improved accuracy and SSD Mo-
bile net for disease detection in real-time, were trained on
diverse plant illnesses and their healthy states. By putting our
models to the test, we can assess how well they can detect
Figure 11: Data flow Diagram. different plant illnesses given a picture. The model’s accu-
racy is also mentioned, which is sufficient for detecting prac-
tically every plant disease. Different detections are shown to
B. USE CASE DIAGRAM
evaluate the model’s accuracy. Tomatoes, potatoes, and bell
peppers may all be tested for illnesses with this approach.
Acknowledgement: Nil
Source of Funding: Nil
Conflict of Interest: Nil
Author’s contribution:
Shagufta Aftab: data collection.
Chaman lal: writing of first and final drafts.
Suresh Kumar B: Manuscript Editing.
Ambreen Fatima: data collection.

REFERENCES
Figure 12: Data flow Diagram
1. Shruthi U, Nagaveni V, Raghavendra BK. A review on machine
The flow of work is depicted in the diagram [fig: 12]. To ac- learning classification techniques for plant disease detection.
cess the system’s features, the user must be logged in. The In2019 5th International Conference on Advanced Computing
& Communication Systems (ICACCS) 2019 Mar 15 (pp. 281-
system gives the user two choices: 284).
1. To use a photograph to do detection. He or she can 2. Nagaraju M, Chawla P. Systematic review of deep learning tech-
niques in plant disease detection. Int Journal of Syst Assur Eng
take pictures using a pi4 camera.
Manag, 2020 Jun;11(3):547-60.
2. Alternatively, you can employ real-time detection. 3. Deepika P, Kaliraj S. A Survey on Pest and Disease Monitoring
The sickness will be detected in real time because of of Crops. In2021 3rd International Conference on Signal Pro-
this. cessing and Communication (ICPSC) 2021 May 13 (pp. 156-
160).
FEATURES OF THE SYSTEM 4. Sankaran S, Mishra A, Ehsani R, Davis C. A review of advanced
• The suggested system uses image processing to detect techniques for detecting plant diseases. Computers and electron-
plant illness. ics in agriculture. 2010 Jun 1;72(1):1-3.
5. Tiwari D, Ashish M, Gangwar N, Sharma A, Patel S, Bhardwaj

41 Int J Cur Res Rev | Vol 14 • Issue 03 • February 2022


Aftab et al: Raspberry Pi (Python AI) for plant disease detection

S. Potato leaf diseases detection using deep learning. In 2020 4th 11. Valdoria JC, Caballeo AR, Fernandez BI, Condino JM. iDahon:
International Conference on Intelligent Computing and Control An android based terrestrial plant disease detection mobile ap-
Systems (ICICCS) 2020 May 13 (pp. 461-466). plication through digital image processing using deep learning
6. Ahmed K, Shahidi TR, Alam SM, Momen S. Rice leaf disease neural network algorithm. In2019 4th International Conference
detection using machine learning techniques. In2019 Interna- on Information Technology (InCIT) 2019 Oct 24 (pp. 94-98).
tional Conference on Sustainable Technologies for Industry 4.0 12. Ramesh S, Hebbar R, Niveditha M, Pooja R, Shashank N, Vi-
(STI) 2019 Dec 24 (pp. 1-5). nod PV. Plant disease detection using machine learning. In2018
7. Durmuş H, Güneş EO, Kırcı M. Disease detection on the leaves International conference on design innovations for 3Cs compute
of the tomato plants by using deep learning. In2017 6th Inter- communicate control (ICDI3C) 2018 Apr 25 (pp. 41-45).
national Conference on Agro-Geoinformatics 2017 Aug 7 (pp. 13. Kusumo BS, Heryana A, Mahendra O, Pardede HF. Machine
1-5). learning-based for automatic detection of corn-plant diseases
8. Durmuş H, Güneş EO, Kırcı M. Disease detection on the leaves using image processing. In2018 International Conference on
of the tomato plants by using deep learning. In2017 6th Inter- Computer, Control, Informatics, and its Applications (IC3INA)
national Conference on Agro-Geoinformatics 2017 Aug 7 (pp. 2018 Nov 1 (pp. 93-97).
1-5). 14. Modem Amarendhar R, M. James S, P.V.G.D Prasad R. Analysis
9. Harish S, Gayathri KS. Smart Home-based Prediction of Symp- of COVID-19 Complications Using Deep Learning-Based Neu-
toms of Alzheimer’s Disease using Machine Learning and Con- ro-Fuzzy Classification Approach. Int J Cur Res Rev. 13(20),
textual Approach. In2019 International Conference on Compu- October, 2021, 85-89,
tational Intelligence in Data Science (ICCIDS) 2019 Feb 21 (pp. 15. Nanditha B R, Geetha Kiran A. A Review on Imaging Modali-
1-6). ties and Techniques for Oral Malignancy Detection Int J of Cur
10. Soni H, Arora P, Rajeswari D. Malicious Application Detec- Res Rev. 13(20), October, 71-78.
tion in Android using Machine Learning. In2020 International
Conference on Communication and Signal Processing (ICCSP)
2020 Jul 28 (pp. 0846-0848).

Int J Cur Res Rev | Vol 14 • Issue 03 • February 2022 42

View publication stats

You might also like