4.1 Dataset
A great deal of information is required to train intelligent visualization and classification systems. As a rule, machine learning and deep learning systems perform better when trained with a large amount of data. For this research work, we utilized images taken from Thanjavur district, India, as well as data from the Plant Village database. Here, plant datasets are divided into three groups based on their types, such as corn, tomato, and potato. The goal of this study was to generate a unique data set that contained images of different sizes (S. Shrivastava, Singh, and Hooda 2015). We used whole data set to process, extract, select, and classify plant leaf images. Deep learning systems should be trained and evaluated using research and assessment data. According to the data set, Fig. 2,3,4, and Table 3 represents the leaf diseases related to corn, tomato, and rice plants, respectively.
Table 3 Summary of an image dataset
Dataset
|
Trained image
|
Tested image
|
Total image
|
Classes
|
Corn
|
1282
|
700
|
1982
|
2
|
Tomato
|
1100
|
600
|
1700
|
2
|
Potato
|
700
|
450
|
1150
|
2
|
4.2 Image Segmentation of Plant disease
Segregation is the process of splitting images from unsupervised algorithms in computer vision. The goal is to distinguish the diseased from the targeted part (Wang, Sun, and Wang 2017). A distinction was made between normal and diseased regions to obtain the target region (Barbedo 2016). Image segmentation can be done in many ways, including region-based edge-based, and cluster-based. There are several types of clustering, but clustering is the most important.The infected portions of the leaf are segmented using different techniques to extract the pigment(Wijekoon, Goodwin, and Hsiang 2008). A segmentation method (Camargo and Smith 2009b), however, proposed a method to separate the pigment from the earliest symptoms from the color images and to identify the pigment from the earliest symptoms in color images by implementing a segmentation method and utilizing the features as inputs for classifying the images in the segmentation method (Munisami et al. 2015). Researchers (Garcia and Barbedo 2016) developed an to segment plant leaf disease symptoms.
Based on the extracted images, the segmentation method classifies the disease type based on the pigments extracted from infected regions (Espinoza et al. 2016).(Camargo and Smith 2009a) considered the pigment in color images and differentiated the features based on segmentation. The author introduced a novel algorithm for segmenting disease symptoms on leaves. As far as disease identification is concerned, automatic segmentation was more accurate than manual segmentation. According to the author, automatic segmentation produces much higher levels of accuracy than manual segmentation. Using the K-means cluster algorithm, pigment in the leaves was separated from the background in this research (Fig. 5 and Algorithm I) (Archana and Sahayadhas 2018a).
Algorithm I: Improved K- means segmentation
Input:Median Filter Output Image (M_Filt)
Output: Segmented Image.
|
STEP 1: Read the input image from the preprocessed image.
STEP 2: In the next step, use rgb2lab to convert the input image into RGB format.
STEP 3: Again, convert the RGB image using the model of L*a*b* conversion he redundant function of using apply form
STEP 4: Next, resized the previous image with row-wise and column specified values were identified.
STEP 5: Calculate the k points on the centroids of the initial group, which represent the objects to be clustered.
STEP 6: The closest point to the centroid is determined by assigning the pixel value to each point and calculating the distance.
STEP 7: After finding the region of interest using different clusters and again convert the image using the RGB conversion model as Final Segmented Image.
|
4.3 Feature extraction: RGB Color Model
A color model can be used to differentiate the symptoms of a damaged pathogen. It is necessary to represent several models to analyze the color image. A model may be represented using RGB, which is converted to HSV. An RGB image has been created by combining three channels, i.e., red, green, and blue, using an additive color model in various ways to create a vast array of colors(Shih and Cheng 2005).An HSV space model is applied in this study to distinguish pathogens from healthy regions on the rice plant.As shown in Fig. 6, the RGB color model was transferred to the HSI color model using the equations below.
$$Hue\left(H\right)=2-ACOS \left\{\frac{\left[\left(R-G\right)+\left(R+G\right)\right]}{\sqrt[2]{\left(R-G\right)2+\left(R-G\right)\left(G-B\right)}}\right\}, B>G \left(1\right)$$
Where,
In this case, H refers to hue, which describes the pure color in the image. After S, we have Saturation, which refers to the dilution of pure color over white color. Finally, V stands for Value, which describes the color's brightness.
$$\text{I}\text{n}\text{t}\text{e}\text{n}\text{s}\text{i}\text{t}\text{y} \left( \text{I}\right)=\frac{R+G+B}{3} \left(2\right)$$
Where,
Red, green and blue represent an R, G, and B color model respectively. The greener pixel represents healthier and the arbitrarily minute value of ε which helps to eliminate division by zero.
Those pixels with the greenest color represent the healthiest portions. Here, the HSV color space model is used to analyze the RGB components, as shown in Fig. 7. This color space model is used to extract the specific infected portion of the leaf. Additionally, the color calibration reduces the effects of illumination variations caused by the unpredictable sun after collecting the color image data of the plant leaves. As illumination changes, R, G, and B color components' intensity values also change, resulting in modified intensity values, which will affect results (Algorithm II).
Algorithm II: NIBCF -Novel Intensity Based Color Feature
|
Input: Final_ Seg_ Image
Output: Color_ Feature
|
Step1: RGB to Gray conversation for the Future process.
Gray Image – rgb2gray (Final_ Seg_ Image);
Step2: After the Gray conversion we take the color features for the gray image by using the NIBCF.
Output Image = NIBCF(Gray_Image,6,2,1)
Where is Novel Intensity Based Color Feature.
Step3: To calculate the NIBCF Values based on the following steps.
Input_ Img = round (Input_ Img)
[r,c] = size(Input _ Img)
Mini_intelsity = min (min ( Input_Img)
Maxi_intelsity–max(Input _ Img)
Out_I = zeros (Maxi_intelsity – Mnini_intelsity + 1)
Then find Dir xandDir_yvalues
Dir_c = Dir_c * Dis
Dir_y = Dir _y * Dis;
Then find Intensity 1and Intensity 2 values
Based on the Intensity value we calculate the Output_ image.
Notes: Intensity1and Intensity2 values depend on the Minimum Intensity and Maximum_ Intensity.
Step4: After the, Output_ Image calculation we estimate the Color_Features for the input image.
M = Output _Image
for k1 – Output _Image
Idxr = 1 + fix(k1/4)
for k2 = 1:4:size(M,1)-3
MF = M(k1:k1 + 3,k2:k2 + 3)
A(idx,idxc) – mean(MF(:);
end end
Color_ Feature = abs(A(1:28))
|
The Y component of the color calibration shows the amount of energy (intensity) in the sensed color picture. Instead of using the original intensity value, a normalized value is used to overcome this problem. Assume that the real diseased image has M rows, N columns, and three channels, R, G, and B. A color image is collected and three channels are extracted, one luminance Y channel and two chrominance channels. Finally, the optimal threshold value is calculated by p0 ….pn-2 between the variance of the corresponding histogram. The following equation shows the whole process
$$\left\{{p}_{0, }{p}_{1}\dots ..,{p}_{n-2}\right\}=avg \&\text{max}\left\{{a}_{2}\left({t}_{0, }{t}_{1}\dots ..,{t}_{n-2}\right) \right(3)$$
Where
$${\sigma }_{n}^{2} ={\sum }_{i=1}^{n}({\mu }_{1}- {\mu }_{n}\left) \right(4)$$
Here µ is for calculating the image’s intensity and cumulating the final class value.
$${\omega }_{i }= {\sum }_{i=c}{p}_{i} \left(5\right)$$
The threshold quality can be determined by estimating the distance ratio between the inter-class and the total variance.
$$\eta =\frac{{\sigma }_{b}^{2}}{{\sigma }_{t}^{2}} \left(6\right)$$
A class fusion algorithm based on expert learning has been developed to automatically separate the discolorations of the sycamore bug from the leaves. The case of k1 > bk1 indicated no sycamore lace bug discoloration (natural leaf discoloration or leaf veins). Hence, the threshold is used for separating these two classes of the mask. Alternatively, the threshold was used unless the leaves were highly discoloured or showed trichomes or mildew spots. Since this is based on the intensity a subjective assessment of disease severity is based on the color distribution of lesions. Thus, the Intensity-based color index can be used objectively to quantify disease severity levels. Different pixels' red and green color values are considered to calculate the I value. According to this paper, the R-G-based Intensity value effectively indicates all diseases on green plant leaves. In diseased pixels, the lesion color ranges from yellow to dark brown.
4.4 Classification
Data models are evaluated based on their performance metrics during image classification. In machine learning, performance metrics are used to measure and evaluate the data.It is generally used for refining the parameters and selecting the appropriate model. (Gayathri Devi and Neelamegam 2018) Accuracy, Sensitivity, Specificity, Precision, and Recall are some of the most common performance metrics. Research and applications for identifying plant diseases can be extended with DL advancements. Early application of the right measures requires fast and accurate models. It depends on the goal of minimization or maximization when choosing the network architecture for a classifier system.
Our paper describes a multi-stage-CNN configuration inspired by the classical and successful Here, LeNet-5 and AlexNet CNN architectures and their improved performance by (Liu et al. 2018).Hence, Convolution, stochastic pooling, and softmax layers are presented in the CNN-based model(Pandian J. et al. 2022) A diagram and related parameters are shown in Fig. 8.
From the input image, edges, lines, corners, and other low-level features are extracted using the first convolutional layer. In each output map feature, multiple input maps are combined with convolutions. Here, the input maps Mj represents a set of input layers, Kij represents the convolutional kernel, bj represents bias, and l represents the lth layer. In addition to sigmoid and tanh functions, CNNs can also be implemented with additive biases.
$${x}_{j}^{l}=f ( \sum _{i \in M j}{x}_{i}* {k}_{ij}+ {b}_{j }^{i} (7)$$
The different kernel dimensions in CNNs were: Pi and Qj are its height and width, and wijpq is its weight at the position (p, q) connected to the layer (i, j), which we call sigmoid(). Unsupervised training is usually performed on CNN parameters such as bias bij and kernel weight wijpq.
$${v}_{ij}^{xy}=sigmoid \left({b}_{ij}+ \sum _{q=0}^{p\left(i-1\right)}\sum _{q=0}^{q\left(j-1\right)}{w}_{ij}^{pq}{v}_{\left(i=1\right)}^{\left( x+p\right)\left(y+q\right)}\right) \left(8\right)$$
From these kernel dimensions the InceptionV3 perception network had the lowest accuracy percentage compared to the other perception networks using the same learning transfer technique. As a result, the AlexNet did not achieve similar results because it had the best results but scored much lower than the authors do. Lastly, some classes in PlantVillage have more images than others, which could result in overfitting if trained incorrectly(Kaur et al. 2022). Finally, if done incorrectly, the Plant Village data set is not balanced due to a lack of balance regarding images per class, which could lead to overfitting.