BBillot/SynthSeg

Can`t run the command python ./scripts/commands/SynthSeg_predict.py --i <image> --o <segmentation> --post <post> --resample <resample> --vol <vol>

Closed this issue · 4 comments

Tixi3 commented

Hi! Thank you for this code. However, I want to test SynthSeg on some data and I tried using the command line (from cmd): python ./scripts/commands/SynthSeg_predict.py --i --o --post --resample --vol with corresponding image and segmentation path, but it won`t work.
What might be wrong? Or is there any other way to run all those scripts (from Console in PyCharm for example)?

Hi, could you please copy/paste the error message you had ? Because it's impossible to say what's wrong without it.
Thanks !

Tixi3 commented

cmd_error
Hi! There is a snap of an error. "tijan" is just the name of a user.
Thanks!

Tixi3 commented

Hi! I also tried to start SynthSeg_predict.py (from scripts\commands) from PyCharm by giving image path and path for segmentation folder as parameters (Run >Edit Configurations > Parameters : --i D:\training_seg_01.nii\subject01_seg_extra_cerebral_lesions.nii --o D:\segmentacija), but I get this error:
pycharm_error
Thanks!

IN the first case you're probably not running the code from the SynthSeg directory, so you will need an absolute path to SynthSeg_predict.py

In the second case, you're nt providing python with a python executable file but with a directory so it can't work.

Moreover, once you sort the different paths, make sure you reset the default python path to the main SynthSeg folder, and source your virtual environment.