Expected physical slice direction for Pillar0-AbdomenCT inference

#2
by pschwar - opened

Hi Pillar-0 team,

Could you clarify the expected physical slice direction for YalaLab/Pillar0-AbdomenCT, specifically revision d73d111bb278b3f6411f3c8e72c7e6f8a5fb1bb8?

The Sybil1.5 demo README specifies that the first frame should be in the abdominal region and the last near the clavicles, meaning increasing depth progresses toward the head. Does the abdomen checkpoint expect the same inferior-to-superior convention?

The public abdomen training loader includes torch.flip(volume, dims=[1]). Is this reversal specific to the Merlin source/cache ordering, or should it also be applied after RAVE loading for inference with this released checkpoint?

For context, our preprocessing uses RAVE at revision 20adeb873021c864e9410fae8898b0c8da309769, 1.25 mm isotropic resampling, a central 384³ cube, -1024 HU padding for added depth slices, and all eleven CT windows. We preserve int16 HU without video export and currently apply no additional depth reversal.

Is there an official abdomen inference example that specifies the required physical orientation and confirms these spacing/padding conventions?

Thank you!

Hello,

Thank you for your question!

Good catch, we've corrected that line and attributed you in the fix: https://github.com/YalaLab/pillar-finetune/pull/10. It should be superior-to-inferior.

That torch.flip should be applied selectively to correct the orientation.

k_axis_z = np.array(sitk_image.GetDirection()).reshape(3, 3)[2, 2]
if k_axis_z > 0:          # index increases toward the head => inferior -> superior
    volume = volume[::-1]  # emit superior -> inferior, the Pillar convention

Going forward, we're going to apply this line in RAVE, so that we can avoid manipulating the torch object! This (plus the example you requested) will land soon.

sitk_image = sitk.DICOMOrient(sitk_image, "LPI")
volume = sitk.GetArrayFromImage(sitk_image)  # Shape: (Z, Y, X)

The parameters you listed look correct!

Thank you for bearing with us.

Sign up or log in to comment