Kaggle Gemma 4 Good Hackathon · Health & Sciences

A photo. A name.A memory returns.

Zekra (ذكرة, "a keepsake") is a gentle companion for people living with Alzheimer's. Snap a photo of the person at the door. Zekra recognizes them, shares your shared story, and helps you through the day. Runs on-device with Gemma 4. Nothing leaves the phone.

Dedicated to my grandmother, and to every family living this
Today
9:41
Zekra patient home, captured live
Why we built this

For Teta,who knew every face in the album.

She made kibbeh for thirty people on Christmas. She remembered every grandchild's birthday, every neighbor's quarrel, every recipe her own mother had taught her in a village that no longer exists.

The last time I visited, she couldn't place me. The room went quiet, and my family tried to coax it out of her. "Teta, you know who this is. Look. Tell us who she is." She searched my face. I watched her search, and I watched it hurt. The shame of not knowing is its own grief, and it was happening to her in front of all of us.

Later, someone brought down the old photo albums. And there I was, in her arms, a baby, and she knew. She named every face on the page. The girl in the white dress, the wedding in 1985, the cousin in Beirut. The faces hadn't been lost. The bridge to them had.

Zekra is the companion I wish she'd had. A phone in her pocket that knew our faces, held our stories, and never made her feel ashamed for asking. It can't bring her back. But for the next family, maybe it can keep a little more of the warmth in the room.

Amanie, founder
How it works

One photo. Their whole story.

Zekra is built around a moment most families know: a familiar face, a name that won't come. We designed for that moment, and the dozen other small ones that make up the day.

01

Someone is at the door

Maybe it's your daughter. Maybe it's a neighbor. When the face doesn't quite click, you don't have to guess, and you don't have to ask.

9:41
SARAH · 94%
High confidence · 94%
This is
Sarah, your daughter
She lives nearby and visits often. You danced with Omar at her village wedding in 1995.
02

Snap a photo

One tap. Gemma 4 looks at the photo on the phone, not in the cloud, and matches the face against the people the family has added.

9:41
Zekra patient home, captured live
03

Their story comes back

"This is Sarah, your daughter. She brings her kids on Sundays. You danced at her wedding." The shared memory, surfaced gently, in the right moment.

9:41
ذ
Zekra
on-device
Good afternoon, Nora. ☀️ Sarah is coming over at 3. You'll have tea on the balcony.
Sarah? Remind me who she is.
Sarah is your daughter. She brings her two little ones. Layla loves your kibbeh.
Did I take my morning pill?
Not yet. Your Donepezil is on the kitchen counter, next to the breakfast plate.
Say something…
🎙
Live on-device

This is the real app, running on a Pixel.

No marketing render. That's the patient home screen captured from a real device. The whole flow ships in a single Flutter app: face recognition, the agent, the knowledge graph, medication tracking, and the caregiver console.

  • Gemma 4 E2B runs on-device via LiteRT-LM, no cloud roundtrips.
  • ArcFace embeddings for face recognition, stored locally.
  • ObjectBox + an embedded graph layer for people, memories, and events.
  • Native Gemma 4 tool-call parsing — twelve patient-facing tools, all offline.
9:41
Zekra patient home screen, captured live on macOS desktop instance
● captured live
What's inside

The whole day, gently held.

Zekra isn't a single feature. It's the small interventions, woven together, designed for the moments families told us about over and over.

Recognize the people you love

A photo is enough. Gemma 4 vision + an on-device face graph put a name and a relationship behind every familiar face.

A Knowledge Graph of a life

Not just faces. Events, places, shared memories, relationships through time. The graph grows with the family, never with the cloud.

Gentle, never quizzing

Zekra describes, never tests. "This is Sarah," never "Do you know who this is?" Built on hours of caregiver research.

Medications, kindly

Reminders for doses, side-effects logged, missed pills surfaced for the caregiver, without alarms that startle.

Two modes, one app

A simple patient view that never overwhelms. A full caregiver view, behind a PIN, for the people building the graph.

Private by architecture

Faces, names, memories all stay on the phone. No cloud account. No data partnership. The graph is yours.

Science & design

Built on the evidence, not on a hunch.

