Inspiration
Pneumonia remains a leading cause of mortality worldwide, especially in areas with limited access to expert radiologists. We wanted to build a fast, reliable, and accessible diagnostic tool that assists healthcare workers in detecting pneumonia from chest X-rays quickly.
What it does
- X-Ray Analysis: Accepts chest X-ray uploads and accurately classifies them as normal or pneumonia-positive.
- Explainable AI (Grad-CAM): Highlights specific lung regions influencing the model's decision with visual heatmaps.
- Clinical Reporting: Generates instant diagnostic summaries with confidence scores for clinical evaluation.
How we built it
- Deep Learning & Computer Vision: PyTorch, Torchvision, OpenCV, and Grad-CAM for image classification and visual explanation.
- Backend: FastAPI and Uvicorn for lightweight, high-performance API endpoints.
- Frontend: Next.js, React, and Tailwind CSS for a clean, responsive medical console.
- Deployment & Cloud: Vercel for frontend hosting and Railway for cloud model inference.
Challenges we ran into
- Cloud Memory Constraints: Handling PyTorch and Grad-CAM memory overhead on cloud servers without triggering Out-of-Memory (OOM) errors.
- Cross-Origin Configuration: Resolving CORS policies and environment routing between the decoupled Vercel frontend and cloud backend.
- Model Explainability: Accurately mapping convolutional layer activations back onto variable-sized medical input images.
Accomplishments that we're proud of
- Successfully deployed an end-to-end deep learning pipeline connecting a modern web UI to a live inference backend.
- Integrated Grad-CAM heatmaps to ensure the model provides transparent, interpretable visual evidence rather than acting as a black box.
- Maintained low latency for real-time diagnostic predictions.
What we learned
- Best practices for containerizing and optimizing heavy ML dependencies (PyTorch/OpenCV) for production environments.
- The critical importance of explainable AI in medical imaging to build clinical trust.
- Seamlessly managing cross-platform deployments between Vercel and cloud compute providers.
What's next for Pneumonia-Detector
- Multi-Class Detection: Expanding the model to identify COVID-19, tuberculosis, and other respiratory conditions.
- DICOM Support: Enabling direct ingestion of standard medical imaging formats used in hospital PACS systems.
- Mobile Accessibility: Optimizing the interface and lightweight inference for mobile field clinics.
Built With
- fastapi-(python)
- pytorch
- react-18
- tailwind-css
- typescript
- uvicorn


Log in or sign up for Devpost to join the conversation.