tfm.vision.anchor_generator.AnchorGenerator
Utility to generate anchors for a multiple feature maps.
tfm.vision.anchor_generator.AnchorGenerator(
anchor_sizes, scales, aspect_ratios, strides, clip_boxes=False
)
Example:
anchor_gen = AnchorGenerator([32, 64], [.5, 1., 2.],
strides=[16, 32])
anchors = anchor_gen([512, 512, 3])
Args |
anchor_sizes
|
A list of int represents the anchor size for each scale. The
anchor height will be anchor_size / sqrt(aspect_ratio) , anchor width
will be anchor_size * sqrt(aspect_ratio) for each scale.
|
scales
|
A list/tuple, or a list/tuple of a list/tuple of positive
floats representing the actual anchor size to the base anchor_size .
|
aspect_ratios
|
A list/tuple, or a list/tuple of a list/tuple of positive
floats representing the ratio of anchor width to anchor height.
|
strides
|
A list/tuple of ints represent the anchor stride size between
center of anchors at each scale.
|
clip_boxes
|
Boolean to represents whether the anchor coordinates should be
clipped to the image size. Defaults to False .
|
Methods
__call__
View source
__call__(
image_size
)
Call self as a function.
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."],[],[]]