image.png1540×810 87.7 KB

NOW, i am writing a super-resolution code.but i am confused about the dataset implementation,
if i only have a directory about my training image, i can write the code like the above image,
but, if i have an input image folder,and a target(gronud truth)image folder,what should i edit it?
def init(self,input_img_dir,target_img_dir,…):
self.input_img_files=[os.list.]
self.target_img_files=[os.list]
sort()
sort()
def __getitem(item,index):
#so,the index is the input_img index or target_img index?and how to get right training image pairs?