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 get_backbone_features(self, x: Tensor) -> Dict[str, Tensor]:
      # extract features from the backbone network
      enc_end_points: Dict = self.encoder.extract_end_points_all(x)
  
      end_points: Dict = dict()
      for idx, os in enumerate(self.output_strides):
          if os == 8:
              end_points["os_{}".format(os)] = enc_end_points.pop(
                  "out_l3"
              )
          elif os == 16:
              end_points["os_{}".format(os)] = enc_end_points.pop(
                  "out_l4"
              )
          elif os == 32:
              end_points["os_{}".format(os)] = enc_end_points.pop(
                  "out_l5"
              )
          else:
              x = end_points[
                  "os_{}".format(self.output_strides[idx - 1])
              ]
              end_points["os_{}".format(os)] = self.extra_layers[
                  "os_{}".format(os)
              ](x)
  
      if self.fpn is not None:
          # apply Feature Pyramid Network
          end_points = self.fpn(end_points)
  
      return end_points
  
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 5 for calling the SingleShotMaskDetector obj's underlying member method code with example usage: obj.get_backbone_features(x) and returns: end_points