class_docstr: Get Norfair detections from MOTChallenge text files containing detections
class_docstr_tok: ["Get","Norfair","detections","from","MOTChallenge","text","files","containing","detections"]
docstr: this function returns a list of norfair Detections class, corresponding to frame=frame_number
docstr_tok: ["this","function","returns","a","list","of","norfair","Detections","class",",","corresponding","to","frame=frame_number"]
code: def get_dets_from_frame(self, frame_number):
      """this function returns a list of norfair Detections class, corresponding to frame=frame_number"""
  
      indexes = np.argwhere(
          self.matrix_detections[:, 0] == frame_number
      )
      detections = []
      if len(indexes) > 0:
          actual_det = self.matrix_detections[indexes]
          actual_det.shape = [actual_det.shape[0], actual_det.shape[2]]
          for det in actual_det:
              points = np.array([[det[2], det[3]], [det[4], det[5]]])
              conf = det[6]
              new_detection = Detection(points, np.array([conf, conf]))
              detections.append(new_detection)
      self.actual_detections = detections
      return detections
  
imports: import os
  import numpy
  from rich import print
  from rich.progress import track
  from norfair import Detection
  from collections import OrderedDict
label_desc: Use image node_id 2 for calling the DetectionFileParser obj's underlying member method code with example usage: obj.get_dets_from_frame(frame_number) and returns: detections