class_docstr: Base class of Matcher, which matches boxes and anchors to each other
  
  Args:
      similarity_fn: function for similarity computation between
          boxes and anchors
class_docstr_tok: ["Base","class","of","Matcher",",","which","matches","boxes","and","anchors","to","each","other","Args",":","similarity_fn",":","function","for","similarity","computation","between","boxes","and","anchors"]
docstr: Compute matches
  
  Args:
      boxes: bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``StandardMode``
      anchors: anchors to match Mx4 or Mx6, also assumed to be ``StandardMode``.
      num_anchors_per_level: number of anchors per feature pyramid level
      num_anchors_per_loc: number of anchors per position
  
  Returns:
      - matrix which contains the similarity from each boxes to each anchor [N, M]
      - vector which contains the matched box index for all
        anchors (if background `BELOW_LOW_THRESHOLD` is used
        and if it should be ignored `BETWEEN_THRESHOLDS` is used) [M]
docstr_tok: ["Compute","matches","Args",":","boxes",":","bounding","boxes",",","Nx4","or","Nx6","torch","tensor","or","ndarray",".","The","box","mode","is","assumed","to","be","``","StandardMode","``","anchors",":","anchors","to","match","Mx4","or","Mx6",",","also","assumed","to","be","``","StandardMode","``",".","num_anchors_per_level",":","number","of","anchors","per","feature","pyramid","level","num_anchors_per_loc",":","number","of","anchors","per","position","Returns",":","-","matrix","which","contains","the","similarity","from","each","boxes","to","each","anchor","[","N",",","M","]","-","vector","which","contains","the","matched","box","index","for","all","anchors","(","if","background","`","BELOW_LOW_THRESHOLD","`","is","used","and","if","it","should","be","ignored","`","BETWEEN_THRESHOLDS","`","is","used",")","[","M","]"]
code: def compute_matches(
      self,
      boxes: torch.Tensor,
      anchors: torch.Tensor,
      num_anchors_per_level: Sequence[int],
      num_anchors_per_loc: int,
  ) -> tuple[torch.Tensor, torch.Tensor]:
      """
      Compute matches
  
      Args:
          boxes: bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``StandardMode``
          anchors: anchors to match Mx4 or Mx6, also assumed to be ``StandardMode``.
          num_anchors_per_level: number of anchors per feature pyramid level
          num_anchors_per_loc: number of anchors per position
  
      Returns:
          - matrix which contains the similarity from each boxes to each anchor [N, M]
          - vector which contains the matched box index for all
            anchors (if background `BELOW_LOW_THRESHOLD` is used
            and if it should be ignored `BETWEEN_THRESHOLDS` is used) [M]
      """
      raise NotImplementedError
  
file_path: MONAI/monai/apps/detection/utils/ATSS_matcher.py
imports: from __future__ import annotations
  import logging
  from abc import ABC, abstractmethod
  from collections.abc import Callable, Sequence
  from typing import TypeVar
  import torch
  from torch import Tensor
  from monai.data.box_utils import COMPUTE_DTYPE, box_iou, boxes_center_distance, centers_in_boxes
  from monai.utils.type_conversion import convert_to_tensor
label_desc: Use image node_id 3 for calling the Matcher obj's underlying member method code with example usage: obj.compute_matches(boxes, anchors, num_anchors_per_level, num_anchors_per_loc) without return types