Skip to content

Conversation

@dkuegler
Copy link
Member

@dkuegler dkuegler commented Nov 9, 2023

Includes the bias field commits

Adds three files to run Fastsurfer on a subject_list file and on a slurm cluster in a resource-optimized way.

Known issues:
On our slurm cluster I experienced some sporadic out-of-memory issues where they should not have happened. These need to be investigated.

fix python-s in run_fastsurfer.sh (only use this if it is defined, else use python3.10 -- this is the default value and the in-docker fix to ignore user-space packages)
fix bashrc definition in Docker/Dockerfile
rewrite/update N4_bias_correct.py
- accept additional parameters (--aseg, --verbosity, --version)
- port from optparse to argparse
- change printing to logging facilities (instead of print), verbosity changes amount of prints.
- rename functions and variables to follow PEP8 (lowercase, underscore to separate)
- add function and integration to process the aseg and calculate wm intensity based on the wm segmentation from aseg
- change normalization code to keep the zero-base (robust scaling should be done previously, e.g. typically in conforming)
- rearrange code structure so functions are not as dependent on flags. Specifically, whether or not specific flags/files are present is moved to the main script. Consequently, functions are more predictable and not dependent on arguments.
@m-reuter
Copy link
Member

m-reuter commented Nov 9, 2023

Nice! I wonder if it makes sense to move these into a slurm subdirectory or into the singularity subdir?

@m-reuter m-reuter changed the title add scripts for Fastsurfer orchestration on slurp clusters add scripts for Fastsurfer orchestration on slurs clusters Nov 9, 2023
@m-reuter m-reuter changed the title add scripts for Fastsurfer orchestration on slurs clusters add scripts for Fastsurfer orchestration on slurm clusters Nov 9, 2023
m-reuter and others added 6 commits November 10, 2023 13:30
fix doc string talairach origin
change the renormalization (--skipwm mode) to only consider the average intensity of the masked image.
fix docstring in image_io.py
- minimal reorder and formatting

add
- brun_fastsurfer.sh: a batch version of run_fastsurfer.sh
- srun_fastsurfer.sh: a slurm/orchestration script for run_fastsurfer.sh (and brun_fastsurfer.sh)
- stool.sh: functions for srun_* and brun_*
add statusfile and do not fail in brun_fastsurfer.sh so a single segmentation failed does not break the pipeline
fix double prepend in_dir in check_subject_images
cleanup the job dependencies of seg, surf and cleanup
@dkuegler dkuegler force-pushed the feature/slurm-support branch from 067c87b to e12136d Compare November 13, 2023 14:59
fix wait in brun_fastsurfer
add Note/Error message for invalid path to t1 in run_fastsurfer.sh
update srun_fastsurfer docs:
- usage: output folder structure
- check of out_dir
- update of statusfile
add --no-home for singularity
fix copyjob for --surf_only (srun_fastsurfer)
add time (timelimit)
fix check_seg_surf_only()
move out_folders into a slurm folder
fix $dir in cleanup
fix copy script
no jobstep in segmentation
fix premature creation of the hpc_work directory
create hpc_work dir on demand
make cleanup script only delete the folder if all the moving was successful
@m-reuter m-reuter merged commit 3c1bef8 into Deep-MI:dev Nov 15, 2023
@dkuegler dkuegler deleted the feature/slurm-support branch November 16, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants