class_docstr: GridDropout, drops out rectangular regions of an image and the corresponding mask in a grid fashion.
  
  Args:
      ratio (float): the ratio of the mask holes to the unit_size (same for horizontal and vertical directions).
          Must be between 0 and 1. Default: 0.5.
      unit_size_min (int): minimum size of the grid unit. Must be between 2 and the image shorter edge.
          If 'None', holes_number_x and holes_number_y are used to setup the grid. Default: `None`.
      unit_size_max (int): maximum size of the grid unit. Must be between 2 and the image shorter edge.
          If 'None', holes_number_x and holes_number_y are used to setup the grid. Default: `None`.
      holes_number_x (int): the number of grid units in x direction. Must be between 1 and image width//2.
          If 'None', grid unit width is set as image_width//10. Default: `None`.
      holes_number_y (int): the number of grid units in y direction. Must be between 1 and image height//2.
          If `None`, grid unit height is set equal to the grid unit width or image height, whatever is smaller.
      shift_x (int): offsets of the grid start in x direction from (0,0) coordinate.
          Clipped between 0 and grid unit_width - hole_width. Default: 0.
      shift_y (int): offsets of the grid start in y direction from (0,0) coordinate.
          Clipped between 0 and grid unit height - hole_height. Default: 0.
      random_offset (boolean): weather to offset the grid randomly between 0 and grid unit size - hole size
          If 'True', entered shift_x, shift_y are ignored and set randomly. Default: `False`.
      fill_value (int): value for the dropped pixels. Default = 0
      mask_fill_value (int): value for the dropped pixels in mask.
          If `None`, transformation is not applied to the mask. Default: `None`.
  
  Targets:
      image, mask
  
  Image types:
      uint8, float32
  
  References:
      https://arxiv.org/abs/2001.04086
class_docstr_tok: ["GridDropout",",","drops","out","rectangular","regions","of","an","image","and","the","corresponding","mask","in","a","grid","fashion",".","Args",":","ratio","(","float",")",":","the","ratio","of","the","mask","holes","to","the","unit_size","(","same","for","horizontal","and","vertical","directions",")",".","Must","be","between","0","and","1",".","Default",":","0.5.","unit_size_min","(","int",")",":","minimum","size","of","the","grid","unit",".","Must","be","between","2","and","the","image","shorter","edge",".","If","'None","'",",","holes_number_x","and","holes_number_y","are","used","to","setup","the","grid",".","Default",":","`","None","`",".","unit_size_max","(","int",")",":","maximum","size","of","the","grid","unit",".","Must","be","between","2","and","the","image","shorter","edge",".","If","'None","'",",","holes_number_x","and","holes_number_y","are","used","to","setup","the","grid",".","Default",":","`","None","`",".","holes_number_x","(","int",")",":","the","number","of","grid","units","in","x","direction",".","Must","be","between","1","and","image","width\/\/2",".","If","'None","'",",","grid","unit","width","is","set","as","image_width\/\/10",".","Default",":","`","None","`",".","holes_number_y","(","int",")",":","the","number","of","grid","units","in","y","direction",".","Must","be","between","1","and","image","height\/\/2",".","If","`","None","`",",","grid","unit","height","is","set","equal","to","the","grid","unit","width","or","image","height",",","whatever","is","smaller",".","shift_x","(","int",")",":","offsets","of","the","grid","start","in","x","direction","from","(","0,0",")","coordinate",".","Clipped","between","0","and","grid","unit_width","-","hole_width",".","Default",":","0.","shift_y","(","int",")",":","offsets","of","the","grid","start","in","y","direction","from","(","0,0",")","coordinate",".","Clipped","between","0","and","grid","unit","height","-","hole_height",".","Default",":","0.","random_offset","(","boolean",")",":","weather","to","offset","the","grid","randomly","between","0","and","grid","unit","size","-","hole","size","If","'True","'",",","entered","shift_x",",","shift_y","are","ignored","and","set","randomly",".","Default",":","`","False","`",".","fill_value","(","int",")",":","value","for","the","dropped","pixels",".","Default","=","0","mask_fill_value","(","int",")",":","value","for","the","dropped","pixels","in","mask",".","If","`","None","`",",","transformation","is","not","applied","to","the","mask",".","Default",":","`","None","`",".","Targets",":","image",",","mask","Image","types",":","uint8",",","float32","References",":","https",":","\/\/arxiv.org\/abs\/2001.04086"]
code: def __init__(
      self,
      ratio: float = 0.5,
      unit_size_min: Optional[int] = None,
      unit_size_max: Optional[int] = None,
      holes_number_x: Optional[int] = None,
      holes_number_y: Optional[int] = None,
      shift_x: int = 0,
      shift_y: int = 0,
      random_offset: bool = False,
      fill_value: int = 0,
      mask_fill_value: Optional[int] = None,
      always_apply: bool = False,
      p: float = 0.5,
  ):
      super(GridDropout, self).__init__(always_apply, p)
      self.ratio = ratio
      self.unit_size_min = unit_size_min
      self.unit_size_max = unit_size_max
      self.holes_number_x = holes_number_x
      self.holes_number_y = holes_number_y
      self.shift_x = shift_x
      self.shift_y = shift_y
      self.random_offset = random_offset
      self.fill_value = fill_value
      self.mask_fill_value = mask_fill_value
      if not 0 < self.ratio <= 1:
          raise ValueError("ratio must be between 0 and 1.")
  
file_path: albumentations/albumentations/augmentations/dropout/grid_dropout.py
imports: import random
  from typing import Iterable, Optional, Tuple
  import numpy
  from ...core.transforms_interface import DualTransform
  from .None import functional
label_desc: Use image node_id 1 to create a new GridDropout object from inherited base classes: DualTransform with example: obj = GridDropout(ratio, unit_size_min, unit_size_max, holes_number_x, holes_number_y, shift_x, shift_y, random_offset, fill_value, mask_fill_value, always_apply, p)