# PneumoNet: Artificial Intelligence Assistance for Pneumonia Detection on X-Rays
## 3 Pneumonet Framework
### Pneumonia Classification Module
However, PCM exhibited robust pneumonia detection in the paediatric Dataset #3 [10], adeptly identifying subtle consolidations, and showed comparable reliability in Datasets #1 [8] and #2 [9], indicating no apparent age-related performance bias. Data augmentation (e.g., \(\pm 5^{\circ}\) rotations) and preprocessing (e.g., 227 \(\times\) 227 resizing) standardised features, mitigating potential bias, though future explicit age-specific testing is planned to confirm generalisability. With predictions benchmarked by accuracy (ACC), precision (P), recall (R), F1 score, and Area Under the Curve (AUC), the test set assesses generalisation. Dataset #1 [8] was used initially as a proof of concept for training and testing, and PCM was compared to AlexNet and ResNet-50 to validate the usage of AlexNet as the backbone of the PCM's new architecture. The results and corresponding metrics are compared in Table 2, and the derived AUCs are displayed in Figure 2. PCM outperforms the two conventional approaches that were offered. In Table 2 the top three rows show the comparison of the results from PCM to AlexNet and ResNet-50 using Dataset #1 [8], the bottom two rows show the results of PCM when training and testing with Dataset #2 [9] and Dataset #3 [10]. Figure 3 shows the confusion matrix obtained by PCM. The results demonstrate that PCM achieves high performance across all three datasets, as evidenced by the confusion matrices and derived metrics. For Dataset #1 [8], the model achieved an accuracy of 96.70%, with high precision (97.80%) and good recall (89.70%), indicating strong classification ability despite a slightly higher false negative rate (FN = 26). Dataset #2 [9] showed even better performance, with 259 true positives (TP), only 3 false positives (FP), and 11 false negatives (FN), resulting in near-perfect precision and recall. Similarly, Dataset #3 [10] exhibited robust metrics, with 248 TP, 4 FP, and 20 FN, reinforcing the model's consistency in accurately identifying positive cases while minimising misclassifications. The low FP rates across all datasets highlight PCM reliability in reducing false alarms, while the varying FN rates suggest potential differences in dataset difficulty or class imbalance. Overall, the results confirm the model's generalisability and effectiveness in pneumonia detection across diverse datasets. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Model** & **Accuracy** & **Precision** & **Recall** & **AUC** & **Specificity** & **F1 Score** \\ \hline ResNet-50 trained and tested with [8] & 91.3\% & 82.1\% & 86.6\% & 96.6\% & 93\% & 84.2\% \\ AlexNet trained and tested with [8] & 91.1\% & 78.3\% & 92.9\% & 97.4\% & 90.5\% & 84.9\% \\ PCM trained and tested with [8] & 96.7\% & 97.8\% & 89.7\% & 98.39\% & 99.3\% & 93.12\% \\ PCM trained and tested with [9] & 98.7\% & 98.9\% & 95.9\% & 99.77\% & 99.6\% & 98.35\% \\ PCM trained and tested with [10] & 97.7\% & 98.4\% & 92.5\% & 98.04\% & 99.5\% & 96.97\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of the results obtained using three different models on the chest X-ray over Dataset #1 [8] and the PCM results for Dataset #2 [9] and Dataset #3 [10]. Figure 3: The confusion matrix obtained after being trained by PCM when trained and tested with Dataset #1 [8], Dataset #2 [9], and Dataset #3 [10], respectively. Figure 2: ROC curves and AUC obtained using different models, Dataset #1 [8]. Table 3 shows the comparison of the results obtained by the pneumonia classification module with the work of other researchers concerning the detection of pneumonia on X-rays. From top to bottom, the table shows the comparison of different models trained and tested with different datasets, which can be compared with PCM, which appears at the bottom of the table. The comparative analysis in Table 3 benchmarks PneumoNet's pneumonia classification module against multiple deep learning models, demonstrating PCM's superior accuracy.