Inspiration

As a final-year AI student, I've spent the past year building and deploying real diagnostic AI systems, including a chest X-ray classifier for COVID-19 and pneumonia. Through that work, I kept running into the same wall: even when a model performs well, doctors don't trust predictions they can't verify. That gap between "accurate" and "usable" stuck with me. I wanted to build something that didn't just diagnose, but actually explained itself, since that's the only way AI has a real chance of helping under-resourced clinics rather than sitting unused. Growing up seeing how stretched thin healthcare access is outside major cities in Pakistan made this feel personal rather than theoretical, I wanted a project that could genuinely serve people, not just perform well on a benchmark.

What it does

The system takes a chest X-ray, classifies it as COVID-19, Pneumonia, or Normal using a custom CNN, and then uses Grad-CAM to generate a heatmap showing exactly which regions of the lungs drove that prediction. On top of that, a RAG-based report generator produces a structured, readable summary grounded in reference medical context, giving clinicians a fast, explainable second opinion instead of an opaque black-box output.

How we built it

I built the classifier using a custom SeparableConv2D CNN architecture, trained and evaluated to reach around 94% accuracy across the three classes. Grad-CAM was layered on top of the trained model to produce visual explanations for each prediction.

For the report generation piece, I built a RAG pipeline using ChromaDB for retrieval and the Groq API for generation, so the system could produce grounded, readable summaries rather than hallucinated text.

The whole thing was wrapped in a FastAPI backend, containerized with Docker, and deployed to Kubernetes via Minikube, with MLflow tracking experiments and GitHub Actions handling CI/CD ,so it wasn't just a notebook model, but a deployable pipeline end to end.

Challenges we ran into

  • Getting Grad-CAM to produce clean, medically meaningful heatmaps (rather than noisy or misleading activations) took a lot of iteration on which convolutional layers to target.
  • Integrating the RAG pipeline with the classifier without slowing down inference was another hurdle, since retrieval and generation both add latency that matters in a clinical context.
  • On the infrastructure side, getting Docker and Kubernetes to work reliably together locally, especially around networking and resource limits in Minikube, involved a fair amount of debugging.

Accomplishments that we're proud of

What we learned

I learned that a model's accuracy is only part of the story — explainability and deployment readiness are what actually determine whether an AI tool could be trusted and used in a real clinical setting. I also got much more comfortable with the full MLOps lifecycle, not just training models but tracking, containerizing, and deploying them reliably.

What's next for RadiAI: Explainable Chest X-Ray Diagnosis Assistant

it can be improved by using transfer learning.

Built With

Share this project:

Updates