original_docstring: Tracks objects from image.
  
          Specifically for use with MOT evaluation, will attempt to get optional
          input `mot_metadata` and recreate `JDEModel` with the appropriate
          frame rate when necessary.
  
          Args:
              inputs (Dict[str, Any]): Dictionary with keys "img". When running
                  under MOT evaluation, contains "mot_metadata" key as well.
  
          Returns:
              outputs (dict): Dictionary containing:
              - bboxes (List[np.ndarray]): Bounding boxes for tracked targets.
              - bbox_labels (np.ndarray): Bounding box labels, hard coded as
                  "person".
              - bbox_scores (List[float]): Detection confidence scores.
              - obj_attrs (Dict[str, List[int]]): Tracking IDs, specifically for use
                  with `mot_evaluator`.
          
docstring: Tracks objects from image.
  Specifically for use with MOT evaluation, will attempt to get optional
  input `mot_metadata` and recreate `JDEModel` with the appropriate
  frame rate when necessary.
docstring_tokens: Tracks objects from image . Specifically for use with MOT evaluation will attempt to get optional input ` mot_metadata ` and recreate ` JDEModel ` with the appropriate frame rate when necessary .
code: def run(self, inputs: Dict[str, Any]) -> Dict[str, Any]:
          """Tracks objects from image.
  
          Specifically for use with MOT evaluation, will attempt to get optional
          input `mot_metadata` and recreate `JDEModel` with the appropriate
          frame rate when necessary.
  
          Args:
              inputs (Dict[str, Any]): Dictionary with keys "img". When running
                  under MOT evaluation, contains "mot_metadata" key as well.
  
          Returns:
              outputs (dict): Dictionary containing:
              - bboxes (List[np.ndarray]): Bounding boxes for tracked targets.
              - bbox_labels (np.ndarray): Bounding box labels, hard coded as
                  "person".
              - bbox_scores (List[float]): Detection confidence scores.
              - obj_attrs (Dict[str, List[int]]): Tracking IDs, specifically for use
                  with `mot_evaluator`.
          """
          metadata = inputs.get(
              "mot_metadata", {"frame_rate": self._frame_rate, "reset_model": False}
          )
          frame_rate = metadata["frame_rate"]
          reset_model = metadata["reset_model"]
  
          if frame_rate != self._frame_rate or reset_model:
              self._frame_rate = frame_rate
              self._reset_model()
  
          bboxes, bbox_scores, track_ids = self.model.predict(inputs["img"])
          bbox_labels = np.array(["person"] * len(bboxes))
          bboxes = np.clip(bboxes, 0, 1)
  
          return {
              "bboxes": bboxes,
              "bbox_labels": bbox_labels,
              "bbox_scores": bbox_scores,
              "obj_attrs": {"ids": track_ids},
          }
code_tokens: def run ( self , inputs : Dict [ str , Any ] ) -> Dict [ str , Any ] : metadata = inputs . get ( "mot_metadata" , { "frame_rate" : self . _frame_rate , "reset_model" : False } ) frame_rate = metadata [ "frame_rate" ] reset_model = metadata [ "reset_model" ] if frame_rate != self . _frame_rate or reset_model : self . _frame_rate = frame_rate self . _reset_model ( ) bboxes , bbox_scores , track_ids = self . model . predict ( inputs [ "img" ] ) bbox_labels = np . array ( [ "person" ] * len ( bboxes ) ) bboxes = np . clip ( bboxes , 0 , 1 ) return { "bboxes" : bboxes , "bbox_labels" : bbox_labels , "bbox_scores" : bbox_scores , "obj_attrs" : { "ids" : track_ids } , }
short_docstring: Tracks objects from image.
short_docstring_tokens: Tracks objects from image .
comment: """Tracks objects from image.
  
          Specifically for use with MOT evaluation, will attempt to get optional
          input `mot_metadata` and recreate `JDEModel` with the appropriate
          frame rate when necessary.
  
          Args:
              inputs (Dict[str, Any]): Dictionary with keys "img". When running
                  under MOT evaluation, contains "mot_metadata" key as well.
  
          Returns:
              outputs (dict): Dictionary containing:
              - bboxes (List[np.ndarray]): Bounding boxes for tracked targets.
              - bbox_labels (np.ndarray): Bounding box labels, hard coded as
                  "person".
              - bbox_scores (List[float]): Detection confidence scores.
              - obj_attrs (Dict[str, List[int]]): Tracking IDs, specifically for use
                  with `mot_evaluator`.
          """