work / cervical-lens

CervicalLens

Edge cytology screening plus genomic risk stratification for cervical cancer, with a clinician portal, an offline mobile app and an API.

Years
2026
Status
research
Live
cervicallens.hallelx2.com

What it is

Two models for two different moments. The first screens Pap-smear cell images on a low-end phone with no connection: a student model distilled from a larger teacher, exported to ONNX at 0.28 MB, 3.6 ms per image on CPU against 14.4 ms in PyTorch. It flags a slide when p(abnormal) ≥ 0.50. On the held-out set that catches 96% of abnormal slides and clears only 40% of normal ones (30 of 50 normals flagged), so a positive is a referral to a pathologist, not a diagnosis.

Read more

The second is for confirmed patients. Two regularised Cox models on TCGA-CESC data, a virulence axis and a metastasis/APOBEC axis, are each split at the median into a 2×2 matrix from LOW to CRITICAL. Combined C-index 0.655; CRITICAL against LOW has a hazard ratio of 2.2 (p = 0.010).

Both surface in a Next.js clinician portal, an offline-first Expo app and an API. Research use only.

Stack

  • Python
  • PyTorch
  • ONNX
  • lifelines
  • TCGA-CESC
  • TypeScript
  • Next.js
  • Expo

Counted

  • 0.28 MBmodel size
    ONNX export
  • 3.6 msCPU latency
    vs 14.4 ms PyTorch
  • 96% / 40%sensitivity / specificity
    held-out set
  • 0.655genomic C-index
    95% CI 0.588–0.713
  • 2.2hazard ratio, CRITICAL vs LOW
    p = 0.010

How it works

The system as a machine on a bench. Hover or use the arrow keys to drive it.

0.28 MB
Needle: the 0.28 MB student's p(abnormal) against the 0.50 markSlides: a dot on the label is abnormal on ground truth, a ring is normalCoin columns: TCGA-CESC patients per risk cell (91, 54, 56, 93)Research use only, not a clinical device: a distilled 0.28 MB student reads each slide in 3.6 ms on CPU and flags p ≥ 0.50, catching 96% of abnormal slides but sending 60% of normal ones to the pathologist too (specificity 0.40, AUC 0.84; the tour's slide readings are illustrative, its rates the held-out test set's). A confirmed case is then placed on two Cox axes from TCGA-CESC, virulence (C 0.591) and metastasis (C 0.645), split at their medians into LOW to CRITICAL (combined C 0.655, HR 2.2 CRITICAL vs LOW, p = 0.010).

The path through it

  1. CaptureA Pap-smear cell image on the phone, offline.
  2. ScreenThe distilled 0.28 MB ONNX model, 3.6 ms on CPU; p(abnormal) ≥ 0.50 flags the slide.
  3. ReferPositives go to a pathologist review queue.
  4. StratifyExpression, mutations and HPV genotype feed two Cox axes: virulence (C = 0.591) and metastasis/APOBEC (C = 0.645).
  5. Risk matrixMedian split on each axis → LOW, MODERATE, HIGH, CRITICAL.