Offline computer vision iOS app for injectable dose verification
A native iOS app that reads an injectable medication dose optically through the camera, checks it against the patient's own schedule, warns aloud on a mismatch, and keeps a photographed, timestamped log — with a bespoke on-device computer vision pipeline and no backend at all.
A person self-administering an injectable medication has to read a dose off a small, transparent, graduated barrel — often several times a day, often in poor light, and very often with the same visual impairment their underlying condition causes. A magnifier doesn't help someone whose vision loss is central rather than acuity-based, and a caregiver reading the dose aloud isn't available three times a day. Separately, adherence is invisible: neither the patient nor their clinician has a reliable record of what was actually drawn and when, because the record depends on the patient remembering to write it down. The output the app produces is a number a patient may act on medically, on a scale where a single unit matters, with no server to correct a bad result afterward.
Because the device being measured has fixed, known physical geometry and high-contrast landmarks, the measurement was solved deterministically rather than reaching for a trained model: locate the landmarks by direct per-pixel colour classification, measure the distance to the plunger, and convert through the known geometry. That gets an explainable result rather than a confidence score, needs no training data, ships no model, and behaves identically on every device — all of which matter more in a safety-relevant health context than the flexibility a model would buy.
Three cheap checks run before the expensive per-pixel scan: the gyroscope is sampled continuously and analysis is skipped entirely while the phone is moving, frame sharpness is computed and blurred frames are discarded, and average brightness is measured with unusable lighting rejected and named specifically — glare, misalignment or poor light get different guidance rather than a generic failure message. Results then accumulate across many sampled frames with outliers trimmed against the running average, and once a specific value has repeated often enough it wins outright over the mean, which is the correct statistic for a discrete, quantised measurement.
The app already knows the patient's prescribed schedule, so the measured dose is cross-checked against it and a mismatch triggers a spoken warning and an explicit three-way choice — go back, adjust, or log anyway — while a large-type manual override means the machine is never allowed to insist it's right. The whole application is deliberately offline: no account, no backend, no analytics, no cloud storage, with health data leaving the device only through an export the patient explicitly initiates and shares.
A dose can now be verified without another person, performed by the phone and stated back to the patient instead of requiring good eyesight, a magnifier or a family member. Wrong doses are challenged rather than silently recorded, because the app knows the prescribed schedule and produces an audible warning and a deliberate choice on any mismatch. Adherence became evidenced rather than remembered, with every reading timestamped and photographed and exportable as CSV or PDF for a clinical appointment, and privacy is architectural rather than promised, since there's no backend, no account and no third-party service for patient data to pass through.
Something holding you back?
New build, rebuild, or adding AI to what you already have — I'll take a look and give you an honest perspective.