Open
Description
Instead of using PIL.open
, @NicolasHug has pointed out that we can move to torchvision.io.decode_image
to speed up image processing by doing everything on pure tensors (see also. This would also allow us to drop our explicit PIL requirement). This should entail:
- changing load_image to use torchvision.io.decode_image
- updating CLIPImageTransform to accept tensors instead of PIL.Image (in the short term we can keep PIL.Image support for backwards compatibility)