neuronflow / BraTS-Toolkit

Code to preprocess, segment, and fuse glioma MRI scans based on the BraTS Toolkit manuscript.
https://www.frontiersin.org/articles/10.3389/fnins.2020.00125/full
GNU Affero General Public License v3.0
72 stars 12 forks source link

Preprocessor stuck on running HD-Bet #17

Closed chocolatetoast-chiu closed 11 months ago

chocolatetoast-chiu commented 2 years ago

Hi, I'm trying to use the BraTS preprocessor, and it is getting stuck on the "running HD-Bet." Does anyone face this issue before when using this preprocessor? Thank you! I will provide the required information to help you figure it out!

Attachment from the output command line image

Thank you!

neuronflow commented 2 years ago

thanks for your interest in btk. Can you provide information about your hardware? Also run the nvidia docker toolkit hello-world please and post the output here.

chocolatetoast-chiu commented 2 years ago

Sure! Thanks for the quick reply! Here is the docker hello-world response: image

nvidia-smi response: image

running a base CUDA container: image

Hardware information: I used cloud computing instance under our university cloud environment:

  1. OS: Linux ubuntu focal 20.04
  2. RAM: 16GB
  3. vCPUs: 8
  4. GPU: NVIDIA A100-SXM
neuronflow commented 2 years ago

Sorry, I believe there might be a misunderstanding, please run:

docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi

You might need sudo depending on your docker configuration.

from: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html

neuronflow commented 2 years ago

closing until more details are provided, feel free to reopen.

azounek commented 1 year ago

Hi, I have the same problem. I am running ubuntu 22.04.1 with CUDA 12.0 on WSL2 in Windows 11 and the Toolkit is also stuck on "running HD-Bet".

@chocolatetoast-chiu Did you manage to find a solution in the meantime?

The output of the nvidia-smi command looks fine so I am not sure what went wrong. Screenshot_20230104_153651

Please let me know if I should provide more details. Thank you !

neuronflow commented 1 year ago

Sorry, I overlooked your msg @azounek . Did you find a solution int he meantime? Potentially the same issue as here: https://github.com/neuronflow/BraTS-Toolkit/issues/29

neuronflow commented 1 year ago

Perhaps a good test would be whether HD-BET alone can run on your machines: https://github.com/MIC-DKFZ/HD-BET

@FabianIsensee do you have an idea what could be the issue here?

chocolatetoast-chiu commented 1 year ago

Sorry for not following this issue for a long time!

I did solve this issue by setting the mode to GPU.

        # execute it
    prep.single_preprocess(
        t1File=t1File,
        t1cFile=t1cFile,
        t2File=t2File,
        flaFile=flaFile,
        outputFolder=outputDir + examName,
        # this way the brain extraction will run on cpu
        mode="gpu",
        confirm=False,
        skipUpdate=False,
        gpuid="0",
    )

If the mode was set to 'cpu', then I'm not able to finish my preprocessing. I don't know the exact reason why.

neuronflow commented 11 months ago

Interesting. We have a new preprocessing pipeline now that might solve your problems. Let me know if you want to serve as a beta tester.

neuronflow commented 11 months ago

closed until further details about the cpu mode are provided.