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
Affine registration PR 3/3 #654
Conversation
@@ -96,310 +97,6 @@ def get_direction_and_spacings(affine, dim): | |||
A = affine[:dim,:dim] | |||
return A.dot(np.diag(1.0/scalings)), scalings | |||
|
|||
|
|||
class ScaleSpace(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the ScaleSpace class to its own module because now we have two different ways of building a scale space (the ANTS-like anisotropic scale space and the ANTS2-like isotropic one). The new scale space is IsotropicScaleSpace.
Seems to currently be failing on the minimal scipy requirement (0.9), because the setting of inputs to the optimization have changed since: https://travis-ci.org/nipy/dipy/jobs/63966654#L2007 Any way we can provide some kind of compatibility shim in |
Any chance to increase test coverage in |
Hi @Garyfallidis, @arokem, @matthew-brett, |
Oh durnit - I relaunched that run, and now it's working. It was failing on this assertion: https://github.com/nipy/dipy/blob/master/dipy/align/tests/test_imaffine.py#L307 But only on python 3.3 (?!). Let's hope that was just a fluke. On Mon, Jul 27, 2015 at 12:45 PM, Omar Ocegueda notifications@github.com
|
Thanks for reporting that! this kind of weird failures usually indicates a memory access violation, or an uninitialized buffer. I'll double check. |
No need to revert, we're just discussing the details of the inheritance, and I doubt anyone will start using that stuff in the next week or so. |
Hi @arokem,
Marc just reported the same failure in Python 3.4. I am investigating but since this is already in master, do you think it is preferable to skip the test for now and open an issue so it stops breaking the tests (I can re-activate the test after I figure out what the issue is about)? |
Yeah - I saw that. I am somewhat reluctant to remove this from our tests, On Wed, Jul 29, 2015 at 7:21 AM, Omar Ocegueda notifications@github.com
|
It's hard to reproduce (that's what I am trying to do right now), I think that's why it didn't show up during the review, it works correctly in my Ubuntu, Windows 8.1 and Travis didn't complain either. |
The worst kind... I will also give it a try. |
I see this now too: http://nipy.bic.berkeley.edu/builders/dipy-py2.6-32/builds/555/steps/shell_6/logs/stdio
Maybe that would be a good machine to start on? |
@matthew-brett - is that really the same issue? Superficially it looks like another test than this failure. Not saying we don't need to fix this one as well - just trying to understand. |
Actually, even better, it's failing in a similar way on OSX, with a segfault: http://nipy.bic.berkeley.edu/builders/dipy-py2.7-osx-10.8/builds/377/steps/shell_6/logs/stdio That machine is much faster. Same on my laptop:
|
Ariel - I'm guessing there's some memory access violation somewhere, maybe causing both problems, just recommending this one as a place to start because it's easier to reproduce, and hoping that this will lead us to a fix for both issues. |
Actually - I get the test_mi_gradient failure on my laptop as well. At least for one run out one. Now trying to see if it's an intermittent thing. |
*one run out of one |
Oh! that's awesome!, @matthew-brett, when you say "Maybe that would be a good machine to start on" do you mean using try-branch for debugging or is there a way to get access to the actual machine? |
Sadly, intermittent: one for two. |
I can't give you access to the '10.8' machine (actually, it's a 10.10 machine now). But I can give you access to the 10.7 machine that is failing in the same way. I'm afraid that machine is in really bad shape, running very slowly. You should now have access via your ssh-rsa key for jomaroceguedag@gmail.com : |
That machine already had the code compiled. To get going using the virtualenv that the tests used:
|
Thanks @matthew-brett!, I just activated the venv and I am now trying to build with is that the right thing to do? |
You can get the parameters that buildbot runs with from looking at the file
|
Awesome! it's compiling now =) |
Hi @matthew-brett, @arokem, We have two options here:
I personally would vote (2). What do you think? |
On Wed, Jul 29, 2015 at 11:00 AM, Omar Ocegueda notifications@github.com
Yes, unless I am missing something, 2 definitely sounds like the best way |
How about doing 2 and 3? Is there any reason not to raise the error for option 3? |
P.S. Does this explain why the error is intermittent? With the random seed On Wed, Jul 29, 2015 at 11:09 AM, Ariel Rokem arokem@gmail.com wrote:
|
Oh! of course!, we need 2 and 3 so we can catch the error and send @arokem, I'm not sure if this explains the intermitent behavior. I think it depends on what happens when we attempt to access an array at index 'nan'. Let me investigate a bit more about that, but for now this should fix this memory error too: |
Sorry, I meant: access an array at the index that results from converting |
Hello @omarocegueda , I noticed that you haven't renamed the following functions in what is now in the master Can you please use transform_X instead as we discussed in this PR? |
Changes Unknown when pulling 741e3c0 on omarocegueda:imaffine_pr3 into ** on nipy:master**. |
This is the last PR of the affine registration series. It also includes a tutorial explaining how to do an ANTS2-like affine registration. The following graph shows the performance of this implementation compared to ANTS2, using sparse sampling (30% of the voxels).
EDIT: we have now the same accuracy as ANTS2 in this dataset (image updated). Our implementation is a bit faster too (still a bit slower than ANTS2), the following are the updated times:
(sparse means use 30% of the voxels for PDF estimation)
ANTS2 sparse: 11.0 minutes
Dipy sparse: 12.0 minutes
Flirt : 4.41 minutes
Nipy: 49 seconds