
Disease Detection Overview
IDM Solutions partnered with a small greenhouse to extend their technology and AI capabilities as they move into creating a seamless smart greenhouse. IDM Solutions created a custom convolutional neural network (CNN) to classify tomato plant disease with a prediction accuracy of 95.32% on 1816 test images across ten (10) different diseases.
Transformation into a Smart Greenhouse
This serves as the first phase in IDM Solutions developing a real-time mobile plant disease prediction capability to create a pipeline for informed disease remediation strategies. The overall cycle starts with taking a picture of the diseased leaf. Then, the image is provided to the custom CNN developed by IDM Solutions to predict the type of disease. Once the disease is identified, the farmer will then be able to develop a remediation strategy for irrigation cycles, nutrient, and fertilizer adjustment in order to minimize disease spreading, plant loss, and maximize yield and profitability.
Why is Plant Disease so Important to Farms and Greenhouses
Across the agriculture ecosystem, plant and crop disease has devastating effects with the primary driver being crop loss and reduced yield with an estimated $21 billion in crop loss. This is roughly 13-22% annual yield loss (billions) due to disease in rice, wheat, maize, and potato.
The economic impact of this loss has repercussions from imports/exports, stock market, labor and agriculture resources/by-products such as fertilizer use and animal feed. Two of the many notable crop diseases which had a lasting global effort was the Irish potato famine caused by potato late blight pathogen and the Bengali famine caused by the rice brown spot pathogen.
For any size farm or greenhouse, it becomes pivotal for famers to identify and classify the type of disease and plan accordingly. The economic impact would be less burdensome if the diseased plants/crops are identified early and/or a farmer irradicates the disease before the plants/crops are all infected. This will also lessen the burden on stores and facilities relative to outbreaks of diseases/sickness on both the animal and human population.
Enabling a ML approach to classify plant disease
IDM Solutions developed a real-time mobile-based custom convolutional neural network (CNN)-based disease classification framework for a greenhouse to increase their intelligent decision-making capabilities using images from the Plantville database. The ML framework classifies the type of tomato plant disease based on an image of the diseased leaf. The classifier can predict ten (10) different types of diseases. Figure 1 depicts the ten (10) different diseases (image class) along with the number of images that were used to train, validate, and test the model. The class of disease which had the largest number of images was the yellow leaf curtis virus with 5,358 images. The class of disease which had the fewest number of images was the mosaic virus with 374 images. All the images from all 10 classes of diseases were randomized such that the model would not be biased to any disease.
Figure 2 depicts the custom CNN model that was created in Python using TensorFlow 2. The model was trained on a total of 12,712 images and tested on1,816 images. A stochastic gradient descent optimizer was used with a learning rate of .001 and momentum of 0.9. A sparse categorical cross entropy function was used as the loss function. The model was run for 70 epochs and converged to an accuracy of 95.32% with 1731/1816 test images labeled correctly. Table 1 depicts the accuracy of the model for each set of data.
Figure 1: Number of images for training, validation, and testing for each class of disease
Figure 3 depicts an illustration of 20 randomly sampled test images. The correct disease is labeled on the top of each image and the predicted label is shown below the image (blue if predicted correctly, red if predicted incorrectly).
IDM Solutions provided more information to the greenhouse for managing decisions by providing detailed accounts of the model prediction accuracy as a function of number of images and correctly labeled images. This was to develop an understanding on how the number of images (in both training and testing) gave rise to specific disease classification and understand where more data is needed for further improvement. Figure 4 depicts the number of training images per image class and the percent accuracy of the model. Figure 5 further depicts the number of test images correctly labeled per image class and the percent accuracy of the model. Overall, when the model is supplied an adequate number of training images, the model captures the disease features. Even with some of the diseases that have a limited number of images, when there are distinct features which classify the type of disease, the model is still able to predict the disease.
Figure 2: Graphical illustration of the CNN structure that was created for this effort
Table 1: Results of the accuracy of the custom CNN
Figure 3: 20 sample test images where an incorrect image has a red label
Figure 4: Number of training images per image class and the percent accuracy of the model
Figure 5: Number of images correctly labeled per image class and the percent accuracy of the model
Prediction Capability
Working with a small greenhouse, IDM Solutions developed a custom CNN to predict tomato plant disease based on images of the leaf which springboards the greenhouse into digital and AI-driven revolution. The development of the ML-based solution encompasses phase 1 of the incorporation of building a real-time mobile capability for the client to aid in the intelligent decision-making processes within their greenhouse. The farmer will now be able to develop a remediation strategy for irrigation cycles, nutrient and fertilizer adjustment, and crop yield management to maximize profitability based on the type of disease on the plant.