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

Robust Brain Extraction #1096

Closed
wants to merge 34 commits into from

Conversation

@riddhishb
Copy link
Contributor

commented Jul 11, 2016

This PR will mark the start of some work in template based brain extraction as a part google summer of code 2016.
Currently only two changes

  1. Added a new function brain_extraction in dipy.segment.mask
  2. Added a tutorial in doc/examples

All the tests and refinement will be coming along in this month

@riddhishb riddhishb added the gsoc2016 label Jul 11, 2016

@coveralls

This comment has been minimized.

Copy link

commented Jul 12, 2016

Coverage Status

Coverage decreased (-0.1%) to 82.778% when pulling f73d718 on riddhishb:brain_extraction into fbad873 on nipy:master.

@codecov-io

This comment has been minimized.

Copy link

commented Jul 12, 2016

Current coverage is 80.83% (diff: 81.67%)

Merging #1096 into master will decrease coverage by 0.13%

@@             master      #1096   diff @@
==========================================
  Files           205        217     +12   
  Lines         23329      24648   +1319   
  Methods           0          0           
  Messages          0          0           
  Branches       2341       2483    +142   
==========================================
+ Hits          18889      19924   +1035   
- Misses         3958       4212    +254   
- Partials        482        512     +30   

Powered by Codecov. Last update b64971b...9243bfa

@coveralls

This comment has been minimized.

Copy link

commented Jul 12, 2016

Coverage Status

Coverage decreased (-0.1%) to 82.778% when pulling 34efdef on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 14, 2016

Coverage Status

Coverage decreased (-0.1%) to 82.778% when pulling d3a83e1 on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 15, 2016

Coverage Status

Coverage decreased (-0.1%) to 82.778% when pulling 342b731 on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 18, 2016

Coverage Status

Coverage decreased (-0.1%) to 82.778% when pulling 9a3e547 on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 19, 2016

Coverage Status

Coverage decreased (-0.2%) to 82.745% when pulling 9dde5fe on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 19, 2016

Coverage Status

Coverage decreased (-0.2%) to 82.745% when pulling 5b467d3 on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 19, 2016

Coverage Status

Coverage decreased (-0.2%) to 82.73% when pulling 679439c on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 19, 2016

Coverage Status

Coverage decreased (-0.04%) to 82.869% when pulling 0bcc84e on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 19, 2016

Coverage Status

Coverage decreased (-0.04%) to 82.869% when pulling 0bcc84e on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 20, 2016

Coverage Status

Coverage increased (+0.07%) to 82.974% when pulling 92808e1 on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 21, 2016

Coverage Status

Coverage increased (+0.09%) to 82.993% when pulling 3bc7c24 on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 26, 2016

Coverage Status

Coverage increased (+0.06%) to 82.97% when pulling aeaa171 on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 28, 2016

Coverage Status

Coverage increased (+0.07%) to 82.978% when pulling 3da490b on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 29, 2016

Coverage Status

Coverage increased (+0.07%) to 82.978% when pulling 450354f on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 29, 2016

Coverage Status

Coverage increased (+0.07%) to 82.978% when pulling 450354f on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 30, 2016

Coverage Status

Coverage increased (+0.07%) to 82.978% when pulling d946c17 on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Jul 31, 2016

Coverage Status

Coverage increased (+0.01%) to 82.922% when pulling cfcc58a on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Aug 1, 2016

Coverage Status

Coverage increased (+0.01%) to 82.922% when pulling fd0bb75 on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Aug 2, 2016

Coverage Status

Coverage increased (+0.01%) to 82.922% when pulling 2aed020 on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Aug 4, 2016

Coverage Status

Coverage increased (+0.01%) to 82.922% when pulling 8686f5a on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Aug 4, 2016

Coverage Status

Coverage increased (+0.01%) to 82.922% when pulling 8686f5a on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Aug 5, 2016

Coverage Status

Coverage increased (+0.01%) to 82.922% when pulling 48dabd5 on riddhishb:brain_extraction into fbad873 on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Aug 6, 2016

Coverage Status

Coverage increased (+0.01%) to 82.922% when pulling ceff037 on riddhishb:brain_extraction into fbad873 on nipy:master.

@riddhishb riddhishb force-pushed the riddhishb:brain_extraction branch from ceff037 to 102f0b4 Aug 6, 2016

@riddhishb

This comment has been minimized.

Copy link
Contributor Author

commented Aug 6, 2016

Rebased with the master

@coveralls

This comment has been minimized.

Copy link

commented Aug 6, 2016

Coverage Status

Coverage increased (+0.01%) to 82.922% when pulling 102f0b4 on riddhishb:brain_extraction into e309c15 on nipy:master.

@riddhishb riddhishb force-pushed the riddhishb:brain_extraction branch from f6865fa to 7bf7413 Aug 11, 2016

@coveralls

This comment has been minimized.

Copy link

commented Aug 11, 2016

Coverage Status

Coverage increased (+0.01%) to 83.038% when pulling 9588f5a on riddhishb:brain_extraction into b64971b on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Aug 11, 2016

Coverage Status

Coverage increased (+0.01%) to 83.038% when pulling 9588f5a on riddhishb:brain_extraction into b64971b on nipy:master.

@coveralls

This comment has been minimized.

