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

rotation augmentation: rotate, don't just transpose #12

Open
bertsky opened this issue Jan 30, 2021 · 0 comments
Open

rotation augmentation: rotate, don't just transpose #12

bertsky opened this issue Jan 30, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@bertsky
Copy link

bertsky commented Jan 30, 2021

The current implementation of the rotation augmenter does not actually rotate or reflect, it transposes:

def rotation_90(img):
img_rot=np.zeros((img.shape[1],img.shape[0],img.shape[2]))
img_rot[:,:,0]=img[:,:,0].T
img_rot[:,:,1]=img[:,:,1].T
img_rot[:,:,2]=img[:,:,2].T
return img_rot

Thus, the image will still be flipped / mirrored afterwards.

I suggest using an actual reflection, or doing a flip (an inverse slice on the first axis) after the transposition.

Also, how about rotating -90°, and also various skew angles, too?

@cneud cneud added the enhancement New feature or request label Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants