# Adaptive Thresholding of CNN Features for Maize Leaf Disease Classification and Severity Estimation
## 4 Results
### Maize Leaf Disease Classification  
The proposed study demonstrates the superior performance of transfer learning for retraining convolutional neural networks by comparing the accuracies of CNNs such as Inception V3, DenseNet 121, DenseNet 201, MobileNetV2, VGG16, EffcientNetB0,  
Figure 8: Adaptive threshold computation. The algorithm accepts a 2D heatmap image \(I\) and an \((n\times m)\) 2D sliding window that samples the entire region of the heatmap. The sliding window partitions the heatmap into three regions: (i) test cell, (ii) guard cells and (iii) reference cells. For each test cell or heatmap index \(x_{i,j}\), the algorithm assigns guard cells around the test cell and calculates the average values of the pixels in the reference cells. The resulting mean is then multiplied by a fixed constant \(\alpha\) to determine the threshold value for that test cell only. Finally, a comparator compares this threshold with the value of the test cell to determine the presence of an ROI before moving to another heatmap position.  
ResNet50 and LeNet in the context of maize leaf disease classification. Table 1 shows the comparison results.  
The results of the experiments indicate that with a large enough dataset, a shallow CNN trained from the ground up can achieve remarkable accuracy compared with mainstream convolutional neural networks. Our shallow CNN with only three convolutional layers manages to achieve high accuracy of 96% compared with the 99% obtained from DensNet121 with 121 layers.  
This paper visualizes the class activation maps of the convolutional layers to estimate disease severity. The class activation heatmap has pixels of varying intensities. Bright pixels represent areas that contribute more to the decision of the CNN, while darker pixels represent regions that do not carry any features related to the predicted class.  
The adaptive thresholding algorithm adopted in this paper is not an entirely new concept. In fact, it was introduced in the field of radar target detection to identify objects buried in background noise [55]. We adopted the same concept due to the need to extract regions of interest that are often surrounded by background noise in class activation heatmaps. Background noise in this context refers to high-intensity pixels that are not part of the ROI. Fixed thresholding algorithms do not work well for these kind of problems, as the intensity levels of the ROI vary from pixel to pixel.  
The adaptive thresholding algorithm's performance is compared with that of the well-known adaptive thresholding techniques in image processing. From the results, we can conclude that the proposed adaptive thresholding framework, borrowed from radar signal processing, performs much better than [PERSON]'s, [PERSON]'s or [PERSON]'s thresholding. This is because thresholding relies on determining the average intensity of a region while isolating the cell being tested.  
The performance of the proposed adaptive thresholding method is highlighted in Figure 9. Here, we demonstrate its ability to extract the ROI from three maize leaf disease classes: Blight, Common Rust and Gray Leaf Spot. Consequently, leaf disease severity is then obtained by expressing the area of the ROI as a percentage of the total area of the leaf.