code: def random_transform_generator(prng=None, **kwargs):
      """Create a random transform generator.
  
      Uses a dedicated, newly created, properly seeded PRNG by default instead of the global DEFAULT_PRNG.
  
      The transformation consists of the following operations in this order (from left to right):
        * rotation
        * translation
        * shear
        * scaling
        * flip x (if applied)
        * flip y (if applied)
  
      Note that by default, the data generators in `keras_retinanet.preprocessing.generators` interpret the translation
      as factor of the image size. So an X translation of 0.1 would translate the image by 10% of it's width.
      Set `relative_translation` to `False` in the `TransformParameters` of a data generator to have it interpret
      the translation directly as pixel distances instead.
  
      Args
          min_rotation:    The minimum rotation in radians for the transform as scalar.
          max_rotation:    The maximum rotation in radians for the transform as scalar.
          min_translation: The minimum translation for the transform as 2D column vector.
          max_translation: The maximum translation for the transform as 2D column vector.
          min_shear:       The minimum shear angle for the transform in radians.
          max_shear:       The maximum shear angle for the transform in radians.
          min_scaling:     The minimum scaling for the transform as 2D column vector.
          max_scaling:     The maximum scaling for the transform as 2D column vector.
          flip_x_chance:   The chance (0 to 1) that a transform will contain a flip along X direction.
          flip_y_chance:   The chance (0 to 1) that a transform will contain a flip along Y direction.
          prng:            The pseudo-random number generator to use.
      """
  
      if prng is None:
          # RandomState automatically seeds using the best available method.
          prng = np.random.RandomState()
  
      while True:
          yield random_transform(prng=prng, **kwargs)
  
file_path: ImageAI/imageai_tf_deprecated/Detection/keras_retinanet/utils/transform.py
imports: import numpy
label_desc: Use image node_id 15 for calling a global function with example usage: random_transform_generator(prng) without return types