class_docstr: Apply non maxima suppression to filter.
  
  Flag `minima_are_also_good` is useful, when you want to detect both maxima and minima, e.g. for DoG
class_docstr_tok: ["Apply","non","maxima","suppression","to","filter",".","Flag","`","minima_are_also_good","`","is","useful",",","when","you","want","to","detect","both","maxima","and","minima",",","e.g",".","for","DoG"]
code: def __init__(self, kernel_size: tuple[int, int]) -> None:
      super().__init__()
      self.kernel_size: tuple[int, int] = kernel_size
      self.padding: tuple[
          int, int, int, int
      ] = self._compute_zero_padding2d(kernel_size)
      self.register_buffer("kernel", _get_nms_kernel2d(*kernel_size))
  
file_path: kornia/kornia/geometry/subpix/nms.py
imports: from __future__ import annotations
  import torch
  import torch.nn.functional
  from kornia.core import Module, Tensor, eye, pad, zeros
label_desc: Use image node_id 1 to create a new NonMaximaSuppression2d object from inherited base classes: Module with example: obj = NonMaximaSuppression2d(kernel_size)