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","."]
docstr: Get the match score.
  
  Args:
      bboxes (torch.Tensor): of shape (num_current_bboxes, 4) in
          [tl_x, tl_y, br_x, br_y] format. Denoting the detection
          bboxes of current frame.
      labels (torch.Tensor): of shape (num_current_bboxes, )
      scores (torch.Tensor): of shape (num_current_bboxes, )
      prev_bboxes (torch.Tensor): of shape (num_previous_bboxes, 4) in
          [tl_x, tl_y, br_x, br_y] format.  Denoting the detection bboxes
          of previous frame.
      prev_labels (torch.Tensor): of shape (num_previous_bboxes, )
      similarity_logits (torch.Tensor): of shape (num_current_bboxes,
          num_previous_bboxes + 1). Denoting the similarity logits from
          track head.
  
  Returns:
      torch.Tensor: The matching score of shape (num_current_bboxes,
      num_previous_bboxes + 1)
docstr_tok: ["Get","the","match","score",".","Args",":","bboxes","(","torch.Tensor",")",":","of","shape","(","num_current_bboxes",",","4",")","in","[","tl_x",",","tl_y",",","br_x",",","br_y","]","format",".","Denoting","the","detection","bboxes","of","current","frame",".","labels","(","torch.Tensor",")",":","of","shape","(","num_current_bboxes",",",")","scores","(","torch.Tensor",")",":","of","shape","(","num_current_bboxes",",",")","prev_bboxes","(","torch.Tensor",")",":","of","shape","(","num_previous_bboxes",",","4",")","in","[","tl_x",",","tl_y",",","br_x",",","br_y","]","format",".","Denoting","the","detection","bboxes","of","previous","frame",".","prev_labels","(","torch.Tensor",")",":","of","shape","(","num_previous_bboxes",",",")","similarity_logits","(","torch.Tensor",")",":","of","shape","(","num_current_bboxes",",","num_previous_bboxes","+","1",")",".","Denoting","the","similarity","logits","from","track","head",".","Returns",":","torch.Tensor",":","The","matching","score","of","shape","(","num_current_bboxes",",","num_previous_bboxes","+","1",")"]
code: def get_match_score(
      self,
      bboxes: Tensor,
      labels: Tensor,
      scores: Tensor,
      prev_bboxes: Tensor,
      prev_labels: Tensor,
      similarity_logits: Tensor,
  ) -> Tensor:
      """Get the match score.
  
      Args:
          bboxes (torch.Tensor): of shape (num_current_bboxes, 4) in
              [tl_x, tl_y, br_x, br_y] format. Denoting the detection
              bboxes of current frame.
          labels (torch.Tensor): of shape (num_current_bboxes, )
          scores (torch.Tensor): of shape (num_current_bboxes, )
          prev_bboxes (torch.Tensor): of shape (num_previous_bboxes, 4) in
              [tl_x, tl_y, br_x, br_y] format.  Denoting the detection bboxes
              of previous frame.
          prev_labels (torch.Tensor): of shape (num_previous_bboxes, )
          similarity_logits (torch.Tensor): of shape (num_current_bboxes,
              num_previous_bboxes + 1). Denoting the similarity logits from
              track head.
  
      Returns:
          torch.Tensor: The matching score of shape (num_current_bboxes,
          num_previous_bboxes + 1)
      """
      similarity_scores = similarity_logits.softmax(dim=1)
  
      ious = bbox_overlaps(bboxes, prev_bboxes)
      iou_dummy = ious.new_zeros(ious.shape[0], 1)
      ious = torch.cat((iou_dummy, ious), dim=1)
  
      label_deltas = (labels.view(-1, 1) == prev_labels).float()
      label_deltas_dummy = label_deltas.new_ones(
          label_deltas.shape[0], 1
      )
      label_deltas = torch.cat(
          (label_deltas_dummy, label_deltas), dim=1
      )
  
      match_score = similarity_scores.log()
      match_score += (
          self.match_weights["det_score"] * scores.view(-1, 1).log()
      )
      match_score += self.match_weights["iou"] * ious
      match_score += self.match_weights["det_label"] * label_deltas
  
      return match_score
  
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 2 for calling the MaskTrackRCNNTracker obj's underlying member method code with example usage: obj.get_match_score(bboxes, labels, scores, prev_bboxes, prev_labels, similarity_logits) and returns: match_score