HD_BET does not work in latest Slicer Preview Release

While the code below works without any errors in the stable version, it gives an error in the preview version.

import HDBrainExtractionTool             
HDBetLogic = HDBrainExtractionTool.HDBrainExtractionToolLogic()                            
brainNode = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLScalarVolumeNode')        
brainSegNode = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLSegmentationNode')
HDBetLogic.process(masterVolumeNode,brainNode ,brainSegNode ,0)


  File "C:/ProgramData/slicer.org/Slicer5.3.0/slicer.org/Extensions-31866/HDBrainExtraction/lib/Slicer-5.3/qt-scripted-modules/HDBrainExtractionTool.py", line 346, in process
    from HD_BET.run import run_hd_bet
ModuleNotFoundError: No module named 'HD_BET'

Please post the exact error.

Also, it could help to post a fully reproducible example that someone can easily paste into the python console to reproduce what you are seeing. E.g. us the sample data methods to load data, etc.

1 Like

@Muhammed_Fatih_Talu You need to install prerequisite packages (pytorch and hd_bet). You can do that by running the module once using the GUI. If you install and run the module from script, make sure you call HDBetLogic.setupPythonRequirements() before HDBetLogic.process(...).