Zekra is grounded in 30+ years of dementia care research. Every interaction choice (what we show, what we don't, how we frame it) traces back to a specific Cochrane review, RCT, or clinical guideline. Below: the three non-negotiable principles that shaped the app.

Therapy

Reminiscence works.

Sharing personal photos and stories is one of the most validated non-pharmacological interventions in dementia care. Zekra is, at its heart, an AI-powered digital life-story book, activated by a photo instead of a flip-through.

22 RCTsCochrane review, 1,972 participants
0 adverse effectsacross all 22 trials
SMD −0.54for depressive symptoms (Huang 2015)
Cochrane Library · Woods et al., 2018
Tone

Tell, never quiz.

Every dementia authority (Alzheimer's Association, NIA, DAWN Method, Kitwood's person-centred care) explicitly warns against testing recognition. Zekra's agent prompts are tuned, fine-tuned, and red-team-evaluated to describe and share, never to interrogate.

Avoid"Do you know who this is?"
Use"This is Sarah, your daughter"
Whytesting recall causes guilt, fear, agitation
Alzheimer's Association · NIA · Kitwood (1997)
Privacy

Stay on the device.

Biometric data of a vulnerable population is the single most sensitive category in EU and US privacy law. Zekra processes faces, names, and memories entirely on the phone. There is no Zekra cloud to compromise.

GDPR Art. 9faces are special-category data
On-deviceGemma 4 + ArcFace, never cloud
No accountno telemetry, no sync server
GDPR Art. 9 · HIPAA · NIH ethical AI in dementia care
Design grammar

We didn't pick the design. The literature did.

AbilityNet's Designing for Dementia guidelines and the PMC Concept Analysis of dementia usability define a remarkably specific visual + interaction grammar. Zekra implements it line for line.

48 × 48 px
minimum touch target
4.5 : 1
contrast ratio on body text
Sans-serif
no italics, no all-caps
One task
per screen, no juggling
Persistent labels
never placeholder-only
No auto-play
no surprise videos or carousels
Linear nav
no deep menus to get lost in
No login wall
patient opens straight to today
Warm narrative
instead of fact retrieval
Why this exists

No system today combines all four.

A literature scan of adjacent products turned up several memory aids, medication assistants, and life-story apps. Each gets one or two of these right. None gets all four. That's the gap Zekra fills.

  • Cross-age face matching
    A photo from 1985 still finds your husband today.
  • Knowledge graph of a life
    People, events, places, shared memories, through time.
  • Warm narrative retrieval
    A story, not a name tag. "You danced with Omar at the wedding."
  • Fully offline-first
    No cloud, no account, no telemetry. The graph is the family's.
Stack

How it actually runs.

Vision + reasoning
Gemma 4 E2B, LiteRT-LM on Android GPU
Face embeddings
ArcFace R50 ONNX, 83 MB fp16 (or 42 MB int8, 0.5 pp behind)
Storage
ObjectBox for entities and edges, all on-device
Agent
LangGraph-style tool loop, fine-tuned care-dialogue corpus (SFT v9)
Fine-tuning
Unsloth LoRA on Gemma 4, exported to LiteRT-LM for on-device inference
Frontend
Flutter, one codebase, Android first, iOS planned
Read the full research review →

Sources: Cochrane CDSR (Woods et al. 2018), Huang et al. 2015, Lök et al. 2019, Kitwood Dementia Reconsidered (1997), Alzheimer's Association communication guidelines, NIA, DAWN Method, AbilityNet Designing for Dementia, PMC ethical-AI-in-dementia reviews, DEMENTIA-PLAN (arXiv 2503.20950). Full citations in docs/research-literature-review.md.

Under the hood

Engineering Gemma 4 onto a phone.

Running a fine-tuned Gemma 4 on Android end-to-end isn't yet covered by a single public recipe. We pieced one together — byte-level — building on Google's reference .litertlm bundle and the open-source LiteRT-LM toolchain.

Only publicly documented recipe

Fine-tuned Gemma 4, running fully on a Pixel.

A byte-level reverse-engineering of Google's reference .litertlm bundle revealed an undocumented INT2 / INT4 / INT8 mixed quantization, an SP_Tokenizer section the public Python builder can't emit through its API, and a face-shell splice pattern that lets our fine-tuned care-dialogue LoRA run on Pixel 9 Pro GPU with full delegation.

2.6 s
warm-up on Pixel 9 Pro
GPU
full delegation, 0 CPU fallback
0 ms
network latency, 100% on-device
E2B
smallest viable Gemma 4
Architecture

Everything happens on the device.

Inputs
Photo from camera
Voice or text
Caregiver edits
On-device pipeline
Fine-tuned ArcFace
lora_faces · 95.5% / cos≥0.40 on 13,868 pairs (+20.4 pp over stock)
Knowledge graph
ObjectBox entities + edges · people, events, memories, places, meds
Fine-tuned Gemma 4 E2B
LiteRT-LM custom bundle · GPU full delegation · wi8 prefill_decode
Tool-calling agent loop
check_meds · make_note · where_am_i · log_dose · ...
nothing leaves the device
Outputs
Narrative reply on screen
Person profile + photos
Graph mutations, persisted
End-to-end

Four pieces, tuned to ship together on a phone.

Each piece is well-trodden in isolation. Getting all four working together — offline, on a Pixel, with the persona and accuracy intact — is where the work lived.

On-device export

A working bundle for a fine-tuned Gemma 4.

The public LiteRT-LM toolchain exports most of the pieces — but not all of them. We read the official .litertlm byte-level and built the rest: byte-spliced the audio + vision + drafter sections from Google's reference bundle, wrote our own SP_Tokenizer splice (the public Python builder's enum doesn't cover it), and landed on a face-shell + wi8 prefill_decode pattern that runs on Pixel GPU with full delegation.

  • 12-section bundle, only the prefill_decode is ours
  • Audio + sentinels + embedders + drafter spliced from base verbatim
  • GPU full delegation, 2.6 s warm-up on Pixel 9 Pro
fine-tuned-gemma4-on-device.md
Face recognition

A verifier that operates at production threshold.

Stock ArcFace buffalo_l on Zekra's hard conditions (cross-pose, masked, family hard-negatives) sat at 75.1% accuracy at cos ≥ 0.20 — under the production threshold. We switched the loss family from pair-contrastive (collapses on family negatives by construction) to CosFace classification with s=15 recalibrated for 8,651 identities, froze BatchNorm to anchor the pretrained distribution, and added a head-only warmup epoch.

  • 95.5% accuracy at cos ≥ 0.40 — production-standard threshold
  • +20.4 pp over stock, +25.6 pp TNR, 2.8× embedding separation
  • Ships at 42 MB int8 (or 83 MB fp16) — ~4× smaller than stock buffalo_l
  • Subject-disjoint val: 13,868 CPLFW + MLFW protocol pairs
face-embedder-finetune.md
Knowledge graph

A life, modeled offline.

People, events, memories, places, medications — entities and edges with reactive watch streams. No cloud, no account, no telemetry. Imports family photos and builds the graph as the caregiver adds. Survives reboot, restore, sync — but only between the family's own devices, never through us.

  • ObjectBox-backed, single-file local store
  • Reactive providers via broadcast StreamController (no dropped events)
  • Biometric-grade privacy: GDPR Art. 9 'special category' data never leaves the phone
domain-model.md
Care-dialogue agent

Persona on the smallest viable Gemma 4.

E4B was tried and rejected: wi4 produces token-loop garbage, wi8 (~8 GB) gets killed by Android's lowmemorykiller. E2B is the target by physics, not preference. Our SFT corpus is doctrine-tuned for dementia care — 'tell, never quiz' — with native <|tool_call> tool calling so the patient view stays gentle while the caregiver gets full data fidelity.

  • Native Gemma 4 tool-call wire format, parsed in chat_flow.dart
  • Care-dialogue SFT (Unsloth LoRA) + ORPO planned post-merge
  • Verified persona survives wi8 quant on Pixel — wi4 mutes it
sft-training-findings.md

The full recipe — every failure, every flag, the bytes that mattered — is open source. If you find an earlier public recipe, please send it. We'll link it.

Field notes

From the blog.

In the works

Stories coming soon.

I'm writing up the research, the design decisions, and the lessons from putting a multimodal model on a phone. The first posts land here shortly.

Follow on Medium
Try it

Carry the memory in your pocket.

Zekra is open source and available now for Android. iOS and Play Store distribution are coming next. Free, forever, for every family who needs it.

available
Download for
Android
Get the latest APK from GitHub Releases.
Download APK →
coming soon
Coming to
Play Store
Submission in progress.
stay tuned
coming soon
Coming to
App Store
iOS build planned.
stay tuned
Browse the code on GitHub

Side-loading on Android: enable "Install unknown apps" for your browser, then open the downloaded .apk. The app needs camera + notifications.