class_docstr: Interpolate tracks to make tracks more complete.
  
  Args:
      min_num_frames (int, optional): The minimum length of a track that will
          be interpolated. Defaults to 5.
      max_num_frames (int, optional): The maximum disconnected length in
          a track. Defaults to 20.
      use_gsi (bool, optional): Whether to use the GSI (Gaussian-smoothed
          interpolation) method. Defaults to False.
      smooth_tau (int, optional): smoothing parameter in GSI. Defaults to 10.
class_docstr_tok: ["Interpolate","tracks","to","make","tracks","more","complete",".","Args",":","min_num_frames","(","int",",","optional",")",":","The","minimum","length","of","a","track","that","will","be","interpolated",".","Defaults","to","5.","max_num_frames","(","int",",","optional",")",":","The","maximum","disconnected","length","in","a","track",".","Defaults","to","20.","use_gsi","(","bool",",","optional",")",":","Whether","to","use","the","GSI","(","Gaussian-smoothed","interpolation",")","method",".","Defaults","to","False",".","smooth_tau","(","int",",","optional",")",":","smoothing","parameter","in","GSI",".","Defaults","to","10","."]
docstr: Forward function.
  
  pred_tracks (ndarray): With shape (N, 7). Each row denotes
      (frame_id, track_id, x1, y1, x2, y2, score).
  
  Returns:
      ndarray: The interpolated tracks with shape (N, 7). Each row
      denotes (frame_id, track_id, x1, y1, x2, y2, score).
docstr_tok: ["Forward","function",".","pred_tracks","(","ndarray",")",":","With","shape","(","N",",","7",")",".","Each","row","denotes","(","frame_id",",","track_id",",","x1",",","y1",",","x2",",","y2",",","score",")",".","Returns",":","ndarray",":","The","interpolated","tracks","with","shape","(","N",",","7",")",".","Each","row","denotes","(","frame_id",",","track_id",",","x1",",","y1",",","x2",",","y2",",","score",")","."]
code: def forward(self, pred_tracks: np.ndarray) -> np.ndarray:
      """Forward function.
  
      pred_tracks (ndarray): With shape (N, 7). Each row denotes
          (frame_id, track_id, x1, y1, x2, y2, score).
  
      Returns:
          ndarray: The interpolated tracks with shape (N, 7). Each row
          denotes (frame_id, track_id, x1, y1, x2, y2, score).
      """
      max_track_id = int(np.max(pred_tracks[:, 1]))
      min_track_id = int(np.min(pred_tracks[:, 1]))
  
      # perform interpolation for each track
      interpolated_tracks = []
      for track_id in range(min_track_id, max_track_id + 1):
          inds = pred_tracks[:, 1] == track_id
          track = pred_tracks[inds]
          num_frames = len(track)
          if num_frames <= 2:
              continue
  
          if num_frames > self.min_num_frames:
              interpolated_track = self._interpolate_track(
                  track, track_id, self.max_num_frames
              )
          else:
              interpolated_track = track
  
          if self.use_gsi:
              interpolated_track = self.gaussian_smoothed_interpolation(
                  interpolated_track, self.smooth_tau
              )
  
          interpolated_tracks.append(interpolated_track)
  
      interpolated_tracks = np.concatenate(interpolated_tracks)
      return interpolated_tracks[interpolated_tracks[:, 0].argsort()]
  
imports: import numpy
  from mmdet.registry import TASK_UTILS
label_desc: Use image node_id 4 for calling the InterpolateTracklets obj's underlying member method code with example usage: obj.forward(pred_tracks) and returns: interpolated_tracks