-
Notifications
You must be signed in to change notification settings - Fork 145
Open
Labels
needs-reproStill needs to be reproducedStill needs to be reproduced
Description
Description
CerebNet fails as the norm.mgz cannot be found (because it was not created upon --no_biasfield)
What happens
CerebNet tries to read the mri/norm.mgz file, although it does not exist.
Steps to Reproduce
docker run --gpus device=0 -v /data3_ssd4t/liyuchong/soop_dataset:/data -v /data3_ssd4t/liyuchong/fastsurfer:/output --rm --user ( i d − u ) : (id -g) deepmi/fastsurfer:latest --t1 /data/sub-2/anat/sub-2_T1w.nii.gz --sid sub-2_2 --sd /output --3T --threads 32 --seg_only --vox_size 1.0 --no_biasfieldExpected Behavior
If --cereb_statsfile is not passed to CerebNet/run_prediction.py no norm file should be loaded.
Also, if no --norm_name is passed, try for the default file name, but provide a better Error text, if this file does not exist.
Log Files /Screenshots
[INFO: run_prediction.py: 454]: Successfully saved image as /output/sub-2_2/mri/aseg.auto_noCCseg.mgz.
[INFO: run_prediction.py: 762]: Running volume-based QC check on segmentation...
Checking total volume ...
Voxel size in mm3: 1.0
Total segmentation volume in liter: 1.05
INFO: Running CerebNet without generating a statsfile, since biasfield
correction deactivated '--no_biasfield'...
python3.10 -s /fastsurfer/CerebNet/run_prediction.py --t1 /data/sub-2/anat/sub-2_T1w.nii.gz --asegdkt_segfile /output/sub-2_2/mri/aparc.DKTatlas+aseg.deep.mgz --conformed_name /output/sub-2_2/mri/orig.mgz --cereb_segfile /output/sub-2_2/mri/cerebellum.CerebNet.nii.gz --seg_log /output/sub-2_2/scripts/deep-seg.log --async_io --batch_size 1 --viewagg_device auto --device auto --threads 32 --sd /output
[INFO: run_prediction.py: 154]: Checking or downloading default checkpoints ...
[INFO: common.py: 820]: Single subject with absolute file path for input.
[INFO: common.py: 878]: Analyzing single subject /data/sub-2/anat/sub-2_T1w.nii.gz
[INFO: common.py: 106]: Using device: cuda
[INFO: common.py: 106]: Using viewagg_device: cuda
[INFO: inference.py: 434]: 25-05-30_02:40:45
Subject: 0%| | 0/1 [00:00<?, ?it/s]
[ERROR: run_prediction.py: 174]: Cannot resolve the file name mri/norm.mgz for the bias field corrected image, maybe specify an absolute path via --norm_name or the file does not exist.
Traceback (most recent call last):
File "/fastsurfer/CerebNet/run_prediction.py", line 172, in main
return tester.run(subjects)
File "/fastsurfer/CerebNet/inference.py", line 446, in run
for idx, (subject, (norm, norm_file, subject_dataset)) in tqdm(
File "/venv/lib/python3.10/site-packages/tqdm/std.py", line 1181, in iter
for obj in iterable:
File "/fastsurfer/FastSurferCNN/utils/common.py", line 246, in iterate
yield element, func(element)
File "/fastsurfer/CerebNet/inference.py", line 388, in _get_subject_dataset
raise ValueError(
ValueError: Cannot resolve the file name mri/norm.mgz for the bias field corrected image, maybe specify an absolute path via --norm_name or the file does not exist.
Execution failed with error:
Cannot resolve the file name mri/norm.mgz for the bias field corrected image, maybe specify an absolute path via --norm_name or the file does not exist.
ERROR: Cerebellum Segmentation failed!
Environment
- Docker
- FastSurfer Version: @Lycus99 please provide
- FreeSurfer Version: 7.4.1
- OS: please provide
Metadata
Metadata
Assignees
Labels
needs-reproStill needs to be reproducedStill needs to be reproduced