Diseases in Crops are one of the major reasons that affects the crops output. Crops play a very significant role for survival of beings including but not limited to us (human beings), as they are one of the major source of daily life needs including food. Identification of the diseases in a rapid way so that a cure can be take in time, is still a cumbersome process. Fortunately, in this era where smartphones are picking up rapidly and recent advances in machine learning, it is now possible to build smartphone assisted disease diagnosis.
Using an open source database of around 54,306 images of crops with and without disease, we trained a deep convolution neural network to identify 14 distinct species with 26 diseases or their absence thereof. The trained model is observed to show approximately 99.35 % accuracy on the held out test set, illustrating that the approach is viable.
In this report we will have a look at the problem, discuss the solution, and learn about how the recent advances in machine learning helps us implement the solution.
1.1 Look at Problem
Plant Diseases are a big concern for farmers. In agriculture based country such as India, plant diseases account as a major factor and often lead to a considerable amount of losses in almost every agriculture based place in country. These losses not only affect the farmers but the country too. Agriculture is of an utmost importance for any country not just for economy but for survival.
Taking India into consideration, count of agronomists is very less, where there is just one agronomist per 80,000 farmers. Objective of this work is to bridge the gap between an agronomist and farmer. Krishikalp is a Mobile First App made available on all major platforms which will allow its users to diagnose for any potential disease in a crop.
As an implementation, KrishiKalp will allow users to click a picture or use an already captured picture of a leaf of the plant and upload it to our servers using the easy to use interface of our mobile app. The app will then tell the Potential disease the plant may have. On top of that, a powerful Deep Neural network based A.I. will seamlessly detect the Type of the plant too.
1.2 Previous Known Solutions
As per our research there are no commercially available or directly available digital solution to the problem, which can be utilised by the farmers easily.
There have been just limited researches for the feasibility of few similar solutions, which are discussed in next chapter.
All such attempts only compared the various methods for detecting diseases, showing that although it is feasible but still required a lot of attention in terms of pre-requisite data.
All in all, there exists NO such work which directly provides a mobile solution for the end users.
1.3 Our Approach
Our Approach is simple and intuitive. We narrowed down the problem to an Image Classification problem into a set of predefined / Known Diseases, then We evaluate the applicability of deep convolutional neural networks for the said classification problem.
We Utilize the power of tensorflow to build and train a deep convolution neural network to classify a given image of leaf of plant as healthy or may be suffering from a disease.
1.4 Technologies Used
KrishiKalp is powered by a bunch of technologies trusted by leaders in industry. The project is composed of two mobile apps and a backend powered by a deep neural network trained AI. Following is a list of major technologies used to build our project in its current state: –
i. Xcode:- Xcode is an Integrated Development Environment (IDE) for macOS containing software development tools developed by Apple Inc. for developing software for macOS, iOS, watchOS & tvOSRefernce.
Xcode was used to develop the iOS mobile application of KrishiKalp.
ii. Swift: – SwiftRefernce is a general purpose programming language developed by Apple Inc. The Language is meant to allow software development for Apple line-up of Devices operating on iOS, watchOS, tvOS or macOS.
Swift programming was used to develop the iOS mobile app frontend for KrishiKalp.
iii. Android Studio: – Android Studio is the official integrated development environment (IDE) for Google’s Android operating system, built on JetBrains’ IntelliJ IDEA software and designed specifically for Android development.
Android Studio requires JDK (java development kit) to function. For KrishiKalp it was used to develop the Android Client App as a front-end for project.
iv. JAVA: – Java here refers to a general purpose programming language that’s intended to allow developers to write once and run anywhere, i.e. providing a portability to the code developers write.
Android Studio supports java, hence for the project, java was used as a programming language to build android application.
v. Django: – Django is an open source web framework, built in python allowing to create database driven, complex websites and to power the backend of web apps.
Django was used to create the backend of KrishiKalp. Backend is responsible to power a simple web version of KrishiKalp and also provide appropriate APIs to be used by iOS and Android Mobile App Frontends to access the Deep Neural Network based AI.
vi. Python: – Python is a general purpose programming language. Python requires an interpreter to run the code. Python features a dynamic type system and automatic memory management. It supports multiple programming paradigms, including object-oriented, imperative, functional and procedural, and has a large and comprehensive standard library.
Python was used to write custom APIs and create backend using Django for the project.
vii. PostgreSQL: – PostgreSQL is a powerful, open source object-relational database system. PostgreSQL comes with many features aimed to help developers build applications, administrators to protect data integrity and build fault-tolerant environments, and help you manage your data no matter how big or small the dataset. In addition to being free and open source, PostgreSQL is highly extensible. For example, you can define your own data types, build out custom functions, even write code from different programming languages without recompiling your database!
** Chapter Ends **
Vegetable pathologies manifest in different parts of plant. There are various methods that use visual clues from various parts of plants, like fruits (López-García et al. 2010; Corkidi et al. 2005; Aleixos et al. 2002), roots, stems and leaves. In this report, the work is based on predicting diseases using plant leaves.
This chapter lists already tested methods to solve the problem. Most of the methods focuses on image processing. There are few steps which are common in almost all the researches and methods that were tested in past, hence the chapter is divided into sections which describes respective step of every method in a combined form.
2.2 Detection of Disease
Various methods which tried to solve problem, majorly focused on detecting the disease. There are primarily two cases in which simple detection may be useful: –
• Partial Classification: When a disease has to be identified among several diseases possible, it is more convenient to perform a partial classification. Regions under consideration of disease of interest or none can be classified from various possibilities. This is a method illustrated by Abdullah et al .
• Real-time Monitoring: In real Time Monitoring, the systems continuously monitors the plant and raises an alert as soon as any disease is detected. This method is discussed in paper by Sena Jr et al and Story et al. .
2.2.1 Neural Networks
Method by the Abdullah et al focuses on distinguishing a disease from other possibilities that may affect a rubber tree. No segmentation is used in algorithm. Principal Component Analysis is used directly on the RGB values of a low resolution picture of leaves ( 15 x 15 ). The first two principals are then fed as an input to the MLP or Multilayer Perceptron Neural Network consisting of one hidden layer. Then output from this network reveals the result, i.e. whether the plant is infected with the concerned disease or not.
Sena jr proposed a method to distinguish between plants of maize that are affected by fall armyworm and healthy ones. It used digital images. The Algorithm for this was divided into two parts: –
• Image Processing, and
• Image Analysis
In the first stage, the image was converted to a grayscale version, thresholded and then filtered to remove spurious spots. In the later stage, the image is divided into 12 blocks. Blocks in which leaf area was less than 5% was discarded. In remaining blocks, the number of objects that are connected and represents a disease or defect are counted. If the count is above a threshold value, then the plant is considered defected or else it is termed healthy.
2.2.3 Dual segmented regression analysis
This method was proposed by Story et al for monitoring and detection of deficiency of calcium in lettuce an early stage. Firstly, canopy region is isolated by the means of segmentation. Now outlines of desired region are applied to the original image so as to consider the desired area. Now extraction of features such as RGB and HSL, texture etc is done. After this, calculation of separation point which identifies the onset of stress due to the calcium deficiency is performed. It is done by calculating the mean difference between the control containers and treatment at each time of measurement for all features. Dual-segmented regression analysis helps in identifying the time of change. The authors concluded that their work can be used to monitor plants in greenhouse at night time too, however it requires more research for its use in daytime.
The methods discussed in this sections focuses on the severity of a given disease. Such severity can be predicted by either the regions of leaves affected or by how deeply the affection is rooted in plant, this can be estimated with the help of texture and color of the plant / plant’s leaf. Generally, the quantification algorithms follow a step of segmentation to help in isolation of symptoms. This allows for proper processing of extracted feature for predicting the severity of disease.
This problem or task of identifying the severity of the disease in plants is a complex task even if performed manually by specialists. They will have to align their results with every possible symptom. This results in a subjectivity in every manual severity test performed. So it is an important factor to consider while assessing the performance of this very method.
Following are the methods which fall into this category of identifying the severity of disease.
Lindow and Webb reference were one of the first scientists to propose the method of digital image processing. An analog camera was used to capture the images, under an illumination of red light. Images were then digitized and stored. The test was performed using leaves of bracken fern, tomatoes California buckeye and sycamore. The regions affected by diseases were identified using simple thresholding. Pixel variations are then corrected or compensated by using certain correction factors. This is done so as to distinguish the healthy part from affected region.
Price et al reference compared the digital image-processing methods and visual methods in identifying the severity of coffee leaf rust. Two different image processing systems were used. For the first one, the images were captured using CCD or black & white charge coupled device. For second one, a colored CCD camera was used. Segmentation was performed by the means of simple thresholding. According to the authors, the image processing based systems showed better outcomes then compared to the visual one. Also, color in images affected to a great degree in identification of rust in leaves.
Tucker and Chakraborty reference proposed a method that focuses on quantifying and identifying the diseases in sunflower and oat leaves. Firstly, segmentation is performed using a threshold value. Value of threshold varies according to the disease of interest. Cluster of resulting pixels is made which represents the diseased regions. Characteristics of lesions help in classifying the disease (or lack of thereby) into a category. Authors concluded, that results were good, however some errors were observed.
A method for quantifying the symptoms of maze was proposed by the Martin an Rybicki reference which was cause by maze steak virus. The thresholding scheme were inspire by those of Lindow and Webb reference. Results obtained by visual assessments were compared using commercially available software packages. Authors also compared he results using custom built systems too. The authors concluded
Some Content, Helvetica 12.
2.5 Comparison and Conclusion
Some Content, Helvetica 12.
** Chapter Ends **
Methods for Detecting Plant Diseases