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

Outputs to judge success? (aka face still included) #11

Open
jlhanson5 opened this issue Sep 1, 2017 · 6 comments
Open

Outputs to judge success? (aka face still included) #11

jlhanson5 opened this issue Sep 1, 2017 · 6 comments

Comments

@jlhanson5
Copy link

Hello Pydeface repo,

I was just trying to deface some data so that I can put it up on openneuro, but ran into some issues with pydeface. I tried it w/ one sub and had success... However, when I tried to deface a pediatric T1 volume, the face was still present (screengrab below).

deface

Are there other outputs I'm missing from the program that might give some indication of success? The software looked to run without error (command-line output below), but I wondered if there were other files I should inspect to understand why things didn't work out.

jamielh@pfc:~/Volumes/Hanson/Duke_PAC/BIDS_test/derivatives/sub-2014031318263/anat$ pydeface.py sub-${BIDS_sub}_T1w.nii.gz
('defacing', 'sub-2014031318263_T1w.nii.gz')
jamielh@pfc:~/Volumes/Hanson/Duke_PAC/BIDS_test/derivatives/sub-2014031318263/anat$ ls
sub-2014031318263_T1w_defaced.nii.gz  sub-2014031318263_T1w.nii.gz

Any suggestions are greatly appreciated!

Thanks much!
Jamie.

@vsoch
Copy link
Contributor

vsoch commented Sep 1, 2017

hey @jlhanson5 ! I'm not an expert on this, but I think that the process is based on warping the image to a facemask (likely in MNI 152 space?) and importantly, created with adults and not created on pediatric data. I would try taking a look at the mask, and seeing if you are able to create a version that is more properly fitting to your data. If you'd like to make a contribution, I would suggest the following:

  • create a pediatric template to perform the same task
  • expose a boolean variable to the user to select the template (or allow for a custom path and then provide it).
  • test, tweak, and PR!

Hope that helps, or is at least something to try!

@jlhanson5
Copy link
Author

Thanks for that head's up! I ended up flipping my image to match the facemask & template (mean_reg2mean) and that improved things (image below, red = the portions of the image left after de-facing).

deface

One potential that might be useful for pediatric data is to try to use ANTS SyN quick registration (to improve any potential misregistration). I'm a python newbie, but maybe I'll try to work on that moving forward...

@poldrack
Copy link
Contributor

poldrack commented Sep 1, 2017 via email

@vsoch
Copy link
Contributor

vsoch commented Sep 1, 2017

It sounds like it was a registration issue with the template then, @poldrack is right that adult brain maps work pretty good! Please post if you need any more help, and feel free to close the issue.

@lytlemn
Copy link

lytlemn commented Jun 20, 2018

I am having the same issue with the face remaining in pediatric data that is looking to be uploaded to openneuro. I know very little about python, did using the ANTS quick registration fix the issue? If so how could this be incorporated?
Thanks!

@chrisgorgo
Copy link
Contributor

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

5 participants