Inspiration

Parkinson's medication timing is set from the MDS-UPDRS finger-tapping test: tap your thumb and index finger together, as wide and as fast as you can, for ten seconds. It happens once every few months, scored by eye. Five movement disorder specialists scoring the same recorded trials only agree with each other 74% of the time (ICC 0.74 — VisionMD, npj Parkinson's Disease 2025). What matters clinically isn't just how fast someone taps — it's whether the taps get smaller as the trial goes on (amplitude decrement), which a stopwatch or a simple screen-tapping app can't see. A phone camera can.

What it does

Tapline runs that exact test on an iPhone, entirely on-device:

  • Prop your phone up, tap for ten seconds.
  • Apple's Vision framework tracks your thumb and index fingertip, frame by frame.
  • Tapline measures tap count, rate, per-tap width, and how much the taps shrink by the end — the same signal a clinician watches for, quantified.
  • A quality gate refuses a trial it can't measure reliably (hand out of frame, too much motion) instead of guessing.
  • History links results over time, so a patient can show a neurologist what a whole day looks like, not a fifteen-minute visit.

Not a medical device. Tapline doesn't diagnose anything or output a clinical score — it's a log to bring to a neurologist, not a verdict.

How we built it

The core is a shared Swift package (TapCore) used by both the iPhone app and a command-line benchmark tool — one analysis path, not a demo path and a separate real path. It uses Apple's new DetectHumanHandPoseRequest Vision API to track joints, a hysteresis-based tap detector with thresholds that adapt to a trailing window (so it keeps tracking taps even as they shrink), and AVAssetWriter/AVAssetReader for real-time recording and frame-accurate offline analysis.

We didn't just build it — we checked it, against HUBU-FIS, a public, CC-BY 4.0 dataset of 234 real, clinician-scored Parkinson's and control finger-tapping videos. On that dataset, evaluated under a protocol declared before the full run:

  • In the last third of each trial — where amplitude decrement actually shows up — our adaptive detector caught 8.10 taps on average, versus 2.13 for a detector calibrated once at the start.
  • Adding amplitude and decrement to tap rate improved separation of Parkinson's from control from AUC 0.58 to 0.68, and correlation with the clinician's score from Spearman ρ 0.38 to 0.47.

RevenueCat gates the product, not the science: tests are free forever, and Tapline Plus (monthly, annual with a trial, or lifetime) unlocks a one-tap visit report via a contextual paywall — shown when you ask for the report, not as an upfront wall.

Challenges we ran into

Running the benchmark against real clinical footage surfaced real bugs a synthetic test never would have: a CSV parser that silently broke on CRLF line endings (Swift treats "\r\n" as a single grapheme cluster), and a case-mismatch bug that flagged every single video as Parkinson's regardless of its actual label. Both are fixed and documented in the commit history, not swept under the rug.

Accomplishments that we're proud of

Building a benchmark tool that runs the exact same analysis code as the live app, so a claim proven on 234 real patient videos is a claim about the actual shipping product — not a separate demo path.

What we learned

That the hardest bugs to catch are the ones synthetic tests can't see — real-world data surfaces problems (encoding quirks, label mismatches) that clean, constructed test cases never will.

What's next for Tapline

Expanding the benchmark to a second public dataset, and exploring a companion Apple Watch app for passive tremor logging between tests.

Built With

Share this project:

Updates

Submission history