R&D · Research noteComplete

Counterfeit Medicine Vision Model

Deep learning system for detecting counterfeit medicine from a photo, transfer-learning image classifier with a full deployment stack around it.

HealthcareComputer VisionResearchML
ScopeResearch
DomainHealthcare
StatusComplete

Key metrics

1,367

Training images

Roboflow Universe, CC BY 4.0

3

Services

React · Express · FastAPI

Binary

Task

Authentic vs counterfeit

Research question

Verifying medicine authenticity today requires expert inspection or lab testing, neither scalable to a pharmacy counter, a supply-chain checkpoint, or a consumer checking a suspicious package.

Method

A ResNet-18 model, transfer-learned to classify medicine images as authentic or counterfeit with a confidence score, deployed as a proper microservices stack rather than a notebook demo.

FastAPI handles inference. Express handles JWT auth and role-based access. React handles real-time upload and verification.

Architecture

  1. 01

    ResNet-18 transfer learning for authentic vs counterfeit classification with confidence

  2. 02

    FastAPI owns inference

  3. 03

    Express owns JWT auth and role-based access around the inference endpoint

  4. 04

    React handles real-time upload and verification

  5. 05

    Docker Compose packages the full stack

Findings

  • Full three-service microservices architecture (React → Express → FastAPI) shipped end-to-end, not just a trained model
  • JWT-authenticated API with role-based access control around the inference endpoint
  • Trained on a Roboflow counterfeit-medicine dataset (1,367 training images) with a documented train/val/test split

Method details

Task
Binary image classification, authentic vs. counterfeit
Model
ResNet-18, transfer learning
Architecture
FastAPI (ML inference) + Express (auth/API) + React (frontend)
Delivery
Dockerized, docker-compose for full stack
Dataset
Roboflow Universe counterfeit-medicine dataset, CC BY 4.0

Stack

AI / ML
PyTorchResNet-18 transfer learning
Backend
FastAPIExpressMongoDBJWT
Frontend
ReactVite
Infra
DockerDocker Compose

References

  • Roboflow Universe counterfeit-medicine dataset (CC BY 4.0)
  • ResNet-18 transfer learning (PyTorch)

Applying this method in production?

Talk research → product