class_docstr: Multi-scale anchors class.
class_docstr_tok: ["Multi-scale","anchors","class","."]
docstr: Constructs multiscale anchors.
  
  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 two additional
      anchor scales [2^0, 2^0.5] on each level.
    aspect_ratios: list of representing the aspect ratio anchors added
      on each level. For instances, aspect_ratios = [1.0, 2.0, 0..5]
      adds three anchors on each level.
    anchor_scale: float number representing the scale of size of the base
      anchor to the feature stride 2^level. Or a list, one value per layer.
    image_size: integer number or tuple of integer number of input image size.
docstr_tok: ["Constructs","multiscale","anchors",".","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","two","additional","anchor","scales","[","2^0",",","2^0.5","]","on","each","level",".","aspect_ratios",":","list","of","representing","the","aspect","ratio","anchors","added","on","each","level",".","For","instances",",","aspect_ratios","=","[","1.0",",","2.0",",","0","..","5","]","adds","three","anchors","on","each","level",".","anchor_scale",":","float","number","representing","the","scale","of","size","of","the","base","anchor","to","the","feature","stride","2^level",".","Or","a","list",",","one","value","per","layer",".","image_size",":","integer","number","or","tuple","of","integer","number","of","input","image","size","."]
code: def __init__(
      self,
      min_level,
      max_level,
      num_scales,
      aspect_ratios,
      anchor_scale,
      image_size,
  ):
      """Constructs multiscale anchors.
  
      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 two additional
          anchor scales [2^0, 2^0.5] on each level.
        aspect_ratios: list of representing the aspect ratio anchors added
          on each level. For instances, aspect_ratios = [1.0, 2.0, 0..5]
          adds three anchors on each level.
        anchor_scale: float number representing the scale of size of the base
          anchor to the feature stride 2^level. Or a list, one value per layer.
        image_size: integer number or tuple of integer number of input image size.
      """
      self.min_level = min_level
      self.max_level = max_level
      self.num_scales = num_scales
      self.aspect_ratios = aspect_ratios
      if isinstance(anchor_scale, (list, tuple)):
          assert len(anchor_scale) == max_level - min_level + 1
          self.anchor_scales = anchor_scale
      else:
          self.anchor_scales = [anchor_scale] * (
              max_level - min_level + 1
          )
      self.image_size = utils.parse_image_size(image_size)
      self.feat_sizes = utils.get_feat_sizes(image_size, max_level)
      self.config = self._generate_configs()
      self.boxes = self._generate_boxes()
  
file_path: DALI/docs/examples/use_cases/tensorflow/efficientdet/pipeline/anchors.py
imports: import collections
  import numpy
  import tensorflow
  import utils
  from .anchors_utils import argmax_matcher
  from .anchors_utils import box_list
  from .anchors_utils import faster_rcnn_box_coder
  from .anchors_utils import region_similarity_calculator
  from .anchors_utils import target_assigner
label_desc: Use image node_id 1 to create a new Anchors object  with example: obj = Anchors(min_level, max_level, num_scales, aspect_ratios, anchor_scale, image_size)