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

segmented outside the brain? #25

Open
soichih opened this issue Apr 29, 2021 · 4 comments
Open

segmented outside the brain? #25

soichih opened this issue Apr 29, 2021 · 4 comments

Comments

@soichih
Copy link

soichih commented Apr 29, 2021

Hello. I am testing kwyk (docker://neuronets/kwyk:version-0.4-gpu) on brainlife.io

I've noticed that the output segmentation/parcellation image contains areas outside the brain segmented.

Like this..
image
Is this expected? Should I run bet or any preprocessing on the anatomy before running kwyk?

I've tried various models (bvwn_multi_prior, bwn_multi, bwn) and some models has more/less out-of-brain areas but none of them seem to be free from it.

@kaczmarj
Copy link
Member

kaczmarj commented Apr 29, 2021

Interesting, thank you for reporting this. This is undesirable, but not really unexpected at the moment. Any chance you can share the input image? I wonder what features the model might be picking up outside of the brain.

Should I run bet or any preprocessing on the anatomy before running kwyk

At the moment, kwyk is meant to be used directly on the MRI. the only processing (done by kwyk) is to normalize the input image to mean 0 and std deviation 1.

One naive way to prevent this could be to remove segmentations outside of a brainmask (the brainmask could be made by a different algorithm). But a better solution would be to have the model learn more robust features of the brain scans. Adversarial training could help here.

@satra
Copy link
Collaborator

satra commented Apr 29, 2021

@soichih - in some cases i expect that. especially if there is a lot of fat in the scans. we are working on some improvements but those are still a month away.

a few options in the short term.

  1. you could run hd-bet fairly robust in most situations (https://github.com/MIC-DKFZ/HD-BET) and then run kwyk on the output. this is a contrast insensitive brain extractor

  2. you can also run brainy (our brain extractor, only works on T1 - same as kwyk) - https://github.com/neuronets/brainy

@soichih
Copy link
Author

soichih commented Apr 29, 2021

@kaczmarj @satra Thanks!

Here is the input image I've used (my brain)

https://dev1.soichi.us/tmp/t1.nii.gz

Please feel free to use this for your testing (it's my brain ACPC aligned)

I've ran the input data through HD-BET. The input now looks clean.

https://dev1.soichi.us/tmp/t1.bet.nii.gz

image

And here is the output from kwyk. I am no longer seeing voxels outside the brain, but the parcellation seems to be cropped on Left/Right edges.

image

I have a very oddly shaped brain, so it throws off different algorithms a lot.. (I think). :) My brain is pretty good at breaking things!

@satra
Copy link
Collaborator

satra commented Apr 30, 2021

@soichih -thanks. i'm going to add this to the support vector set of brains to use :) indeed this shows some weird effects. hopefully this will go away with the new training, but i will keep this in mind. cc: @Aakanksha-Rana and @Hoda1394

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

3 participants