class_docstr: Base class for the task of object detection
  
  Args:
      opts: Command-line arguments
      encoder: Image-encoder model (e.g., MobileNet or ResNet)
code: def build_model(
      cls, opts: argparse.Namespace, *args, **kwargs
  ) -> BaseAnyNNModel:
      output_stride = getattr(
          opts, "model.detection.output_stride", None
      )
  
      image_encoder = get_model(
          opts=opts,
          category="classification",
          output_stride=output_stride,
          *args,
          **kwargs,
      )
  
      detection_model = cls(
          opts=opts, encoder=image_encoder, *args, **kwargs
      )
  
      if getattr(opts, "model.detection.freeze_batch_norm"):
          cls.freeze_norm_layers(opts, model=detection_model)
      return detection_model
  
file_path: ml-cvnets/cvnets/models/detection/base_detection.py
imports: import argparse
  from typing import Dict
  from torch import nn
  from cvnets.misc.init_utils import initialize_weights
  from cvnets.models import MODEL_REGISTRY, BaseAnyNNModel, get_model
  from cvnets.models.classification.base_image_encoder import BaseImageEncoder
  from utils import logger
label_desc: Use image node_id 4 for calling the BaseDetection obj's underlying member method code with example usage: obj.build_model(cls, opts) and returns: detection_model