ivadomed / model_seg_ms_mp2rage

Model repository for MS lesion segmentation on MP2RAGE data from University of Basel
MIT License
2 stars 0 forks source link

Model performance at test time drops when cropping is not the same as in training #64

Closed jcohenadad closed 1 year ago

jcohenadad commented 1 year ago

To save time, I tried cropping only with a 5vox ball (instead of 5vox ball + 32vox disk as in the processing), however the results was disastrous.

Suggestion: train model with only 5vox ball dilation.

Investigations

Try different models, copy model locally, and run the prediction on a subset of data locally:

# First, activate ivadomed venv
cd MODEL (eg: model_seg_lesion_mp2rage_r20230210_dil32_seed01)
ivadomed_segment_image -m model_seg_lesion_mp2rage -i ~/temp/model_seg_basel/data_processed_lesionseg_small/sub-P001/anat/sub-P001_UNIT1.nii.gz 
jcohenadad commented 1 year ago

model_seg_lesion_mp2rage_r20230210_dil32_seed01: ❌

anim

Same model applied on less tightly cropped data: ✅

anim

Cropping by 20: ✅

sct_crop_image -i /Users/julien/temp/model_seg_basel/20230130_ensemble/sub-P001_UNIT1_crop.nii.gz -xmin 9 -xmax 76 -zmin 9 -zmax 77 -o sub-P001_UNIT1_crop2.nii.gz

anim

Cropping by 40: ✅

anim

So maybe the issue is when the input image size is smaller than the kernel size.

jcohenadad commented 1 year ago

Can close. Issue clarified now.