maziyarpanahi /openmed
Local-first healthcare AI: clinical NER and HIPAA PII de-identification on hardware you control. 2,200+ medical models, 35 model-backed PII languages, and Python, MLX, Android and browser runtimes. Apache-2.0 SDK.
★ 5,769⑂ 735👁 23▤ 47
+0
Daily
+0
Weekly
+158
Monthly
5,769
stars
735
forks
23
watchers
–
prs
–
issues
47
releases
README
Your Data. Your Model. Your Hardware.
Turn clinical text into structured, de-identified insight on hardware you control.
OpenMed's core local runtime performs extraction and de-identification after required model artifacts are available. Model downloads, remote-provider adapters, telemetry-enabled paths, and user-configured integrations may use a network; review each model and dataset's terms.
PyPI package ·
Python 3.11+ ·
Model catalog ·
Research paper ·
Apache-2.0 SDK source
OpenMedKit ·
Apple Silicon / MLX ·
Android / ONNX Runtime Mobile ·
Browser / Transformers.js ·
Documentation
2,266 manifest entries · 35 model-backed PII languages · Apache-2.0 SDK
English ·
简体中文 ·
Español ·
Français ·
Deutsch ·
Italiano ·
Português ·
Nederlands ·
العربية ·
हिन्दी ·
తెలుగు ·
日本語 ·
Türkçe ·
فارسی ·
Kiswahili
---
See it in action
This iPhone example uses OpenMed's local runtime after the required model artifacts are available:
On iPhone via OpenMedKit: scan a clinical note, de-identify it, and extract clinical signals with Apple MLX processing locally in this configuration.
Real-time PII de-identification: in this configured local workflow, the Nemotron Privacy Filter redacts names, addresses, IDs, and billing data from a synthetic clinical discharge packet. (All values shown are synthetic.)
---
30-second example
python
from openmed import analyze_text
result = analyze_text(
"Patient started on imatinib for chronic myeloid leukemia.",
model_name="disease_detection_superclinical",
)
for entity in result.entities:
print(f"{entity.label:
MLX on Apple Silicon: 24–33× faster than CPU PyTorch for the Privacy Filter: median latency per inference step, lower is better.
---
On-device on Android — Kotlin & ONNX Runtime Mobile
OpenMedKit also ships as a native Android/Kotlin library for local document
intake, OCR handoff, PII redaction, and token-classification inference through
ONNX Runtime Mobile. Mobile model repositories include stable tensor names,
dynamic sequence axes, tokenizer files, labels, and Android-ready fp32, fp16,
INT8, and optional .ort outputs.
Add the scoped JitPack repository in settings.gradle.kts:
kotlin
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven {
url = uri("https://jitpack.io")
content { includeGroup("com.github.maziyarpanahi") }
}
}
}
Then use the immutable OpenMed v3.2.0 release:
kotlin
dependencies {
implementation("com.github.maziyarpanahi:openmed:v3.2.0")
}
See the Android installation guide for local builds and
publishing details.
kotlin
val model = OpenMedKit.fromDirectory(modelDir)
val entities = model.analyzeText("Patient Alice Nguyen was seen in cardiology.")
- Android ONNX profile emits model.onnx, model_fp16.onnx,
model_int8.onnx, tokenizer assets, labels, and openmed-onnx.j