Handling images with transparencies

Hi, I have some images in my dataset that are PNG’s with transparencies. When I try to read images using built in dataloader, It generates the warning -

"UserWarning: Palette images with Transparency expressed in bytes should be converted to RGBA images"

How do I handle this? Any ideas?

Thanks!

looks like the default loader converts to ‘RGB’:

By default with ImageLoader you can specify your own loader: https://github.com/pytorch/vision/blob/master/torchvision/datasets/folder.py#L92