docstr: Call the core functionality of AdaLAM, i.e. just outlier filtering. No sanity check is performed on the
  inputs.
  
  Inputs:
      k1: keypoint locations in the source image, in pixel coordinates.
          Expected a float32 tensor with shape (num_keypoints_in_source_image, 2).
      k2: keypoint locations in the destination image, in pixel coordinates.
          Expected a float32 tensor with shape (num_keypoints_in_destination_image, 2).
      putative_matches: Initial set of putative matches to be filtered.
                        The current implementation assumes that these are unfiltered nearest neighbor matches,
                        so it requires this to be a list of indices a_i such that the source keypoint i is
                        associated to the destination keypoint a_i. For now to use AdaLAM on different inputs a
                        workaround on the input format is required.
                        Expected a long tensor with shape (num_keypoints_in_source_image,).
      scores: Confidence scores on the putative_matches. Usually holds Lowe's ratio scores.
      mnn: A mask indicating which putative matches are also mutual nearest neighbors. See documentation on
           'force_seed_mnn' in the DEFAULT_CONFIG. If None, it disables the mutual nearest neighbor filtering on
           seed point selection. Expected a bool tensor with shape (num_keypoints_in_source_image,)
      im1shape: Shape of the source image. If None, it is inferred from keypoints max and min, at the cost of
                wasted runtime. So please provide it. Expected a tuple with (width, height) or (height, width)
                of source image
      im2shape: Shape of the destination image. If None, it is inferred from keypoints max and min, at the cost
                of wasted runtime. So please provide it. Expected a tuple with (width, height) or (height, width)
                of destination image
      o1/o2: keypoint orientations in degrees. They can be None if 'orientation_difference_threshold' in config
             is set to None. See documentation on 'orientation_difference_threshold' in the DEFAULT_CONFIG.
             Expected a float32 tensor with shape (num_keypoints_in_source/destination_image,)
      s1/s2: keypoint scales. They can be None if 'scale_rate_threshold' in config is set to None.
             See documentation on 'scale_rate_threshold' in the DEFAULT_CONFIG.
             Expected a float32 tensor with shape (num_keypoints_in_source/destination_image,)
      return_dist: if True, inverse confidence value is also outputted.
  
  Returns:
      Filtered putative matches.
      A long tensor with shape (num_filtered_matches, 2) with indices of corresponding keypoints in k1 and k2.
