Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wrappers for imagecorruptions library #530

Merged
merged 1 commit into from
Jan 11, 2020
Merged

Add wrappers for imagecorruptions library #530

merged 1 commit into from
Jan 11, 2020

Commits on Jan 11, 2020

  1. Add wrappers for imagecorruptions library

    This patch adds wrappers around the functions from
    package
    https://github.com/bethgelab/imagecorruptions.
    The functions in that package were used in some recent
    papers and are added here for convenience.
    The wrappers produce arrays containing values
    identical to the output arrays from the corresponding
    `imagecorruptions` functions when called via the
    `imagecorruptions.corrupt()` (verified via unittests).
    The interfaces of the wrapper functions are identical to the
    `imagecorruptions` functions, with the only difference of
    also supporting `seed` parameters.
    
    * Add module `imgaug.augmenters.imgcorruptlike`.
      The `like` signals that the augmentation functions do
      not *have* to wrap `imagecorruptions` internally.
      They merely have to produce the same outputs.
    * Add the following functions to module
      `imgaug.augmenters.imgcorruptlike`:
        * `apply_gaussian_noise()`
        * `apply_shot_noise()`
        * `apply_impulse_noise()`
        * `apply_speckle_noise()`
        * `apply_gaussian_blur()`
        * `apply_glass_blur()`
          (improved performance over original function)
        * `apply_defocus_blur()`
        * `apply_motion_blur()`
        * `apply_zoom_blur()`
        * `apply_fog()`
        * `apply_snow()`
        * `apply_spatter()`
        * `apply_contrast()`
        * `apply_brightness()`
        * `apply_saturate()`
        * `apply_jpeg_compression()`
        * `apply_pixelate()`
        * `apply_elastic_transform()`
    * Add function
      `imgaug.augmenters.imgcorruptlike.get_corruption_names(subset)`.
      Similar to `imagecorruptions.get_corruption_names(subset)`,
      but returns a tuple
      `(list of corruption method names,
        list of corruption method functions)`,
      instead of only the names.
    * Add the following augmenters to module
      `imgaug.augmenters.imgcorruptlike`:
        * `GaussianNoise`
        * `ShotNoise`
        * `ImpulseNoise`
        * `SpeckleNoise`
        * `GaussianBlur`
        * `GlassBlur`
        * `DefocusBlur`
        * `MotionBlur`
        * `ZoomBlur`
        * `Fog`
        * `Frost`
        * `Snow`
        * `Spatter`
        * `Contrast`
        * `Brightness`
        * `Saturate`
        * `JpegCompression`
        * `Pixelate`
        * `ElasticTransform`
    * Add context `imgaug.random.temporary_numpy_seed()`.
    aleju committed Jan 11, 2020
    Configuration menu
    Copy the full SHA
    76fefd8 View commit details
    Browse the repository at this point in the history