🚧 Work in progress

AI-Powered Chest X-ray Analysis & Report Generation

A chest X-ray reader that classifies disease, shows where it looked, and writes the report.

PyTorchDenseNetGrad-CAMCheXpertFastAPIReactOllama
Code & demo coming soon

Problem

A raw disease probability is not enough to trust a medical model. A clinician needs to know what the model saw, where it looked, and to have it explained in the language of a radiology report. Can a single pipeline classify thoracic pathologies, visually justify each prediction, and turn the findings into a structured report?

Approach

An end-to-end pipeline: an uploaded chest X-ray is preprocessed (with source-aware normalization), passed through a DenseNet multi-label classifier to produce per-pathology probabilities, and explained with Grad-CAM heatmaps that highlight the regions driving each prediction. Confidence-thresholded findings are then handed to a pluggable LLM (local Llama 3.1 via Ollama by default, or OpenAI) that writes a structured radiology report, exportable to PDF. The whole thing is a React + FastAPI app with a live model/LLM-provider toggle. The classifier is being trained on CheXpert (with an IU X-Ray report-structure reference); the app already runs end-to-end on a pretrained torchxrayvision DenseNet.

Result

A working v1 that goes from an uploaded X-ray to an 18-pathology prediction, a Grad-CAM heatmap over the driving regions, and a generated radiology report with PDF export — all self-hosted so no image or PHI leaves the machine. Training a custom DenseNet121 on CheXpert and swapping in those weights is in progress.

Highlights

  • DenseNet multi-label thoracic-disease classifier (CheXpert / torchxrayvision)
  • Grad-CAM explainability — visual justification for every prediction
  • Pluggable LLM radiology report (local Ollama or OpenAI) with PDF export
  • React + FastAPI app, fully self-hosted for PHI privacy — research/education demo, not a diagnostic tool
Next projectClinical RAG Assistant →