aleju / imgaug

Image augmentation for machine learning experiments.
http://imgaug.readthedocs.io
MIT License
14.42k stars 2.44k forks source link

AttributeError: module 'numpy' has no attribute 'complex'. #853

Open Hemilibeatriz opened 4 months ago

Hemilibeatriz commented 4 months ago

When i run:

import imgaug.augmenters as iaa
import imageio.v2 as imageio
import matplotlib.pyplot as plt

image = imageio.imread('/content/drive/MyDrive/Teste_Colab/images/cyclamen-3659141_1280.jpg')

# Nevoeiro
aug_fog = iaa.Fog()
image_fog = aug_fog(image=image)

# Chuva
aug_rain = iaa.Rain(drop_size=(0.1, 0.2), speed=(0.1, 0.3))
image_rain = aug_rain(image=image)

# Mostrar imagens
plt.figure(figsize=(10, 3))
plt.subplot(1, 2, 1)
plt.imshow(image_fog)
plt.title('Fog')
plt.axis('off')
plt.subplot(1, 2, 2)
plt.imshow(image_rain)
plt.title('Rain')
plt.axis('off')
plt.show()

I got:

AttributeError: module 'numpy' has no attribute 'complex'.
`np.complex` was a deprecated alias for the builtin `complex`. To avoid this error in existing code, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

But all the others augmentations works... What´s wrong? Any ideas I would be most grateful :)