Hi @Nikronic
I have checked if my folder are empty as follow;
import os
import glob

import torch
import torch.cuda as cuda
import torch.nn as nn
from torch.nn import functional as F
from torch.utils import data

import matplotlib.pyplot as plt
import matplotlib.image as matpltimg

import torchvision
from torchvision import datasets
from torchvision import transforms

import numpy as np

from torch.cuda import amp

datadir  = '/DataSets/SimplifyData'

traindir_OI = datadir + '/imagesForTrain/OriginalImages/'
traindir_NI = datadir + '/imagesForTrain/NoiseImages/'

list1 = os.listdir(traindir_OI) 
number_files1 = len(list1)
print(number_files1)

list2 = os.listdir(traindir_NI) 
number_files2 = len(list2)
print(number_files2)

I get as result :
6
6
which is correct because in each folder I have put now 6 images.
I have also tested the folders as follow:
class Dataset(data.Dataset):
    def __init__(self, path_input_1, path_input_2):
        self.filenames_OI = []
        self.filenames_NI = []
        self.path_input_1 = path_input_1
        self.path_input_2 = path_input_2

        filenames_OI = glob.glob(osp.join(path_input_1, '*.jpg'))
        filenames_NI = glob.glob(osp.join(path_input_2, '*.jpg'))
        print(len(filenames_OI)) 
        print(len(filenames_NI))
        
        for fn_OI, fn_NI in filenames_OI, filenames_NI:
            self.filenames_OI.append(fn_OI)
            self.filenames_NI.append(fn_NI)

    def __len__(self):
        return len(self.path_input_1) 

    def __getitem__(self, index):
        x = Image.open(self.filenames_OI[index])
        y = Image.open(self.filenames_NI[index])
        return X, y

I get also:
6
6
So I don’t known why I have the error. ValueError: not enough values to unpack (expected 2, got 0)
Perhaps I have done something wrong in the code, but I don’t known what.