← Back to projects

Assistive hardware · Solo project

MemoryLens

Wearable glasses that recognize familiar faces and quietly say who they are, built to run entirely offline on a Raspberry Pi with no internet and no cloud.

Python · ONNX Runtime · SCRFD · MobileFaceNet · SQLite · Raspberry Pi GitHub repo
100% offline, no face data leaves the device
512 MB Raspberry Pi Zero 2W target hardware
~26 MB total size of all three models combined
Once a familiar face is announced per session, then quiet

What it is

MemoryLens is a pair of glasses for people living with Alzheimer's, Parkinson's, or other memory conditions. A small camera watches for faces, and when it recognizes someone the wearer knows, an earpiece quietly says who they are and how they are related. It runs completely offline, with no internet connection and no face data ever leaving the device, which for medical use is the entire point.

The design choice I care about most is restraint. It would be easy to build something that narrates constantly, and that would be exhausting to wear. MemoryLens announces a familiar face once per session and then stays quiet. If the wearer wants a reminder, a button repeats it. The goal is a gentle cue, not a voice talking over your day.

How it works

The pipeline is a chain of small models, each picked to fit on hardware that costs about fifteen dollars. A frame comes off the camera, SCRFD finds the faces, an affine transform lines each one up to a standard position, and MobileFaceNet turns it into a compact embedding. That embedding is compared by cosine similarity against everyone enrolled in a local SQLite database. Above the similarity threshold, it counts as a match, and the person's name and notes are spoken through an offline text-to-speech voice.

Enrollment is its own guided flow. You center a face in a ring on screen, and it auto-captures about a dozen good samples once the face is centered, correctly sized, and high confidence. All of this targets a Raspberry Pi Zero 2W with 512 MB of RAM, so every piece had to stay small. The three models together come to roughly 26 MB, recognition runs on the CPU through ONNX Runtime, and on the Pi it processes a frame every couple of seconds, which is plenty for the pace of someone walking into a room.

What I took away

Building for a 512 MB target changes how you make decisions. I could not reach for the biggest, most accurate face model. I had to pick ones that fit, still worked, and accept the tradeoffs. Keeping everything offline ruled out the easy cloud APIs and meant the whole pipeline, speech included, had to run locally.

The part I did not expect to spend time on was the human side. A caregiver needs to edit who is in the database and what gets said, so I added plain text profile files they can open and change without touching code or re-enrolling anyone. The technical work was the face recognition. The design work was making something a person would actually want to wear, and that turned out to be the harder half.