Ok. So this looks like a dataset path issue. Can you please tell me what are you passing as input to data_dir ?
Ideally the data_dir = './VOCdevkit/VOC2012/' as per my function.
Also, make sure that the get_dataloader_single_folder function looks something like this:
So, do you have the following folders at this path /content/DeepLabv3FineTuning/dataset1: JPEGImages and SegmentationClass ?
Do you have these two folders under the directory at data_directory path ? If yes, then this should work.
Like in my example, this is the directory structure:
I remain nothing change and make my folder like the author, just test the definition to ensure the image can read as you guide, but I got the above error.
Ok. Can you share a link or post your code somewhere. Looks like you have made some changes in the code like adding a sampler and all as compared to the original GitHub code. So I’ll need to see the code to help you out now.
Hi, Yes, I am able to see the notebook from that link. But is it the correct notebook ? I don’t see any sampler in here whereas your error above says there is a RandomSampler. Can you check again ?
Ok. So I made my proposed changes above to your notebook and was able to train the model on VOC2012 dataset.
I’ll try your dataset now and see if I can replicate your issue and let you know soon.
Thanks so much! I am going to share with you another dataset since I trained the original one on another model successfully and I want to train the new one via this and the same problem also exists.
Why I got this error? my image and label are the same size(166*190 24)
RuntimeError: stack expects each tensor to be equal size, but got [3, 185, 204] at entry 0 and [3, 190, 166] at entry 1