docstr_tok: ["Call","the","core","functionality","of","AdaLAM",",","i.e",".","just","outlier","filtering",".","No","sanity","check","is","performed","on","the","inputs",".","Inputs",":","k1",":","keypoint","locations","in","the","source","image",",","in","pixel","coordinates",".","Expected","a","float32","tensor","with","shape","(","num_keypoints_in_source_image",",","2",")",".","k2",":","keypoint","locations","in","the","destination","image",",","in","pixel","coordinates",".","Expected","a","float32","tensor","with","shape","(","num_keypoints_in_destination_image",",","2",")",".","putative_matches",":","Initial","set","of","putative","matches","to","be","filtered",".","The","current","implementation","assumes","that","these","are","unfiltered","nearest","neighbor","matches",",","so","it","requires","this","to","be","a","list","of","indices","a_i","such","that","the","source","keypoint","i","is","associated","to","the","destination","keypoint","a_i",".","For","now","to","use","AdaLAM","on","different","inputs","a","workaround","on","the","input","format","is","required",".","Expected","a","long","tensor","with","shape","(","num_keypoints_in_source_image",",",")",".","scores",":","Confidence","scores","on","the","putative_matches",".","Usually","holds","Lowe","'s","ratio","scores",".","mnn",":","A","mask","indicating","which","putative","matches","are","also","mutual","nearest","neighbors",".","See","documentation","on","'force_seed_mnn","'","in","the","DEFAULT_CONFIG",".","If","None",",","it","disables","the","mutual","nearest","neighbor","filtering","on","seed","point","selection",".","Expected","a","bool","tensor","with","shape","(","num_keypoints_in_source_image",",",")","im1shape",":","Shape","of","the","source","image",".","If","None",",","it","is","inferred","from","keypoints","max","and","min",",","at","the","cost","of","wasted","runtime",".","So","please","provide","it",".","Expected","a","tuple","with","(","width",",","height",")","or","(","height",",","width",")","of","source","image","im2shape",":","Shape","of","the","destination","image",".","If","None",",","it","is","inferred","from","keypoints","max","and","min",",","at","the","cost","of","wasted","runtime",".","So","please","provide","it",".","Expected","a","tuple","with","(","width",",","height",")","or","(","height",",","width",")","of","destination","image","o1\/o2",":","keypoint","orientations","in","degrees",".","They","can","be","None","if","'orientation_difference_threshold","'","in","config","is","set","to","None",".","See","documentation","on","'orientation_difference_threshold","'","in","the","DEFAULT_CONFIG",".","Expected","a","float32","tensor","with","shape","(","num_keypoints_in_source\/destination_image",",",")","s1\/s2",":","keypoint","scales",".","They","can","be","None","if","'scale_rate_threshold","'","in","config","is","set","to","None",".","See","documentation","on","'scale_rate_threshold","'","in","the","DEFAULT_CONFIG",".","Expected","a","float32","tensor","with","shape","(","num_keypoints_in_source\/destination_image",",",")","return_dist",":","if","True",",","inverse","confidence","value","is","also","outputted",".","Returns",":","Filtered","putative","matches",".","A","long","tensor","with","shape","(","num_filtered_matches",",","2",")","with","indices","of","corresponding","keypoints","in","k1","and","k2","."]
code: def filter_matches(
      self,
      k1: Tensor,
      k2: Tensor,
      putative_matches: Tensor,
      scores: Tensor,
      mnn: Optional[Tensor] = None,
      im1shape: Optional[Tuple[int, int]] = None,
      im2shape: Optional[Tuple[int, int]] = None,
      o1: Optional[Tensor] = None,
      o2: Optional[Tensor] = None,
      s1: Optional[Tensor] = None,
      s2: Optional[Tensor] = None,
      return_dist: bool = False,
  ) -> Union[Tuple[Tensor, Tensor], Tensor]:
      """Call the core functionality of AdaLAM, i.e. just outlier filtering. No sanity check is performed on the
      inputs.
  
      Inputs:
          k1: keypoint locations in the source image, in pixel coordinates.
              Expected a float32 tensor with shape (num_keypoints_in_source_image, 2).
          k2: keypoint locations in the destination image, in pixel coordinates.
              Expected a float32 tensor with shape (num_keypoints_in_destination_image, 2).
          putative_matches: Initial set of putative matches to be filtered.
                            The current implementation assumes that these are unfiltered nearest neighbor matches,
                            so it requires this to be a list of indices a_i such that the source keypoint i is
                            associated to the destination keypoint a_i. For now to use AdaLAM on different inputs a
                            workaround on the input format is required.
                            Expected a long tensor with shape (num_keypoints_in_source_image,).
          scores: Confidence scores on the putative_matches. Usually holds Lowe's ratio scores.
          mnn: A mask indicating which putative matches are also mutual nearest neighbors. See documentation on
               'force_seed_mnn' in the DEFAULT_CONFIG. If None, it disables the mutual nearest neighbor filtering on
               seed point selection. Expected a bool tensor with shape (num_keypoints_in_source_image,)
          im1shape: Shape of the source image. If None, it is inferred from keypoints max and min, at the cost of
                    wasted runtime. So please provide it. Expected a tuple with (width, height) or (height, width)
                    of source image
          im2shape: Shape of the destination image. If None, it is inferred from keypoints max and min, at the cost
                    of wasted runtime. So please provide it. Expected a tuple with (width, height) or (height, width)
                    of destination image
          o1/o2: keypoint orientations in degrees. They can be None if 'orientation_difference_threshold' in config
                 is set to None. See documentation on 'orientation_difference_threshold' in the DEFAULT_CONFIG.
                 Expected a float32 tensor with shape (num_keypoints_in_source/destination_image,)
          s1/s2: keypoint scales. They can be None if 'scale_rate_threshold' in config is set to None.
                 See documentation on 'scale_rate_threshold' in the DEFAULT_CONFIG.
                 Expected a float32 tensor with shape (num_keypoints_in_source/destination_image,)
          return_dist: if True, inverse confidence value is also outputted.
  
      Returns:
          Filtered putative matches.
          A long tensor with shape (num_filtered_matches, 2) with indices of corresponding keypoints in k1 and k2.
      """
      with torch.no_grad():
          return adalam_core(
              k1,
              k2,
              fnn12=putative_matches,
              scores1=scores,
              mnn=mnn,
              im1shape=im1shape,
              im2shape=im2shape,
              o1=o1,
              o2=o2,
              s1=s1,
              s2=s2,
              config=self.config,
              return_dist=return_dist,
          )
  
file_path: kornia/kornia/feature/adalam/adalam.py
imports: from typing import Optional, Tuple, Union
  import torch
  from kornia.core import Tensor, as_tensor
  from kornia.core.check import KORNIA_CHECK_LAF, KORNIA_CHECK_SHAPE
  from kornia.feature.laf import get_laf_center, get_laf_orientation, get_laf_scale
  from .core import AdalamConfig, _no_match, adalam_core
  from .utils import dist_matrix
label_desc: Use image node_id 2 for calling the AdalamFilter obj's underlying member method code with example usage: obj.filter_matches(k1, k2, putative_matches, scores, mnn, im1shape, im2shape, o1, o2, s1, s2, return_dist) and returns: adalam_core