code: def __init__(
      self,
      input_size,
      num_masking_patches=None,
      min_num_patches=4,
      max_num_patches=None,
      min_aspect=0.3,
      max_aspect=None,
  ):
      if not isinstance(input_size, tuple):
          input_size = (input_size,) * 2
      self.height, self.width = input_size
  
      self.num_patches = self.height * self.width
      self.num_masking_patches = num_masking_patches
  
      self.min_num_patches = min_num_patches
      self.max_num_patches = (
          num_masking_patches
          if max_num_patches is None
          else max_num_patches
      )
  
      max_aspect = max_aspect or 1 / min_aspect
      self.log_aspect_ratio = (
          math.log(min_aspect),
          math.log(max_aspect),
      )
  
file_path: dinov2/dinov2/data/masking.py
imports: import random
  import math
  import numpy
label_desc: Use image node_id 1 to create a new MaskingGenerator object  with example: obj = MaskingGenerator(input_size, num_masking_patches, min_num_patches, max_num_patches, min_aspect, max_aspect)