A Multiclass Deep Convolutional Neural Network Classifier for Detection of Common Rice Plant Anomalies

This study examines the use of deep convolutional neural network in the classification of rice plants according to health status based on images of its leaves. A three-class classifier was implemented representing normal, unhealthy, and snailinfested plants via transfer learning from an AlexNet deep network. The network achieved an accuracy of 91.23%, using stochastic gradient descent with mini batch size of thirty (30) and initial learning rate of 0.0001. Six hundred (600) images of rice plants representing the classes were used in the training. The training and testing dataset-images were captured from rice fields around the district and validated by technicians in the field of agriculture. Keywords—Deep neural network; convolutional neural network; rice; transfer learning; AlexNet


A. Background
Advances in computer processing power have revolutionized not only the scope of its applications but as well as its capability to process large amounts of data.What were once constrained to a few layers of neurons, neural networks can now span several layers each comprising thousands of computational neurons, largely due to significant improvements in computing hardware.With this structure, neural networks have evolved into more powerful computational tools closely mimicking human intelligence.
One of the hottest applications of machine learning nowadays is on computer vision and object recognition in general and in plant health monitoring in particular [1]- [3].Neural networks and deep learning currently provide the best solutions to many problems in image recognition, speech recognition, and natural language processing [4].Many researchers around the world continue to exploit this computational power in almost every problem domain.
In the case of rice farming, the concept supporting the application of DIP (Digital Image Processing) in the detection of rice plant diseases, is bolstered by the observation that most of these diseases are manifested in the appearance of the leaves and on the general visual features of the plant.It is therefore not hard to imagine that these visual patterns can be taken collectively to form multivariate basis of identity and traits unique to each type of disease.For instance, Brown Spot, a fungal disease, is characterized by presence of lesions that are initially small, circular, and dark brown to purple-brown [5], while Bacterial Blight is identified with wilting and yellowing of leaves, which, among older plants, turn yellow to grayish white with black dots due to the growth of various saprophytic fungi [6].

B. Machine Learning and Transfer Learning with AlexNet
Transfer learning is an approach in Deep Learning where a large, deep neural network previously trained on other datasets, is adopted and used in another application.Although designing and training a deep network from scratch remains an interesting alternative, adoption of pre-trained deep networks is an appealing prospect for a number of reasons: 1) "Reinventing the wheel" and training networks from scratch takes time and demands high computing power.A convolution network the size and topology of Alexnet finished training in 5 to 6 days; 2) Pre-trained networks have been trained over millions of images to classify thousands of object and classes; As such, the weights and biases connecting its neurons have been optimally calculated; and 3) Many successful applications of pre-trained networks can be found in the literature in applications such as speech recognition and object detection.
AlexNet is a deep, convolutional neural network originally designed to classify 1.2 million high-resolution images in the ImageNet Large Scale Visual Resolution Challenge (ILSVRC) in 2010 into 1000 different classes.It has 650,000 neurons in a total of eight (8) hidden layers of neurons.
During training, Alexnet used non-saturating neurons and a very efficient GPU implementation of the convolution operation.To reduce overfitting in the fully-connected layers the network employed "dropout" method that proved to be very effective.In the ILSVRC-2012 competition a variant of Alexnet achieved a winning top-5 test error rate of 15.3%, compared to 26.2% achieved by the second-best entry [7].www.ijacsa.thesai.orgInstead of sigmoid activation functions, Alexnet used Rectified Linear Units (ReLU), and a softmax function at the output of the last fully connected layer.

C. The Rice Plant and Its Infestations/Diseases
Rice, also known as Oryza Sativa, is one of the most important plants with over half the world population depending on it for food.It is primarily grown in Asia and in the Philippines for instance, rice is a major staple food for millions of Filipinos.As the Department of Agriculture [8] puts it, "an average Filipino diet is based on rice.It provides half of our calorie requirements and one-third of our protein intake.Rice accounts for 20% of food expenditures for average households, which increases to 30% for households belonging to the bottom third of our society."However, despite numerous programs being orchestrated by the government, the ever growing multiplicity of diseases that affect rice productivity remain a serious issue.Data from the International Rice Research Institute (IRRI) Knowledge Bank show that rice farmers lose an estimated average of 37% of their rice crop to pests and diseases every year [9].
If the onset of a rice disease is instantly detected, its spread can be prevented by administering timely interventions.But before anything can be done, the immediate detection of the early signs or stages and symptoms of any disease is paramount.As intimated in [9], "in addition to good crop management, timely and accurate diagnosis can significantly reduce losses."Generally, a rice disease is an abnormal condition that injures the rice plant and diminishes its ability to produce food.These diseases are readily recognized by their symptoms primarily by visual features on the leaves of the rice plant.There are a lot of disease types such as Bakanae, Rice Blast, Bacterial Blight, Sheath Blight, Brown Spot, Bacterial Leaf Streak, False, Smut, Tungro, Leaf Scald, and Stem Rot [9].

