tfm.vision.augment.unwrap
Unwraps an image produced by wrap.
tfm.vision.augment.unwrap(
image: tf.Tensor, replace: int
) -> tf.Tensor
Where there is a 0 in the last channel for every spatial position,
the rest of the three channels in that spatial dimension are grayed
(set to 128). Operations like translate and shear on a wrapped
Tensor will leave 0s in empty locations. Some transformations look
at the intensity of values to do preprocessing, and we want these
empty pixels to assume the 'average' value, rather than pure black.
Args |
image
|
A 3D Image Tensor with 4 channels.
|
replace
|
A one or three value 1D tensor to fill empty pixels.
|
Returns |
image
|
A 3D image Tensor with 3 channels.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-02-02 UTC.
[null,null,["Last updated 2024-02-02 UTC."],[],[]]