From 9f7ec306a13f2bd21859589dff3bb3f7a7bebbd8 Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Fri, 22 Nov 2024 19:44:26 +0200 Subject: [PATCH 1/4] Fixed pre-commit --- .DS_Store | Bin 6148 -> 6148 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/.DS_Store b/.DS_Store index fd67311ca48dda9002628e5caafb87f288cb8781..9a8432691b517aebb5dad0b94ffd0c8fc122dd40 100644 GIT binary patch delta 177 zcmZoMXffEJ#u9T`RQVLV@&y@& z!O8i#1wcIv3?h@8Sd^H!A}23nkz-pQd*Cu-+2ju_B9rg2@F2KKOb!f_?O3HI>#_1P bt^l$Qu@%kQWX)7InT<^j%G|8Qc1sWdLn$%v delta 177 zcmZoMXffEJ#uAe}je&uIg+Y%YogtH Date: Fri, 22 Nov 2024 19:45:27 +0200 Subject: [PATCH 2/4] Format utils.py and init.py --- DLWMLS/__main__.py | 2 +- DLWMLS/utils.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DLWMLS/__main__.py b/DLWMLS/__main__.py index 0431c60..e8a2603 100644 --- a/DLWMLS/__main__.py +++ b/DLWMLS/__main__.py @@ -246,7 +246,7 @@ def main() -> None: model_folder = os.path.join( Path(__file__).parent, "nnunet_results", - "Dataset004_Dataset003_qcedCorrected/nnUNetTrainer__nnUNetPlans__3d_fullres" + "Dataset004_Dataset003_qcedCorrected/nnUNetTrainer__nnUNetPlans__3d_fullres", # "Dataset%s_Dataset%s_dlwmlsICVAll/nnUNetTrainer__nnUNetPlans__%s" # "Dataset%s_Task%s_DLWMLSV2/nnUNetTrainer__nnUNetPlans__%s/" # % (args.d, args.d, args.c), diff --git a/DLWMLS/utils.py b/DLWMLS/utils.py index cb3bad8..7fc5262 100644 --- a/DLWMLS/utils.py +++ b/DLWMLS/utils.py @@ -37,6 +37,9 @@ def rename_and_copy_files(src_folder: str, des_folder: str) -> Tuple[dict, dict] shutil.copy2(old_name, new_name) rename_dict[filename] = rename_file rename_back_dict[rename_back] = filename.split(".nii")[0] + "_WMLS.nii.gz" - print("%s will be renamed to %s" % (old_name, filename.split(".nii")[0] + "_WMLS.nii.gz")) + print( + "%s will be renamed to %s" + % (old_name, filename.split(".nii")[0] + "_WMLS.nii.gz") + ) return rename_dict, rename_back_dict From 2a0c6af91a4c6800201cdaa286abcbe26b3dfd9e Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Sat, 23 Nov 2024 12:27:04 +0200 Subject: [PATCH 3/4] Added build badges on readme --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5420b3d..09ef3c2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # DLWMLS - Deep Learning White Matter Lesion Segmentation +![MacOS Build](https://github.com/CBICA/DLWMLS/actions/workflows/macos-build.yml/badge.svg) +![Ubuntu Build](https://github.com/CBICA/DLWMLS/actions/workflows/ubuntu-build.yml/badge.svg) + ## Overview DLWMLS uses a trained [nnUNet](https://github.com/MIC-DKFZ/nnUNet) model to segment White Matter Lesions (WML) from ICV-segmented (see DLICV method) and LPS oriented brain images (Nifti/.nii.gz format). @@ -17,7 +20,7 @@ pip install -e . ``` ### Installing PyTorch -Depending on your system configuration and supported CUDA version, you may need to follow the [PyTorch Installation Instructions](https://pytorch.org/get-started/locally/). +Depending on your system configuration and supported CUDA version, you may need to follow the [PyTorch Installation Instructions](https://pytorch.org/get-started/locally/). ## Usage @@ -34,7 +37,7 @@ DLWMLS -h ``` ## \[Windows Users\] Troubleshooting model download failures -Our model download process creates several deep directory structures. If you are on Windows and your model download process fails, it may be due to Windows file path limitations. +Our model download process creates several deep directory structures. If you are on Windows and your model download process fails, it may be due to Windows file path limitations. To enable long path support in Windows 10, version 1607, and later, the registry key `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled (Type: REG_DWORD)` must exist and be set to 1. From fa8f1c8db3cf00aa33e0e447567ea4c137ddda22 Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Thu, 12 Dec 2024 01:34:27 +0200 Subject: [PATCH 4/4] Correct torch version --- requirements.txt | 4 ++-- setup.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index c1496e0..b53f4e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -torch>=2.2.1 -nnunetv2>=2.2.1 +torch==2.2.1 +nnunetv2==2.5.1 argparse huggingface_hub pathlib diff --git a/setup.py b/setup.py index 384973f..25c52bc 100644 --- a/setup.py +++ b/setup.py @@ -20,9 +20,9 @@ download_url="https://github.com/CBICA/DLWMLS/", url="https://github.com/CBICA/DLWMLS/", packages=find_packages(exclude=["tests", ".github"]), - python_requires=">=3.8", + python_requires=">=3.9", install_requires=[ - "torch>=2.2.1", + "torch<=2.2.1", "nnunetv2>=2.2.1", "argparse", "huggingface_hub",