I'm making an image iterator for my deep learning project. On this project, i need to apply noise generation(for reducing overfitting).
I tried the code below, but it takes 0.005 seconds for one image, yes it is fast but i'm working with more than a million images, so it takes a lot to do that.
def noise_generator(img, n=0.15):
return img + np.random.normal(0.0, n, img.shape)
It would be really good if i can do it in like 0.001 seconds for one image. Any suggestions?
Aucun commentaire:
Enregistrer un commentaire