class_docstr: This class implements a `Single Shot Object Detector <https://arxiv.org/abs/1512.02325>`_
  
  Args:
      opts: command-line arguments
      encoder (BaseImageEncoder): Encoder network (e.g., ResNet or MobileViT)
class_docstr_tok: ["This","class","implements","a","`","Single","Shot","Object","Detector","<","https",":","\/\/arxiv.org\/abs\/1512.02325",">","`","_","Args",":","opts",":","command-line","arguments","encoder","(","BaseImageEncoder",")",":","Encoder","network","(","e.g.",",","ResNet","or","MobileViT",")"]
code: def add_arguments(
      cls, parser: argparse.ArgumentParser
  ) -> argparse.ArgumentParser:
      group = parser.add_argument_group(title=cls.__name__)
      group.add_argument(
          "--model.detection.ssd.anchors-aspect-ratio",
          type=int,
          nargs="+",
          action="append",
          default=[[2, 3]] * 4,
          help="Anchors aspect ratio in each feature map obtained at different output strides.",
      )
      group.add_argument(
          "--model.detection.ssd.output-strides",
          type=int,
          nargs="+",
          default=[16, 32, 64, 128],
          help="Extract feature maps from these output strides.",
      )
      group.add_argument(
          "--model.detection.ssd.proj-channels",
          type=int,
          nargs="+",
          default=[512] * 4,
          help="Projection channels for feature map obtained at each output stride",
      )
  
      # depreciated
      group.add_argument(
          "--model.detection.ssd.min-box-size",
          type=float,
          default=None,
          help="Min. box size. Value between 0 and 1. Good default value is 0.1",
      )
      group.add_argument(
          "--model.detection.ssd.max-box-size",
          type=float,
          default=None,
          help="Max. box size. Value between 0 and 1. Good default value is 1.05",
      )
  
      # Depreciated
      group.add_argument(
          "--model.detection.ssd.center-variance",
          type=float,
          default=None,
          help="Center variance.",
      )
      group.add_argument(
          "--model.detection.ssd.size-variance",
          type=float,
          default=None,
          help="Size variance.",
      )
      group.add_argument(
          "--model.detection.ssd.iou-threshold",
          type=float,
          default=None,
          help="IOU Threshold.",
      )
  
      # inference related arguments
      group.add_argument(
          "--model.detection.ssd.conf-threshold",
          type=float,
          default=0.01,
          help="Confidence threshold. For evaluation on COCO, set to 0.01, so that we can compute mAP",
      )
      group.add_argument(
          "--model.detection.ssd.top-k",
          type=int,
          default=400,
          help="Keep only top-k objects before NMS",
      )
      group.add_argument(
          "--model.detection.ssd.objects-per-image",
          type=int,
          default=200,
          help="Keep only these many objects after NMS",
      )
      group.add_argument(
          "--model.detection.ssd.nms-iou-threshold",
          type=float,
          default=0.5,
          help="NMS IoU threshold ",
      )
  
      # FPN
      group.add_argument(
          "--model.detection.ssd.fpn-out-channels",
          type=int,
          default=256,
          help="Number of output channels in FPN",
      )
      group.add_argument(
          "--model.detection.ssd.use-fpn",
          action="store_true",
          help="Use SSD with FPN",
      )
  
      return parser
  
imports: import argparse
  import math
  from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  from torch import Tensor, nn
  from torchvision.ops import batched_nms
  from cvnets.anchor_generator import build_anchor_generator
  from cvnets.layers import AdaptiveAvgPool2d, ConvLayer2d, SeparableConv2d
  from cvnets.matcher_det import build_matcher
  from cvnets.misc.init_utils import initialize_conv_layer
  from cvnets.models import MODEL_REGISTRY
  from cvnets.models.classification.base_image_encoder import BaseImageEncoder
  from cvnets.models.detection import DetectionPredTuple
  from cvnets.models.detection.base_detection import BaseDetection
  from cvnets.modules import SSDHead
  from utils import logger
  from utils.common_utils import is_coreml_conversion
label_desc: Use image node_id 2 for calling the SingleShotMaskDetector obj's underlying member method code with example usage: obj.add_arguments(cls, parser) and returns: parser