Skip to main content

he-dapi

H&E ↔ DAPI virtual staining — inference library + CLI.

Predicts a virtual DAPI fluorescence image from a brightfield H&E patch (paired Pix2Pix). Weights are downloaded automatically from the Hugging Face model repo.

Install

pip install he-dapi
# optional extras
pip install "he-dapi[wsi]"     # .svs/.tiff support
pip install "he-dapi[onnx]"    # ONNX Runtime

CLI

he-dapi info
he-dapi translate -i he.png -o dapi.png -d he2dapi

Python

from he_dapi import translate, load_generator

pred = translate("he.png", direction="he2dapi")   # -> uint8 HxW numpy array
# or reuse a loaded model across calls:
model = load_generator("he2dapi")
pred  = translate("he.png", model=model)

Large images are processed in 512px tiles (stride 256) with overlap averaging. Input is normalized to [-1, 1] (uint8 / 127.5 - 1); output is [0, 1].

Status

  • he2dapi (paired Pix2Pix): available.
  • dapi2he (unpaired CycleGAN): added when unpaired training completes.

License

MIT. Research demonstration only — not validated for clinical use.

Metadata

Release files for he-dapi 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for he-dapi 0.1.0
File Size Uploaded
he_dapi-0.1.0.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for he-dapi 0.1.0
File Interpreter ABI Platform
he_dapi-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / he_dapi-0.1.0.tar.gz

Download URL he_dapi-0.1.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2694b90a7d609f3f1abf104eee8c2183cbc1b60d272519c77171784552238548
BLAKE2b-256 checksum
How to use checksums
ed2f0c2f772dda2a17609853549d40a2155efaea3bf339ea4e2be22ece4046e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / he_dapi-0.1.0-py3-none-any.whl

Download URL he_dapi-0.1.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3146f44f6700ca41b220f86012ca585549059312e340c38deec7724103a1908
BLAKE2b-256 checksum
How to use checksums
baf4fccc3f1a5baaf02300e3ca9c8eb35bc5df17a33b4e9b2d8ece25f98c9173
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page