← Back to Leaderboard
Omaziyarpanahi

maziyarpanahi/openmed

Local-first clinical NLP SDK for entity extraction and de-identification

AI FrameworkQuickstart ↓
Engineering Health (Methodology)
A+ · 95/100
Maintenance Activity
● Updated 4d ago
Latest Release
v4.0.0
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption20/25
Release Cadence20/20
License Clarity20/20
DockerSelf-HostedLocal AIGPUAPI
Total Stars
★ 5,896
24h Growth
+4
7d Growth
+45
Forks
779

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

maziyarpanahi/openmed Star History (2025-10-03 - 2026-12-04) ALL-TIME STAR HISTORY (2025-10 – 2026-12) +5.9k in 427d · avg +14/day 6.2k 3.1k 0 2025-10-03: ★ 12025-11-01: ★ 782025-11-29: ★ 842025-12-27: ★ 922026-01-24: ★ 1572026-02-21: ★ 2642026-03-21: ★ 3792026-04-18: ★ 7942026-05-16: ★ 1,1902026-06-13: ★ 3,3642026-07-11: ★ 4,4422026-08-08: ★ 4,9142026-09-05: ★ 5,2102026-10-03: ★ 5,4262026-10-31: ★ 5,7422026-12-04: ★ 5,896 ★ 5.9k 2025-10 2026-05 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

OpenMed is a clinical preprocessing SDK, not a retrieval engine. Its Python APIs separate clinical entity extraction (analyze_text), PII span detection (extract_pii), and text transformation (deidentify). The selected model and language route determine the inference path. Applications can call these operations in-process, process collections with BatchProcessor, or integrate through REST, CLI, or MCP; the MCP surface includes a typed tool registry.

The Python Hugging Face path supports CPU and CUDA. OpenMedKit provides a Swift/MLX path with CoreML fallback for supported token-classification artifacts, while Android uses Kotlin and ONNX Runtime Mobile. Compatible ONNX exports can also run on Python CPU or in the browser via Transformers.js. Kotlin parity tests check tokenizer offsets, span boundaries, and decoder outputs against Python, but do not imply that every registry model is portable across runtimes.

Key Capabilities & Differentiators

The registry contains 2,266 manifest entries. Its specialized checkpoints include a 434M disease model for DISEASE, CONDITION, and DIAGNOSIS, and a 109M anatomy model for ANATOMY, ORGAN, and BODY_PART. PII extraction supports 42 language routes, 35 of them model-backed. Russian currently uses a multilingual default-model placeholder; the optional Indic NER family requires explicitly configured weights and is neither bundled nor automatically selected.

Smart merging addresses PII spans split during tokenization. De-identification can mask or replace text, hash values, or shift dates. Beyond text, the mobile workflow supports local document intake and redaction review, including manual coverage of a handwritten signature and checking the exported PDF before sharing. The CPU clinical-brief demo illustrates evidence grounding and review handoff with synthetic NER/NLI test doubles; it does not validate trained-model performance or clinical fitness.

Trade-offs & Limitations

For one model on one backend, a direct Hugging Face or ONNX Runtime integration can be simpler. OpenMed earns its integration cost when a team needs both clinical NER and de-identification, or wants to share workflows across servers and devices. Compared with a managed API, local inference can keep payloads within infrastructure you control, but shifts artifact distribution, capacity planning, upgrade testing, and privacy validation to your team.

The Apache-2.0 SDK license does not settle the terms of individual weights or datasets, and catalog size does not establish accuracy for a given language or document type. A Safe Harbor-aligned configuration can target the 18 identifier categories, but it does not confer HIPAA compliance. Use representative data to check residual identifiers, clinically relevant text removed by mistake, and final exports. Size RAM and VRAM against the actual model set, input lengths, and concurrency rather than a single baseline.

Hardware & Deployment Guide

