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

Segmentation Inaccuracies with degenerated hippocampi #287

Open
mchoi99 opened this issue Mar 18, 2024 · 21 comments
Open

Segmentation Inaccuracies with degenerated hippocampi #287

mchoi99 opened this issue Mar 18, 2024 · 21 comments

Comments

@mchoi99
Copy link

mchoi99 commented Mar 18, 2024

Hi there,

I am currently trying to segment the hippocampal subfield of AD and MCI patients using hippunfold, and it seems like there are many inaccuracies with the segmentation outputs (ie. segmentations crossing into CSF space, the hippocampus not looking like a hippocampus, etc.) and I am wondering if there is any additional code I should be using to correct these errors.

Many times, even cognitively normal subjects seem to output errors in segmentation, particularly those who longitudinally acquire MCI or AD. Perhaps any changes to the overall cortical surface is causing errors in segmenting the hippocampus.

I would really appreciate some insight from the HippUnfold team on this issue. Thank you.

@jordandekraker
Copy link
Collaborator

Happy to help troubleshoot, but note that these models weren't trained with much disease data and so segmentation may not work super well if there is very high atrophy. Still, its worth taking a look at some failed cases to try and see why.
Could you 1) check the "qc" output folder and 2) post a few screenshots of cases that failed?

@mchoi99
Copy link
Author

mchoi99 commented Mar 18, 2024 via email

@jordandekraker
Copy link
Collaborator

I don't think your images got attached properly, do you think you could try again please? Make sure to add them on the Git Issue and not by email

Thanks

@mchoi99
Copy link
Author

mchoi99 commented Mar 19, 2024

Hi Dr. Jordan Dekraker,

My apologies, here are the screenshots.
I am attaching a screenshot of the
space-cropT2w_desc-subfields_atlas-multihist7_dseg.png from the qc folder,
as well as my own screenshots from ITK-SNAP.

sub-4179_hemi-R_space-cropT2w_desc-subfields_atlas-multihist7_dseg
Screenshot from 2024-03-18 17-00-09
Screenshot from 2024-03-18 16-59-47

@jordandekraker
Copy link
Collaborator

Thanks
This definitely looks like a gross oversegmentation, particularly in th eposterior areas. This is a failure at the UNet tissue segmentation step, which we noted occurs a bit more often in T2w images. We do have a few other options of trained UNets that could help, I would suggest:
--force-nnunet-model synthseg_v0.2
That should provide equally good (or better) results, with hopefully no more gross errors. If there are still gross errors, then it might be worthwhile to instead run on a more standard T1w image. We found this to be more reliable, but sometimes shows less subject-specific detail.

Let me know how that works

@mchoi99
Copy link
Author

mchoi99 commented Mar 19, 2024 via email

@jordandekraker
Copy link
Collaborator

yup, that will work!
I recommend writing to a new output folder though if that is the same output name you used previously

@akhanf
Copy link
Member

akhanf commented Mar 19, 2024

Hi Peter, you're working with Trevor Steve right? Was just mentioning on an e-mail with him that we have some ongoing work and QC on the ADNI data, and will be training a new model to improve performance on elderly/atrophic datasets. Will connect over e-mail on that soon.

My bet is that the synthseg models won't fare much better on these cases, since this kind of level of atrophy isn't seen in that training set either, but worth a shot..

@mchoi99
Copy link
Author

mchoi99 commented Mar 19, 2024 via email

@akhanf
Copy link
Member

akhanf commented Mar 20, 2024

Might be at least a couple weeks @Bradley-Karat is away at a conference this week, and I'm off next week. But will let you know when we have something you can test.

@mchoi99
Copy link
Author

mchoi99 commented Mar 21, 2024

Thank you for the update @akhanf.

@jordandekraker I have ran the new code and it seems like there are still over-estimations, this time not in the posterior but more frequent across the body. I have attached some screenshots below for you to review. In particular, the subiculum (red) is segmented as much longer and the CA3 (yellow) is now segmenting in to the CSF at times. These are quite common across the 19 CN subjects I scanned, "highreshippo" T2w images (with T1w) from ADNI.

At this point, would you recommend using the original command line? Or is there a different model that you think could help?Thank you.

Screenshot from 2024-03-21 11-29-36
Screenshot from 2024-03-21 11-26-28
Screenshot from 2024-03-21 11-24-58
sub-4179_hemi-L_space-cropT2w_desc-subfields_atlas-multihist7_dseg
sub-4179_hemi-R_space-cropT2w_desc-subfields_atlas-multihist7_dseg

@jordandekraker
Copy link
Collaborator

Thanks for sharing. Performance definitely looks better now using this model, but I agree there are stil quite a few errors. my suggestions would be:

  1. manually check the results and discard subjects with major errors
  2. wait for Ali & Brad to share their atrophy-trained model
  3. try running with ONLY the T1w image (ie. --modality T1w). This can help if the contrast is low in T2w images, but there's certainly no guaruntee that it will work better since its also not trained with such extensively atrophied cases

I think that's all I can offer for help right now, and I'm definitely looking forward to seeing how Ali&Brad's new model performs too!

@mchoi99
Copy link
Author

mchoi99 commented Mar 21, 2024 via email

@mchoi99
Copy link
Author

mchoi99 commented Apr 12, 2024

Hi there Dr. Dekraker and Dr. Khan,

I hope this message finds you well.

I, along with other labmates, have found a good proportion of CN subjects from ADNI that result in oversegmentations in T2.
We would like to ask - are there any necessary pre-processing steps that must be done upon downloading files from ADNI? Does hippunfold have any preprocessing steps integrated into it?
What are the main factors that cause major segmentation quality differences between T1w and T2w?

Thank you for your time.
Peter

@jordandekraker
Copy link
Collaborator

As suggested above, try the T1w images. The T2w images in the ADNI dataset are anisotropic - they have good resolution in a coronal plane but very thick slices and so its hard to get a detailed 3D context. We also noted in the HippUnfold paper that performance was generally more reliable in T1w images, possibly because the contrast between grey and white matter is more optimal. This is difficult to recover in the T2w images, even with careful preprocessing.

@mchoi99
Copy link
Author

mchoi99 commented Apr 19, 2024 via email

@Bradley-Karat
Copy link
Collaborator

Hi Peter,

The T1w ADNI specific model has been re-trained, and I am just running some test cases to see how it performs. Will keep this thread updated once thats finished!

@mchoi99
Copy link
Author

mchoi99 commented Apr 19, 2024 via email

@akhanf
Copy link
Member

akhanf commented Apr 19, 2024

Hi Peter, as Brad and I mentioned above, we're already training (actually already done, just need to deploy to test) a model with ADNI data. Should have some results to discuss soon, but might be a good idea for us to set-up a call to chat about next steps. Jordan fyi this is an ongoing collaboration we have going with Trevor Steve's lab, so work is already underway here that Brad is helping with.

@mchoi99
Copy link
Author

mchoi99 commented Apr 19, 2024 via email

@mchoi99
Copy link
Author

mchoi99 commented Apr 29, 2024 via email

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

4 participants