class_docstr: This class assigns to each predicted "element" (e.g., a box) a ground-truth
  element. Each predicted element will have exactly zero or one matches; each
  ground-truth element may be assigned to zero or more predicted elements.
  
  Matching is based on the MxN match_quality_matrix, that characterizes how well
  each (ground-truth, predicted)-pair match. For example, if the elements are
  boxes, the matrix may contain box IoU overlap values.
  
  The matcher returns a tensor of size N containing the index of the ground-truth
  element m that matches to prediction n. If there is no match, a negative value
  is returned.
class_docstr_tok: ["This","class","assigns","to","each","predicted","``","element","''","(","e.g.",",","a","box",")","a","ground-truth","element",".","Each","predicted","element","will","have","exactly","zero","or","one","matches",";","each","ground-truth","element","may","be","assigned","to","zero","or","more","predicted","elements",".","Matching","is","based","on","the","MxN","match_quality_matrix",",","that","characterizes","how","well","each","(","ground-truth",",","predicted",")","-pair","match",".","For","example",",","if","the","elements","are","boxes",",","the","matrix","may","contain","box","IoU","overlap","values",".","The","matcher","returns","a","tensor","of","size","N","containing","the","index","of","the","ground-truth","element","m","that","matches","to","prediction","n.","If","there","is","no","match",",","a","negative","value","is","returned","."]
docstr: Args:
      high_threshold (float): quality values greater than or equal to
          this value are candidate matches.
      low_threshold (float): a lower quality threshold used to stratify
          matches into three levels:
          1) matches >= high_threshold
          2) BETWEEN_THRESHOLDS matches in [low_threshold, high_threshold)
          3) BELOW_LOW_THRESHOLD matches in [0, low_threshold)
      allow_low_quality_matches (bool): if True, produce additional matches
          for predictions that have only low-quality match candidates. See
          set_low_quality_matches_ for more details.
docstr_tok: ["Args",":","high_threshold","(","float",")",":","quality","values","greater","than","or","equal","to","this","value","are","candidate","matches",".","low_threshold","(","float",")",":","a","lower","quality","threshold","used","to","stratify","matches","into","three","levels",":","1",")","matches",">","=","high_threshold","2",")","BETWEEN_THRESHOLDS","matches","in","[","low_threshold",",","high_threshold",")","3",")","BELOW_LOW_THRESHOLD","matches","in","[","0",",","low_threshold",")","allow_low_quality_matches","(","bool",")",":","if","True",",","produce","additional","matches","for","predictions","that","have","only","low-quality","match","candidates",".","See","set_low_quality_matches_","for","more","details","."]
code: def __init__(
      self,
      high_threshold: float,
      low_threshold: float,
      allow_low_quality_matches: bool = False,
  ) -> None:
      """
      Args:
          high_threshold (float): quality values greater than or equal to
              this value are candidate matches.
          low_threshold (float): a lower quality threshold used to stratify
              matches into three levels:
              1) matches >= high_threshold
              2) BETWEEN_THRESHOLDS matches in [low_threshold, high_threshold)
              3) BELOW_LOW_THRESHOLD matches in [0, low_threshold)
          allow_low_quality_matches (bool): if True, produce additional matches
              for predictions that have only low-quality match candidates. See
              set_low_quality_matches_ for more details.
      """
      self.BELOW_LOW_THRESHOLD = -1
      self.BETWEEN_THRESHOLDS = -2
      torch._assert(
          low_threshold <= high_threshold,
          "low_threshold should be <= high_threshold",
      )
      self.high_threshold = high_threshold
      self.low_threshold = low_threshold
      self.allow_low_quality_matches = allow_low_quality_matches
  
imports: import math
  from collections import OrderedDict
  from typing import Dict, List, Optional, Tuple
  import torch
  from torch import nn, Tensor
  from torch.nn import functional
  from torchvision.ops import complete_box_iou_loss, distance_box_iou_loss, FrozenBatchNorm2d, generalized_box_iou_loss
label_desc: Use image node_id 1 to create a new Matcher object  with example: obj = Matcher(high_threshold, low_threshold, allow_low_quality_matches)