top of page

Advanced Chest X-Ray Classification Using Swin Transformer and Histogram Equalization

Overview:
Developed a state-of-the-art deep learning system leveraging the Swin Transformer architecture to classify chest X-ray images into categories such as COVID-19, pneumonia, and normal. The project incorporated innovative data augmentation techniques, such as histogram equalization, to enhance model performance and interpretability. This work aimed to contribute to the field of medical image analysis, enabling accurate and efficient diagnosis of chest diseases.

​

Key Contributions:

  1. Data Preprocessing and Augmentation:

    • Processed the ChestX-ray14 dataset consisting of over 112,000 images with diverse pathologies.

    • Applied histogram equalization to improve image contrast and quality, alongside additional augmentations like random rotation, flipping, and cropping.

  2. Model Development:

    • Implemented the Swin Transformer, a hierarchical vision transformer model, to capture local and global dependencies within chest X-ray images.

    • Trained the model using the Adam optimizer with an adaptive learning rate for optimal performance.

  3. Evaluation and Metrics:

    • Evaluated the model using metrics such as accuracy, precision, recall, and F1-score, achieving an average AUC of 0.861 on the test set.

    • Compared the Swin Transformer’s performance with state-of-the-art architectures like ResNet50 and DenseNet121, demonstrating superior classification accuracy.

  4. Visualization and Interpretability:

    • Incorporated attention maps to highlight critical regions within X-ray images contributing to the model’s classification decisions, enhancing interpretability.

  5. Deployment and User Interface:

    • Designed and deployed a user-friendly web interface using Flask and HTML, enabling healthcare professionals to upload X-ray images and receive diagnosis results in real-time.

    • Integrated features to display attention maps and classification probabilities for increased user trust and transparency.

 

Skills and Technologies:

  • Programming & Frameworks: Python, PyTorch, Flask

  • Machine Learning: Swin Transformer, Adam optimizer, histogram equalization

  • Data Processing: Image augmentation, normalization, dataset balancing

  • Visualization: Attention maps, performance metrics (confusion matrix, AUC-ROC)

  • Web Development: Flask, HTML/CSS for interface design

 

Results and Impact:

  • Achieved state-of-the-art classification performance, outperforming traditional deep learning models in accuracy and efficiency.

  • Provided an accessible and interpretable diagnostic tool for healthcare professionals, with potential applications in clinical settings to improve patient outcomes.

bottom of page