03Academic
MedCalyx
AI Lung Disease Detection & Data Annotation
End-to-end chest X-ray workflow: classification, Grad-CAM interpretability, pseudo bounding boxes, and persistence of predictions as annotation-ready records with export helpers.
- Company
- Anna University — Capstone
- Role
- Full-Stack AI & ML Engineer
- Duration
- Final year capstone
- Category
- Full-Stack
/images/work/medcalyx/cover.webp
Full-bleed project cover. Wide editorial crop of the interface or its subject matter.
01Impact
By the numbers.
3
Integrated services
E2E
Upload → analyze → UI
CAM
Attention overlays
API
Proxied Next routes
02Overview
The brief.
Three-service architecture — Next.js app (auth, upload, results), FastAPI main API (JWT, images, orchestration), and a dedicated FastAPI inference service for preprocess → classify → Grad-CAM → bbox heuristics. Weak supervision plus interpretability, framed for future detector training.
Problem
Radiology workflows need fast, trustworthy assistance on CXR: not only a label, but where the model looked and geometry that can feed downstream training and review.
Solution
Normalize AI responses in the main API, store images and predictions, expose Grad-CAM and bbox overlays to the UI, and keep inference isolated in ai_service so models can evolve without rewriting the core API.
03Features
What it does.
Chest disease classification
Inference path with confidence scoring and normalized disease labels for the main API.
- PyTorch-oriented stack
- ai_service
Grad-CAM & pseudo-boxes
Attention maps and heuristic boxes surfaced as annotated previews and stored metadata.
- Grad-CAM
- Heatmap → bbox
Main API orchestration
JWT auth, multipart uploads, calls to ai_service, predictions and optional annotation records.
- FastAPI
- SQLite / PostgreSQL
Next.js client
Login, register, upload, and results with server-side proxy routes to the backend.
- Next.js
- React 19
- Tailwind
04Architecture
How it's built.
frontend
- Next.js App Router
- Proxy API routes
- Tailwind
- Session token flow
main api
- FastAPI
- Prediction orchestration
- Static uploads/outputs
- JWT
ai service
- FastAPI /annotate
- Preprocess
- Classify
- Grad-CAM
- Visualization
data
- Users
- Images
- Predictions
- Annotations (COCO-style helpers)
05Challenges
What was hard.
Aligning flexible model JSON with a stable API contract
PredictionService normalizes aliases for labels, confidence scale, and bbox formats.
Keeping inference scalable and replaceable
Dedicated ai_service on a configurable base URL so weights and pipelines can ship independently.
06Gallery
A closer look.
/images/work/medcalyx/01.webp
Interface detail. Crop tight on one screen or one interaction — not a full-page screenshot shrunk down.
/images/work/medcalyx/02.webp
Interface detail. Crop tight on one screen or one interaction — not a full-page screenshot shrunk down.
/images/work/medcalyx/03.webp
Interface detail. Crop tight on one screen or one interaction — not a full-page screenshot shrunk down.
/images/work/medcalyx/04.webp
Interface detail. Crop tight on one screen or one interaction — not a full-page screenshot shrunk down.
07Stack
Built with.
- Next.js
- React
- FastAPI
- Python
- PyTorch ecosystem
- JWT
- PostgreSQL / SQLite
Outcomes
- Runnable tri-service stack from local dev to deployment-oriented config
- Interpretable outputs (CAM + boxes) tied to stored predictions
- Clear separation between product API and model experimentation