image loader rgb transform

Solutions on MaxInterview for image loader rgb transform by the best coders in the world

showing results for - "image loader rgb transform"
Frida
22 Mar 2016
1While loading your images, you could use Image.open(path).convert('RGB') on all images.
2If you are using ImageFolder, this functionality should be already there using the default loader.
3
4def myloader(filename):
5    return Image.open(filename).convert('RGB')
6
7
8dog_test = datasets.ImageFolder('/data/dog_images/test',transform = valid_transform,loader=myloader)
9test = torch.utils.data.DataLoader(dataset=dog_test,batch_size=64)
similar questions
queries leading to this page
image loader rgb transform