safeeyes
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder
翻訳待ち
A deep learning toolkit for healthcare AI: EHR (MIMIC, eICU, OMOP), clinical text, signals and imaging. 30+ models, reproducible pipelines.
翻訳待ち
健康Python · CythonGitHub @sunlabuiuc自分でインストール所有者未確認
Paste into Claude or ChatGPT for installation instructions suited to your environment.
Have you tried it? One tap is enough. No sign-in needed.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Deep learning for healthcare: from raw EHR data to a trained, evaluated model in about 15 lines.
PyHealth is an open-source PyTorch toolkit for building, benchmarking and reproducing clinical AI models. It works with electronic health records (MIMIC-III, MIMIC-IV, eICU, OMOP), clinical text, biosignals (EEG, ECG) and medical images.
.. image:: https://img.shields.io/pypi/v/pyhealth.svg?color=brightgreen :target: https://pypi.org/project/pyhealth/ :alt: PyPI version
.. image:: https://static.pepy.tech/badge/pyhealth :target: https://pepy.tech/project/pyhealth :alt: Downloads
.. image:: https://img.shields.io/github/stars/sunlabuiuc/pyhealth.svg :target: https://github.com/sunlabuiuc/pyhealth/stargazers :alt: GitHub stars
.. image:: https://img.shields.io/readthedocs/pyhealth?logo=readthedocs&label=docs&version=latest :target: https://pyhealth.readthedocs.io/en/latest/ :alt: Docs
.. image:: https://github.com/sunlabuiuc/PyHealth/workflows/CI/badge.svg :target: https://github.com/sunlabuiuc/PyHealth/actions :alt: CI status
.. image:: https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white :target: https://discord.gg/mpb835EHaX :alt: Discord
.. image:: https://img.shields.io/badge/Tutorials-Google%20Colab-orange?logo=googlecolab :target: https://pyhealth.readthedocs.io/en/latest/tutorials.html :alt: Tutorials
.. image:: https://img.shields.io/badge/YouTube-16%20Videos-red?logo=youtube :target: https://www.youtube.com/playlist?list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV :alt: YouTube
Documentation <https://pyhealth.readthedocs.io/en/latest/>_ ·
Tutorials <https://pyhealth.readthedocs.io/en/latest/tutorials.html>_ ·
Paper (ICML 2026) <https://openreview.net/forum?id=gMLVFN9hl8>_ ·
Discord <https://discord.gg/mpb835EHaX>_ ·
Mailing list <https://docs.google.com/forms/d/e/1FAIpQLSfpJB5tdkI7BccTCReoszV9cyyX2rF99SgznzwlOepi5v-xLw/viewform?usp=header>_
.. image:: figure/poster.png :width: 810
.. code-block:: sh
pip install pyhealth
This example trains and evaluates an in-hospital mortality model on synthetic MIMIC-III data. You don't need credentials to run it.
.. code-block:: python
from pyhealth.datasets import MIMIC3Dataset, get_dataloader, split_by_patient
from pyhealth.models import RNN
from pyhealth.tasks import MortalityPredictionMIMIC3
from pyhealth.trainer import Trainer
if __name__ == "__main__": # needed in scripts; set_task uses worker processes
dataset = MIMIC3Dataset(
root="https://storage.googleapis.com/pyhealth/Synthetic_MIMIC-III/",
tables=["DIAGNOSES_ICD", "PROCEDURES_ICD", "PRESCRIPTIONS"],
)
samples = dataset.set_task(MortalityPredictionMIMIC3())
train, val, test = split_by_patient(samples, [0.8, 0.1, 0.1])
model = RNN(dataset=samples)
trainer = Trainer(model=model, metrics=["roc_auc", "pr_auc"])
trainer.train(
train_dataloader=get_dataloader(train, batch_size=32, shuffle=True),
val_dataloader=get_dataloader(val, batch_size=32),
epochs=3,
)
print(trainer.evaluate(get_dataloader(test, batch_size=32)))
Pointing root at your own MIMIC copy uses real data. You can also swap in MIMIC4Dataset, another task from pyhealth.tasks or another model from pyhealth.models, and the rest of the code stays the same. The tutorials <https://pyhealth.readthedocs.io/en/latest/tutorials.html>_ walk through each stage.
If PyHealth helps your work, please star the repo and cite the paper <#citing-pyhealth>_. Stars and citations help us keep the project funded and maintained.
Python version: PyHealth 2.x requires Python 3.12 or 3.13 (>=3.12,<3.14).
Install the latest release from PyPI. This also installs PyTorch and the other deep learning dependencies:
.. code-block:: sh
pip install pyhealth
For the latest development version, or to contribute, install from source:
.. code-block:: sh
git clone https://github.com/sunlabuiuc/PyHealth.git
cd PyHealth
pip install -e .
Legacy version: PyHealth 1.1.6 supports Python 3.9+ but lacks the 2.x features:
.. code-block:: sh
pip install pyhealth==1.1.6
News: We keep adding influential papers and benchmarks to PyHealth. See the planned list <https://docs.google.com/spreadsheets/d/1PNMgDe-llOm1SM5ZyGLkmPysjC4wwaVblPLAHLxejTw/edit#gid=159213380>_. You're welcome to pick one and send a PR, or to suggest a paper.
pyhealth provides these functionalities (we are still enriching some modules):
.. image:: figure/overview.png :width: 770
You can use the following functions independently:
This is the beginning of the README. Read the rest at the original. Read the full README ↗