Skip to content

Conversation

alykhantejani
Copy link
Contributor

In response to #61

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

I think this looks good, thanks Aly!
I have two small comments, but once those are addressed I think this is good to go!


def __call__(self, img):
w, h = img.size
crop_w = w // 2

This comment was marked as off-topic.

bl = img.crop((0, h - crop_h, crop_w, h))
br = img.crop((w - crop_w, h - crop_h, w, h))
center = CenterCrop((crop_h, crop_w))(img)
return [tl, tr, bl, br, center]

This comment was marked as off-topic.

@alykhantejani
Copy link
Contributor Author

@fmassa I've made these changes - let me know if there's anything else that needs changing.

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@chsasank
Copy link
Contributor

How about we convert these classes to function five_crop and ten_crop? I can do that for you.

@alykhantejani
Copy link
Contributor Author

@chsasank yeah - I think that we should do this. I'll merge this, then you can send a PR to refactor them into functions?

@alykhantejani alykhantejani merged commit 8cd15cb into pytorch:master Sep 26, 2017
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.

3 participants