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

110-rotation #126

Merged
merged 2 commits into from
Mar 5, 2020
Merged

110-rotation #126

merged 2 commits into from
Mar 5, 2020

Conversation

madil90
Copy link
Contributor

@madil90 madil90 commented Feb 28, 2020

Fixes #110 .

Description

Add the rotation transform. Tests coming soon.

Status

Work in progress

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or new feature that would cause existing functionality to change)
  • New tests added to cover the changes
  • Docstrings/Documentation updated

@madil90
Copy link
Contributor Author

madil90 commented Feb 28, 2020

@wyli @ericspod Same behavior as #125 (comment) replicated here. Resolution of that comment will be applied.

@@ -12,6 +12,7 @@

import torch
import numpy as np
from skimage.transform import rotate
Copy link
Member

@ericspod ericspod Feb 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skimage isn't listed as a dependency in requirements.txt, an import won't be possible if it's missing. We should add it or scipy to requirements.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, as briefly discussed in #112 (comment), pytorch provides a handy grid_sample function which seems also much more efficient than skimage.transform (at least for generic warps in 2D). See https://colab.research.google.com/drive/17pI6xPGLTGcpGBulBrWZeNnBfLAwzqZT

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strangely the CI test passed without modifying requirements.txt, @IsaacYangSLA looks like the CI docker image has common packages preinstalled, could we have a minimal docker image instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to use scipy.ndimage. Scikit-image doesn't work for 3D images properly. Also added to requirements and test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tvercaut That request is being handled in another PR.

@madil90 madil90 force-pushed the 110-rotation branch 2 times, most recently from 635bd9e to 25fae0f Compare March 5, 2020 01:12
@madil90 madil90 changed the title Adding rotation transform. 110-rotation Mar 5, 2020
Copy link
Contributor

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Thanks.

@madil90 madil90 merged commit f5ccf2a into master Mar 5, 2020
@wyli wyli deleted the 110-rotation branch May 21, 2020 13:33
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

Successfully merging this pull request may close these issues.

Port spatial rotation transform
5 participants