class_docstr: Simple online and realtime tracking with a deep association metric.
  
  Details can be found at `DeepSORT<https://arxiv.org/abs/1703.07402>`_.
  
  Args:
      detector (dict): Configuration of detector. Defaults to None.
      reid (dict): Configuration of reid. Defaults to None
      tracker (dict): Configuration of tracker. Defaults to None.
      data_preprocessor (dict or ConfigDict, optional): The pre-process
         config of :class:`TrackDataPreprocessor`.  it usually includes,
          ``pad_size_divisor``, ``pad_value``, ``mean`` and ``std``.
      init_cfg (dict or list[dict]): Configuration of initialization.
          Defaults to None.
docstr: Calculate losses from a batch of inputs and data samples.
docstr_tok: ["Calculate","losses","from","a","batch","of","inputs","and","data","samples","."]
code: def loss(
      self, inputs: Tensor, data_samples: TrackSampleList, **kwargs
  ) -> dict:
      """Calculate losses from a batch of inputs and data samples."""
      raise NotImplementedError(
          "Please train `detector` and `reid` models firstly, then \
                  inference with SORT/DeepSORT."
      )
  
file_path: mmdetection/mmdet/models/mot/deep_sort.py
imports: from typing import Optional
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures import TrackSampleList
  from mmdet.utils import OptConfigType
  from .base import BaseMOTModel
label_desc: Use image node_id 2 for calling the DeepSORT obj's underlying member method code with example usage: obj.loss(inputs, data_samples) without return types