Dev

New Open-Source Medical Text Analysis Tool "OpenMed" Runs Completely on Device

Medical AI tool "OpenMed" released on GitHub. Enables entity extraction and PII anonymization from clinical text on-device. Includes over 1,000 specialized models, offered under Apache-2.0.

4 min read Reviewed & edited by the SINGULISM Editorial Team

New Open-Source Medical Text Analysis Tool "OpenMed" Runs Completely on Device
Photo by Accuray on Unsplash

The open-source project “OpenMed,” designed to extract structured data from medical text, has been released on GitHub. Developed by Maziyar Panahi, this tool is notable for enabling entity extraction, PII (Personal Identifiable Information) anonymization, and running over 1,000 specialized medical models directly on the device. Promising no cloud requirements, no vendor lock-in, and a design that ensures patient data never leaves the network, it is licensed under Apache-2.0.

Local-First Medical AI

The core philosophy of OpenMed is to “complete processing where the data resides.” Patient data handled by medical institutions faces strict regulatory constraints, and traditional methods of sending it to cloud APIs create compliance challenges. OpenMed addresses these issues by executing all processing on CPU, CUDA, or Apple Silicon (MLX).

Specific use cases include extracting diagnosis names and medication information from clinical notes, anonymizing discharge summaries, and shaping research datasets. It features 247 PII checkpoints and supports all 18 Safe Harbor identifiers defined by HIPAA. It also includes a function to replace data with dummy values while preserving the format.

Technical Features

Over 1,000 Specialized Models

The model suite provided by OpenMed is fine-tuned for specialized tasks such as disease detection, drug extraction, and interpretation of lab values. According to publicly available information, many models outperform proprietary stacks. It supports 12 languages, including Japanese, enabling processing of multilingual clinical text.

Setup in Just a Few Lines

In a Python environment, you can start using it immediately with the following code:

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:<12} {entity.text:<28} {entity.confidence:.2f}")
# DISEASE chronic myeloid leukemia 0.98
# DRUG imatinib 0.95

A key feature is that it requires no API keys or network connection; everything is self-contained locally. It can also run as a Dockerized REST service or batch pipeline, with integration into existing hospital systems considered.

Native Support via Apple MLX

On Apple Silicon, it is accelerated using the MLX framework and is also available as a native app for iOS/macOS called “OpenMedKit.” This allows scanning clinical notes on an iPhone, running anonymization and signal extraction offline. A fallback path to CoreML is also provided.

To add OpenMedKit to an app, incorporate it via Swift Package Manager as follows:

.package(url: "https://github.com/maziyarpanahi/openmed.git", from: "1.5.5")

Implications for the Medical IT Industry

In the medical field, data privacy and compliance have been the biggest barriers to leveraging AI. OpenMed’s approach offers a realistic solution to these challenges by achieving advanced natural language processing without sending data outside the organization.

Compared to existing cloud-based medical APIs, OpenMed may also offer a cost advantage. It has no usage-based fees, and being under Apache-2.0, it imposes no restrictions on commercial use. However, details about the training data and benchmark results for the models are currently limited, so each organization will need to verify accuracy in real-world operations.

Editorial Opinion

In the short term, OpenMed is likely to become a strong option for research institutions and small clinics. Its independence from cloud APIs and HIPAA-compliant PII processing are especially in demand in the U.S. market. Supporting 12 languages, including Japanese, also suggests a design aimed at global deployment.

Over the long term, an increase in local-first medical AI tools could lead to changes in regulations and insurance coverage regarding outsourcing medical data. If advanced diagnostic support becomes possible on edge devices, it could also contribute to telemedicine and improved healthcare access in developing countries.

From an editorial perspective, the provision of Apple MLX support as an iOS app development kit is noteworthy. If the app ecosystem built around local AI model execution expands, Apple’s influence in the medical field is likely to strengthen further. The growth of the community and the availability of enterprise support will be key to widespread adoption.

References

Frequently Asked Questions

Can OpenMed integrate with electronic medical record systems in healthcare institutions?
Yes, it can run as a Dockerized REST service, allowing integration via an API. It also includes batch pipeline capabilities and is designed with integration into existing systems in mind.
What is the biggest advantage compared to cloud-based medical APIs?
Patient data never leaves the device. This simplifies compliance with regulations such as HIPAA and GDPR, and there are no usage-based fees. Additionally, over 1,000 specialized models are available for free.
What preparations are needed to use it on an iPhone?
Add OpenMedKit to your project via Swift Package Manager. It runs on the MLX runtime and can perform PII token classification and zero-shot inference offline. Fallback to CoreML is also supported.
Source: GitHub Trending

Comments

← Back to Home