Classificação em três classes (normal, bacteriana e viral) em radiografias de tórax usando MobileNetv2 e Grad-Cam - Almeida, Miguel Felipe de (Universidade Federal de São Carlos, 2026)
Pneumonia is a respiratory disease of significant clinical and epidemiological relevance, whose initial investigation often involves the analysis of chest radiographs. However, the interpretation of these images can be challenging due to subtle radiographic patterns, overlapping anatomical structures, variations in image quality, and similarities among different pulmonary manifestations. In this context, deep learning techniques have been widely investigated as support tools for medical image analysis. This work aimed to develop and evaluate an automatic system for classifying chest X-rays into three classes: Normal, Bacterial Pneumonia, and Viral Pneumonia, using transfer learning with MobileNetV2, a lightweight convolutional neural network architecture, and visual analysis of predictions through Grad-CAM, an interpretability technique based on activation maps. For this purpose, a public chest X-ray dataset was used and reorganized into three categories based on the original file structure and filename patterns. The images were divided into training, validation, and test sets, resized to the MobileNetV2 input format, and submitted to a preprocessing workflow compatible with the adopted architecture. The training process was conducted in two stages: initially with the convolutional base frozen and, subsequently, with partial fine-tuning of the final layers of the network. The model performance was evaluated using accuracy, precision, recall, F1-score, confusion matrix, and a complementary analysis with a calibrated decision threshold. On the test set, the MobileNetV2 model achieved an accuracy of 80.13%, with the best performance observed for the Bacterial Pneumonia class and greater difficulty in distinguishing between the Normal and Viral Pneumonia classes. The complementary analysis with the calibrated threshold increased the accuracy to 80.45%, representing a slight improvement over the baseline model. In addition, the Grad-CAM maps made it possible to observe the image regions that most influenced the network decisions, contributing to a qualitative analysis of the predictions. The results indicate that the proposed approach is technically feasible as a support method for multiclass chest X-ray classification, combining satisfactory performance, low computational cost, and visual interpretability. However, the model should not be interpreted as an autonomous diagnostic tool, since it presents limitations related to the dataset, the absence of external clinical validation, and the inherent difficulty of separating visually similar radiographic patterns.
Classification into three classes (normal, bacterial, and viral) in chest radiographs using MobileNetv2 and Grad-Cam.
Keywords: Pneumonia; Radiografia de tórax; Chest X-ray; Aprendizado profundo; Deep learning; MobileNetV2; Grad-CAM; ENGENHARIAS::ENGENHARIA ELETRICA; 3. Saúde e Bem-Estar