D. Original Contribution
A number of ideas have been proposed on the use of image processing techniques in the identification and detection of plant diseases such as those in [10]- [16].
The use of Support Vector Machines (SVM) as a classification algorithm was demonstrated in the work of Singh, et.al. [15] to identify Leaf Blast in rice plants.The authors claim 82% classification rate.
In [16], the image processing algorithm developed was enhanced with an interface for digitally illiterate users, especially farmers to efficiently and effectively retrieve information.This work therefore takes into account some principles of Human-Computer-Interaction (HCI), which is a significant step forward considering that most farmers are alien to the digital world.
Phadikar et al. [12] is also a study featuring use of Support Vector Machines.However, the proposed system has two (2) stages: first, detection of disease is accomplished through histogram characterization; and second, either a Bayes" or SVM algorithm is applied.The system gives 79.5% and 68.1% recognition rates for the Bayes" and SVM classifiers, respectively.
Aside from those mentioned above, while some researchers have also ventured into the possibility of using shallow, fullyconnected networks in identifying rice diseases/infestations, the use of deep convolutional networks for this application still remains to be examined.This is the main contribution of this paper.

E. Organization of the Paper
The rest of the paper is organized as follows: Section II discusses the methodologies followed, particularly the image data sets used and the leaning scheme applied.Section III presents the results, followed by the Conclusion in Section IV.

A. Fine-Tuning AlexNet
We first customized AlexNet in order to accommodate our multi-class classification problem.The objective of our proposed system is to classify an input image of rice plant of no a priori class into whether: (a) it is infested with golden apple snails; (b) it is afflicted with diseeases; and (c) it is normal and healthy.And since AlexNet was designed to handle 1000 classes, its output layer also has to be retrofitted to handle our 3-class system.
The learning algorithm used was the same with the pretrained network, Stochastic Gradient Descent, while adopting the mini-batch size of thirty (30), and base learning rate of 0.0001.

B. Rice Image Datasets
A total of two hundred twenty-seven (227) rice images were captured in ricefields around the district particularly in Goa (Digdigon, Buyo, Matacla, Abucayan, Halawig-gogon, Catagbacan, and Belen), San Jose (Bilog, Pugay, and Dolo), Tigaon (San Rafael, Vinagre, and San Antonio), and Sagnay (Huyon-huyon, and Nato).The images were resized into 227 x 227 resolution in order to fit the input layer of AlexNet.These images were manually augmented by operations such as cropping and rotations, as well as by downloading public images from [17].A priori classification was conducted with the assistance of technicians at the Municipal Agriculturist"s Office of Goa, Camarines Sur, and the Crop Protection Office of Department of Agriculture, Regional Office V.
Of the total images images, 70% or six-hundred (600) were used for training and the remaining 30% or two hundred fiftyseven (257) were used for testing.
There were also unstructured interviews conducted with farmers during the image capture activities.
Training images were labeled a priori classes and fed into the AlexNet network for fine-tuning.After 10 epochs, the accuracy was calculated using testing images.
The simulation data were stored and the activations are characterized visually as feature maps.www.ijacsa.thesai.org

III. RESULTS
Our unstructured interviews with farmers revealed that the three (3) most common rice plant infestations/diseases in the district are: golden apple snail, tungro, and black bug.Fig. 1 shows sample images of rice plants afflicted with these three (3) most common diseases/pests in the district.Fig. 2 is a sample image of rice infested with golden apple snail used in the test.The corresponding activations of all channels for convolution layers 1 and 2 are in Fig. 3 and 4, respectively.These activations are characterized as feature maps for visual analyses.Feature maps are results of the convolution layers which after the convolution filters are applied, which explain the similarity with edges.It can be noticed from the figures above that in convolution layer 1, there are 96 feature maps, while in layer 2, there are 256 thumbnail feature maps resulting from the 96 filters in layer 1, and 256 filters in layer 2 of AlexNet network, respectively.
Table I below summarizes the training and learning results, where stochastic gradient descent was used, with a base learning rate of 0.0001 and batch size of 30.The speed of convergence indicated by the figures under the column "time elapsed" is noticeable as is always the case in transfer learning.In matter of minutes the algorithm converged into an acceptable accuracy.
The column "mini-batch accuracy" refers to the accuracy of the algorithm measured against the sample set of images in the batch.Recall that in stochastic gradient descent method, the algorithm estimates the gradient vector using a number of random sample of images taken from the training set known as mini-batch size.In the case of our study, batch size is 30 images.The next figure, Fig. 5 shows a sample output of the classifier for twenty (20) test images.All images in the figure were correctly classified, the last image being labeled "Kuhol Detected"."Kuhol" is the Filipino term for Golden Apple Snail.

IV. CONCLUSION
Leveraging on the architecture of AlexNet, we developed in this paper, a deep convolutional neural network applying the pre-trained weights and biases for classifying rice plants" images into three (3) classes: normal, unhealthy, or golden apple snail infested.The dataset of images was comprised of images captured in several ricefields around the district as well as public images from the internet.The images were resized and augmented and divided into training-testing set of 70%-30% ratio.
Stochastic gradient descent was the learning algorithm applied under a base learning rate of 0.0001 and batch size of thirty (30), which produced the result of 91.23% accuracy.

V. FUTURE WORK
The researchers are interested to expand this work to include other classes not yet covered in the present study, such as Brown Spot and Leaf Blythe, and other rice abnormalities.The reason these were not yet included is the absence of sufficient image sets.Furthermore, the use of multispectral high altitude images are also being considered.

Fig. 2 .
Fig. 2. Sample test image of rice with golden apple snail infestation.

Fig. 5 .
Fig. 5. Classification results of 20 test images fed into the network.The last image at the lower right corner is labeled "kuhol detected"."Kuhol" is the Filipino word for golden apple snail.