Computational system requirements and dataset preparation
An 11th Gen Intel® CoreTM i5-11320H CPU with 16 GB RAM and Windows 11 Home was the computing setup. This supplied the processing capacity required to effectively process the image data and train the deep learning model. The most recent version of Anaconda was installed in order to manage Python packages and streamline the development process. Python 3.11 was chosen as the programming language and Jupyter Notebook was utilized for coding. For model building, training and assessment, necessary libraries such as Scikit-learn, TensorFlow and Pandas were installed.
Images of bean leaves classified as healthy or diseased are included in the dataset utilized in this study, which was obtained from Kaggle. There are about 1300 photos in the dataset, of which 1036 are used for training, 129 for validation and 130 for testing. Each image had a variety of perspectives, scales and orientations and were taken in a range of lighting situations. The dataset also suffers from noise, which makes it a suitable candidate for exploring data augmentation techniques. Fig 1 depicts images from the dataset with different categories.
Processing of data
• In order to prepare the raw images for deep learning model training, data preprocessing is an essential step. The following are the preprocessing procedures used in this study:
•
Resizing: To guarantee consistency throughout the collection, every image is scaled to a standard size of 224 by 224 pixels. To guarantee high-quality inputs for model training, any corrupted or unintelligible photos were eliminated.
•
Normalization: To guarantee that the model trains on a consistent scale, the pixel values are normalized to a range of [0, 1] by dividing by 255.0.
Data augmentation
The training images are subjected to several augmentation techniques, including random zoom, random rotations and random horizontal flipping. These additions improve the model’s capacity to generalize fresh, untested data and help to avoid overfitting. 80% of the dataset was used for training, 10% for validation and 10% for testing. This segmentation guarantees the model’s generalization to new data and helps avoid overfitting.
Why ResNet-20
The choice of ResNet-20 for classifying bean leaf diseases is based on several factors. First, its network depth is ideal for the task. It captures complex patterns in the images while avoiding the need for excessive computational resources or large datasets. This makes it suitable for tasks with limited resources. Second, residual learning enhances the network’s ability to learn intricate features in leaf images. The residual blocks allow the network to detect complex patterns, which traditional CNNs might struggle with. Lastly, computational efficiency is a key advantage of ResNet-20. With fewer layers and parameters, it requires less memory and processing power. This makes it well-suited for real-time, on-field disease detection, where quick predictions are essential. Overall, ResNet-20 offers a good balance of performance and efficiency for bean leaf disease classification.
ResNet-20 model architecture
A deep convolutional neural network (CNN) called the ResNet-20 architecture was created to manage challenging picture categorization tasks, like detecting illnesses in bean leaves. The usage of residual connections, which enable the network to get around some layers, is one of its main characteristics. This makes it possible to train deeper networks efficiently and lessens the vanishing gradient issue. ResNet-20 learns the residuals, or differences, between the input and output rather than explicitly learning a mapping from input to output. This facilitates the network’s learning of intricate visual features.
The architecture in this work was based on residual blocks, which was made up of two or more convolutional layers. Every block features a skip connection that enabled the output of the preceding layer to be appended to the output of the block’s final convolutional layer, avoiding the current layers. This addition enhanced gradient flow and preserves previously learned features, resulting in more effective training. There were three primary groups of residual blocks in ResNet-20, each with three blocks: 16 filters in the first group, 32 filters in the second group and 64 filters in the third group. These blocks extracted information from the input image that were e more abstract and sophisticated. Fig 2 shows the ResNet-20 architecture.
The layout was started with a 224x224x3 (RGB) input image, which was followed by an initial convolutional layer with 16 3x3 filters and the same padding. Batch normalization and a ReLU activation to add non-linearity came next. The model used global average pooling after the convolutional layers to reduce the feature maps’ spatial dimensions and converted them into a fixed-length vector. A completely linked layer with 512 units and a ReLU activation, which further integrated the learnt features, came next. To avoid overfitting, the fully linked layer was subjected to a dropout rate of 0.5. The class probabilities for the three categories- Angular Leaf Spot, Rust and Healthy-were produced by the last layer, a softmax layer with three units. Table 1 summarizes the hyperparameters used in the model’s training and testing.
Evaluation metrics
To evaluate the performance of the model, several metrics were used.
Accuracy
The percentage of correctly classified images from the test set.