Abstract
Chest X-ray imaging is a crucial diagnostic tool in medical practice, used for assessing various respiratory, cardiovascular, and musculoskeletal conditions. Recent advances in machine learning and computer vision have led to the development of algorithms capable of analyzing chest X-ray images to identify signs of disease or abnormalities with high accuracy. This study focuses on the application of a customized WideResNet model, a deep learning architecture, to classify chest X-ray images quality and diagnose various diseases. Two datasets were used in this study: an in-distribution dataset containing 5000 chest X-ray images classified into four classes (Infiltration, Effusion, Atelectasis, and Mass) and an out-of-distribution dataset consisting of chest X-Rays images also classified into four classes (Cardiomegaly, Consolidation, Emphysema, No Findings). Both datasets were preprocessed using a Scharr filter to enhance image quality and reduce noise. The Scharr filter is known for its accuracy in detecting small and diagonal edges, making it a suitable choice for preprocessing chest X-ray images. The WideResNet model, an extension of the ResNet architecture, was employed for image classification. The model's architecture consists of multiple residual blocks stacked together, each containing convolutional layers, batch normalization layers, and ReLU activation functions. The skip connections within the residual blocks address the vanishing gradient problem, allowing the model to learn the identity function and preserve input information. Wide residual blocks, a key feature of the WideResNet model, were used to improve the network's capacity to learn complex features while reducing its depth. The customized WideResNet model was trained and tested on the in-distribution and the out-of-distribution dataset to evaluate its ability to generalize to other medical conditions beyond chest X-rays. The model's performance was assessed by fine-tuning hyperparameters such as network depth, residual block width, and the number of filters in each convolutional layer. This study demonstrates the potential of the WideResNet model, combined with effective preprocessing techniques, in improving the accuracy and speed of chest X-ray imaging for disease diagnosis. The application of deep learning models such as WideResNet in medical imaging can lead to better patient outcomes through faster and more accurate detection of diseases. Furthermore, the use of out-of-distribution datasets for testing showcases the model's robustness and potential applicability in various medical fields beyond chest X-ray imaging.