jbohnslav / opencv_transforms

OpenCV implementation of Torchvision's image augmentations
MIT License
377 stars 46 forks source link

Dataloader could not work after using this implementation #2

Closed LvJC closed 5 years ago

LvJC commented 5 years ago

I use your implementation of transforms to my datasets, but I find that Dataloader could not work, it is only support with PIL Image. STRANGE

jbohnslav commented 5 years ago

Thanks for using repo! This is expected behavior. You should read your images as a numpy array, rather than a PIL image. This package does not use PIL at all. The slow way to fix your error would be np.array(image). The faster way would be to use openCV's imread function, and not to use PIL at all.