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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,5 @@ lightning_logs/
test.txt
derivatives_seg
robert_test.py
poetry.lock
poetry.lock
*.DS_Store
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SciPy = "^1.11.2"
torchmetrics = "^1.1.2"
tqdm = "^4.66.1"
einops= "^0.6.1"
nnunetv2 = "2.4.2"
nnunetv2 = "^2.4.2"
TPTBox = "^0.4.0"
antspyx = "0.4.2"
rich = "^13.6.0"
Expand Down
2 changes: 1 addition & 1 deletion spineps/lab_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def load(self, folds: tuple[str, ...] | None = None) -> Self: # noqa: ARG002

chktpath = search_path(self.model_folder, "**/*val_f1=*valf1-weights.ckpt")
assert len(chktpath) >= 1, chktpath
model = PLClassifier.load_from_checkpoint(checkpoint_path=chktpath[-1])
model = PLClassifier.load_from_checkpoint(checkpoint_path=chktpath[-1], weights_only=False)
if hasattr(model.opt, "final_size"):
self.final_size = model.opt.final_size
self.transform = Compose(
Expand Down
2 changes: 1 addition & 1 deletion spineps/seg_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def load(self, folds: tuple[str, ...] | None = None) -> Self: # noqa: ARG002

chktpath = search_path(self.model_folder, "**/*weights*.ckpt")
assert len(chktpath) == 1
model = PLNet.load_from_checkpoint(checkpoint_path=chktpath[0])
model = PLNet.load_from_checkpoint(checkpoint_path=chktpath[0], weights_only=False)
model.eval()
self.device = torch.device("cuda:0" if torch.cuda.is_available() and not self.use_cpu else "cpu")
model.to(self.device)
Expand Down
Loading