class_docstr: Module which detects and described local features in an image using the DISK method. See
  :cite:`tyszkiewicz2020disk` for details.
  
  .. image:: _static/img/disk_outdoor_depth.jpg
  
  Args:
      desc_dim: The dimension of the descriptor.
      unet: The U-Net to use. If None, a default U-Net is used. Kornia doesn't provide the training code for DISK
            so this is only useful when using a custom checkpoint trained using the code released with the paper.
            The unet should take as input a tensor of shape :math:`(B, C, H, W)` and output a tensor of shape
            :math:`(B, \mathrm{desc\_dim} + 1, H, W)`.
  
  Example:
      >>> disk = DISK.from_pretrained('depth')
      >>> images = torch.rand(1, 3, 256, 256)
      >>> features = disk(images)
class_docstr_tok: ["Module","which","detects","and","described","local","features","in","an","image","using","the","DISK","method",".","See",":","cite",":","`","tyszkiewicz2020disk","`","for","details",".","..","image",":",":","_static\/img\/disk_outdoor_depth.jpg","Args",":","desc_dim",":","The","dimension","of","the","descriptor",".","unet",":","The","U-Net","to","use",".","If","None",",","a","default","U-Net","is","used",".","Kornia","does","n't","provide","the","training","code","for","DISK","so","this","is","only","useful","when","using","a","custom","checkpoint","trained","using","the","code","released","with","the","paper",".","The","unet","should","take","as","input","a","tensor","of","shape",":","math",":","`","(","B",",","C",",","H",",","W",")","`","and","output","a","tensor","of","shape",":","math",":","`","(","B",",","\\mathrm","{","desc\\_dim","}","+","1",",","H",",","W",")","`",".","Example",":",">",">",">","disk","=","DISK.from_pretrained","(","'depth","'",")",">",">",">","images","=","torch.rand","(","1",",","3",",","256",",","256",")",">",">",">","features","=","disk","(","images",")"]
code: def __init__(
      self, desc_dim: int = 128, unet: None | Module = None
  ) -> None:
      super().__init__()
  
      self.desc_dim = desc_dim
  
      if unet is None:
          unet = Unet(
              in_features=3,
              size=5,
              down=[16, 32, 64, 64, 64],
              up=[64, 64, 64, desc_dim + 1],
          )
      self.unet = unet
  
file_path: kornia/kornia/feature/disk/disk.py
imports: from __future__ import annotations
  from typing import Optional
  import torch
  from kornia.core import Module, Tensor
  from ._unets import Unet
  from .detector import heatmap_to_keypoints
  from .structs import DISKFeatures
label_desc: Use image node_id 1 to create a new DISK object from inherited base classes: Module with example: obj = DISK(desc_dim, unet)