DCAN-Labs / BIBSnet

This BIDS App provides the utility of creating a nnU-Net anatomical MRI segmentation and mask with a infant brain trained model. It can easily be included in other processing pipelines and for circumventing JLF within Nibabies.
https://bibsnet.readthedocs.io/en/latest/
Apache License 2.0
4 stars 8 forks source link

Failure to skull strip / appropriately resize image #97

Closed kellyhi08 closed 9 months ago

kellyhi08 commented 9 months ago

What happened?

I have been running BIBSnet on a group of infants and for a few it is segmenting non-brain (face, spine, mouth). These subjects do not have qualitatively worse (higher motion) T1s than some of my other subjects, so I am not sure what is leading to this issue. All subject T1s were collected with the same scan parameters. My subjects range in age from 1 month to 2 years. The three problem subjects are ages 1 month, 11 moths and 3 months. BIBSnet did work on one of my 2 month subjects and multiple 1 year old subjects. Initially, I did not include brain size, but when this problem arose, I tried adding it, but that did not help.

Here are some images of an example failing subject: T1 image

Failing segmentation image

What command did you use?

singularity pull bibsnet.sif docker://dcanumn/bibsnet:latest 

singularity run --nv --cleanenv --no-home -B path/BIBSnet_inputs/:/input -B path/BIBSnet_outputs:/output path/BIBSnet/bibsnet.sif /input /output participant -v --participant-label $subnum -z

What version of BIBSnet are you using?

latest as of Jan 16th, 2024

Directory Structure

There are more subjects, but this is the start of the tree. All subjects look the same.

image

Relevant log output

No response

Add any additional information or context about the problem here.

No response

LuciMoore commented 9 months ago

@kellyhi08 can you try to run fslreorient2std or fslorient (see documentation here) on the raw data and see if this fixes your issue? I think this could also be causing the other comment you made here

If one of these works then we will add this command to the preBIBSNet stage of processing to prevent future issues

kellyhi08 commented 9 months ago

Hello,

I tried fslerorient2std, but that did not seem to make a difference. However, the images were oriented incorrectly in FSL, so I tried a different dicom to nifti converter (dicm2nii in matlab), and that fixed the orientation and that seemed to fix the segmentation problem!

image

Thanks for your help!

LuciMoore commented 9 months ago

@kellyhi08 You're welcome! We should probably add some automation for this to the pipeline or logging at least, so I'll open a separate issue for that

Out of curiosity, which dicom to nifti converter were you using before?

LuciMoore commented 9 months ago

@kellyhi08 also - did you happen to try fslorient? I think that would have worked over fslorient2std

I'll close this issue for now, but let me know if you have more details to share!