
TrueMeds — Counterfeit Medicine Detection (ResNet-18 + Microservices)
TrueMeds implements a three-tier architecture: the browser uploads an image to an Express backend that authenticates the user (JWT, roles) and proxies to a FastAPI microservice running a fine-tuned ResNet-18 checkpoint (`best_cls_resnet18.pt`). Responses return label probabilities and confidence for pharmaceutical QC-style workflows. Training lives in `ml_service/main.ipynb` with dataset loaders, augmentation, and checkpointing. Docker Compose brings up client (3000), API (5000), and ML (8000) for one-command demos. Documentation covers API contracts (`/classify` on FastAPI, `/api/v1/ml/classify` on Express), environment configuration, troubleshooting, and dataset provenance (Roboflow Universe, CC BY 4.0).
Timeline
Course / multi-month
Role
Full-Stack & ML Engineer
Team
Course team
Status
Technology Stack
Key Features
Key Learnings
- Serving PyTorch models behind FastAPI with clear I/O schema
- JWT RS256 patterns mirrored across ML proxy APIs
- Vite + React integration with multipart uploads and token headers
- Responsible framing of ML for safety-critical domains (assistive, not sole decision maker)
Key Challenges
- Coordinating three runtimes and environment variables across dev and Docker
- Managing binary size and security of uploaded images
- Closing the loop between notebook-trained weights and production FastAPI load path
- Dataset size and domain shift risks in real-world deployment