Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jcohenadad opened this issue Jan 30, 2023 · 2 comments

Comments

@jcohenadad
Copy link
Member

jcohenadad commented Jan 30, 2023

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
Copy link
Member Author

jcohenadad commented Mar 10, 2023

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
Copy link
Member Author

Can close. Issue clarified now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant