                      image[:, :, idx] = image[:, :, idx] * (1 + adjustment)
          return batch
  
      # <<< IMAGE AUGMENTATION >>> #
      def transform(self, batch):
          """ Perform random transformation on the passed in batch.
  
          The transformation parameters are set in :file:`config.train.ini`
  
          Parameters
 
</s> remove         return batch
 </s> add  </s> remove         amount_l = self._config.get("color_lightness", 30) / 100
        amount_ab = self._config.get("color_ab", 8) / 100
        adjust = np.array([amount_l, amount_ab, amount_ab], dtype="float32")
        randoms = (
            (np.random.rand(self._batchsize, 1, 1, 3).astype("float32") * (adjust * 2)) - adjust)
        logger.trace("Random LAB adjustments: %s", randoms)

 </s> add         randoms = np.random.uniform(-self._constants.lab_adjust,
                                    self._constants.lab_adjust,
                                    size=(self._batchsize, 1, 1, 3)).astype("float32")
        logger.trace("Random LAB adjustments: %s", randoms)  # type: ignore
        # Iterating through the images and channels is much faster than numpy.where and slightly
        # faster than numexpr.where. </s> remove     def color_adjust(self, batch):
 </s> add     def color_adjust(self, batch: np.ndarray) -> np.ndarray: </s> remove     def random_flip(self, batch):
 </s> add     def random_flip(self, batch: np.ndarray): </s> remove         logger.trace("Randomly transformed image")
        return batch
 </s> add         logger.trace("Randomly transformed image")  # type: ignore
    def transform(self, batch: np.ndarray):
                      image[:, :, idx] = image[:, :, idx] * (1 + adjustment)
          return batch
  
      # <<< IMAGE AUGMENTATION >>> #
    def transform(self, batch: np.ndarray):
          """ Perform random transformation on the passed in batch.
  
          The transformation parameters are set in :file:`config.train.ini`
  
          Parameters
keep keep keep keep 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