tfm.vision.anchor.Anchor
Anchor class for anchor-based object detectors.
tfm.vision.anchor.Anchor(
min_level, max_level, num_scales, aspect_ratios, anchor_size, image_size
)
Args |
min_level
|
integer number of minimum level of the output feature pyramid.
|
max_level
|
integer number of maximum level of the output feature pyramid.
|
num_scales
|
integer number representing intermediate scales added on each
level. For instances, num_scales=2 adds one additional intermediate
anchor scales [2^0, 2^0.5] on each level.
|
aspect_ratios
|
list of float numbers representing the aspect ratio anchors
added on each level. The number indicates the ratio of width to height.
For instances, aspect_ratios=[1.0, 2.0, 0.5] adds three anchors on each
scale level.
|
anchor_size
|
float number representing the scale of size of the base
anchor to the feature stride 2^level.
|
image_size
|
a list of integer numbers or Tensors representing [height,
width] of the input image size.The image_size should be divided by the
largest feature stride 2^max_level.
|
Attributes |
anchors_per_location
|
|
multilevel_boxes
|
|
Methods
unpack_labels
View source
unpack_labels(
labels: tf.Tensor
) -> Dict[str, tf.Tensor]
Unpacks an array of labels into multi-scales labels.
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."],[],[]]