Bilal Shihab / Projects

Localabs

An iPhone app that turns a photo of a lab report into a plain-language explanation, with a medical language model running entirely on the phone:

Solo projectApr 2026 – presentFeature-complete, not on the App Store
Specmeasured on iPhone 17
Model
MedGemma 4B, 2.5 GB quantized
Runtime
llama.cpp on Metal GPU
Photo to readout
~12 s
OCR
Apple Vision, table reconstruction
Output
Summary, glossary, diet, questions, medications
Context
30 days of HealthKit data
Cloud baseline
Command A+: 7.1 s median, ~$0.02/report
Requires
iOS 26, iPhone 15 Pro or later
Three Localabs screens: a report summary, the medication list, and questions for the doctor
Fig. 1A report summary over the original scan, the medication list it builds, and the questions it suggests for the next visit. The report is a sample.

Why I built it

Lab results are hard to interpret, especially when no one at home has medical training. A general-purpose chatbot can hallucinate, so it shouldn't be relied on for this, and it won't remind you about the medications on your report or suggest questions for your follow-up visit.

The hard part

The main challenge was keeping everything on the phone, including iPhones with less memory. With the 2.5 GB model loaded, processing a full 12-megapixel photo pushed 6 GB iPhones past their memory limit, and iOS shut the app down mid-scan. I fixed this by downscaling each photo to 2048 px before OCR. The app also checks for at least 7 GB of RAM at launch, because the App Store can't restrict downloads by device memory.