← Back to all projects
Machine Learning99% Sensitivity (Recall)

Pneumonia Detection with Transformers (CheX-DS)

Hybrid DenseNet121 + Swin Transformer in PyTorch with weighted asymmetric loss, achieving 99% recall on chest radiographs.

PyTorchSwin TransformerStreamlitDockerComputer Vision
Pneumonia Detection with Transformers (CheX-DS)

Project Overview

Computer-aided medical diagnosis requires an absolute minimum rate of false negatives. The CheX-DS architecture integrates the local pattern extraction capability of DenseNet121 with the global and contextual attention of a Swin Transformer.


Key Implementation Highlights

  • Weighted Asymmetric Loss: Formulated an asymmetric loss function that penalizes false negatives more severely to combat the marked statistical imbalance between healthy and pathological chest radiographs.
  • Outstanding Metrics: Achieved a 99% Recall (Sensitivity), reducing test loss from 1.03 (ResNet50 baseline) down to only 0.29.
  • Interactive Deployment: Designed an interactive web dashboard in Streamlit containerized with Docker, enabling reproducible inference and visual activation mapping on clinical medical imagery.