jadouse5/SahhaAI

Offline, private, open-source wound-care AI for Morocco's disconnected clinics. VLM + segmentation, runs in-browser (WebGPU) or locally. By Jad Tounsi El Azzouzi.

TypeScript

0

3 commits

updated Jun 18, 2026

See the code

README

SahhaAI — صحة AI

Offline, private, open-source wound-care AI for healthcare in disconnected zones.

Built for nurses and clinics in isolated regions of Morocco (Merzouga, the High Atlas, the deep south) where there is no reliable internet and patient data must never leave the room.

Author: Jad Tounsi El Azzouzi · License: Apache-2.0 · For the Moroccan AI community 🇲🇦


What it does

A nurse photographs a wound or injury. SahhaAI, running 100% locally, will:

  1. Segment the wound region from the photo (lightweight SAM).
  2. Assess it with a Vision-Language Model — type, severity signals, red flags.
  3. Instruct — step-by-step first-aid in French / Arabic / Darija / English.
  4. Show the materials needed — what they are, what they look like, and the Darija word for each (so the nurse can ask a villager for them).

No cloud. No account. No data upload. Works on a plane, in the desert, in a power-cut clinic.

Two ways to run — both offline-capable

ModeEngineWhereUse
Browser (WebGPU)transformers.js + WebGPUAny modern laptop/phone, in a browser tabZero install. Scan QR → app loads → models cached → unplug internet, keep working.
Local (MLX)mlx-vlmApple Silicon Mac (M-series)Faster, larger model, full power for the live demo.

The same web app is hostable on Vercel and runnable straight from the link as a local PWA — open it once online, it caches everything, then runs with the network off.

Models (all small, all open)

  • VLM (browser): SmolVLM-256M-Instruct (ONNX, WebGPU) — ~150–250MB, loads on a phone; 500M variant for more quality
  • VLM (local MLX): mlx-community/Qwen2.5-VL-3B-Instruct-4bit — richer assessment
  • Segmentation (browser): SlimSAM (Xenova/slimsam-77-uniform) — WebGPU
  • Segmentation (local): LiteMedSAM — laptop-grade medical SAM
  • Optional upgrade: MedGemma-4B (Google medical VLM) for clinics with a 16GB+ GPU

Quick start

# Browser / web app
cd SahhaAI
npm install
npm run dev          # http://localhost:3000  — works offline after first load

# Local MLX (Apple Silicon)
cd mlx
pip install -r requirements.txt
python run_wound_vlm.py --image ../data/sample_wound.jpg --lang darija
python run_segmentation.py --image ../data/sample_wound.jpg

Repo layout

SahhaAI/
├── app/            Next.js web app (WebGPU, PWA, offline, 4 languages)
│   ├── lib/        in-browser inference (VLM + segmentation)
│   └── locales/    fr / ar / darija / en
├── mlx/            local Apple-Silicon inference (Python, mlx-vlm + LiteMedSAM)
├── deck/           Reveal.js pitch deck (open deck/index.html)
├── docs/           business model, deployment, model card, safety
├── scripts/        QR-code generator for the hosted link
└── data/           Moroccan materials reference + Darija glossary

⚠️ Safety

SahhaAI is decision support, not a doctor. It assists trained health workers; it does not replace them. See docs/SAFETY.md. For life-threatening cases: stabilize and evacuate.

License

Apache-2.0 — free for everyone, forever. Built to be forked, improved, and deployed by anyone serving neglected communities.

Jad Tounsi El Azzouzi

Contributors

jadouse5

3 commits

jadouse5/SahhaAI

Offline, private, open-source wound-care AI for Morocco's disconnected clinics. VLM + segmentation, runs in-browser (WebGPU) or locally. By Jad Tounsi El Azzouzi.

TypeScript

0

3 commits

updated Jun 18, 2026

See the code

README

SahhaAI — صحة AI

Offline, private, open-source wound-care AI for healthcare in disconnected zones.

Built for nurses and clinics in isolated regions of Morocco (Merzouga, the High Atlas, the deep south) where there is no reliable internet and patient data must never leave the room.

Author: Jad Tounsi El Azzouzi · License: Apache-2.0 · For the Moroccan AI community 🇲🇦


What it does

A nurse photographs a wound or injury. SahhaAI, running 100% locally, will:

  1. Segment the wound region from the photo (lightweight SAM).
  2. Assess it with a Vision-Language Model — type, severity signals, red flags.
  3. Instruct — step-by-step first-aid in French / Arabic / Darija / English.
  4. Show the materials needed — what they are, what they look like, and the Darija word for each (so the nurse can ask a villager for them).

No cloud. No account. No data upload. Works on a plane, in the desert, in a power-cut clinic.

Two ways to run — both offline-capable

ModeEngineWhereUse
Browser (WebGPU)transformers.js + WebGPUAny modern laptop/phone, in a browser tabZero install. Scan QR → app loads → models cached → unplug internet, keep working.
Local (MLX)mlx-vlmApple Silicon Mac (M-series)Faster, larger model, full power for the live demo.

The same web app is hostable on Vercel and runnable straight from the link as a local PWA — open it once online, it caches everything, then runs with the network off.

Models (all small, all open)

  • VLM (browser): SmolVLM-256M-Instruct (ONNX, WebGPU) — ~150–250MB, loads on a phone; 500M variant for more quality
  • VLM (local MLX): mlx-community/Qwen2.5-VL-3B-Instruct-4bit — richer assessment
  • Segmentation (browser): SlimSAM (Xenova/slimsam-77-uniform) — WebGPU
  • Segmentation (local): LiteMedSAM — laptop-grade medical SAM
  • Optional upgrade: MedGemma-4B (Google medical VLM) for clinics with a 16GB+ GPU

Quick start

# Browser / web app
cd SahhaAI
npm install
npm run dev          # http://localhost:3000  — works offline after first load

# Local MLX (Apple Silicon)
cd mlx
pip install -r requirements.txt
python run_wound_vlm.py --image ../data/sample_wound.jpg --lang darija
python run_segmentation.py --image ../data/sample_wound.jpg

Repo layout

SahhaAI/
├── app/            Next.js web app (WebGPU, PWA, offline, 4 languages)
│   ├── lib/        in-browser inference (VLM + segmentation)
│   └── locales/    fr / ar / darija / en
├── mlx/            local Apple-Silicon inference (Python, mlx-vlm + LiteMedSAM)
├── deck/           Reveal.js pitch deck (open deck/index.html)
├── docs/           business model, deployment, model card, safety
├── scripts/        QR-code generator for the hosted link
└── data/           Moroccan materials reference + Darija glossary

⚠️ Safety

SahhaAI is decision support, not a doctor. It assists trained health workers; it does not replace them. See docs/SAFETY.md. For life-threatening cases: stabilize and evacuate.

License

Apache-2.0 — free for everyone, forever. Built to be forked, improved, and deployed by anyone serving neglected communities.

Jad Tounsi El Azzouzi

Contributors

jadouse5

3 commits

Languages

TypeScript

40.7%

Python

36.2%

CSS

8.9%

HTML

8.9%

JavaScript

3.2%

Shell

2.0%