TotalSegmentator
TotalSegmentator copied to clipboard
Issue creating standalone exe with pyinstaller
I have created a virtual environment and installed Total Segmentator and everything seems to work fine with the installation but I try to create a standalone exe using pyinstaller, I keep getting an error that the arguments are empty and I can't seem to figure out what's missing when creating the exe because the required modules are present.
PyInstaller command: pyinstaller -F --collect-submodules=pydicom --collect-submodules=nnunetv2 --collect-submodules=torch --collect-submodules=tensorboard TotalSegmentator.py
Error message: If you use this tool please cite: https://pubs.rsna.org/doi/10.1148/ryai.230024
No GPU detected. Running on CPU. This can be very slow. The '--fast' or the --roi_subset
option can help to reduce runtime.
Converting dicom to nifti...
found image with shape (512, 512, 31)
Resampling...
Resampled in 0.77s
Predicting part 1 of 5 ...
usage: TotalSegmentator.exe [-h] -i filepath -o directory [-ot {nifti,dicom}] [-ml] [-nr NR_THR_RESAMP] [-ns NR_THR_SAVING] [-f] [-ff] [-t NORA_TAG] [-p]
[-ta {total,body,lung_vessels,cerebral_bleed,hip_implant,coronary_arteries,pleural_pericard_effusion,test,appendicular_bones,tissue_types,heartchambers_highres,face,vertebrae_body,total_mr,tissue_types_mr,face_mr}]
[-rs ROI_SUBSET [ROI_SUBSET ...]] [-rsr ROI_SUBSET_ROBUST [ROI_SUBSET_ROBUST ...]] [-s] [-r] [-sii] [-cp CROP_PATH] [-bs] [-fs] [-ss] [-ndm] [-v1o] [-d {gpu,cpu,mps}] [-q] [-v] [-l LICENSE_NUMBER]
[--test 0|1|3] [--version]
TotalSegmentator.exe: error: the following arguments are required: -i, -o
Input command: TotalSegmentator -i D:\CT_MR_Datasets\CT_RajaRajaCholan\Abdomen_liver\ALSeries2 -o D:\Frontier\DcmConversionToolBinaries\output