class_docstr: Anchor generator for YOLO.
  
  Args:
      strides (list[int] | list[tuple[int, int]]): Strides of anchors
          in multiple feature levels.
      base_sizes (list[list[tuple[int, int]]]): The basic sizes
          of anchors in multiple levels.
code: def __init__(self, strides, base_sizes):
      self.strides = [_pair(stride) for stride in strides]
      self.centers = [
          (stride[0] / 2.0, stride[1] / 2.0) for stride in self.strides
      ]
      self.base_sizes = []
      num_anchor_per_level = len(base_sizes[0])
      for base_sizes_per_level in base_sizes:
          assert num_anchor_per_level == len(base_sizes_per_level)
          self.base_sizes.append(
              [_pair(base_size) for base_size in base_sizes_per_level]
          )
      self.base_anchors = self.gen_base_anchors()
  
imports: import mmcv
  import numpy
  import torch
  from torch.nn.modules.utils import _pair
  from .builder import ANCHOR_GENERATORS
label_desc: Use image node_id 1 to create a new YOLOAnchorGenerator object from inherited base classes: AnchorGenerator with example: obj = YOLOAnchorGenerator(strides, base_sizes)