View source on GitHub |
Crop and resize on multilevel feature pyramid.
tfm.vision.spatial_transform_ops.multilevel_crop_and_resize(
features: Dict[str, tf.Tensor],
boxes: tf.Tensor,
output_size: int = 7,
sample_offset: float = 0.5
) -> tf.Tensor
Generate the (output_size, output_size) set of pixels for each input box by first locating the box into the correct feature level, and then cropping and resizing it using the correspoding feature map of that level.
Returns | |
---|---|
A 5-D tensor representing feature crop of shape [batch_size, num_boxes, output_size, output_size, num_filters]. |