he-dapi
🚧 Early / work-in-progress (alpha). Only the
he2dapidirection is available today;dapi2he(unpaired CycleGAN) is pending training. APIs, weights and outputs may change between releases. Research demo only — not for clinical use.
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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| he_dapi-0.1.1.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| he_dapi-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.7 kB
Release files / he_dapi-0.1.1.tar.gz
| Download URL | he_dapi-0.1.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e8857f87c8bf2a55a81bcefb8f7af93551a520f480efce4728a85088121b268
|
|
BLAKE2b-256 checksum How to use checksums |
94ca825e04ed808b0dc25dc1e5f1fd37610dc2f1af33ebee0ebe54f7ef47fd45
|
| 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.1-py3-none-any.whl
| Download URL | he_dapi-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edfd734ff4772d298d6179d78ff176dddb56770dd1b5da47d71719f55501a61d
|
|
BLAKE2b-256 checksum How to use checksums |
8fa03d793fa763a1c608764efd97dd2bd3c5c45262da9751f9fccce46b02591f
|
| 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}
|