For experimental setup, we used the system of configuration: Intel Core i3, 2.40 GHz, 6 GB RAM with 70 GB hard disk in Ubuntu 16.04 environment. All the experiments were performed using Python 3.5 version, Tensorflow 1.3 version, Keras 2.0.8 version and cuDNN. Keras is a deep learning library which contains all deep learning models (Kumar T. et al. 2020). Pickle 1.3 library is used to save and load the preprocessed object. The sklearn library is used for retrieving the confusion matrix. The convolution layer is created by the function Conv2D(). The normalization, pooling layer and dropout are created by the function BatchNormalization(), MaxPooling2D() and Dropout(), respectively, defined in the Keras library. The classification phase is constructed by a function dense() from the Keras library.
The confusion_matrix() function from sklearn library is used to obtain the confusion matrix. From this matrix, we can get true positive (TP), true negative (TN), false positive (FP) and false negative (FN) values. The metrics like accuracy, precision, recall and F1 score can be obtained from the confusion matrix values. Accuracy is the only metrics used in the experiment to measure the performance of the classification. It is shown in Equation (12.1). The dataset is taken from UCI (Rice-Disease-DataSet – GitHub) and GitHub (Rice Leaf Diseases DataSet – UCI). Bacterial leaf blight (BLB), brown spot (BS), blast (BL) and leaf smut (LS) are the four diseases of paddy taken from these two sources for training and testing as shown in Figure 12.11. The first source gives BLB, BS and LS of 40 images each. The second source gives BLB, BL and BS of 96, 80 and 100 images, respectively. From the two sources, the total images obtained for the experiment are BLB, BS, BL and LS of 136, 140, 80 and 40 images, respectively. The dataset is divided into 80% for training and 20% for testing.
Accuracy=(TP+TN)(TP+TN+FP+FN)(12.1)
Leave a Reply