Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed pre-commit #5

Merged
merged 5 commits into from
Dec 11, 2024
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
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion DLWMLS/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
5 changes: 4 additions & 1 deletion DLWMLS/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).
Expand All @@ -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

Expand All @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
torch>=2.2.1
nnunetv2>=2.2.1
torch==2.2.1
nnunetv2==2.5.1
argparse
huggingface_hub
pathlib
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading