Skip to content

Conversation

djl11
Copy link

@djl11 djl11 commented Jan 9, 2020

Fixed incorrect clipping of query indices for non-square images.
Also modified tests to use non-square images.

Additional note: a single tf.reverse(query_points, -1) operation in an if statement could simplify this function for "ij" vs "xy" mode.

@djl11 djl11 requested a review from WindQAQ as a code owner January 9, 2020 15:45
@boring-cyborg boring-cyborg bot added the image label Jan 9, 2020
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@djl11
Copy link
Author

djl11 commented Jan 9, 2020

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Jan 9, 2020
@seanpmorgan
Copy link
Member

For non-square images, the current code creates out-of-bounds pixel queries during the tf.gather operation. This changes fixes this.

Additional note: using non-square images in unit tests would prevent these kinds of errors.

Also: a single tf.reverse(query_points, -1) operation in an if statement could simplify this function for "ij" vs "xy" mode.

Thanks @djl11! Could you please add a test case as you describe.

seanpmorgan
seanpmorgan previously approved these changes Jan 9, 2020
Copy link
Member

@seanpmorgan seanpmorgan 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! There's a lint error that I'm going to fix so we can get this into the 0.7 release.

@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@djl11
Copy link
Author

djl11 commented Jan 9, 2020

@googlebot I consent.

@seanpmorgan
Copy link
Member

seanpmorgan commented Jan 9, 2020

@googlebot I consent.

@djl11 don't worry about the CLA I'll override it. In the future to fix the lint errors just run:
bash tools/run_docker.sh -c 'make code-format'

Sorry I would have just asked you if I had known you're online. I'm planning to cut 0.7 right after these tests and merge. You'll be credited with the commit just FYI

@djl11
Copy link
Author

djl11 commented Jan 9, 2020

@seanpmorgan okay great, wasn't sure about the lint errors, thanks for the advice!
I'll leave it to you for now then. Cheers!

Copy link
Member

@seanpmorgan seanpmorgan 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 the fix! Welcome to addons!

@seanpmorgan seanpmorgan merged commit 2b84e03 into tensorflow:master Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants