How to edit in U-2-Net to load in my own images and labels?

I got train images: 0 train labels: 0
I set my folders like this:
––DUTS-TR
——im_aug
———0.jpg
———1.png
——gt_aug
———0.png
———1.png
is there something wrong?

ValueError: num_samples should be a positive integer value, but got num_samples=0

what should I edit, any guidance will be helpful

`data_dir = os.path.join(os.getcwd(), ‘train_data’ + os.sep)

| tra_image_dir = os.path.join(‘DUTS’, ‘DUTS-TR’, ‘DUTS-TR’, ‘im_aug’ + os.sep)
| tra_label_dir = os.path.join(‘DUTS’, ‘DUTS-TR’, ‘DUTS-TR’, ‘gt_aug’ + os.sep)`

I assume you are using ImageFolder, which won’t work in your use case, as it’ll create the targets for a multi-class classification, while you seem to be dealing with a segmentation use case.
If that’s the case, I would recommend to write a custom Dataset as described here.
In the __init__ you could define the image paths to the data and target images and load the corresponding pair in the __getitem__ method.