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

added support of halpPixelCenters to resizeNearestNeighbor op #4262

Merged
merged 6 commits into from
Nov 19, 2020

Conversation

pyu10055
Copy link
Collaborator

@pyu10055 pyu10055 commented Nov 18, 2020

ResizeNearestNeighbor op supports half_pixel_centers param, which we have added support for resizeBilinear op recently.

https://www.tensorflow.org/api_docs/python/tf/raw_ops/ResizeNearestNeighbor?hl=en

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

Copy link
Collaborator

@lina128 lina128 left a comment

Choose a reason for hiding this comment

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

Thank you Ping!

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @lina128 and @pyu10055)


tfjs-core/src/ops/image/resize_nearest_neighbor.ts, line 41 at r1 (raw file):

 *     corners of images and resized images. If false, rescale by
 *     `new_height / height`. Treat similarly the width dimension.
 * @param halfPixelCenters Defaults to `false`. Whether to assume pixel centers

sugg: Shall we use the same field description as TF? i.e. half_pixel_centers assumes pixels are of half the actual dimensions, and yields more accurate resizes.

Copy link
Collaborator Author

@pyu10055 pyu10055 left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @lina128)


tfjs-core/src/ops/image/resize_nearest_neighbor.ts, line 41 at r1 (raw file):

Previously, lina128 (Na Li) wrote…

sugg: Shall we use the same field description as TF? i.e. half_pixel_centers assumes pixels are of half the actual dimensions, and yields more accurate resizes.

Where did you find that description? I am reusing the same param description from resizeBilinear.

Copy link
Collaborator

@lina128 lina128 left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @pyu10055)


tfjs-core/src/ops/image/resize_nearest_neighbor.ts, line 41 at r1 (raw file):

Previously, pyu10055 (Ping Yu) wrote…

Where did you find that description? I am reusing the same param description from resizeBilinear.

Got it. I found the description from tflite codebase in g3, sent you the link. Either description is fine by me as long as there's some consistency.

@pyu10055 pyu10055 merged commit 39fd40e into master Nov 19, 2020
@pyu10055 pyu10055 deleted the half_pixel branch November 19, 2020 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants