          is loaded this function should be called to initialize the class and perform various
          calculations based on this input size to cache certain constants for image augmentation
          calculations.
  
          Parameters
          ----------
          training_size: int
               The size of the training images stored on disk that are to be fed into
               :class:`ImageAugmentation`. The training images should always be square and of the
               same size. This is the size, in pixels, of the `width` and the `height` of the
               training images.
           """
          logger.debug("Initializing constants. training_size: %s", training_size)
          self._training_size = training_size
          coverage = int(self._training_size * self._coverage_ratio // 2) * 2
  
          # Color Aug
          clahe_base_contrast = training_size // 128
          # Target Images
          tgt_slices = slice(self._training_size // 2 - coverage // 2,
 
</s> remove         The training image size is not known prior to loading the images from disk and commencing
        training, so it cannot be set in the :func:`__init__` method. When the first training batch
        is loaded this function should be called to initialize the class and perform various
        calculations based on this input size to cache certain constants for image augmentation
        calculations.
 </s> add         Returns
        -------
        dict
            Cached constants that are used for various augmentations
        """
        logger.debug("Initializing constants.") </s> remove         clahe_base_contrast = training_size // 128
        # Target Images
        tgt_slices = slice(self._training_size // 2 - coverage // 2,
                           self._training_size // 2 + coverage // 2)
 </s> add         amount_l = int(self._config.get("color_lightness", 30)) / 100
        amount_ab = int(self._config.get("color_ab", 8)) / 100
        lab_adjust = np.array([amount_l, amount_ab, amount_ab], dtype="float32") </s> remove     is_display: bool
        Whether the images being fed through will be used for Preview or Time-lapse. Disables
        the "warp" augmentation for these images.
    input_size: int
        The expected input size for the model. It is assumed that the input to the model is always
        a square image. This is the size, in pixels, of the `width` and the `height` of the input
        to the model.
    output_shapes: list
        A list of tuples defining the output shapes from the model, in the order that the outputs
        are returned. The tuples should be in (`height`, `width`, `channels`) format.
    coverage_ratio: float
        The ratio of the training image to be trained on. Dictates how much of the image will be
        cropped out. E.G: a coverage ratio of 0.625 will result in cropping a 160px box from a
        256px image (:math:`256 * 0.625 = 160`)
 </s> add     processing_size: int
        The largest input or output size of the model. This is the size that images are processed
        at. </s> remove     def initialize(self, training_size):
 </s> add     def _get_constants(self) -> AugConstants: </s> remove         warp_range_ = np.linspace(self._training_size // 2 - coverage // 2,
                                  self._training_size // 2 + coverage // 2, 5, dtype='float32')
        warp_mapx = np.broadcast_to(warp_range_, (self._batchsize, 5, 5)).astype("float32")
 </s> add         warp_range = np.linspace(0, self._processing_size, 5, dtype='float32')
        warp_mapx = np.broadcast_to(warp_range, (self._batchsize, 5, 5)).astype("float32")
        # Transform
        tform_shift = (int(self._config.get("shift_range", 5)) / 100) * self._processing_size
          is loaded this function should be called to initialize the class and perform various
          calculations based on this input size to cache certain constants for image augmentation
          calculations.
  
        # Transform
        tform_shift = (int(self._config.get("shift_range", 5)) / 100) * self._processing_size
        # Transform
        tform_shift = (int(self._config.get("shift_range", 5)) / 100) * self._processing_size
        # Transform
        tform_shift = (int(self._config.get("shift_range", 5)) / 100) * self._processing_size
        # Transform
        tform_shift = (int(self._config.get("shift_range", 5)) / 100) * self._processing_size
        # Transform
        tform_shift = (int(self._config.get("shift_range", 5)) / 100) * self._processing_size
        # Transform
        tform_shift = (int(self._config.get("shift_range", 5)) / 100) * self._processing_size
        # Transform
        tform_shift = (int(self._config.get("shift_range", 5)) / 100) * self._processing_size
        # Transform
        tform_shift = (int(self._config.get("shift_range", 5)) / 100) * self._processing_size
        # Transform
        tform_shift = (int(self._config.get("shift_range", 5)) / 100) * self._processing_size
        # Transform
        tform_shift = (int(self._config.get("shift_range", 5)) / 100) * self._processing_size
        # Transform
        tform_shift = (int(self._config.get("shift_range", 5)) / 100) * self._processing_size
  
          # Color Aug
          clahe_base_contrast = training_size // 128
          # Target Images
          tgt_slices = slice(self._training_size // 2 - coverage // 2,
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Data Augmentation update (#1263)

- lib.detected_face
    - Subclass Masks for Landmark based masks
    - Add training mask propery + methods to DetectedFace
  - lib.training_training
    - subclass TrainingDataGenerator for training and preview data
    - Split cache into own module
    - Reduce thread count to 1 to prevent image corruption + data re-use
    - Process on largest model input/output size rather than stored image size
    - Size and crop masks during caching stage
    - Implement ring buffer for data flow
    - Fix preview reload bug
  - augmentation
    - typing
    - switch color aug order
    - better initialization
    - Fix warp + landmark warp to correctly apply at different image scales
    - Slightly improved warp caching
    - Don't store whether image is_preview. Handle all data as training images implicitly
  - plugins.trainer: Typing and fixes to work with trainingdata refactor 
lib/training/augmentation.py