class_docstr: Initiate a tracktor based on an object detetor.
class_docstr_tok: ["Initiate","a","tracktor","based","on","an","object","detetor","."]
code: def detect_and_track(
      self,
      frame,
      tracking_anchor_indices,
      tracking_anchor_weights,
      tracking_object_classes,
  ):
      with_tracking = len(tracking_anchor_indices) > 0
  
      if with_tracking:
          tracking_indices = mx.nd.array(
              tracking_anchor_indices, ctx=self._ctx
          )
          tracking_weights = mx.nd.array(
              tracking_anchor_weights, ctx=self._ctx
          )
          tracking_classes = mx.nd.array(
              tracking_object_classes.reshape((-1, 1)), ctx=self._ctx
          )
      else:
          tracking_classes = (
              tracking_indices
          ) = tracking_weights = self._dummy_ti
  
      (
          ids,
          scores,
          bboxes,
          voted_tracking_bboxes,
          detection_anchor_indices,
      ) = self.detector.run_detection(
          frame, tracking_indices, tracking_weights, tracking_classes
      )
  
      valid_det_num = (
          (scores > self._detector_thresh)
          .sum()
          .astype(int)
          .asnumpy()[0]
      )
  
      if valid_det_num > 0:
          valid_scores = scores[:valid_det_num]
          valid_bboxes = bboxes[:valid_det_num, :]
          valid_classes = ids[:valid_det_num, :]
          detection_output = mx.nd.concat(
              valid_bboxes, valid_scores, valid_classes, dim=1
          ).asnumpy()
          anchor_indices_output = detection_anchor_indices[
              :valid_det_num, :
          ]
      else:
          # no detection
          detection_output = np.array([])
          anchor_indices_output = np.array([])
  
      tracking_response = (
          voted_tracking_bboxes.asnumpy()
          if with_tracking
          else np.array([])
      )
  
      return (
          detection_output,
          anchor_indices_output,
          tracking_response,
          {},
      )
  
file_path: gluon-cv/gluoncv/model_zoo/smot/tracktors.py
imports: from abc import ABC, abstractmethod
  import numpy
  import mxnet
  from .utils import timeit
  from .general_detector import GeneralDetector
label_desc: Use image node_id 5 for calling the GluonSSDMultiClassTracktor obj's underlying member method code with example usage: obj.detect_and_track(frame, tracking_anchor_indices, tracking_anchor_weights, tracking_object_classes) and returns: detection_output,  anchor_indices_output,  tracking_response,  dict