Skip to content

Commit

Permalink
bugfix in download of -rs weights
Browse files Browse the repository at this point in the history
  • Loading branch information
wasserth committed May 28, 2024
1 parent 22e07e9 commit 9381b6b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## Master


## Release 2.2.1
* Bugfixes


## Release 2.2.0
* also return statistics from python api
* add `totalseg_get_phase`
Expand Down
7 changes: 6 additions & 1 deletion resources/package_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ python setup.py sdist bdist_wheel
twine upload --skip-existing dist/*
```

INFO: Now all done by `release.sh`
INFO: Now all done by `release.sh`


## Release new weights
* Click on "Draft a new release" on github
* Create new tag ending with -weights and upload weights
3 changes: 2 additions & 1 deletion totalsegmentator/python_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ def totalsegmentator(input: Union[str, Path, Nifti1Image], output: Union[str, Pa
if crop is not None or roi_subset is not None:

body_seg = False # can not be used together with body_seg
download_pretrained_weights(298)
st = time.time()
if not quiet: print("Generating rough body segmentation...")
if robust_rs:
Expand All @@ -342,6 +341,8 @@ def totalsegmentator(input: Union[str, Path, Nifti1Image], output: Union[str, Pa
crop_spacing = 6.0
crop_task = "total_mr" if task == "total_mr" else "total"
crop_trainer = "nnUNetTrainer_DASegOrd0_NoMirroring" if task == "total_mr" else "nnUNetTrainer_4000epochs_NoMirroring"
download_pretrained_weights(crop_model_task)

organ_seg, _, _ = nnUNet_predict_image(input, None, crop_model_task, model="3d_fullres", folds=[0],
trainer=crop_trainer, tta=False, multilabel_image=True, resample=crop_spacing,
crop=None, crop_path=None, task_name=crop_task, nora_tag="None", preview=False,
Expand Down

0 comments on commit 9381b6b

Please sign in to comment.