This repository was archived by the owner on Mar 11, 2026. It is now read-only.
Closed
Conversation
WindQAQ
reviewed
Apr 25, 2020
| A scalar length to extend the image by on each side. | ||
| A tuple of pairs (LH, LW) to extend the image by in each dimension. | ||
| A tuple of tuple pairs ((LT, LB), (LL, LR)) to extend the image by for | ||
| each individual side |
Member
There was a problem hiding this comment.
This is not implemented yet, right?
Author
There was a problem hiding this comment.
Oops! I intended it to add it before but it slipped my mind.
Contributor
|
/cc @tanzhenyu What do you think about this? |
Contributor
Can't this be done through tf.image.pad_xxx? |
Contributor
|
It seems to me could be covered by https://www.tensorflow.org/api_docs/python/tf/image/pad_to_bounding_box. |
Contributor
Yeah |
Contributor
|
I am closing this. Please reopen if you think there there are some others use cases that could be covered by this new API. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #1318.
Pads an image by extending the borders of the image by some predefined size. I separated it out to a new function because it seemed useful for more situations than just rotation (for example, I used it before calling
tf.image.random_cropto get a randomly shifted image). I currently named ittfa.image.extendbut it might make more sense to use something liketfa.image.pad____to fit in line with the other pad functions (tf.image.resize_and_pad,tf.image.pad_to_bounding_box, etc.).