class_docstr: Tracker for MaskTrack R-CNN.
  
  Args:
      match_weights (dict[str : float]): The Weighting factor when computing
      the match score. It contains keys as follows:
  
          - det_score (float): The coefficient of `det_score` when computing
              match score.
          - iou (float): The coefficient of `ious` when computing match
              score.
          - det_label (float): The coefficient of `label_deltas` when
              computing match score.
class_docstr_tok: ["Tracker","for","MaskTrack","R-CNN",".","Args",":","match_weights","(","dict","[","str",":","float","]",")",":","The","Weighting","factor","when","computing","the","match","score",".","It","contains","keys","as","follows",":","-","det_score","(","float",")",":","The","coefficient","of","`","det_score","`","when","computing","match","score",".","-","iou","(","float",")",":","The","coefficient","of","`","ious","`","when","computing","match","score",".","-","det_label","(","float",")",":","The","coefficient","of","`","label_deltas","`","when","computing","match","score","."]
code: def assign_ids(self, match_scores: Tensor):
      num_prev_bboxes = match_scores.shape[1] - 1
      _, match_ids = match_scores.max(dim=1)
  
      ids = match_ids.new_zeros(match_ids.shape[0]) - 1
      best_match_scores = match_scores.new_zeros(num_prev_bboxes) - 1e6
      for idx, match_id in enumerate(match_ids):
          if match_id == 0:
              ids[idx] = self.num_tracks
              self.num_tracks += 1
          else:
              match_score = match_scores[idx, match_id]
              # TODO: fix the bug where multiple candidate might match
              # with the same previous object.
              if match_score > best_match_scores[match_id - 1]:
                  ids[idx] = self.ids[match_id - 1]
                  best_match_scores[match_id - 1] = match_score
      return ids, best_match_scores
  
file_path: mmdetection/mmdet/models/trackers/masktrack_rcnn_tracker.py
imports: from typing import List
  import torch
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures import DetDataSample
  from mmdet.structures.bbox import bbox_overlaps
  from .base_tracker import BaseTracker
label_desc: Use image node_id 3 for calling the MaskTrackRCNNTracker obj's underlying member method code with example usage: obj.assign_ids(match_scores) and returns: ids,  best_match_scores