ivadomed / model_seg_sci

Deep-learning based segmentation of the spinal cord and intramedually lesions in traumatic and non-traumatic SCI
MIT License
12 stars 2 forks source link

cannot import name 'predict_from_raw_data' #79

Closed TayyssirB closed 9 months ago

TayyssirB commented 9 months ago

File "C:\Users\tpc\Desktop\these\sciseg\model_seg_sci\packaging\run_inference.py", line 10, in from nnunetv2.inference.predict_from_raw_data import predict_from_raw_data as predictor ImportError: cannot import name 'predict_from_raw_data' from 'nnunetv2.inference.predict_from_raw_data'

valosekj commented 9 months ago

@TayyssirB thank you for reporting this!

Did you follow the installation instructions? Specifically, did you run the following commands?

conda create -n venv_nnunet python=3.9
conda activate venv_nnunet
pip install -r packaging/requirements.txt
TayyssirB commented 9 months ago

yes i did (venv_nnunet) C:\Users\tpc\Desktop\these\sciseg\model_seg_sci>pip install -r packaging/requirements.txt Collecting numpy (from -r packaging/requirements.txt (line 1)) Downloading numpy-1.26.4-cp39-cp39-win_amd64.whl.metadata (61 kB) ---------------------------------------- 61.0/61.0 kB 203.2 kB/s eta 0:00:00 Collecting nibabel (from -r packaging/requirements.txt (line 2)) ..... etc etc

valosekj commented 9 months ago

Okay, thank you for confirming this!

We recently added the model to the Spinal Cord Toolbox (SCT) v6.2. I updated the installation and usage instructions here. Could you please follow them and let us know if it works?

TayyssirB commented 9 months ago

it works perfectly thanks