tfm.vision.layers.MultilevelROIAligner
Stay organized with collections
Save and categorize content based on your preferences.
Performs ROIAlign for the second stage processing.
tfm.vision.layers.MultilevelROIAligner(
crop_size: int = 7, sample_offset: float = 0.5, **kwargs
)
Args |
crop_size
|
An int of the output size of the cropped features.
|
sample_offset
|
A float in [0, 1] of the subpixel sample offset.
|
**kwargs
|
Additional keyword arguments passed to Layer.
|
Methods
call
View source
call(
features: Mapping[str, tf.Tensor], boxes: tf.Tensor, training: bool = None
)
Generates ROIs.
| Args |
features
|
A dictionary with key as pyramid level and value as features.
The features are in shape of
[batch_size, height_l, width_l, num_filters].
|
boxes
|
A 3-D tf.Tensor of shape [batch_size, num_boxes, 4]. Each row
represents a box with [y1, x1, y2, x2] in un-normalized coordinates.
from grid point.
|
training
|
A bool of whether it is in training mode.
|
| Returns |
A 5-D tf.Tensor representing feature crop of shape
[batch_size, num_boxes, crop_size, crop_size, num_filters].
|
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 2026-11-06 UTC.
[null,null,["Last updated 2026-11-06 UTC."],[],[]]