Skip to content

Instantly share code, notes, and snippets.

M. Ernestus erniejunior

Block or report user

Report or block erniejunior

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@erniejunior
erniejunior / elastic_transform.py
Last active Dec 9, 2019 — forked from fmder/elastic_transform.py
Elastic transformation of an image in Python
View elastic_transform.py
import numpy as np
from scipy.ndimage.interpolation import map_coordinates
from scipy.ndimage.filters import gaussian_filter
def elastic_transform(image, alpha, sigma, random_state=None):
"""Elastic deformation of images as described in [Simard2003]_.
.. [Simard2003] Simard, Steinkraus and Platt, "Best Practices for
Convolutional Neural Networks applied to Visual Document Analysis", in
Proc. of the International Conference on Document Analysis and
Recognition, 2003.
You can’t perform that action at this time.