class_docstr: Mask out values in a 1-dimensional buffer using a fixed masking pattern.
class_docstr_tok: ["Mask","out","values","in","a","1-dimensional","buffer","using","a","fixed","masking","pattern","."]
code: def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None:
      super().__init__(opts=opts, *args, **kwargs)
      self.keep_frac = getattr(
          opts, "image_augmentation.mask_positions.keep_frac"
      )
      self._cached_masks = None
  
imports: import argparse
  import io
  from typing import Dict, Union
  import numpy
  import torch
  from PIL import Image
  from data.transforms import TRANSFORMATIONS_REGISTRY, BaseTransformation
label_desc: Use image node_id 1 to create a new MaskPositions object from inherited base classes: BaseTransformation with example: obj = MaskPositions(opts)