First of all, thank you for the excellent resource that is the PAM50 template, it's been incredibly helpful in my work. While working with the template, I noticed that the vertebrae appear under-segmented, and in some cases, segmentation errors are visible, for instance, on axial slice 431.


Introduction of new methods such as totalspineseg offer a simple and quasi automatic way to mitigate this issue. I have run that model on the PAM50_t2.nii.gz file and binarized that segmentation using the following code
import nibabel as nib
import os
import numpy as np
# output generated by sct_deepseg -i PAM50_t2.nii.gz -task totalspineseg
img_path = os.path.join(os.getenv("SCT_DIR"),"data\\PAM50\\template","PAM50_t2_step2_output.nii.gz")
img_outpath = os.path.join(os.getenv("SCT_DIR"),"data\\PAM50\\template","PAM50_spine_totalspineseg.nii.gz")
img = nib.load(img_path)
img_array = img.get_fdata()
img_bin_array = np.zeros_like(img_array)
img_bin_array[(img_array >=11) & (img_array < 50)] = 1
img_out = nib.Nifti1Image(img_bin_array, affine = img.affine)
nib.save(img_out, img_outpath)
PAM50_spine_totalspineseg.nii.gz
It doesn't solve everything, and spinous processes are still under-segmented in thoracic vertebrae. There might also be some collisions with CSF space to check. Other methods such as spineps could also be used.
I understand that the main focus of PAM50 is the spinal cord, but improving the vertebral segmentation would increase its usefulness for a broader range of applications. I'd be happy to help integrate or test improvements if needed.
Best regards,
Tom Le Tutour
First of all, thank you for the excellent resource that is the PAM50 template, it's been incredibly helpful in my work. While working with the template, I noticed that the vertebrae appear under-segmented, and in some cases, segmentation errors are visible, for instance, on axial slice 431.
Introduction of new methods such as totalspineseg offer a simple and quasi automatic way to mitigate this issue. I have run that model on the PAM50_t2.nii.gz file and binarized that segmentation using the following code
PAM50_spine_totalspineseg.nii.gz
It doesn't solve everything, and spinous processes are still under-segmented in thoracic vertebrae. There might also be some collisions with CSF space to check. Other methods such as spineps could also be used.
I understand that the main focus of PAM50 is the spinal cord, but improving the vertebral segmentation would increase its usefulness for a broader range of applications. I'd be happy to help integrate or test improvements if needed.
Best regards,
Tom Le Tutour