Start with Python 3.11+ and openmed[hf] for CPU or CUDA, or openmed[mlx] on Apple Silicon. Add the service extra to run python -m openmed.service.logging with /health, /analyze, /pii/extract, and /pii/deidentify. The root Dockerfile and Compose configuration provide a self-hosted path on port 8080; test the model preload list, resident-model cap, concurrency, and request-body timeouts under representative load.

For disconnected operation, stage compatible weights and tokenizer assets in advance and verify the full workflow without network access. Downloads, remote adapters, telemetry-enabled paths, and configured integrations can still use a network. The release sequence shows what has changed: v3.2.0 broadened language routing and local model integrations, v3.3.0 added workflows for documents, images, speech, and waveforms, and v4.0.0 advanced offline mobile document processing and redaction review.

Language routing: 42 PII language codes, 35 model-backed; Russian currently uses a multilingual fallback placeholder.
Clinical model catalog: 2,266 manifest entries, including specialized checkpoints for disease, medication, anatomy, and gene entities.
De-identification: Smart merging joins fragmented PII spans; transformations include masking, replacement, hashing, and date shifting.
Android deployment: ONNX exports support fp32, fp16, INT8, and optional .ort artifacts; Kotlin parity tests cover offsets, span boundaries, and decoder outputs.
Browser inference: Token-classification ONNX bundles can run through Transformers.js, with a documented WebGPU path.
Service controls: Docker Compose exposes port 8080 and configures model preloading, resident-model limits, concurrency, and request-body timeouts.
Best For

Teams that need to extract clinical entities and de-identify notes or documents on infrastructure they control, with a review step before indexing, analysis, or sharing.

Skip If

You want a managed clinical service, an out-of-the-box compliance guarantee, or only need to run one checkpoint and already have a validated privacy pipeline.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedLocal AIGPU
npm install openmed @huggingface/transformers

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
openmed ★5.9k+45PythonApache-2.0Local-first clinical NLP SDK for entity extraction and de-identification
langextract39.5k+85PythonApache-2.0Python SDK for extracting structured data with traceable source spans
auto-ontology19.1k+3.2kPythonApache-2.0An ontology framework that grounds agent-generated SQL in reviewed business defi
llama_index53.1k+110PythonMITA modular Python SDK for document ingestion, indexing, and RAG

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/maziyarpanahi/openmed.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

maziyarpanahi/openmed Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about openmed

How should I integrate OpenMed into a clinical document pipeline?

Use extract_pii when a reviewer needs to inspect detected spans, deidentify to produce transformed text, and analyze_text with a task-specific model to extract clinical entities. These operations can run in-process in Python or behind the corresponding REST endpoints. If redaction precedes extraction, test whether it removes context needed by the clinical model; preserve span mappings if downstream reviewers need to trace findings back to the source.

Do I need a GPU, and how should I size RAM or VRAM?

No single GPU or VRAM requirement applies. The Hugging Face runtime supports CPU or CUDA, and Apple Silicon can use MLX with compatible artifacts. Measure peak RAM or VRAM with the chosen checkpoints, representative input lengths, and expected concurrent requests. For a service deployment, test cold starts separately from steady state and tune the preload list and resident-model cap together.

Can I use OpenMed commercially, and does self-hosting make it HIPAA-compliant?

The SDK source is Apache-2.0, but that license does not automatically cover the model weights or datasets you select. Check each artifact’s terms before commercial use or redistribution. A Safe Harbor-aligned configuration can target the 18 identifier categories, but self-hosting does not establish HIPAA compliance. Validate residual identifiers and review logging, network paths, access, retention, and export controls.

When should I choose OpenMed over a direct Hugging Face or ONNX Runtime integration?

A direct Hugging Face pipeline can be simpler for one checkpoint on one server. Using ONNX Runtime directly gives you control of a small inference stack, but your application must supply the tokenizer, span decoding, and redaction logic that it needs. OpenMed is a better fit when reusable de-identification, language routing, and deployment across Python, mobile, or browser justify the extra integration and validation work.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining maziyarpanahi/openmed? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature maziyarpanahi/openmed on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare