class_docstr: This class generates anchors (or priors) ``on-the-fly`` for the
  `single shot object detector (SSD) <https://arxiv.org/abs/1512.02325>`_.
class_docstr_tok: ["This","class","generates","anchors","(","or","priors",")","``","on-the-fly","``","for","the","`","single","shot","object","detector","(","SSD",")","<","https",":","\/\/arxiv.org\/abs\/1512.02325",">","`","_","."]
docstr: Adds SSD anchor generator-specific arguments to the parser
docstr_tok: ["Adds","SSD","anchor","generator-specific","arguments","to","the","parser"]
code: def add_arguments(
      cls, parser: argparse.ArgumentParser
  ) -> argparse.ArgumentParser:
      """
      Adds SSD anchor generator-specific arguments to the parser
      """
      group = parser.add_argument_group(title=cls.__name__)
      group.add_argument(
          "--anchor-generator.ssd.output-strides",
          nargs="+",
          type=int,
          help="Output strides of the feature maps for which we want to generate anchors",
      )
      group.add_argument(
          "--anchor-generator.ssd.aspect-ratios",
          nargs="+",
          type=float,
          action="append",
          help="Aspect ratios at each output stride",
      )
  
      # prior box arguments
      # SSD sample priors between min and max box sizes.
      # for example, if we use feature maps from three spatial levels (or output strides), then we
      # sample width and height for anchor boxes as:
      # scales = np.linspace(min_box_size, max_box_size, len(output_strides) + 1)
      # min_box dimensions for the first feature map is scales[0] * feature_map_dimensions
      # while the max_box dimensions will be sqrt(scales[0] * scales[1]) * feature_map dimensions. And so on
      group.add_argument(
          "--anchor-generator.ssd.min-scale-ratio",
          type=float,
          help="Min. scale ratio",
      )
      group.add_argument(
          "--anchor-generator.ssd.max-scale-ratio",
          type=float,
          help="Max. scale ratio",
      )
      group.add_argument(
          "--anchor-generator.ssd.no-clipping",
          action="store_true",
          help="Don't clip the anchors",
      )
      group.add_argument(
          "--anchor-generator.ssd.step",
          type=int,
          default=[1],
          nargs="+",
          help="Step between pixels",
      )
      return parser
  
file_path: ml-cvnets/cvnets/anchor_generator/ssd_anchor_generator.py
imports: import argparse
  from itertools import product
  from typing import List, Optional
  import numpy
  import torch
  from torch import Tensor
  from cvnets.anchor_generator import ANCHOR_GEN_REGISTRY, BaseAnchorGenerator
  from utils import logger
label_desc: Use image node_id 3 for calling the SSDAnchorGenerator obj's underlying member method code with example usage: obj.add_arguments(cls, parser) and returns: parser