Below is teh example code i’m trying to adapt, but the issue is i don’t have a csv file my annoattaions are simple in teh annotation folder as .xml???
class data_Gen(torch.utils.data.Dataset):
def init(self,csv_file,root_dir,transform):
self.annotations=pd.read_csv(csv_file)
self.root_dir=root_dir
self.transform=transform
def __getitem__(self,I):
    img_path=os.path.join(self.root_dir,self.annotations.iloc[index,0])
    image=io.imread((img_path))
    y_label=torch.tensor((int(self.annotations.iloc[index,1])))
    
    if self.transform:
        image=self.transform(image)
        
    return(image,y_label)