In this article, the main focus has been placed on the detection of various diseases in paddy such as bacterial leaf blight, bacterial leaf streak etc., using Convolutional Neural Networks. Detection by the human eye may not always be timely and accurate, but detection using an automated process at regular intervals of time may prevent significant crop losses due to these diseases.
Introduction
I. INTRODUCTION
Paddy, or in common words, rice, is one of the most important food crops of the world. Rice feeds about half of humanity and any loss of rice crop proves to be catastrophic on many levels. Of the different channels through which crop loss may occur, such as insects, pests and bacterial and fungal diseases, bacterial and fungal diseases are what can be though to the most detrimental. Rice blast, caused by fungus Magnaporthe grisea and bacterial leaf streak, caused by Xanthomonas oryzae are perennially the two worst rice diseases worldwide and as such is their importance and the importance of rice, they are both among the top 10 diseases of plants in general. This article is primarily concerned with the detection of diseases in rice. The dataset of images was obtained from Kaggle for computational purposes.
II. CONVOLUTIONAL NEURAL NETWORKS
In deep learning, Convolutional Neural Networks or CNNs is a class of artificial neural networks, mostly applied while dealing with images. CNNs differ from ordinary neural networks in the sense that they use the mathematical operation of convolution in atleast one of their layers. CNNs have different layers:
The Convolution Layer: In a CNN, the input is usually an RGB image in the form of a tensor and its shape is usually given as (height of image) x (width of image) x (number of colour layers, for RGB, it’s 3). Convolutional layers convolve the input with a feature map, with shape (feature map height) x (feature map width). For example: consider a grayscale image (3 x 3) and a kernel (2 x 2) with strides of 1. Then, the convolution takes place as:
2. The convolutional layer is followed by an optional pooling layer. Pooling layers reduce the dimension of the data. Pooling involves selecting a pooling operation, much like selecting a filter for the kernel maps. The size of the pooling operation is usually smaller than the feature map. Two types of pooling are commonly used – Average Pooling and Max Pooling. An example of Max Pooling with an image of shape (4 x 4) with filter of shape (2x2) would be:
3. The third type of layer is a fully connected layer – every neuron in the previous layer is connected to every neuron in the subsequent layer. It is the same type of layer found in a traditional Artificial Neural Network. The flattened layer goes through a fully connected layer, following which images are classified.
4. The final layer is the output layer with sigmoid activation (for image classification with two classes) or SoftMax activation (for images with more than two classes).
III. APPLICATION TO PADDY IMAGES TO IDENTIFY DISEASES
Now, keeping everything in mind, we are going to develop a Convolutional Neural Network for the identification and classification of diseases in paddy. The dataset used to perform computations for this article contains 10407 images of diseased paddy plants, belonging to 10 different classes(of diseases), namely bacterial leaf blight, bacterial leaf streak, bacterial panicle blight, blast, brown spot, dead heart, downey mildew, hispa, tungro and finally, normal plants. A simple flowchart outlining the entire process can be formulated as in Figure 1.
After image augmentation and annotation was completed, the dataset was split into an 80-20 ratio of training and testing images. Following these tasks, a convolutional neural network was designed using the TensorFlow module in Python. The CNN had a data augmentation layer, followed by a repetition of 2D Convolution Layer and 2D Max Pooling Layer. The convolution layer had a kernel of size 32 and ReLU (Rectified Linear Unit) activation function was used in each of the convolution layers. The outputs of the convolution and the pooling layers were finally flattened and fed into a densely connected layer of 128 neurons. A brief summarization of model parameters can be found in Fig 3.
As can be seen from Fig. 4, the model accuracy on the validation dataset is very close to 1 (0.934) to be precise. Although hyperparameter tuning has been applied and the best model results are published, further improvements of model accuracy can be achieved with better hardware and an additional supply of training images.
IV. MODEL DEPLOYMENT
After a model has been developed, it has to be deployed suitably so as to achieve the true purpose. More often than not, farmers are not that savvy in handling technical devices and hence, it would be imprudent to develop only a manual implementation of the model. The entire process needs to be automated and connected to a power supply. Image capturing devices placed throughout the paddy fields will have to automatically capture images of the plants at regular specified time intervals, which would then be fed to the model to get the state of the plants. Upon detection of the diseases, alerts must be sent to the proper authorities for proper and timely eradication of the diseases.
Conclusion
Diseases appear in crops in different areas during different stages in the cycle of the plant development. It is impossible for human beings to accurately detect these diseases every time they appear. Automation of this timely detection of plant diseases can be effectively carried out with the giant strides that are being made in the field of computer vision. The Machine Learning techniques and IoT helping in their effective deployment, truly have the potential to push the agricultural sector towards a greater glory and make it more robust to such diseases.