MIC-DKFZ / HD-BET

MRI brain extraction tool
Apache License 2.0
255 stars 61 forks source link

'HD-bet' is not an internal or external command, nor a runnable program or batch file. #24

Closed ljljlj02 closed 1 year ago

ljljlj02 commented 2 years ago

Hello, I want to know if HD-BET supports Win10 system,,I have run the following command cd HD-BET pip install -e . ,However, there is a problem in executing the following code hd-bet --help, HD-bet' is not an internal or external command, nor a runnable program or batch file.

I don't know what went wrong, Any help would be greatly appreciated。

FabianIsensee commented 2 years ago

unfortunately Windows is not supported. You need a Linux-based operating system

Manurocker95 commented 2 years ago

unfortunately Windows is not supported. You need a Linux-based operating system

Any plan to port it to Windows?

FabianIsensee commented 2 years ago

I am willing to accept PR's ;-)

rbumm commented 1 year ago

We were able to run the HDBrainExtraction 3D Slicer extension (that is packaging an HD-BET model) successfully in Windows 11 on a GTX 1060 laptop.

ljljlj02 commented 1 year ago

We were able to run the HDBrainExtraction 3D Slicer extension (that is packaging an HD-BET model) successfully in Windows 11 on a GTX 1060 laptop.

Nice.

sh-shahrokhi commented 1 year ago

Hello, I want to know if HD-BET supports Win10 system,,I have run the following command cd HD-BET pip install -e .,However, there is a problem in executing the following code hd-bet --help, HD-bet' is not an internal or external command, nor a runnable program or batch file.

I don't know what went wrong, Any help would be greatly appreciated。

I solved this in a hacky way. you may rename the hd-bet file in main repo HD-BET directory to hd-bet.py, cd to that directory, and call it with python3 hd-bet.py -i <input> ... You may also need to get cuda enabled torch as it may not get automatically installed: pip3 install -U torch --extra-index-url https://download.pytorch.org/whl/cu117

FabianIsensee commented 1 year ago

good solution, thanks for that!

onderplt commented 9 months ago

I have successfully run HD-BET in windows 11 using Windows Subsystem for Linux 2 (WSL2). Thus if you want to run it under windows 10/11, WSL is an option.

saimasafdar2021 commented 4 months ago

Hi, I tried using the HD-BET particularly described by sh-shahrokhi but i am unable to use it. The terminal message is as follow:

(base) useradmin@DEP59365:/media/useradmin/Disk2/HD-Bet/HD-BET/HD_BET$ python3 hd-bet.py -i /media/useradmin/Disk2/HD-Bet/APT010/T1_reorient.nii.gz -o /media/useradmin/Disk2/HD-Bet/APT010/t1_bet.nii.gz -s 1

######################## If you are using hd-bet, please cite the following paper: Isensee F, Schell M, Tursunova I, Brugnara G, Bonekamp D, Neuberger U, Wick A, Schlemmer HP, Heiland S, Wick W,Bendszus M, Maier-Hein KH, Kickingereder P. Automated brain extraction of multi-sequence MRI using artificialneural networks. arXiv preprint arXiv:1901.11341, 2019. ########################

Traceback (most recent call last): File "hd-bet.py", line 134, in run_hd_bet(input_files, output_files, mode, config_file, device, pp, tta, save_mask, overwrite_existing, bet) File "/home/useradmin/HD-BET/HD_BET/run.py", line 63, in run_hd_bet net.cuda(device) File "/home/useradmin/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 911, in cuda return self._apply(lambda t: t.cuda(device)) File "/home/useradmin/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 802, in _apply module._apply(fn) File "/home/useradmin/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 825, in _apply param_applied = fn(param) File "/home/useradmin/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 911, in return self._apply(lambda t: t.cuda(device)) File "/home/useradmin/.local/lib/python3.8/site-packages/torch/cuda/init.py", line 302, in _lazy_init torch._C._cuda_init() RuntimeError: The NVIDIA driver on your system is too old (found version 11040). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.

sh-shahrokhi commented 4 months ago

Your error is not related to hd-bet, you need to update your nvidia drivers o install a suitable torch version. The runtime error at the end says that.

On Tue, Feb 27, 2024, 8:13 p.m. saima safdar @.***> wrote:

Hi, I tried using the HD-BET particularly described by sh-shahrokhi https://github.com/sh-shahrokhi but i am unable to use it. The terminal message is as follow:

(base) @.***:/media/useradmin/Disk2/HD-Bet/HD-BET/HD_BET$ python3 hd-bet.py -i /media/useradmin/Disk2/HD-Bet/APT010/T1_reorient.nii.gz -o /media/useradmin/Disk2/HD-Bet/APT010/t1_bet.nii.gz -s 1

######################## If you are using hd-bet, please cite the following paper: Isensee F, Schell M, Tursunova I, Brugnara G, Bonekamp D, Neuberger U, Wick A, Schlemmer HP, Heiland S, Wick W,Bendszus M, Maier-Hein KH, Kickingereder P. Automated brain extraction of multi-sequence MRI using artificialneural networks. arXiv preprint arXiv:1901.11341, 2019. ########################

Traceback (most recent call last): File "hd-bet.py", line 134, in run_hd_bet(input_files, output_files, mode, config_file, device, pp, tta, save_mask, overwrite_existing, bet) File "/home/useradmin/HD-BET/HD_BET/run.py", line 63, in run_hd_bet net.cuda(device) File "/home/useradmin/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 911, in cuda return self._apply(lambda t: t.cuda(device)) File "/home/useradmin/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 802, in _apply module._apply(fn) File "/home/useradmin/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 825, in _apply param_applied = fn(param) File "/home/useradmin/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 911, in return self._apply(lambda t: t.cuda(device)) File "/home/useradmin/.local/lib/python3.8/site-packages/torch/cuda/init.py", line 302, in _lazy_init torch._C._cuda_init() RuntimeError: The NVIDIA driver on your system is too old (found version 11040). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.

— Reply to this email directly, view it on GitHub https://github.com/MIC-DKFZ/HD-BET/issues/24#issuecomment-1968118036, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZRPJACXKSZJX5MMUKTNVKLYV2OE3AVCNFSM5HUWHJXKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWHAYTCOBQGM3A . You are receiving this because you commented.Message ID: @.***>