Apparently the elastic augmentation on the GPU on the M1 chip is currently broken.
import augmend
import matplotlib.pyplot as plt
import numpy as np
aug = augmend.Augmend()
kwargs=dict(amount=20, grid=3, order=0)
aug.add([augmend.transforms.Elastic(use_gpu=False, **kwargs), augmend.transforms.Elastic(use_gpu=True, **kwargs)])
x = np.zeros((100,100), np.float32)
x[40:60,50:90] = 1
y_cpu, y_gpu = aug([x,x])
plt.figure(figsize=(20,6))
plt.subplot(1,3,1)
plt.imshow(x)
plt.subplot(1,3,2)
plt.imshow(y_cpu, interpolation='none')
plt.title("CPU")
plt.subplot(1,3,3)
plt.imshow(y_gpu, interpolation='none')
plt.title("GPU")
Apparently the elastic augmentation on the GPU on the M1 chip is currently broken.
Below an example to reproduce the issue: