rootlets¶
S e g m e n t a t i o n o f s p i n a l n e r v e r o o t l e t s f o r T 2 w a n d M P 2 R A G E c o n t r a s t s ( T 1 w - I N V 1 , T 1 w - I N V 2 , a n d U N I T 1 ) Segmentation of spinal nerve rootlets for T2w and MP2RAGE contrasts (T1w-INV1, T1w-INV2, and UNIT1)
T h i s s e g m e n t a t i o n m o d e l f o r s p i n a l n e r v e r o o t l e t s s e g m e n t a t i o n u s e s a 3 D U - N e t a r c h i t e c t u r e , a n d w a s t r a i n e d w i t h t h e n n U N e t V 2 f r a m e w o r k . I t i s a m u l t i c l a s s m o d e l , o u t p u t t i n g a s i n g l e s e g m e n t a t i o n i m a g e c o n t a i n i n g 8 c l a s s e s r e p r e s e n t i n g t h e C 2 - T 1 d o r s a l a n d v e n t r a l s p i n a l c o r d n e r v e r o o t l e t s . T r a i n i n g d a t a i n c l u d e d i m a g e s f r o m h e a l t h y s u b j e c t s a c r o s s t h r e e d a t a s e t s : s p i n e - g e n e r i c m u l t i - s u b j e c t ( 3 T T 2 w , n = 2 1 ) , O p e n N e u r o d s 0 0 4 5 0 7 ( 3 T T 2 w , n = 7 , 1 0 i m a g e s ) , a n d p r i v a t e d a t a ( 7 T M P 2 R A G E , n = 1 5 , 3 c o n t r a s t s p e r s u b j e c t , 4 5 i m a g e s ) . This segmentation model for spinal nerve rootlets segmentation uses a 3D U-Net architecture, and was trained with the nnUNetV2 framework. It is a multiclass model, outputting a single segmentation image containing 8 classes representing the C2-T1 dorsal and ventral spinal cord nerve rootlets. Training data included images from healthy subjects across three datasets: spine-generic multi-subject (3T T2w, n=21), OpenNeuro ds004507 (3T T2w, n=7, 10 images), and private data (7T MP2RAGE, n=15, 3 contrasts per subject, 45 images).
Reference¶
@misc{krejci2025rootletsegdeeplearningmethod,
title={RootletSeg: Deep learning method for spinal rootlets segmentation across MRI contrasts},
author={Katerina Krejci and Jiri Chmelik and Sandrine Bédard and Falk Eippert and Ulrike Horn and Virginie Callot and Julien Cohen-Adad and Jan Valosek},
year={2025},
eprint={2509.16255},
archivePrefix={arXiv},
primaryClass={q-bio.TO},
url={https://arxiv.org/abs/2509.16255},
}
P r o j e c t U R L : [ h t t p s : / / g i t h u b . c o m / i v a d o m e d / m o d e l - s p i n a l - r o o t l e t s ] ( h t t p s : / / g i t h u b . c o m / i v a d o m e d / m o d e l - s p i n a l - r o o t l e t s ) Project URL: https://github.com/ivadomed/model-spinal-rootlets
usage: sct_deepseg rootlets [-i <file> [<file> ...]] [-o <str>] [-install]
[-custom-url CUSTOM_URL [CUSTOM_URL ...]]
[-largest {0,1}] [-fill-holes {0,1}]
[-remove-small REMOVE_SMALL [REMOVE_SMALL ...]]
[-qc <folder>] [-qc-dataset <str>]
[-qc-subject <str>] [-qc-seg <file>] [-h] [-v <int>]
[-r {0,1}] [-test-time-aug]
INPUT/OUTPUT¶
- -i
I m a g e f i l e n a m e ( s ) t o s e g m e n t . I f s e g m e n t i n g m u l t i p l e f i l e s , s e p a r a t e f i l e n a m e s w i t h a s p a c e . Image filename(s) to segment. If segmenting multiple files, separate filenames with a space.
- -o
O u t p u t f i l e n a m e . T h e c h o s e n f i l e n a m e w i l l b e u s e d a s a b a s e n a m e , a n d m o d e l - s p e c i f i c s u f f i x e s w i l l b e a d d e d t o t h e e n d d e p e n d i n g o n t h e t y p e o f o u t p u t ( e . g . ‘ _ c o r d . n i i . g z ‘ , ‘ _ g m . n i i . g z ‘ , e t c . ) . Output file name. The chosen filename will be used as a base name, and model-specific suffixes will be added to the end depending on the type of output (e.g. ‘_cord.nii.gz’, ‘_gm.nii.gz’, etc.).
TASKS¶
- -install
I n s t a l l m o d e l s t h a t a r e r e q u i r e d f o r s p e c i f i e d t a s k . Install models that are required for specified task.
D e f a u l t : ` ` F a l s e ` ` Default:
False- -custom-url
U R L ( s ) p o i n t i n g t o t h e ` . z i p ` a s s e t f o r a m o d e l r e l e a s e . T h i s o p t i o n c a n b e u s e d w i t h ` - i n s t a l l ` t o i n s t a l l a s p e c i f i c v e r s i o n o f a m o d e l . T o u s e t h i s o p t i o n , n a v i g a t e t o t h e ‘ R e l e a s e s ‘ p a g e o f t h e m o d e l , f i n d r e l e a s e y o u w i s h t o i n s t a l l , a n d r i g h t - c l i c k + c o p y t h e U R L o f t h e ` . z i p ` l i s t e d u n d e r ‘ A s s e t s ‘ . E x a m p l e : ` s c t _ d e e p s e g r o o t l e t s - i n s t a l l - c u s t o m - u r l C U S T O M _ U R L ` ` s c t _ d e e p s e g r o o t l e t s - i t 2 . n i i . g z ` URL(s) pointing to the
.zipasset for a model release. This option can be used with-installto install a specific version of a model. To use this option, navigate to the ‘Releases’ page of the model, find release you wish to install, and right-click + copy the URL of the.ziplisted under ‘Assets’. Example:sct_deepseg rootlets -install -custom-url CUSTOM_URLsct_deepseg rootlets -i t2.nii.gz
PARAMETERS¶
- -largest
P o s s i b l e c h o i c e s : 0 , 1 Possible choices: 0, 1
K e e p t h e l a r g e s t c o n n e c t e d o b j e c t f r o m e a c h o u t p u t s e g m e n t a t i o n ; i f n o t s e t , a l l o b j e c t s a r e k e p t . Keep the largest connected object from each output segmentation; if not set, all objects are kept.
D e f a u l t : ` ` 0 ` ` Default:
0- -fill-holes
P o s s i b l e c h o i c e s : 0 , 1 Possible choices: 0, 1
I f s e t , s m a l l h o l e s i n t h e s e g m e n t a t i o n w i l l b e f i l l e d i n a u t o m a t i c a l l y . If set, small holes in the segmentation will be filled in automatically.
D e f a u l t : ` ` 0 ` ` Default:
0- -remove-small
M i n i m a l o b j e c t s i z e t o k e e p w i t h u n i t ( m m 3 o r v o x ) . A s i n g l e v a l u e c a n b e p r o v i d e d o r o n e v a l u e p e r p r e d i c t i o n c l a s s . S i n g l e v a l u e e x a m p l e : 1 m m 3 , 5 v o x . M u l t i p l e v a l u e s e x a m p l e : 1 0 2 0 1 0 v o x ( r e m o v e o b j e c t s s m a l l e r t h a n 1 0 v o x e l s f o r c l a s s 1 a n d 3 , a n d s m a l l e r t h a n 2 0 v o x e l s f o r c l a s s 2 ) . Minimal object size to keep with unit (mm3 or vox). A single value can be provided or one value per prediction class. Single value example: 1mm3, 5vox. Multiple values example: 10 20 10vox (remove objects smaller than 10 voxels for class 1 and 3, and smaller than 20 voxels for class 2).
- -test-time-aug
P e r f o r m t e s t - t i m e a u g m e n t a t i o n ( T T A ) b y f l i p p i n g t h e i n p u t i m a g e a l o n g a l l a x e s a n d a v e r a g i n g t h e r e s u l t i n g p r e d i c t i o n s . N o t e : T h e t i m e i t t a k e s t o r u n t h e m o d e l w i l l i n c r e a s e d u e t o t h e a d d i t i o n a l p r e d i c t i o n s . Perform test-time augmentation (TTA) by flipping the input image along all axes and averaging the resulting predictions. Note: The time it takes to run the model will increase due to the additional predictions.
D e f a u l t : ` ` F a l s e ` ` Default:
False
MISC ARGUMENTS¶
- -qc
T h e p a t h w h e r e t h e q u a l i t y c o n t r o l g e n e r a t e d c o n t e n t w i l l b e s a v e d . The path where the quality control generated content will be saved.
- -qc-dataset
I f p r o v i d e d , t h i s s t r i n g w i l l b e m e n t i o n e d i n t h e Q C r e p o r t a s t h e d a t a s e t t h e p r o c e s s w a s r u n o n . If provided, this string will be mentioned in the QC report as the dataset the process was run on.
- -qc-subject
I f p r o v i d e d , t h i s s t r i n g w i l l b e m e n t i o n e d i n t h e Q C r e p o r t a s t h e s u b j e c t t h e p r o c e s s w a s r u n o n . If provided, this string will be mentioned in the QC report as the subject the process was run on.
- -qc-seg
S e g m e n t a t i o n f i l e t o u s e f o r c r o p p i n g t h e Q C . T h i s o p t i o n i s u s e f u l w h e n y o u w a n t t o Q C a r e g i o n t h a t i s d i f f e r e n t f r o m t h e o u t p u t s e g m e n t a t i o n . F o r e x a m p l e , i t m i g h t b e u s e f u l t o p r o v i d e a d i l a t e d c o r d s e g m e n t a t i o n t o e x p a n d t h e Q C f i e l d o f v i e w . Segmentation file to use for cropping the QC. This option is useful when you want to QC a region that is different from the output segmentation. For example, it might be useful to provide a dilated cord segmentation to expand the QC field of view.
- -v
P o s s i b l e c h o i c e s : 0 , 1 , 2 Possible choices: 0, 1, 2
V e r b o s i t y . 0 : D i s p l a y o n l y e r r o r s / w a r n i n g s , 1 : E r r o r s / w a r n i n g s + i n f o m e s s a g e s , 2 : D e b u g m o d e . Verbosity. 0: Display only errors/warnings, 1: Errors/warnings + info messages, 2: Debug mode.
D e f a u l t : ` ` 1 ` ` Default:
1- -r
P o s s i b l e c h o i c e s : 0 , 1 Possible choices: 0, 1
R e m o v e t e m p o r a r y f i l e s . Remove temporary files.
D e f a u l t : ` ` 1 ` ` Default:
1