Skip to content
All projects
05

VITRA

Turn reagent colours into measurable data.

Year
2026
Status
Live
Category
Full-Stack
vitra-lab.vercel.app
The VITRA landing page: the ten reagent pads as orbs inside a glass RGB colour cube
The VITRA landing page: the ten reagent pads as orbs inside a glass RGB colour cube

01 / Overview

VITRA is a computer-vision research platform for use case KJS-HC-03, Urine Test Strip Reader using Colorimetry as a Point-of-Care Technology, at K J Somaiya School of Engineering. Urine dipsticks screen for diabetes, urinary tract infections, and kidney and liver disorders, but they are read by eye against a printed chart: subjective, lighting-dependent and categorical.

VITRA is the software for a sealed, LED-lit Raspberry Pi 5 reader. After a 120 s timed reaction it checks the photo, finds the ten reagent pads, measures their colour, turns colour into numbers only when a compatible calibration exists, and routes every result to a clinician, who signs off every run.

It is a research prototype: not a medical device and not clinically validated. All bundled data, images and models are synthetic, and nothing in it is a real patient sample. The hosted demo runs on a temporary database that resets on its own, with one-click demo accounts for the admin, clinician, operator and researcher roles.

02 / Problem

Urine dipsticks screen for diabetes, urinary tract infections, and kidney and liver disorders, but they are read by eye against a printed chart.

Reading by eye is subjective, depends on the lighting and gives only categories, not measurable values.

03 / Solution

  1. 01A sealed, LED-lit Raspberry Pi 5 enclosure photographs the strip after a fixed 120 s reaction, so every strip is captured at the same moment and under the same light.
  2. 02Nine whole-image quality checks run first; a failure stores the run as an invalid image and nothing is inferred.
  3. 03OpenCV localises and rectifies the strip, segments the ten pads, and measures RGB, CIELAB and HSV features per pad, giving a 30-D RGB vector.
  4. 04Colour becomes a value only when a compatible calibration exists; otherwise the analyte reports calibration required. An explicit result-state policy labels every result measured, experimental, synthetic, out of range, indeterminate, invalid image, unavailable or calibration required.
  5. 05Every result is routed to a clinician for review, and every state change is audited.

04 / Features

  1. 01Analysis from an upload or browser-camera capture, with a reaction timer and strip product and batch selection
  2. 02A result inspector with the original image, overlay, pad inspector and subject trend
  3. 03A clinician review queue with accept, reject, needs-repeat and note decisions, audited
  4. 04PDF and JSON reports with a SHA-256 hash, linked to the run and a pseudonymous sample
  5. 05Calibration studio: CSV dataset import, linear, poly2/poly3 ridge, kNN and random-forest models with a group-aware split, 5-fold CV and empirical 95% intervals, and a model lifecycle in which the database forbids validating a synthetic-trained model
  6. 06Model lab with per-model evaluation and side-by-side comparison
  7. 07Device registry with rotating API keys and an ingest API; a clearly labelled simulated device is included
  8. 08Honesty rules: synthetic data is labelled SYNTHETIC everywhere, there are no green "normal" or red "abnormal" indicators, and red is reserved for image and system faults

05 / Architecture

  • 01Next.js 15 App Router, React 19, TypeScript strict, Tailwind CSS v4, Drizzle ORM, zod and pdf-lib
  • 02PostgreSQL 15+ through DATABASE_URL; embedded PGlite for local development and the temporary demo fallback; 23 tables from hand-written SQL migrations
  • 03Python CV and calibration service (Starlette, OpenCV, scikit-learn): quality, localise, segment, features and overlay, plus calibration training and inference with a joblib model store
  • 04The web app owns all state; the browser and devices never call the CV service directly
  • 05scrypt passwords, HttpOnly cookie sessions, RBAC across 5 roles, zod-validated server actions, protected file serving and an audit trail for every state change
  • 06Tests: Vitest, Python unittest and a Playwright smoke suite

06 / Screens

The reaction: each pad is a point in RGB space that travels as its colour develops over 120 seconds
The reaction: each pad is a point in RGB space that travels as its colour develops over 120 seconds
The result inspector for a synthetic seeded run: original image, acquisition metadata and the ten segmented pads
The result inspector for a synthetic seeded run: original image, acquisition metadata and the ten segmented pads

Let's build something.

© 2026 GLAZY, a freelance web & SaaS agency · Founded by Krutik Mhatre
Footage: Mixkit (7 clips)