Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 45 additions & 3 deletions deepcell_auth/_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"download_cellsam_evaluation_dataset",
"download_cellsam_model",
"download_deepcell_types_model",
"download_deepcell_types_baseline",
"download_deepcell_types_data",
"download_torch_mesmer_model",
]
Expand Down Expand Up @@ -74,15 +75,17 @@ def download_deepcell_types_model(version=None):
Which version of the model weights to download. If not specified, the latest
published version will be downloaded. Available versions:

- '2025-06-09' (latest)
- '2025-06-09_public-data-only'
- '2026-06-15' (latest)
- '2026-06-23-ptft'
- '2025-06-09' (legacy; use with matching historical commit)
- '2025-06-09_public-data-only' (legacy)
"""
from ._auth import load_manifest, fetch_data

manifest = load_manifest()
dct_models = manifest["models"]["deepcell-types"]

version = "2025-06-09" if version is None else version
version = "2026-06-15" if version is None else version
try:
record = dct_models[version]
except KeyError:
Expand All @@ -95,6 +98,45 @@ def download_deepcell_types_model(version=None):
)


def download_deepcell_types_baseline(name):
"""Download a deepcell-types comparison-baseline checkpoint.

Parameters
----------
name : str
Baseline identifier. One of 'cellsighter', 'maps', or 'xgboost'.
Some baselines ship companion files (maps -> _stats.npz;
xgboost -> .remap.json), so a list of local paths is returned.

'nimbus' is intentionally not served here: its pretrained weights are
distributed upstream (angelolab/Nimbus-Inference) and are not
re-hosted by this project.

Returns
-------
list
Local paths to every file downloaded for this baseline.
"""
from ._auth import load_manifest, fetch_data

manifest = load_manifest()
baselines = manifest["models"]["deepcell-types-baselines"]

try:
records = baselines[name]
except KeyError:
raise KeyError(
f"Baseline {name} not found. Available baselines: {list(baselines)}"
)

return [
fetch_data(
record["asset_key"], cache_subdir="models", file_hash=record["asset_hash"]
)
for record in records
]


def download_deepcell_types_data(version=None):
"""Download training dataset for the deepcell-types project.

Expand Down
27 changes: 27 additions & 0 deletions deepcell_auth/asset_manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,39 @@ models:
"asset_key": "models/cellsam-models_v1.2.tar.gz"
"asset_hash": "f41e6899c49fc8ce12f77a8d25594604"
deepcell-types:
"2026-06-15":
"asset_key": "models/deepcell-types_2026-06-15_resmlp.pt"
"asset_hash": "b819a7e0b177ad5330394eab3c6c7ad8"
"2026-06-23-ptft":
"asset_key": "models/deepcell-types_2026-06-23_resmlp_ptft.pt"
"asset_hash": "402e94c103c5e489a57433cd107009d3"
# Legacy CLIP checkpoints. Incompatible with current deepcell-types code;
# retained for reproducibility (use with the matching historical commit).
"2025-06-09":
"asset_key": "models/deepcell-types_2025-06-09.pt"
"asset_hash": "19b669675c06816414e8677f542ff542"
"2025-06-09_public-data-only":
"asset_key": "models/deepcell-types_2025-06-09_public-data-only.pt"
"asset_hash": "331841fe78d9a5afec6e58d0035c40ef"
# Comparison-baseline checkpoints for deepcell-types. Each baseline maps to a
# LIST of assets because some ship companion files (maps -> _stats.npz;
# xgboost -> .remap.json). Nimbus is intentionally absent: its pretrained
# weights are distributed upstream (angelolab/Nimbus-Inference) and are not
# re-hosted here.
deepcell-types-baselines:
"cellsighter":
- "asset_key": "models/deepcell-types_baseline-cellsighter.pth"
"asset_hash": "c5a105fb044ad82c82817a32aabbae7c"
"maps":
- "asset_key": "models/deepcell-types_baseline-maps.pth"
"asset_hash": "1ad5e30ceaccfdb91050b663099258fb"
- "asset_key": "models/deepcell-types_baseline-maps_stats.npz"
"asset_hash": "1f462d0c8bf531af73026d415d52728d"
"xgboost":
- "asset_key": "models/deepcell-types_baseline-xgboost.json"
"asset_hash": "9e51cf1af8c6c43b00871a821fde0f57"
- "asset_key": "models/deepcell-types_baseline-xgboost.remap.json"
"asset_hash": "fba1b0e705e5f7747eb2f9cae30815ba"
torch-mesmer:
"2026-06-30":
"asset_key": "models/torch-mesmer_2026-06-30.pth"
Expand Down