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

ENH: Add MOOSE3.0 Segmentation Extension #2127

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

Keyn34
Copy link

@Keyn34 Keyn34 commented Dec 4, 2024

New extension

MOOSE (Multi-organ objective segmentation) is a data-centric AI solution that generates multilabel organ segmentations to facilitate systemic TB whole-person research.

Tier 1

Any extension that is listed in the Extensions Catalog must fulfill these requirements.

  • Repository name is Slicer+ExtensionName (except if the repository that hosts the extension can be also used without Slicer)
  • Repository is associated with 3d-slicer-extension GitHub topic so that it is listed here. To edit topics, click the settings icon in the right side of "About" section header and enter 3d-slicer-extension in "Topics" and click "Save changes". To learn more about topics, read https://help.github.com/en/articles/about-topics
  • Extension description summarizes in 1-2 sentences what the extension is usable (should be understandable for non-experts)
  • Any known related patents must be mentioned in the extension description.
  • LICENSE.txt is present in the repository root and the name of the license is mentioned in extension homepage. We suggest you use a permissive license that includes patent and contribution clauses. This will help protect developers and ensure the code remains freely available. MIT (https://choosealicense.com/licenses/mit/) or Apache (https://choosealicense.com/licenses/apache-2.0/) license is recommended. Read here to learn more about licenses. If source code license is more restrictive for users than MIT, BSD, Apache, or 3D Slicer license then describe the reason for the license choice and include the name of the used license in the extension description.
  • Extension URL and revision (scmurl, scmrevision) is correct, consider using a branch name (main, release, ...) instead of a specific git hash to avoid re-submitting pull request whenever the extension is updated
  • Extension icon URL is correct (do not use the icon's webpage but the raw data download URL that you get from the download button - it should look something like this: https://raw.githubusercontent.com/user/repo/main/SomeIcon.png)
  • Screenshot URLs (screenshoturls) are correct, contains at least one
  • Content of submitted json file is consistent with the top-level CMakeLists.txt file in the repository (dependencies, etc. are the same)
  • Homepage URL points to valid webpage containing the following:
    • Extension name
    • Short description: 1-2 sentences, which summarizes what the extension is usable for
    • At least one nice, informative image, that illustrates what the extension can do. It may be a screenshot.
    • Description of contained modules: at one sentence for each module
    • Publication: link to publication and/or to PubMed reference (if available)
  • Hide unused github features (such as Wiki, Projects, and Discussions, Releases, Packages) in the repository to reduce noise/irrelevant information:
    • Click Settings and in repository settings uncheck Wiki, Projects, and Discussions (if they are currently not used).
    • Click the settings icon next to About in the top-right corner of the repository main page and uncheck Releases and Packages (if they are currently not used)
  • The extension is safe:
    • Does not include or download binaries from unreliable sources
    • Does not send any information anywhere without user consent (explicit opt-in is required)

Notes:

  • The utilized models for inference are downloaded from an AWS repository when first used.
  • The used License for this Extension is the same as the one we used originally in MOOSE: GNU GENERAL PUBLIC LICENSE Version 3
  • The models are trained on a dataset consisting of 1.7k annotated CT datasets
  • Special thanks to the DentalSegmentator and TotalSegmentator slicer extension developers for implementation inspiration

@lassoan
Copy link
Contributor

lassoan commented Dec 4, 2024

Thanks a lot for your contribution, very nice work! Installation of dependencies worked flawlessly (not an easy thing to do) and I could get some segmentation results.

A couple of things to address (many things but mostly small ones that should be easy to address):

  • Since a non-permissive license is used, a sentence need to be added to the extension description about the license, such as The extension, the MOOSE package, and segmentation models are distributed under the GPL license..
  • Extension icon is not correct, just a placeholder (https://github.com/mprires/SlicerMOOSE/blob/main/SlicerMOOSE.png)
  • There is no screenshot. Add at least one, using any Slicer sample data set. I would recommend to use Colorize Volume for nicer rendering - see example here: https://github.com/lassoan/SlicerTotalSegmentator?tab=readme-ov-file#totalsegmentator. You may also consider updating the animation with something nicer (the current video shows progressive rendering with the rendering quality fluctuating; the volume rendering and segmentation is just overlaid on each other instead of properly mixed using an algorithm like in Colorize volume module). You can create video animation using Screen Capture module.
  • Remove ExtensionsIndex folder from the repository.
  • When you need to install MOOSE first, only the Install Dependencies button will be activated. - I'm not sure how to interpret this. I guess that you meant that the button is enabled and I should press it - if that's the case then you could rephrase the text to be more clear. However, it seems that you can automatically detect that the dependencies are not installed, so you can do what every other AI segmentation extensions do: when you start the segmentation and you detect that dependencies are not installed then show a confirmation popup to the user that explains that some dependencies need to be installed and if the user consents then install the dependencies. In addition, you can add an "Advanced" section (collapsed by default) to your module GUI that has a button to force installing dependencies.
  • Add a node selector for the segmentation result. It does not require any extra click for the user, as you can make the default text to be "Create new segmentation"
  • Click it and after MOOSE is installed in the background - for me, MOOSE was not installed in the background. It was very much installed in the foreground, i.e., the application did not respond until the installation was complete. It is completely fine that the installation happens in the main thread, but then remove the misleading "in the background" note.
  • Input Volume and Model selector section will be activated they are not "acivated". Probably you mean "enabled".
  • Select a volume does it have to be a CT image? What other requirements apply? Where to get information on them? Describe these in 1-2 sentences there.
  • Using CTACardio sample data set with clin_ct_body_composition model failed with a non-informative error message: Error during MOOSE segmentation: list index out of range. Always make sure to print the stack trace if you catch an exception. I copied the log below.
  • Using CTACardio sample data set with clin_ct_cardiac model provided segmentation result, but it was not great. In the tutorial steps, suggest a specific model name and Slicer Sample Data set that a first-time user should try something that is fast and produces nice results. Also describe approximately how long that specific segmentation is expected to take (on CPU and on GPU).
  • CTACardio sample data set produces low-quality segmentation with many models clin_ct_muscles (almost empty), clin_ct_organs (only the lung segmentation is OK), clin_ct_ribs (lots of pieces are missing). It may worth checking if there is a bug that could be fixed or there is something wrong with this specific data set. Or if there are models that perform worse than well-established tools (such as TotalSegmentator and MONAIAuto3DSeg) then it may make sense to distinguish those models (e.g., add "experimental" in the name to make users aware that these may not perform as well, but other models are better).
[DEBUG][Qt] 04.12.2024 12:08:23 [] (unknown:0) - Session start time .......: 20241204_120823
[DEBUG][Qt] 04.12.2024 12:08:23 [] (unknown:0) - Slicer version ...........: 5.7.0-2024-12-03 (revision 33138 / 0b8bbd9) win-amd64 - installed release
[DEBUG][Qt] 04.12.2024 12:08:23 [] (unknown:0) - Operating system .........: Windows /  Professional / (Build 22631, Code Page 65001) - 64-bit
[DEBUG][Qt] 04.12.2024 12:08:23 [] (unknown:0) - Memory ...................: 32590 MB physical, 77181 MB virtual
[DEBUG][Qt] 04.12.2024 12:08:23 [] (unknown:0) - CPU ......................: GenuineIntel , 12 cores, 12 logical processors
[DEBUG][Qt] 04.12.2024 12:08:23 [] (unknown:0) - VTK configuration ........: OpenGL2 rendering, TBB threading
[DEBUG][Qt] 04.12.2024 12:08:23 [] (unknown:0) - Qt configuration .........: version 5.15.2, with SSL, requested OpenGL 3.2 (compatibility profile)
[DEBUG][Qt] 04.12.2024 12:08:23 [] (unknown:0) - Internationalization .....: enabled, language=en_US
[DEBUG][Qt] 04.12.2024 12:08:23 [] (unknown:0) - Developer mode ...........: enabled
[DEBUG][Qt] 04.12.2024 12:08:23 [] (unknown:0) - Application path .........: C:/tmp/Slicer 5.7.0-2024-12-03 moose/bin
[DEBUG][Qt] 04.12.2024 12:08:23 [] (unknown:0) - Additional module paths ..: C:/D/SlicerMOOSE/MOOSE
[DEBUG][Python] 04.12.2024 12:08:26 [Python] (C:\tmp\Slicer 5.7.0-2024-12-03 moose\lib\Slicer-5.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:40) - Scripted subject hierarchy plugin registered: SegmentEditor
[DEBUG][Python] 04.12.2024 12:08:26 [Python] (C:\tmp\Slicer 5.7.0-2024-12-03 moose\lib\Slicer-5.7\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:40) - Scripted subject hierarchy plugin registered: SegmentStatistics
[DEBUG][Qt] 04.12.2024 12:08:26 [] (unknown:0) - Switch to module:  "Welcome"
[INFO][Stream] 04.12.2024 12:08:27 [] (unknown:0) - Loading Slicer RC file [C:/Users/andra/.slicerrc.py]
[DEBUG][Qt] 04.12.2024 12:08:39 [] (unknown:0) - Switch to module:  "MOOSE"
[INFO][Stream] 04.12.2024 12:08:39 [] (unknown:0) - TORCH IS NOT INSTALLED
[INFO][Stream] 04.12.2024 12:08:39 [] (unknown:0) - TORCH IS NOT INSTALLED
[INFO][Stream] 04.12.2024 12:08:39 [] (unknown:0) - TORCH IS NOT INSTALLED
[INFO][Stream] 04.12.2024 12:08:39 [] (unknown:0) - TORCH IS NOT INSTALLED
[INFO][Stream] 04.12.2024 12:09:30 [] (unknown:0) - TORCH IS NOT INSTALLED
[INFO][Stream] 04.12.2024 12:09:33 [] (unknown:0) - Looking in indexes: https://download.pytorch.org/whl/cu124
[INFO][Stream] 04.12.2024 12:09:37 [] (unknown:0) - Collecting torch
[INFO][Stream] 04.12.2024 12:09:37 [] (unknown:0) -   Downloading https://download.pytorch.org/whl/cu124/torch-2.5.1%2Bcu124-cp39-cp39-win_amd64.whl (2510.7 MB)
[INFO][Stream] 04.12.2024 12:15:01 [] (unknown:0) -      ---------------------------------------- 2.5/2.5 GB ? eta 0:00:00
[INFO][Stream] 04.12.2024 12:15:13 [] (unknown:0) - Collecting filelock (from torch)
[INFO][Stream] 04.12.2024 12:15:13 [] (unknown:0) -   Downloading https://download.pytorch.org/whl/filelock-3.13.1-py3-none-any.whl (11 kB)
[INFO][Stream] 04.12.2024 12:15:13 [] (unknown:0) - Requirement already satisfied: typing-extensions>=4.8.0 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from torch) (4.12.1)
[INFO][Stream] 04.12.2024 12:15:13 [] (unknown:0) - Collecting networkx (from torch)
[INFO][Stream] 04.12.2024 12:15:13 [] (unknown:0) -   Using cached https://download.pytorch.org/whl/networkx-3.2.1-py3-none-any.whl (1.6 MB)
[INFO][Stream] 04.12.2024 12:15:14 [] (unknown:0) - Collecting jinja2 (from torch)
[INFO][Stream] 04.12.2024 12:15:14 [] (unknown:0) -   Downloading https://download.pytorch.org/whl/Jinja2-3.1.3-py3-none-any.whl (133 kB)
[INFO][Stream] 04.12.2024 12:15:14 [] (unknown:0) -      -------------------------------------- 133.2/133.2 kB 7.7 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:15:14 [] (unknown:0) - Collecting fsspec (from torch)
[INFO][Stream] 04.12.2024 12:15:14 [] (unknown:0) -   Downloading https://download.pytorch.org/whl/fsspec-2024.2.0-py3-none-any.whl (170 kB)
[INFO][Stream] 04.12.2024 12:15:14 [] (unknown:0) -      ------------------------------------- 170.9/170.9 kB 10.7 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:15:14 [] (unknown:0) - Collecting sympy==1.13.1 (from torch)
[INFO][Stream] 04.12.2024 12:15:14 [] (unknown:0) -   Using cached https://download.pytorch.org/whl/sympy-1.13.1-py3-none-any.whl (6.2 MB)
[INFO][Stream] 04.12.2024 12:15:14 [] (unknown:0) - Collecting mpmath<1.4,>=1.1.0 (from sympy==1.13.1->torch)
[INFO][Stream] 04.12.2024 12:15:14 [] (unknown:0) -   Using cached https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl (536 kB)
[INFO][Stream] 04.12.2024 12:15:14 [] (unknown:0) - Collecting MarkupSafe>=2.0 (from jinja2->torch)
[INFO][Stream] 04.12.2024 12:15:14 [] (unknown:0) -   Downloading https://download.pytorch.org/whl/MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl (17 kB)
[INFO][Stream] 04.12.2024 12:15:15 [] (unknown:0) - Installing collected packages: mpmath, sympy, networkx, MarkupSafe, fsspec, filelock, jinja2, torch
[INFO][Stream] 04.12.2024 12:17:59 [] (unknown:0) - Successfully installed MarkupSafe-2.1.5 filelock-3.13.1 fsspec-2024.2.0 jinja2-3.1.3 mpmath-1.3.0 networkx-3.2.1 sympy-1.13.1 torch-2.5.1+cu124
[INFO][Stream] 04.12.2024 12:18:05 [] (unknown:0) - Collecting git+https://github.com/Keyn34/MOOSE.git@SlicerMOOSE
[INFO][Stream] 04.12.2024 12:18:05 [] (unknown:0) -   Cloning https://github.com/Keyn34/MOOSE.git (to revision SlicerMOOSE) to c:\users\andra\appdata\local\temp\pip-req-build-bjq38_9z
[INFO][Stream] 04.12.2024 12:18:06 [] (unknown:0) -   Running command git clone --filter=blob:none --quiet https://github.com/Keyn34/MOOSE.git 'C:\Users\andra\AppData\Local\Temp\pip-req-build-bjq38_9z'
[INFO][Stream] 04.12.2024 12:18:11 [] (unknown:0) -   Running command git checkout -b SlicerMOOSE --track origin/SlicerMOOSE
[INFO][Stream] 04.12.2024 12:18:12 [] (unknown:0) -   Branch 'SlicerMOOSE' set up to track remote branch 'SlicerMOOSE' from 'origin'.
[INFO][Stream] 04.12.2024 12:18:12 [] (unknown:0) -   Switched to a new branch 'SlicerMOOSE'
[INFO][Stream] 04.12.2024 12:18:12 [] (unknown:0) -   Resolved https://github.com/Keyn34/MOOSE.git to commit c23b9f4611a5f9028df80962e6a839538c49ab8f
[INFO][Stream] 04.12.2024 12:18:12 [] (unknown:0) -   Preparing metadata (setup.py): started
[INFO][Stream] 04.12.2024 12:18:13 [] (unknown:0) -   Preparing metadata (setup.py): finished with status 'done'
[INFO][Stream] 04.12.2024 12:18:13 [] (unknown:0) - Collecting acvl-utils==0.2 (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:13 [] (unknown:0) -   Using cached acvl_utils-0.2-py3-none-any.whl
[INFO][Stream] 04.12.2024 12:18:13 [] (unknown:0) - Collecting nnunetv2 (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:13 [] (unknown:0) -   Using cached nnunetv2-2.5.1-py3-none-any.whl
[INFO][Stream] 04.12.2024 12:18:14 [] (unknown:0) - Collecting halo~=0.0.31 (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:14 [] (unknown:0) -   Downloading halo-0.0.31.tar.gz (11 kB)
[INFO][Stream] 04.12.2024 12:18:14 [] (unknown:0) -   Preparing metadata (setup.py): started
[INFO][Stream] 04.12.2024 12:18:14 [] (unknown:0) -   Preparing metadata (setup.py): finished with status 'done'
[INFO][Stream] 04.12.2024 12:18:14 [] (unknown:0) - Collecting SimpleITK~=2.2.1 (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:14 [] (unknown:0) -   Downloading SimpleITK-2.2.1-cp39-cp39-win_amd64.whl.metadata (8.2 kB)
[INFO][Stream] 04.12.2024 12:18:14 [] (unknown:0) - Collecting pydicom~=2.2.2 (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:14 [] (unknown:0) -   Downloading pydicom-2.2.2-py3-none-any.whl.metadata (6.4 kB)
[INFO][Stream] 04.12.2024 12:18:14 [] (unknown:0) - Collecting argparse~=1.4.0 (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:14 [] (unknown:0) -   Using cached argparse-1.4.0-py2.py3-none-any.whl.metadata (2.8 kB)
[INFO][Stream] 04.12.2024 12:18:14 [] (unknown:0) - Requirement already satisfied: numpy<2.0 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from moosez==3.0.6) (1.26.4)
[INFO][Stream] 04.12.2024 12:18:14 [] (unknown:0) - Collecting mpire~=2.3.3 (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:14 [] (unknown:0) -   Downloading mpire-2.3.5-py3-none-any.whl.metadata (11 kB)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) - Collecting openpyxl~=3.0.9 (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) -   Downloading openpyxl-3.0.10-py2.py3-none-any.whl.metadata (2.4 kB)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) - Collecting pyfiglet~=0.8.post1 (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) -   Downloading pyfiglet-0.8.post1-py2.py3-none-any.whl.metadata (1.3 kB)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) - Collecting natsort~=8.1.0 (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) -   Downloading natsort-8.1.0-py3-none-any.whl.metadata (20 kB)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) - Collecting colorama~=0.4.6 (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) -   Using cached colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) - Collecting dask (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) -   Downloading dask-2024.8.0-py3-none-any.whl.metadata (3.8 kB)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) - Collecting rich (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) -   Downloading rich-13.9.4-py3-none-any.whl.metadata (18 kB)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) - Collecting pandas (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) -   Using cached pandas-2.2.3-cp39-cp39-win_amd64.whl.metadata (19 kB)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) - Collecting dicom2nifti~=2.4.8 (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:15 [] (unknown:0) -   Downloading dicom2nifti-2.4.11-py3-none-any.whl.metadata (1.3 kB)
[INFO][Stream] 04.12.2024 12:18:16 [] (unknown:0) - Collecting matplotlib (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:16 [] (unknown:0) -   Downloading matplotlib-3.9.3-cp39-cp39-win_amd64.whl.metadata (11 kB)
[INFO][Stream] 04.12.2024 12:18:16 [] (unknown:0) - Collecting psutil (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:16 [] (unknown:0) -   Using cached psutil-6.1.0-cp37-abi3-win_amd64.whl.metadata (23 kB)
[INFO][Stream] 04.12.2024 12:18:16 [] (unknown:0) - Collecting nibabel (from moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:16 [] (unknown:0) -   Using cached nibabel-5.3.2-py3-none-any.whl.metadata (9.1 kB)
[INFO][Stream] 04.12.2024 12:18:16 [] (unknown:0) - Collecting batchgenerators (from acvl-utils==0.2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:16 [] (unknown:0) -   Downloading batchgenerators-0.25.1.tar.gz (76 kB)
[INFO][Stream] 04.12.2024 12:18:16 [] (unknown:0) -      ---------------------------------------- 77.0/77.0 kB 4.2 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:16 [] (unknown:0) -   Preparing metadata (setup.py): started
[INFO][Stream] 04.12.2024 12:18:17 [] (unknown:0) -   Preparing metadata (setup.py): finished with status 'done'
[INFO][Stream] 04.12.2024 12:18:17 [] (unknown:0) - Requirement already satisfied: torch in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from acvl-utils==0.2->moosez==3.0.6) (2.5.1+cu124)
[INFO][Stream] 04.12.2024 12:18:17 [] (unknown:0) - Collecting scikit-image (from acvl-utils==0.2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:17 [] (unknown:0) -   Using cached scikit_image-0.24.0-cp39-cp39-win_amd64.whl.metadata (14 kB)
[INFO][Stream] 04.12.2024 12:18:17 [] (unknown:0) - Collecting connected-components-3d (from acvl-utils==0.2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:17 [] (unknown:0) -   Downloading connected_components_3d-3.21.0-cp39-cp39-win_amd64.whl.metadata (32 kB)
[INFO][Stream] 04.12.2024 12:18:17 [] (unknown:0) - Requirement already satisfied: scipy in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from dicom2nifti~=2.4.8->moosez==3.0.6) (1.13.1)
[INFO][Stream] 04.12.2024 12:18:17 [] (unknown:0) - Collecting python-gdcm (from dicom2nifti~=2.4.8->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:17 [] (unknown:0) -   Downloading python_gdcm-3.0.24.1-cp39-cp39-win_amd64.whl.metadata (3.8 kB)
[INFO][Stream] 04.12.2024 12:18:17 [] (unknown:0) - Collecting log_symbols>=0.0.14 (from halo~=0.0.31->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:17 [] (unknown:0) -   Downloading log_symbols-0.0.14-py3-none-any.whl.metadata (523 bytes)
[INFO][Stream] 04.12.2024 12:18:17 [] (unknown:0) - Collecting spinners>=0.0.24 (from halo~=0.0.31->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:17 [] (unknown:0) -   Downloading spinners-0.0.24-py3-none-any.whl.metadata (576 bytes)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) - Collecting termcolor>=1.1.0 (from halo~=0.0.31->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) -   Using cached termcolor-2.5.0-py3-none-any.whl.metadata (6.1 kB)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) - Requirement already satisfied: six>=1.12.0 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from halo~=0.0.31->moosez==3.0.6) (1.16.0)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) - Collecting tqdm (from mpire~=2.3.3->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) -   Using cached tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) - Collecting pywin32==225 (from mpire~=2.3.3->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) -   Downloading pywin32-225-cp39-cp39-win_amd64.whl.metadata (881 bytes)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) - Collecting et-xmlfile (from openpyxl~=3.0.9->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) -   Downloading et_xmlfile-2.0.0-py3-none-any.whl.metadata (2.7 kB)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) - Collecting click>=8.1 (from dask->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) -   Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) - Collecting cloudpickle>=1.5.0 (from dask->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) -   Using cached cloudpickle-3.1.0-py3-none-any.whl.metadata (7.0 kB)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) - Requirement already satisfied: fsspec>=2021.09.0 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from dask->moosez==3.0.6) (2024.2.0)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) - Requirement already satisfied: packaging>=20.0 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from dask->moosez==3.0.6) (24.0)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) - Collecting partd>=1.4.0 (from dask->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) -   Downloading partd-1.4.2-py3-none-any.whl.metadata (4.6 kB)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) - Collecting pyyaml>=5.3.1 (from dask->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) -   Using cached PyYAML-6.0.2-cp39-cp39-win_amd64.whl.metadata (2.1 kB)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) - Collecting toolz>=0.10.0 (from dask->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) -   Downloading toolz-1.0.0-py3-none-any.whl.metadata (5.1 kB)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) - Collecting importlib-metadata>=4.13.0 (from dask->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:18 [] (unknown:0) -   Using cached importlib_metadata-8.5.0-py3-none-any.whl.metadata (4.8 kB)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) - Collecting contourpy>=1.0.1 (from matplotlib->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) -   Using cached contourpy-1.3.0-cp39-cp39-win_amd64.whl.metadata (5.4 kB)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) - Collecting cycler>=0.10 (from matplotlib->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) -   Using cached cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) - Collecting fonttools>=4.22.0 (from matplotlib->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) -   Downloading fonttools-4.55.1-cp39-cp39-win_amd64.whl.metadata (168 kB)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) -      ------------------------------------- 168.1/168.1 kB 10.5 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) - Collecting kiwisolver>=1.3.1 (from matplotlib->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) -   Using cached kiwisolver-1.4.7-cp39-cp39-win_amd64.whl.metadata (6.4 kB)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) - Requirement already satisfied: pillow>=8 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from matplotlib->moosez==3.0.6) (10.3.0)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) - Requirement already satisfied: pyparsing>=2.3.1 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from matplotlib->moosez==3.0.6) (3.1.2)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) - Requirement already satisfied: python-dateutil>=2.7 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from matplotlib->moosez==3.0.6) (2.9.0.post0)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) - Collecting importlib-resources>=3.2.0 (from matplotlib->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) -   Using cached importlib_resources-6.4.5-py3-none-any.whl.metadata (4.0 kB)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) - Requirement already satisfied: typing-extensions>=4.6 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from nibabel->moosez==3.0.6) (4.12.1)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) - Collecting dynamic-network-architectures<0.4,>=0.3.1 (from nnunetv2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:19 [] (unknown:0) -   Using cached dynamic_network_architectures-0.3.1-py3-none-any.whl
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) - Collecting scikit-learn (from nnunetv2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) -   Using cached scikit_learn-1.5.2-cp39-cp39-win_amd64.whl.metadata (13 kB)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) - Collecting graphviz (from nnunetv2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) -   Using cached graphviz-0.20.3-py3-none-any.whl.metadata (12 kB)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) - Collecting tifffile (from nnunetv2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) -   Using cached tifffile-2024.8.30-py3-none-any.whl.metadata (31 kB)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) - Requirement already satisfied: requests in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from nnunetv2->moosez==3.0.6) (2.32.3)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) - Collecting seaborn (from nnunetv2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) -   Using cached seaborn-0.13.2-py3-none-any.whl.metadata (5.4 kB)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) - Collecting imagecodecs (from nnunetv2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) -   Downloading imagecodecs-2024.9.22-cp39-cp39-win_amd64.whl.metadata (20 kB)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) - Collecting yacs (from nnunetv2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) -   Using cached yacs-0.1.8-py3-none-any.whl.metadata (639 bytes)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) - Collecting batchgeneratorsv2>=0.2 (from nnunetv2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) -   Using cached batchgeneratorsv2-0.2.1-py3-none-any.whl
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) - Collecting einops (from nnunetv2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:20 [] (unknown:0) -   Using cached einops-0.8.0-py3-none-any.whl.metadata (12 kB)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) - Collecting pytz>=2020.1 (from pandas->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) -   Using cached pytz-2024.2-py2.py3-none-any.whl.metadata (22 kB)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) - Collecting tzdata>=2022.7 (from pandas->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) -   Using cached tzdata-2024.2-py2.py3-none-any.whl.metadata (1.4 kB)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) - Collecting markdown-it-py>=2.2.0 (from rich->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) -   Downloading markdown_it_py-3.0.0-py3-none-any.whl.metadata (6.9 kB)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) - Collecting pygments<3.0.0,>=2.13.0 (from rich->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) -   Using cached pygments-2.18.0-py3-none-any.whl.metadata (2.5 kB)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) - Collecting future (from batchgenerators->acvl-utils==0.2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) -   Using cached future-1.0.0-py3-none-any.whl.metadata (4.0 kB)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) - Collecting unittest2 (from batchgenerators->acvl-utils==0.2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) -   Using cached unittest2-1.1.0-py2.py3-none-any.whl.metadata (15 kB)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) - Collecting threadpoolctl (from batchgenerators->acvl-utils==0.2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) -   Using cached threadpoolctl-3.5.0-py3-none-any.whl.metadata (13 kB)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) - Collecting fft-conv-pytorch (from batchgeneratorsv2>=0.2->nnunetv2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) -   Downloading fft_conv_pytorch-1.2.0-py3-none-any.whl.metadata (2.8 kB)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) - Collecting zipp>=3.20 (from importlib-metadata>=4.13.0->dask->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:21 [] (unknown:0) -   Using cached zipp-3.21.0-py3-none-any.whl.metadata (3.7 kB)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) -   Downloading mdurl-0.1.2-py3-none-any.whl.metadata (1.6 kB)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Collecting locket (from partd>=1.4.0->dask->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) -   Downloading locket-1.0.0-py2.py3-none-any.whl.metadata (2.8 kB)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Requirement already satisfied: networkx>=2.8 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from scikit-image->acvl-utils==0.2->moosez==3.0.6) (3.2.1)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Collecting imageio>=2.33 (from scikit-image->acvl-utils==0.2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) -   Using cached imageio-2.36.1-py3-none-any.whl.metadata (5.2 kB)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Collecting lazy-loader>=0.4 (from scikit-image->acvl-utils==0.2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) -   Using cached lazy_loader-0.4-py3-none-any.whl.metadata (7.6 kB)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Requirement already satisfied: filelock in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from torch->acvl-utils==0.2->moosez==3.0.6) (3.13.1)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Requirement already satisfied: jinja2 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from torch->acvl-utils==0.2->moosez==3.0.6) (3.1.3)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Requirement already satisfied: sympy==1.13.1 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from torch->acvl-utils==0.2->moosez==3.0.6) (1.13.1)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from sympy==1.13.1->torch->acvl-utils==0.2->moosez==3.0.6) (1.3.0)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Requirement already satisfied: charset-normalizer<4,>=2 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from requests->nnunetv2->moosez==3.0.6) (3.3.2)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Requirement already satisfied: idna<4,>=2.5 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from requests->nnunetv2->moosez==3.0.6) (3.7)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Requirement already satisfied: urllib3<3,>=1.21.1 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from requests->nnunetv2->moosez==3.0.6) (2.2.1)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Requirement already satisfied: certifi>=2017.4.17 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from requests->nnunetv2->moosez==3.0.6) (2024.2.2)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) - Collecting joblib>=1.2.0 (from scikit-learn->nnunetv2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:22 [] (unknown:0) -   Using cached joblib-1.4.2-py3-none-any.whl.metadata (5.4 kB)
[INFO][Stream] 04.12.2024 12:18:23 [] (unknown:0) - Requirement already satisfied: MarkupSafe>=2.0 in c:\tmp\slicer 5.7.0-2024-12-03 moose\lib\python\lib\site-packages (from jinja2->torch->acvl-utils==0.2->moosez==3.0.6) (2.1.5)
[INFO][Stream] 04.12.2024 12:18:23 [] (unknown:0) - Collecting traceback2 (from unittest2->batchgenerators->acvl-utils==0.2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:23 [] (unknown:0) -   Using cached traceback2-1.4.0-py2.py3-none-any.whl.metadata (1.5 kB)
[INFO][Stream] 04.12.2024 12:18:23 [] (unknown:0) - Collecting linecache2 (from traceback2->unittest2->batchgenerators->acvl-utils==0.2->moosez==3.0.6)
[INFO][Stream] 04.12.2024 12:18:23 [] (unknown:0) -   Using cached linecache2-1.0.0-py2.py3-none-any.whl.metadata (1000 bytes)
[INFO][Stream] 04.12.2024 12:18:23 [] (unknown:0) - Using cached argparse-1.4.0-py2.py3-none-any.whl (23 kB)
[INFO][Stream] 04.12.2024 12:18:23 [] (unknown:0) - Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
[INFO][Stream] 04.12.2024 12:18:23 [] (unknown:0) - Downloading dicom2nifti-2.4.11-py3-none-any.whl (43 kB)
[INFO][Stream] 04.12.2024 12:18:23 [] (unknown:0) -    ---------------------------------------- 43.6/43.6 kB 2.1 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:23 [] (unknown:0) - Downloading mpire-2.3.5-py3-none-any.whl (284 kB)
[INFO][Stream] 04.12.2024 12:18:23 [] (unknown:0) -    --------------------------------------- 284.8/284.8 kB 18.3 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:23 [] (unknown:0) - Downloading pywin32-225-cp39-cp39-win_amd64.whl (9.1 MB)
[INFO][Stream] 04.12.2024 12:18:24 [] (unknown:0) -    ---------------------------------------- 9.1/9.1 MB 14.5 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:24 [] (unknown:0) - Downloading natsort-8.1.0-py3-none-any.whl (37 kB)
[INFO][Stream] 04.12.2024 12:18:24 [] (unknown:0) - Downloading openpyxl-3.0.10-py2.py3-none-any.whl (242 kB)
[INFO][Stream] 04.12.2024 12:18:24 [] (unknown:0) -    --------------------------------------- 242.1/242.1 kB 14.5 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:24 [] (unknown:0) - Downloading pydicom-2.2.2-py3-none-any.whl (2.0 MB)
[INFO][Stream] 04.12.2024 12:18:24 [] (unknown:0) -    ---------------------------------------- 2.0/2.0 MB 20.6 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:24 [] (unknown:0) - Downloading pyfiglet-0.8.post1-py2.py3-none-any.whl (865 kB)
[INFO][Stream] 04.12.2024 12:18:24 [] (unknown:0) -    --------------------------------------- 865.8/865.8 kB 26.7 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:24 [] (unknown:0) - Downloading SimpleITK-2.2.1-cp39-cp39-win_amd64.whl (27.0 MB)
[INFO][Stream] 04.12.2024 12:18:25 [] (unknown:0) -    ---------------------------------------- 27.0/27.0 MB 12.8 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:25 [] (unknown:0) - Downloading dask-2024.8.0-py3-none-any.whl (1.2 MB)
[INFO][Stream] 04.12.2024 12:18:25 [] (unknown:0) -    ---------------------------------------- 1.2/1.2 MB 19.7 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:25 [] (unknown:0) - Downloading matplotlib-3.9.3-cp39-cp39-win_amd64.whl (7.8 MB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) -    ---------------------------------------- 7.8/7.8 MB 17.2 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached nibabel-5.3.2-py3-none-any.whl (3.3 MB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached pandas-2.2.3-cp39-cp39-win_amd64.whl (11.6 MB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached psutil-6.1.0-cp37-abi3-win_amd64.whl (254 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Downloading rich-13.9.4-py3-none-any.whl (242 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) -    --------------------------------------- 242.4/242.4 kB 14.5 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached click-8.1.7-py3-none-any.whl (97 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached cloudpickle-3.1.0-py3-none-any.whl (22 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached contourpy-1.3.0-cp39-cp39-win_amd64.whl (211 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached cycler-0.12.1-py3-none-any.whl (8.3 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Downloading fonttools-4.55.1-cp39-cp39-win_amd64.whl (2.2 MB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) -    ---------------------------------------- 2.2/2.2 MB 20.2 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached importlib_metadata-8.5.0-py3-none-any.whl (26 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached importlib_resources-6.4.5-py3-none-any.whl (36 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached kiwisolver-1.4.7-cp39-cp39-win_amd64.whl (55 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Downloading log_symbols-0.0.14-py3-none-any.whl (3.1 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) -    ---------------------------------------- 87.5/87.5 kB 5.2 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Downloading partd-1.4.2-py3-none-any.whl (18 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached pygments-2.18.0-py3-none-any.whl (1.2 MB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached pytz-2024.2-py2.py3-none-any.whl (508 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached PyYAML-6.0.2-cp39-cp39-win_amd64.whl (162 kB)
[INFO][Stream] 04.12.2024 12:18:26 [] (unknown:0) - Using cached scikit_image-0.24.0-cp39-cp39-win_amd64.whl (12.9 MB)
[INFO][Stream] 04.12.2024 12:18:27 [] (unknown:0) - Downloading spinners-0.0.24-py3-none-any.whl (5.5 kB)
[INFO][Stream] 04.12.2024 12:18:27 [] (unknown:0) - Using cached termcolor-2.5.0-py3-none-any.whl (7.8 kB)
[INFO][Stream] 04.12.2024 12:18:27 [] (unknown:0) - Using cached tifffile-2024.8.30-py3-none-any.whl (227 kB)
[INFO][Stream] 04.12.2024 12:18:27 [] (unknown:0) - Downloading toolz-1.0.0-py3-none-any.whl (56 kB)
[INFO][Stream] 04.12.2024 12:18:27 [] (unknown:0) -    ---------------------------------------- 56.4/56.4 kB 2.9 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:27 [] (unknown:0) - Using cached tzdata-2024.2-py2.py3-none-any.whl (346 kB)
[INFO][Stream] 04.12.2024 12:18:27 [] (unknown:0) - Downloading connected_components_3d-3.21.0-cp39-cp39-win_amd64.whl (545 kB)
[INFO][Stream] 04.12.2024 12:18:27 [] (unknown:0) -    --------------------------------------- 545.3/545.3 kB 16.7 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:27 [] (unknown:0) - Using cached einops-0.8.0-py3-none-any.whl (43 kB)
[INFO][Stream] 04.12.2024 12:18:27 [] (unknown:0) - Downloading et_xmlfile-2.0.0-py3-none-any.whl (18 kB)
[INFO][Stream] 04.12.2024 12:18:27 [] (unknown:0) - Using cached graphviz-0.20.3-py3-none-any.whl (47 kB)
[INFO][Stream] 04.12.2024 12:18:27 [] (unknown:0) - Downloading imagecodecs-2024.9.22-cp39-cp39-win_amd64.whl (28.6 MB)
[INFO][Stream] 04.12.2024 12:18:28 [] (unknown:0) -    ---------------------------------------- 28.6/28.6 MB 11.1 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:28 [] (unknown:0) - Downloading python_gdcm-3.0.24.1-cp39-cp39-win_amd64.whl (28.9 MB)
[INFO][Stream] 04.12.2024 12:18:29 [] (unknown:0) -    ---------------------------------------- 28.9/28.9 MB 13.1 MB/s eta 0:00:00
[INFO][Stream] 04.12.2024 12:18:29 [] (unknown:0) - Using cached scikit_learn-1.5.2-cp39-cp39-win_amd64.whl (11.0 MB)
[INFO][Stream] 04.12.2024 12:18:29 [] (unknown:0) - Using cached seaborn-0.13.2-py3-none-any.whl (294 kB)
[INFO][Stream] 04.12.2024 12:18:29 [] (unknown:0) - Using cached tqdm-4.67.1-py3-none-any.whl (78 kB)
[INFO][Stream] 04.12.2024 12:18:29 [] (unknown:0) - Using cached yacs-0.1.8-py3-none-any.whl (14 kB)
[INFO][Stream] 04.12.2024 12:18:29 [] (unknown:0) - Using cached imageio-2.36.1-py3-none-any.whl (315 kB)
[INFO][Stream] 04.12.2024 12:18:29 [] (unknown:0) - Using cached joblib-1.4.2-py3-none-any.whl (301 kB)
[INFO][Stream] 04.12.2024 12:18:29 [] (unknown:0) - Using cached lazy_loader-0.4-py3-none-any.whl (12 kB)
[INFO][Stream] 04.12.2024 12:18:29 [] (unknown:0) - Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)
[INFO][Stream] 04.12.2024 12:18:30 [] (unknown:0) - Using cached threadpoolctl-3.5.0-py3-none-any.whl (18 kB)
[INFO][Stream] 04.12.2024 12:18:30 [] (unknown:0) - Using cached zipp-3.21.0-py3-none-any.whl (9.6 kB)
[INFO][Stream] 04.12.2024 12:18:30 [] (unknown:0) - Downloading fft_conv_pytorch-1.2.0-py3-none-any.whl (6.8 kB)
[INFO][Stream] 04.12.2024 12:18:30 [] (unknown:0) - Using cached future-1.0.0-py3-none-any.whl (491 kB)
[INFO][Stream] 04.12.2024 12:18:30 [] (unknown:0) - Downloading locket-1.0.0-py2.py3-none-any.whl (4.4 kB)
[INFO][Stream] 04.12.2024 12:18:30 [] (unknown:0) - Using cached unittest2-1.1.0-py2.py3-none-any.whl (96 kB)
[INFO][Stream] 04.12.2024 12:18:30 [] (unknown:0) - Using cached traceback2-1.4.0-py2.py3-none-any.whl (16 kB)
[INFO][Stream] 04.12.2024 12:18:30 [] (unknown:0) - Using cached linecache2-1.0.0-py2.py3-none-any.whl (12 kB)
[INFO][Stream] 04.12.2024 12:18:30 [] (unknown:0) - Building wheels for collected packages: moosez, halo, batchgenerators
[INFO][Stream] 04.12.2024 12:18:31 [] (unknown:0) -   Building wheel for moosez (setup.py): started
[INFO][Stream] 04.12.2024 12:18:31 [] (unknown:0) -   Building wheel for moosez (setup.py): finished with status 'done'
[INFO][Stream] 04.12.2024 12:18:31 [] (unknown:0) -   Created wheel for moosez: filename=moosez-3.0.6-py3-none-any.whl size=47818 sha256=bf271a60eeb03e7d6007536290e0883a4e8233a6d8c30d96cd111b4017f4c57f
[INFO][Stream] 04.12.2024 12:18:31 [] (unknown:0) -   Stored in directory: C:\Users\andra\AppData\Local\Temp\pip-ephem-wheel-cache-58c_ha10\wheels\87\92\26\cd3075c30751fa3f01c8d0eff9755f35325c053eb19ecd8e2d
[INFO][Stream] 04.12.2024 12:18:31 [] (unknown:0) -   Building wheel for halo (setup.py): started
[INFO][Stream] 04.12.2024 12:18:32 [] (unknown:0) -   Building wheel for halo (setup.py): finished with status 'done'
[INFO][Stream] 04.12.2024 12:18:32 [] (unknown:0) -   Created wheel for halo: filename=halo-0.0.31-py3-none-any.whl size=11267 sha256=4d63031153d2efe134efaf425869b1af4c3b548cbce6b79d06499cbd19ff7a13
[INFO][Stream] 04.12.2024 12:18:32 [] (unknown:0) -   Stored in directory: c:\users\andra\appdata\local\pip\cache\wheels\bb\85\47\b7c7338ab52808105f937bd8c04aec5d98a543311ac2c8bed2
[INFO][Stream] 04.12.2024 12:18:32 [] (unknown:0) -   Building wheel for batchgenerators (setup.py): started
[INFO][Stream] 04.12.2024 12:18:33 [] (unknown:0) -   Building wheel for batchgenerators (setup.py): finished with status 'done'
[INFO][Stream] 04.12.2024 12:18:33 [] (unknown:0) -   Created wheel for batchgenerators: filename=batchgenerators-0.25.1-py3-none-any.whl size=93102 sha256=a8ccc2b331b04b793ee454df5d32ba1c53e0d28aba24304afebe58e7ccd86a82
[INFO][Stream] 04.12.2024 12:18:33 [] (unknown:0) -   Stored in directory: c:\users\andra\appdata\local\pip\cache\wheels\97\8d\b9\3a9435d619b6a4bcd98f8cb8b324da29b6173555bb80860bdd
[INFO][Stream] 04.12.2024 12:18:33 [] (unknown:0) - Successfully built moosez halo batchgenerators
[INFO][Stream] 04.12.2024 12:18:34 [] (unknown:0) - Installing collected packages: spinners, SimpleITK, pywin32, pytz, pyfiglet, linecache2, argparse, zipp, tzdata, traceback2, toolz, tifffile, threadpoolctl, termcolor, pyyaml, python-gdcm, pygments, pydicom, psutil, natsort, mdurl, locket, lazy-loader, kiwisolver, joblib, imageio, imagecodecs, graphviz, future, fonttools, et-xmlfile, einops, cycler, contourpy, connected-components-3d, colorama, cloudpickle, yacs, unittest2, tqdm, scikit-learn, scikit-image, partd, pandas, openpyxl, markdown-it-py, log_symbols, importlib-resources, importlib-metadata, click, rich, nibabel, mpire, matplotlib, halo, fft-conv-pytorch, dynamic-network-architectures, dask, batchgenerators, seaborn, dicom2nifti, batchgeneratorsv2, acvl-utils, nnunetv2, moosez
[INFO][Stream] 04.12.2024 12:18:34 [] (unknown:0) -   Attempting uninstall: SimpleITK
[INFO][Stream] 04.12.2024 12:18:34 [] (unknown:0) -     Found existing installation: SimpleITK 2.4.0rc2.dev213
[INFO][Stream] 04.12.2024 12:18:34 [] (unknown:0) -     Uninstalling SimpleITK-2.4.0rc2.dev213:
[INFO][Stream] 04.12.2024 12:18:34 [] (unknown:0) -       Successfully uninstalled SimpleITK-2.4.0rc2.dev213
[INFO][Stream] 04.12.2024 12:18:44 [] (unknown:0) -   Attempting uninstall: pydicom
[INFO][Stream] 04.12.2024 12:18:44 [] (unknown:0) -     Found existing installation: pydicom 2.4.4
[INFO][Stream] 04.12.2024 12:18:44 [] (unknown:0) -     Uninstalling pydicom-2.4.4:
[INFO][Stream] 04.12.2024 12:18:44 [] (unknown:0) -       Successfully uninstalled pydicom-2.4.4
[INFO][Stream] 04.12.2024 12:19:20 [] (unknown:0) - Successfully installed SimpleITK-2.2.1 acvl-utils-0.2 argparse-1.4.0 batchgenerators-0.25.1 batchgeneratorsv2-0.2.1 click-8.1.7 cloudpickle-3.1.0 colorama-0.4.6 connected-components-3d-3.21.0 contourpy-1.3.0 cycler-0.12.1 dask-2024.8.0 dicom2nifti-2.4.11 dynamic-network-architectures-0.3.1 einops-0.8.0 et-xmlfile-2.0.0 fft-conv-pytorch-1.2.0 fonttools-4.55.1 future-1.0.0 graphviz-0.20.3 halo-0.0.31 imagecodecs-2024.9.22 imageio-2.36.1 importlib-metadata-8.5.0 importlib-resources-6.4.5 joblib-1.4.2 kiwisolver-1.4.7 lazy-loader-0.4 linecache2-1.0.0 locket-1.0.0 log_symbols-0.0.14 markdown-it-py-3.0.0 matplotlib-3.9.3 mdurl-0.1.2 moosez-3.0.6 mpire-2.3.5 natsort-8.1.0 nibabel-5.3.2 nnunetv2-2.5.1 openpyxl-3.0.10 pandas-2.2.3 partd-1.4.2 psutil-6.1.0 pydicom-2.2.2 pyfiglet-0.8.post1 pygments-2.18.0 python-gdcm-3.0.24.1 pytz-2024.2 pywin32-225 pyyaml-6.0.2 rich-13.9.4 scikit-image-0.24.0 scikit-learn-1.5.2 seaborn-0.13.2 spinners-0.0.24 termcolor-2.5.0 threadpoolctl-3.5.0 tifffile-2024.8.30 toolz-1.0.0 tqdm-4.67.1 traceback2-1.4.0 tzdata-2024.2 unittest2-1.1.0 yacs-0.1.8 zipp-3.21.0
[DEBUG][Qt] 04.12.2024 12:24:19 [] (unknown:0) - Switch to module:  "Welcome"
[DEBUG][Qt] 04.12.2024 12:24:20 [] (unknown:0) - Switch to module:  "SampleData"
[DEBUG][Python] 04.12.2024 12:24:23 [Python] (C:/tmp/Slicer 5.7.0-2024-12-03 moose/bin/../lib/Slicer-5.7/qt-scripted-modules/SampleData.py:381) - Verifying checksum
[DEBUG][Python] 04.12.2024 12:24:23 [Python] (C:/tmp/Slicer 5.7.0-2024-12-03 moose/bin/../lib/Slicer-5.7/qt-scripted-modules/SampleData.py:381) - File already exists and checksum is OK - reusing it.
[DEBUG][Python] 04.12.2024 12:24:23 [Python] (C:/tmp/Slicer 5.7.0-2024-12-03 moose/bin/../lib/Slicer-5.7/qt-scripted-modules/SampleData.py:381) - Requesting load CTACardio from C:/Users/andra/AppData/Local/slicer.org/Slicer/cache/SlicerIO/CTA-cardio.nrrd ...
[DEBUG][Qt] 04.12.2024 12:24:24 [] (unknown:0) - Switch to module:  "MOOSE"
[DEBUG][Qt] 04.12.2024 12:24:24 [] (unknown:0) - "Volume" Reader has successfully read the file "C:/Users/andra/AppData/Local/slicer.org/Slicer/cache/SlicerIO/CTA-cardio.nrrd" "[1.00s]"
[DEBUG][Python] 04.12.2024 12:24:24 [Python] (C:/tmp/Slicer 5.7.0-2024-12-03 moose/bin/../lib/Slicer-5.7/qt-scripted-modules/SampleData.py:381) - Load finished
[CRITICAL][Stream] 04.12.2024 12:28:30 [] (unknown:0) - WARNING: In D:\a\1\sitk-build\ITK\Modules\Core\Common\src\itkObjectFactoryBase.cxx, line 562
[CRITICAL][Stream] 04.12.2024 12:28:30 [] (unknown:0) - Possible incompatible factory load:
[CRITICAL][Stream] 04.12.2024 12:28:30 [] (unknown:0) - Running itk version :
[CRITICAL][Stream] 04.12.2024 12:28:30 [] (unknown:0) - itk version 5.3.0
[CRITICAL][Stream] 04.12.2024 12:28:30 [] (unknown:0) - Loaded factory version:
[CRITICAL][Stream] 04.12.2024 12:28:30 [] (unknown:0) - itk version 5.4.0
[CRITICAL][Stream] 04.12.2024 12:28:30 [] (unknown:0) - Loading factory:
[CRITICAL][Stream] 04.12.2024 12:28:30 [] (unknown:0) - C:/tmp/Slicer 5.7.0-2024-12-03 moose/bin/../lib/Slicer-5.7/ITKFactories\MRMLIDIOPlugin.dll
[CRITICAL][Stream] 04.12.2024 12:28:30 [] (unknown:0) -
[CRITICAL][Stream] 04.12.2024 12:28:30 [] (unknown:0) -
[DEBUG][Python] 04.12.2024 12:28:35 [Python] (C:\tmp\Slicer 5.7.0-2024-12-03 moose\lib\Python\Lib\site-packages\matplotlib\__init__.py:341) - matplotlib data path: C:\tmp\Slicer 5.7.0-2024-12-03 moose\lib\Python\Lib\site-packages\matplotlib\mpl-data
[DEBUG][Python] 04.12.2024 12:28:36 [Python] (C:\tmp\Slicer 5.7.0-2024-12-03 moose\lib\Python\Lib\site-packages\matplotlib\__init__.py:341) - CONFIGDIR=C:\Users\andra\.matplotlib
[DEBUG][Python] 04.12.2024 12:28:36 [Python] (C:\tmp\Slicer 5.7.0-2024-12-03 moose\lib\Python\Lib\site-packages\matplotlib\__init__.py:1512) - interactive is False
[DEBUG][Python] 04.12.2024 12:28:36 [Python] (C:\tmp\Slicer 5.7.0-2024-12-03 moose\lib\Python\Lib\site-packages\matplotlib\__init__.py:1513) - platform is win32
[DEBUG][Python] 04.12.2024 12:28:36 [Python] (C:\tmp\Slicer 5.7.0-2024-12-03 moose\lib\Python\Lib\site-packages\matplotlib\__init__.py:341) - CACHEDIR=C:\Users\andra\.matplotlib
[DEBUG][Python] 04.12.2024 12:28:36 [Python] (C:\tmp\Slicer 5.7.0-2024-12-03 moose\lib\Python\Lib\site-packages\matplotlib\font_manager.py:1580) - Using fontManager instance from C:\Users\andra\.matplotlib\fontlist-v390.json
[ERROR][Python] 04.12.2024 12:28:36 [Python] (C:\tmp\Slicer 5.7.0-2024-12-03 moose\bin\Python\slicer\util.py:3049) - Error during MOOSE segmentation: list index out of range

@LalithShiyam
Copy link

Hi @lassoan, we are looking into this, we think it's a bug, but we will get back to you in a bit. Many thanks for reviewing the PR, we appreciate your time!
Lalith

@lassoan
Copy link
Contributor

lassoan commented Dec 4, 2024

Just two more things:

  1. I've just noticed that pytorch is installed with some hardcoded URLs. Since we need to accommodate many extensions that require pytorch and many operating system and hardware combinations, we ask all extension developers to use SlicerPyTorch extension to install pytorch.

Please replace this code:

        if self.dependencies_installed():
            self.addLog("Dependencies already installed.")
        else:
            self.addLog("Installing dependencies...")
            if os.name == 'nt':
                 slicer.util.pip_install("torch --index-url https://download.pytorch.org/whl/cu124")
            else:
                slicer.util.pip_install("torch")
            slicer.util.pip_install("git+https://github.com/Keyn34/MOOSE.git@SlicerMOOSE")
            self.addLog("Dependencies installed successfully.")

by something like this:

https://github.com/lassoan/SlicerTotalSegmentator/blob/c4144875e600705f4c4b30a44b49d05d27ffb757/TotalSegmentator/TotalSegmentator.py#L757-L776

  1. Make models folder more easily accessible

Models are big and users may have trouble finding and removing model files they no longer need. At least describe in the module documentation where models are installed, but it would be even better to add buttons to the "Advanced" section to manage the models (open the models folder, remove all models), as it is done in MONAIAuto3DSeg:

image

@jamesobutler
Copy link
Contributor

jamesobutler commented Dec 4, 2024

@lassoan I also see that the moosez python package being installed is uninstalling the Slicer SimpleITK python package (SimpleITK-2.4.0rc2.dev213) because it is enforcing SimpleITK >=2.2.1,<2.3 (see here). This will run into Slicer/Slicer#6711. @Keyn34 Would you be able to update moosez to support newer versions of SimpleITK so that the special Slicer SimpleITK is not removed?

added "PyTorch" to build_dependencies for Windows and to be sync with Extension repo
@fedorov
Copy link
Member

fedorov commented Dec 5, 2024

@LalithShiyam @Keyn34 would you be able to confirm if there are any redistribution restrictions applied to the segmentation results produced by your model?

Does any license apply to the outputs of this module?

@LalithShiyam
Copy link

Hi @fedorov, would GPLV3 the original license of moosev3 be a problem?

@fedorov
Copy link
Member

fedorov commented Dec 5, 2024

GPL is a source code license, not a license that is designed to handle data. Typically, a license from the family of Creative Commons licenses is selected (Wikipedia provides a nice graph summarizing the gradation from permissive to restrictive https://en.wikipedia.org/wiki/Creative_Commons_license).

I do not think we are in a position to enforce any specific license on the output. Obviously, the more permissive license is, the more reusable the segmentations generated would be, and the more use of your software could be anticipated, but it is your decision which license you choose.

The reason I asked the question is to document the license so that the users of your extension are fully aware of what they can and cannot do with the segmentation results.

image

(image credit: https://en.wikipedia.org/wiki/Creative_Commons_license#/media/File:Creative_commons_license_spectrum.svg)

@LalithShiyam
Copy link

LalithShiyam commented Dec 5, 2024

Hi @fedorov many thanks for the detailed explanation, much appreciated. As you can tell. We are newbies. I think CC BY-NC should be ideal for us. But we are open to hear your thoughts!

Cheers,
Lalith

@fedorov
Copy link
Member

fedorov commented Dec 5, 2024

I think CC BY-NC should be ideal for us. But we are open to hear your thoughts!

Of course, I would love to see CC-BY, but it is your choice, and it is consistent with GPL you selected for the source code. Thank you for the clarification!

@lassoan
Copy link
Contributor

lassoan commented Dec 5, 2024

We are newbies

In this case, I briefly share my point of view on this.

Anything that is released with a restrictive license (GPL, CC BY NC, ...) is mostly ignored by clinicians, researchers, and companies, due to usage restrictions of any "derived work". For most groups, it is safer to just redo the work from scratch than worry about legal risks. If your goal is to make money by selling your models with a commercial license to companies then a restrictive license may be appropriate. However, achieving success with such license is really difficult, because you are on your own (you project will not have contributors or research collaborators, because contributors would not be able to freely use the result of their work), you have to be really good to do better than all the open-source models that are distributed with permissive license; and you have to compete with all the AI companies on cost and quality of the models.

If you release your results with a permissive license (MIT, Apache, BSD, ...) then you give up on the possibility to sell a commercial license to companies. However, there are many other ways you get rewarded for your efforts. Since your work can be used clinically, commercially, or as basis of additional research work, suddenly many people become interested in making you successful: they want to work with you, help you, fund you, pay for your expertise and insights. You can achieve much more, you can have much bigger impact, work with many smart people, which all may make life more meaningful, interesting, and enjoyable.

Your supervisor, your institution, your funding source, etc. may have certain default preferences, but if you have a specific idea of how you want to do things, then they are usually flexible and supportive. For example, if they initially suggested releasing your work with a non-commercial license, but you are considering opening up, then you may be able to convince them that everyone is better off with using a permissive license.

@fedorov
Copy link
Member

fedorov commented Dec 5, 2024

I completely agree with the above by @lassoan. I heard about your package a while ago (before this PR), but once I saw that it is GPL, I didn't want to spend any further time looking into it, and I communicated my concerns to my collaborators who considered it.

To follow up on the topic of data shared under CC-BY-NC, following Andras response, I can share my perspective. I am a co-PI of the team building Imaging Data Commons (IDC). IDC is more than just a data repository - one of our goals is to work on enrichment of images with analysis results and annotations. Along those lines, we analyzed NLST - one of the largest collections in IDC, >125,000 CT series - using TotalSegmentator and pyradiomics and included analysis results in IDC (you can read more here).

It is highly unlikely we would consider doing what we did with TotalSegmentator for your model - even if it is times better than TotalSegmentator - for several reasons. First, under the terms of our contract, all of the software we develop must be released under non-restrictive license (GPL is not one of them), and we would need to develop additional code to apply this model to our data (as we did in https://github.com/ImagingDataCommons/CloudSegmentator). Second, as much as possible we strive to share data under CC-BY license. The few CC-BY-NC collections we have in IDC right now are legacy, and up to now we were able to get all of the new datasets shared under CC-BY.

I would like to second Andras: if you can, I strongly encourage you to revisit the license for your code to use a non-viral license, and also revisit the license for the segmentations produced by your code to be CC-BY.

There are indeed some precedents where developers reconsidered their license from the original choice of GPL - you can see a related discussion and arguments similar to what Andras said above here: bhklab/med-imagetools#117 (comment).

@LalithShiyam
Copy link

Hi @fedorov, @lassoan,

Many thanks for taking the time to explain all these facets - we truly appreciate it. We understand things better now and we are happy to change the license to be permissive: Apache and CC-BY.

We are sorting out things based on your review, we will send the cleaned up version today.

Cheers,
Lalith

@LalithShiyam
Copy link

Hi @lassoan @fedorov MOOSE is now Apache 2.0 and CC-BY: https://github.com/ENHANCE-PET/MOOSE!

Cheers,
Lalith

@Keyn34
Copy link
Author

Keyn34 commented Dec 6, 2024

Hello everyone,
Thank you again for your time and review. We really appreciate it!

I have a few questions:

  • I used python_real = shutil.which("python-real") to determine the python version that is used during the call of slicer.util.launchConsoleProcess(cmd), as models are installed relative to there natively by MOOSE. Is the location of that Python executable consistent?
  • I changed the SimpleITK requirement to be non-restricted. However, I saw that 3DSlicer's installed version is still being overwritten:
Collecting SimpleITK (from moosez==3.0.6)
  Using cached SimpleITK-2.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.9 kB)

.
.
.

Attempting uninstall: SimpleITK
    Found existing installation: SimpleITK 2.2.1rc2.dev4
    Uninstalling SimpleITK-2.2.1rc2.dev4:
      Successfully uninstalled SimpleITK-2.2.1rc2.dev4
  • It's probably not entirely the right place, but I noticed that the TotalSegmentator Slicer extension installs avcl_util before torch. avcl_util requires torch, so it is installed automatically, which might make the torch setup via the PyTorch Extension irrelevant/bypass it which might lead to unexpected behavior, especially on Windows. (?) At least, I noticed this since I was wondering why I wasn't asked to install torch via the PyTorch Extension when using the TotalSegmentator Extension. This could also be relevant for us. I also get an error while installing TotalSegmentator Extension for black;extra==dev. I did not investigate further, though.

I implemented all the suggestions as best as possible. Thanks again!
A quick rundown:

  • The model folders are now easily accessible through the interface.
  • I adopted the torch installation and tested it on Windows and Ubuntu, which worked well for me. Ubuntu doesn't require the PyTorch extension (for me, the extension installs cuda 11.8, which causes problems on my system), as the basic torch installation works here.
  • I lifted the version restriction in MOOSE (see above, please)
  • I adopted the licenses for the code and models. Thanks to the very helpful discussion here, we updated it accordingly as @LalithShiyam already mentioned. I just synched it over to my 3DSlicer-specific branch.
  • I did not include your suggested text regarding licensing @lassoan, as we resolved this in the thread here. I hope this is alright.
  • The extension icon should be correct now.
  • I also added a screenshot of one of our sample datasets from the AutoPET challenge. (EXTENSION_SCREENSHOTURLS was also updated)
  • I removed the ExtensionsIndex folder from the repository.
  • A segmentation node selector and show3D button are now available in the extension.
  • The README was updated regarding how to use the extension and general wording.
  • The expected input data is now hinted in the UI and the README.
  • No returned segmentation is handled more gracefully by informing the user with an error dialog. (Thanks for the find!)
  • Regarding the sample datasets in 3DSlicer: among the four available CT datasets, it worked for two: liver and abdomen, while it struggled with the other two. We are currently investigating why this happens, but at first glance, they look more different and out of distribution than the dataset we trained on. Our models were predominantly trained on oncological whole/total body CT images (eyes to thighs or head to toe). The goal was to enable inter-organ communication in oncological classes. For the liver test data, we found that MOOSE ignores the lesion successfully:
    image
    While TotalSegmentator seems to enclose the lesion:
    image

@jamesobutler
Copy link
Contributor

MOOSE is now Apache 2.0 and CC-BY: https://github.com/ENHANCE-PET/MOOSE!

@Keyn34 You will want to make the same change in your fork’s default branch (main) https://github.com/Keyn34/MOOSE as GitHub uses that to display the license in the summary section. Rebasing your main branch against the upstream https://github.com/ENHANCE-PET/MOOSE should fix that. That will help clarify things even though I know you already changed the license file in the SlicerMoose branch.

Also do you plan on committing the changes in your fork’s SlicerMoose branch to the upstream? I know Slicer is still hanging onto Python 3.9 currently which was why you had to do those additional changes. I know some Slicer users incorrectly will pip install a package directly to use it in scripting rather than letting the Slicer extension install it. A pip install of moosez would pull from PyPI where a version < 3 of moosez would get installed as that would be the latest to support Python 3.9. You don’t have to commit your changes to the upstream, but it is more of a warning about what the users may do in the meantime haha. Lookout for any of these reports on the Slicer discourse. Slicer aims to update its Python version which will probably happen early next year in which case this extension could go back to using the upstream moosez Python package.

@fedorov
Copy link
Member

fedorov commented Dec 6, 2024

Regarding the sample datasets in 3DSlicer [...] Our models were predominantly trained on oncological whole/total body CT images (eyes to thighs or head to toe). The goal was to enable inter-organ communication in oncological classes.

This becomes a bit of a digression, and I am happy to take this discussion offline or meet separately, but ...

Considering the above, you will find a lot of publicly available cancer imaging data in IDC, and furthermore you can relatively easily access any of those images via the SlicerIDCBrowser extension (see this post for details/demo: https://discourse.canceridc.dev/t/sliceridcbrowser-extension-released/515). You could use this data to do more testing, and you could also consider applying your model to a subset of data from IDC and (now that the outputs are covered by CC-BY!) submitting it to IDC - this will demonstrate capabilities of your model, and also enrich IDC data for other users' benefit. If you like, I am happy to meet to discuss this separately.

@Keyn34
Copy link
Author

Keyn34 commented Dec 6, 2024

@Keyn34 You will want to make the same change in your fork’s default branch (main) https://github.com/Keyn34/MOOSE as GitHub uses that to display the license in the summary section. Rebasing your main branch against the upstream https://github.com/ENHANCE-PET/MOOSE should fix that. That will help clarify things even though I know you already changed the license file in the SlicerMoose branch.

@jamesobutler taken care of. The main branch is now up-to-date with the licenses. And thank you for the warning! Right now, we will keep the versions separated, but we want to provide one single version at a later stage.

You could use this data to do more testing, and you could also consider applying your model to a subset of data from IDC and (now that the outputs are covered by CC-BY!) submitting it to IDC - this will demonstrate capabilities of your model, and also enrich IDC data for other users' benefit. If you like, I am happy to meet to discuss this separately.

@fedorov This is very interesting and a great idea. Thanks a lot for the suggestion! We will definitely discuss this internally with the remaining team.

@LalithShiyam
Copy link

Hi @fedorov, happy to do so. How can we connect? There is a discord channel in moose which you joined earlier; we can talk there if it's easier.

@fedorov
Copy link
Member

fedorov commented Dec 6, 2024

@LalithShiyam happy to chat on discord, or you can contact me via gmail andrey dot fedorov!

lassoan added a commit to lassoan/SlicerTotalSegmentator that referenced this pull request Dec 6, 2024
Since acvl_utils requires pytorch, we need to install acvl_utils after pytorch.

Thanks to @Keyn34 for the tip (Slicer/ExtensionsIndex#2127 (comment)).
@lassoan
Copy link
Contributor

lassoan commented Dec 6, 2024

We understand things better now and we are happy to change the license to be permissive: Apache and CC-BY.

Awesome!

  • which might make the torch setup via the PyTorch Extension irrelevant/bypass it which might lead to unexpected behavior, especially on Windows

Good catch, fixed it!

@LalithShiyam
Copy link

LalithShiyam commented Dec 7, 2024

Hi everyone,

Big thanks to @fedorov for introducing us to IDC! As suggested, we did some random testing on 10 datasets from NLST, where the field-of-view is limited to the thoracic region. Unlike the slicer sample thoracic datasets, moose didn’t struggle here. I’ve attached some sample screenshots of organs, vertebrae, cardiac structures, and ribs (subject_id=218890).

Out of the 10 random datasets, moose performed pretty well—didn’t encounter any gross errors, and they LGTM (not a clinician, though). We’re now downloading the remaining 10 TB of NLST data and should have results in the next couple of weeks (hopefully).

The bad news: we still don’t know why it failed on the slicer thoracic datasets. It might be the gadgets attached to the surface of the subject, but I am not sure (even this subject had some clips attached on the chest) - we still need to look into it.

P.S: Is there any thing else that we need to do in regards to this extension?

image
image
image
image

@jamesobutler
Copy link
Contributor

I adopted the torch installation and tested it on Windows and Ubuntu, which worked well for me. Ubuntu doesn't require the PyTorch extension (for me, the extension installs cuda 11.8, which causes problems on my system), as the basic torch installation works here.

@Keyn34, what do you mean by this? Why do you say Ubuntu doesn’t require the Slicer PyTorch extension? That would appropriately install the necessary CUDA version for that platform.

Can you describe further the issue you had with the install of the CUDA 11.8 version of PyTorch?

@Keyn34
Copy link
Author

Keyn34 commented Dec 9, 2024

@jamesobutler We noticed when using the CLI or package of MOOSE, Ubuntu users are usually OK with simply running the setup process where the latest version of torch is being installed. On Windows, users are asked to install their respective torch version first so that MOOSE runs smoothly. I tried to replicate this within 3DSlicer. However, when implementing MOOSE as an extension, I noticed that our systems run into problems when the latest version of torch is not installed. To be precise, if the computation backend is not the latest.

I use 3DSlicer 5.6.2 on Ubuntu 22.04.5 with an RTX 3090, driver Version 535.216.03, and CUDA Version 12.2.

When I install the PyTorch Extension via the Extension Manager and use it to install torch with the default settings, the extension will install torch 2.5.1+cu118
image

When I install the MOOSE extension on top of it, I get the warning:
UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the distutilsmodule insys.modules. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.

Whenever I need to import MOOSE as a package into the extensions (for fetching the segmentation names and IDs), I get the error:

Traceback (most recent call last):
  File "/home/horyzen/Projects/Python/SlicerMOOSE/MOOSE/MOOSE.py", line 142, in button_segmentation_run_clicked
    label_indices = self.logic.get_label_indices(model)
  File "/home/horyzen/Projects/Python/SlicerMOOSE/MOOSE/MOOSE.py", line 252, in get_label_indices
    from moosez.models import Model
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/moosez/__init__.py", line 1, in <module>
    from .moosez import moose
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/moosez/moosez.py", line 39, in <module>
    from moosez import predict
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/moosez/predict.py", line 27, in <module>
    from nnunetv2.inference.predict_from_raw_data import nnUNetPredictor
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/nnunetv2/inference/predict_from_raw_data.py", line 16, in <module>
    from torch._dynamo import OptimizedModule
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/_dynamo/__init__.py", line 3, in <module>
    from . import convert_frame, eval_frame, resume_execution
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/_dynamo/convert_frame.py", line 31, in <module>
    from torch._dynamo.utils import CompileTimeInstructionCounter
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/_dynamo/utils.py", line 1320, in <module>
    if has_triton_package():
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/utils/_triton.py", line 9, in has_triton_package
    from triton.compiler.compiler import triton_key
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/__init__.py", line 8, in <module>
    from .runtime import (
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/runtime/__init__.py", line 1, in <module>
    from .autotuner import (Autotuner, Config, Heuristics, autotune, heuristics)
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/runtime/autotuner.py", line 9, in <module>
    from ..testing import do_bench, do_bench_cudagraph
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/testing.py", line 7, in <module>
    from . import language as tl
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/language/__init__.py", line 4, in <module>
    from . import math
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/language/math.py", line 1, in <module>
    from . import core
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/language/core.py", line 10, in <module>
    from ..runtime.jit import jit
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/runtime/jit.py", line 12, in <module>
    from ..runtime.driver import driver
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/runtime/driver.py", line 1, in <module>
    from ..backends import backends
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/backends/__init__.py", line 50, in <module>
    backends = _discover_backends()
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/backends/__init__.py", line 44, in _discover_backends
    driver = _load_module(name, os.path.join(root, name, 'driver.py'))
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/backends/__init__.py", line 12, in _load_module
    spec.loader.exec_module(module)
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/backends/amd/driver.py", line 7, in <module>
    from triton.runtime.build import _build
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/triton/runtime/build.py", line 8, in <module>
    import setuptools
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/setuptools/__init__.py", line 7, in <module>
    import _distutils_hack.override  # noqa: F401
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/_distutils_hack/override.py", line 1, in <module>
    __import__('_distutils_hack').do_override()
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/_distutils_hack/__init__.py", line 77, in do_override
    ensure_local_distutils()
  File "/home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/site-packages/_distutils_hack/__init__.py", line 64, in ensure_local_distutils
    assert '_distutils' in core.__file__, core.__file__
AssertionError: /home/horyzen/Software/3DSlicer/Slicer-5.6.2-linux-amd64/lib/Python/lib/python3.9/distutils/core.py

This does not happen when I install it, as I am doing right now in the extension, where torch 2.5.1+cu124 is installed:
image

Then, everything works perfectly. On Windows, everything works fine when installing torch via the extension.

I understand this is not an issue with the PyTorch/MOOSE extension or torch itself, as it seems to be only an unfortunate misconfiguration between setuptools and distuils, but I could not find a workaround for it yet to guarantee MOOSE to work.

@lassoan
Copy link
Contributor

lassoan commented Dec 11, 2024

UserWarning: Distutils was imported before Setuptools

You can ignore this warning. It will not cause any problem for us in Python-3.9 and will go away when Slicer will switch to Python 3.11 soon.

We noticed when using the CLI or package of MOOSE, Ubuntu users are usually OK with simply running the setup process where the latest version of torch is being installed

Light-the-torch package is used for automating the installation instructions provided in https://pytorch.org/get-started/locally/ (detect operating system, hardware, and CUDA version). Interestingly in CUDA 12 in linux, the logic of generating the installation command got reversed: to install CUDA-accelerated version you use the default URL, while for CPU version you use a special URL. This logic may not have been implemented in light-the-torch yet, but @jamesobutler have already pushed a fix that should address this (pmeier/light-the-torch#151).

@jamesobutler What would you recommend? Should we wait for the light-the-torch update and test again? Or we should implement some quick workaround in this extension until light-the-torch gets fixed?

@jamesobutler
Copy link
Contributor

Interestingly in CUDA 12 in linux, the logic of generating the installation command got reversed: to install CUDA-accelerated version you use the default URL, while for CPU version you use a special URL.

I didn't notice this before, but yes it does appear torch has a special condition for linux to by default install the latest CUDA 12.4 computation backend whl when no computation is specified. light-the-torch is always specific about which computation backend so it was not impacted by this as it always specifies the --index-url with the computation backend.

Philip of light-the-torch said he would get to integrating my PR this week at some point, so the issue could be resolved soon as it relates to this PR since light-the-torch will then be able to choose from torch CUDA 12.1 and 12.4 whl files. For this extension, updating Ubuntu to continue to use light-the-torch through SlicerPyTorch is probably best and then we provide support to special cases of it failing due to a driver compatibility issue if a specific user has an offending driver version. It may be unique to @Keyn34's 535.216.3 version. Unclear if an older or newer driver version also has the same problems on Ubuntu.

Table 2 of https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html states the Minimum Required Driver Version on Linux for CUDA 11.x toolkit is >=450.80.02.

applications built against any of the older CUDA Toolkits always continued to function on newer drivers due to binary backward compatibility

However, maybe Ubuntu's 535.216.3 broke some compatibility things with CUDA 11.8.

@Keyn34
Copy link
Author

Keyn34 commented Dec 12, 2024

@lassoan and @jamesobutler, just letting you know, and as I was curious: I updated my driver to version 560.35.05 with CUDA version 12.6.

I then installed torch once again via the PyTorch extension:
image

Then, I installed the MOOSE extension again and tried to run it, which unfortunately produced the same error (and warning) as above. When I installed torch manually with slicer.util.pip_install("torch --index-url https://download.pytorch.org/whl/cu121") to enforce cuda 1.21 followed by rerunning MOOSE, I also get that error.

I checked out the CLI implementation of MOOSE as well: I created a virtual Python 3.10 environment and installed torch first with pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 to install torch, version: 2.5.1+cu118. Then, I installed MOOSE on top of it with pip install moosez and tried running it via the CLI interface. It worked perfectly fine. I repeated the same within a Python 3.9 environment, and it also worked fine.

So, I am not sure if it's the driver version. I think it's mainly a problem with the compatibility of the computational backend/torch and 3DSlicer's Python version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants