A Novel CNN with Spatial and Channel Attention for Automated Chest X-Ray Diagnosis
Abstract
This study proposes a novel Convolutional Neural Network (CNN) approach with both spatial and channel attention mechanisms to improve automated chest X-ray image classification. The architecture integrates Squeeze-and-Excitation (SE) Blocks for channel attention and a spatial method to focus on informative regions of the sample, thereby enhancing both local and global feature extraction. The model processes input images of size 224×224×3 and comprises three convolutional blocks, each consisting of Conv2D, Batch Normalization, SE Blocks, Spatial Attention, MaxPooling, and Dropout layers. The dataset, sourced from Kaggle, contains 6,000 chest X-ray images categorized into three classes: Lung Opacity, Normal, and Viral Pneumonia. A standardized preprocessing pipeline was employed, including resizing, normalization (rescaling pixel values to [0, 1]), and real-time augmentation via TensorFlow’s ImageDataGenerator. The model was trained for 10 epochs using a batch size of 32. It achieved a final test accuracy of 93.01%, with a peak validation accuracy of 88.57%, and an Area Under the Curve (AUC) score of 97.22%.DOI:
https://doi.org/10.31449/inf.v49i3.9065Downloads
Published
How to Cite
Issue
Section
License
Authors retain copyright in their work. By submitting to and publishing with Informatica, authors grant the publisher (Slovene Society Informatika) the non-exclusive right to publish, reproduce, and distribute the article and to identify itself as the original publisher.
All articles are published under the Creative Commons Attribution license CC BY 3.0. Under this license, others may share and adapt the work for any purpose, provided appropriate credit is given and changes (if any) are indicated.
Authors may deposit and share the submitted version, accepted manuscript, and published version, provided the original publication in Informatica is properly cited.







