tf.keras.ops.image.extract_es
Stay organized with collections Save and categorize content based on your preferences.
Extracts es from the image(s).
tf.keras.ops.image.extract_es(
image,
size,
strides=None,
dilation_rate=1,
padding='valid',
data_format='channels_last'
)
Args |
---|
image | Input image or batch of images. Must be 3D or 4D. |
size | size int or tuple (_height, _widht) |
strides | strides along height and width. If not specified, or if None , it defaults to the same value as size . |
dilation_rate | This is the input stride, specifying how far two consecutive samples are in the input. For value other than 1, strides must be 1. NOTE: strides > 1 is not supported in conjunction with dilation_rate > 1 |
padding | The type of padding algorithm to use: "same" or "valid" . |
data_format | string, either "channels_last" or "channels_first" . The ordering of the dimensions in the inputs. "channels_last" corresponds to inputs with shape (batch, height, width, channels) while "channels_first" corresponds to inputs with shape (batch, channels, height, weight) . It defaults to the image_data_format value found in your Keras config file at ~/.keras/keras.json . If you never set it, then it will be "channels_last" . |
Returns |
---|
Extracted es 3D (if not batched) or 4D (if batched) |
Examples:
image = np.random.random(
(2, 20, 20, 3)
).astype("float32") # batch of 2 RGB images
es = keras.ops.image.extract_es(image, (5, 5))
es.shape
(2, 4, 4, 75)
image = np.random.random((20, 20, 3)).astype("float32") # 1 RGB image
es = keras.ops.image.extract_es(image, (3, 3), (1, 1))
es.shape
(18, 18, 27)
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-06-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-07 UTC."],[],[]]