Copy link

commented Aug 20, 2016

Coverage Status

Coverage increased (+0.01%) to 83.038% when pulling f1ebca4 on riddhishb:brain_extraction into b64971b on nipy:master.

1 similar comment
@coveralls

This comment has been minimized.

Copy link

commented Aug 20, 2016

Coverage Status

Coverage increased (+0.01%) to 83.038% when pulling f1ebca4 on riddhishb:brain_extraction into b64971b on nipy:master.

@fmorency

This comment has been minimized.

Copy link

commented Aug 26, 2016

Hi,

Thanks for working on this feature. I installed your dipy branch in a fresh virtualenv containing

  • Cython (0.24.1)
  • dipy (0.12.0.dev0)
  • docopt (0.6.2)
  • nibabel (2.1.0)
  • numpy (1.11.1)
  • pip (6.1.1)
  • scipy (0.18.0)
  • setuptools (15.0)

I wrote a little callable script to be able to extract brains 1 from the command line and tested your feature on some T1/B0 2 using the OASIS-30 3 template (with cerebellum 4).

The problem is that the brain/mask obtained in all my tests are empty. I tried T1 on T1 and B0 on T1. Any idea on what is causing this?

Thanks,
-F

@riddhishb

This comment has been minimized.

Copy link
Contributor Author

commented Aug 26, 2016

@fmorency Let me try with your data and I will get back to you, ideally there shouldn't be any problems.

@riddhishb

This comment has been minimized.

Copy link
Contributor Author

commented Aug 26, 2016

@fmorency I dont know what is wrong with it. But I am getting this (correct extraction output)
screen shot 2016-08-26 at 11 59 03 am

And I am using the code and the files as given here
https://www.dropbox.com/sh/wl362aqu03pmhn0/AAA26kfGFmt-nMsXenhVRtN7a?dl=0

@fmorency

This comment has been minimized.

Copy link

commented Aug 30, 2016

Ok, I've been able to get some non-empty results with my script 1. You should probably check for patch/block radius and threshold minimal value and throw an exception if the value is <= 0.

Some quick questions/comments

  1. Ventricles are always absent from the brain mask when processing most of my T1. Why?
  2. What database did you use to test your algorithm? Most of the data I'm trying to segment (different scanners, different pathologies, etc) always have a little something that is wrong (mask too aggressive, missing brain region, part of the skull still present, etc). I still haven't found a set of parameters that works well on T1, for example. What are your thoughts on this?
@riddhishb

This comment has been minimized.

Copy link
Contributor Author

commented Sep 6, 2016

@fmorency I am really sorry for the late reply
I will look into the patch-block exception, thanks a lot for pointing that out.
As for your questions

  1. I do not have any idea about this phenomena I think @RafaelNH or @Garyfallidis may be able to help you here.
  2. You can have a look at the following posts ( 1 and 2 ) for all the data and params I use for testing. The testing process is still ongoing, we would like to experiment on more datasets and improve the algorithm if possible, hopefully we can finish this off in coming few weeks :)
@fmorency

This comment has been minimized.

Copy link

commented Sep 7, 2016

@riddhishb I performed a test run on ISBR_01 using FSL, AFNI, ANTs and dipy-brain extraction. Results can be found in 1. A file named "call" can be found in each folder and contains the command-line ran. Template (OASIS-30 with cerebellum) used for ANTs and dipy-brain-extraction can be found in 2. Binary for dipy-brain-extraction can be found in 3.

As you can see, results from dipy-brain-extraction are often missing regions compared to other methods/ground truth.

@Garyfallidis

This comment has been minimized.

Copy link
Member

commented Oct 13, 2016

@riddhishb have you looked into these results reported by @fmorency? Thanks @fmorency for the feedback.

@Garyfallidis

This comment has been minimized.

Copy link
Member

commented Oct 13, 2016

Also just something to make clear here. During GSoC we didn't have the time to compare against other tools. But we did compare against simulated brains (IBSR) with given masks. The main idea was to put some existing tools together so we can do some brain extraction. Actually, it was impressive that we had a working prototype so fast. Now we should try to look into the details. These results that you are providing @fmorency I think they will be useful. @riddhishb what do you think?

@riddhishb riddhishb changed the title WIP : Robust Brain Extraction Robust Brain Extraction Oct 13, 2016

@riddhishb

This comment has been minimized.

Copy link
Contributor Author

commented Oct 13, 2016

Yeah I think thats the plan! In fact we have to do some nice comparisons, against other methods. Brain extraction functionality in DIPY was just limited to median otsu before this PR, so there is a lot of room for improvement.

@coveralls

This comment has been minimized.

Copy link

commented Oct 15, 2016

Coverage Status

Coverage decreased (-0.1%) to 82.903% when pulling 9243bfa on riddhishb:brain_extraction into b64971b on nipy:master.

1 similar comment
@coveralls

This comment has been minimized.

Copy link

commented Oct 15, 2016

Coverage Status

Coverage decreased (-0.1%) to 82.903% when pulling 9243bfa on riddhishb:brain_extraction into b64971b on nipy:master.

@arokem

This comment has been minimized.

Copy link
Member

commented Mar 15, 2019

This work seems to have stalled. Closing

@arokem arokem closed this Mar 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.