## 4 Experiment Results
### Visual Explanations  
Figures 15-17 show the class activation mapping (CAM) [68] outcomes for malaria, DR, and TB, respectively. The examples are for different IMNets on test samples that had been identified as a true positives by the medical professionals. The CAM outputs can give us more confidence in our models' predictions as they highlight the discriminative regions used by a model to identify a positive class in the dataset. Our goal is to investigate and understand which image region has contributed more to the final model prediction. The idea of the CAM is the following: the probabilities predicted by the network are mapped back to the final convolutional layer to highlight the discriminative regions that are specific to that class [68]. CAM is the output of the activation map after the last convolutional layer for a particular class. CAM is the global average pooling layer applied following the last convolutional layer based on the spatial location in order to generate the weights [68]. Therefore, it allows distinguishing the areas within an image that differentiates the class [68]. \begin{table}
\begin{tabular}{l c c} \hline \hline
**Model** & **Total Parameters** & **MAdd** \\ \hline AlexNet & 61.10M & 0.72G \\ ResNet-50 & 25.56M & 3.87G \\ Inception v3 & 27.16M & 5.72G \\ DenseNet-201 & 20.01M & 4.29G \\ NasNet & 5.290M & 4.93G \\ IMNet \(A\) & 0.018M & 0.0099G \\ IMNet \(A\), \(B\) & 0.390M & 0.0218G \\ IMNet \(A\)-\(C\) & 0.412M & 0.0229G \\ IMNet \(A\)-\(D\) & 0.790M & 0.0666G \\ IMNet \(A\)-\(E\) & 0.955M & 0.0804G \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Resource usage for IMNets in comparison to benchmark models for the malaria dataset networks. Figure 14: Balanced accuracy on the malaria dataset versus the number of floating-point multiply–add (MAdd) operations. The computational cost is measured based on the number of MAdd operations to process a single example. The diameter of each circle is proportional to the MAdd of the network. Figure 16: CAM visualization on DR dataset for a test sample using various IMNets: (**a**) Original sample, (**b**) IMNet \(A\), (**c**) IMNet \(A\), \(B\), (**d**) IMNet \(A\)-\(C\), (**e**) IMNet \(A\)-\(D\), and (**f**) IMNet \(A\)-\(E\). Figure 15: CAM visualization on malaria dataset for a test sample using various IMNets: (**a**) Original sample, (**b**) IMNet \(A\), (**c**) IMNet \(A\), \(B\), (**d**) IMNet \(A\)-\(C\), (**e**) IMNet \(A\)-\(D\), and (**f**) IMNet \(A\)-\(E\). Consider the malaria detection CAM results in Figure 15. The original sample image is shown in Figure 15a. The nucleic acids carry three components: parasites, white blood cells, and platelets highlighted in a bluish-purple color [69], as shown in the original sample image. The other images in Figure 15 are CAM results overlaid on the original image for IMNet \(A\) through IMNet \(A\)-\(E\). Note that the red regions in the CAM images correspond to the spatial regions of most significance to the classifier. In the case of the CAM result for IMNet \(A\), shown in Figure 15b, the attention is distributed and not well focused on the clinically significant portion of the thin smear image. On the other hand, as the IMNS process continues and modules are added, the CAM results do show that attention becomes more focused over the stain on the thin smear example to identify the presence of parasites. The CAM results showing the most focus on the nucleus is IMNet \(A\)-\(D\), and this is the best performing IMNet as shown in Table 3.  
The CAM results for DR are shown in Figure 16. The input retinal image is shown in Figure 16a. Note that the key aspect of detecting or diagnosing DR is the presence of retinal lesions. There are two main types of lesion defects, white lesions and red lesions. The hard and soft exudates are collectively referred to as white lesions. The red lesions are microaneuryss and hemorrhages [70]. The original image contains hard and soft exudates.