Transforms

Transforms shape the area of the trained image before showing it to CLIP for evaluation.

All transforms that do not change the resolution of the image are also available as post processing effects.

Here's a list of all available transformations:

  • add: Adds a fixed value to all pixels.
  • blur: A gaussian blur is applied to the pixels.
  • border: Draws a border on the edge of the image. The resolution is not changed.
  • bwnoise: Adds gray-scale noise to the image.
  • center_crop: Crops an image of the given resolution from the center.
  • clamp: Clamps the pixels into a fixed range.
  • contrast: Adjust the image saturation.
  • crop: Crops a specified section from the image.
  • edge: This removes everything except edges and generally has a bad effect on image quality. It might be useful, however.
  • fnoise: Adds noise to the image's fourier space.
  • mean: Adjust the mean color value.
  • mul: Multiplies all pixels by a fixed value.
  • noise: Adds noise to the image.
  • pad: Pads the image with additional pixels at the borders.
  • quantize: Quantize the color values.
  • random_crop: Crops a section of the specified resolution from a random position in the image.
  • random_rotate: Randomly rotates the image.
  • random_scale: Randomly scales an image in the range specified.
  • random_shift: This randomly translates the pixels of the image.
  • random_translate: Randomly translates an image in the specified range.
  • repeat: Repeats the image a number of times in the right and bottom direction.
  • resize: The resolution of the image is changed.
  • rnoise: Adds noise with a different resolution to the image.
  • rotate: Rotates the image.
  • saturation: Adjust the image saturation.
  • shift: This translates the image while wrapping the edges around.