From a84bd3763ddf6e7bad73146cc65eb33ba8955cff Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Mon, 1 Apr 2024 23:24:17 -0700 Subject: [PATCH] Fixup model extraction code. --- cellSAM/model.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cellSAM/model.py b/cellSAM/model.py index 370758b..e4ebdee 100644 --- a/cellSAM/model.py +++ b/cellSAM/model.py @@ -44,7 +44,9 @@ def get_model(model: nn.Module = None) -> nn.Module: cellsam_assets_dir.mkdir(parents=True, exist_ok=True) if not model_path.exists(): fetch_data("models/cellsam_base.tar.gz", cache_subdir="models") - extract_archive(model_path, cellsam_assets_dir) + extract_archive( + cellsam_assets_dir / "cellsam_base.tar.gz", cellsam_assets_dir + ) assert model_path.exists() model = CellSAM(config) model.load_state_dict(torch.load(model_path))