Ashish_Gupta1:

Data Fatching


import PIL.Image as Image
import os
import torch
images=torch.zeros(len(df),3,128,128)
for i in range(len(df)):
    ak=Image.open(("/content/VOC2012/SegmentationObject")+"/"+df['a'][i]+".png")
    print(ak) # This will tell you information about the image such as mode and size
    ak=transform(ak) 
    images[i]=ak