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].
|