lama icon indicating copy to clipboard operation
lama copied to clipboard

Dataset Dataloader to load the label image at the same time

Open lyu124 opened this issue 2 years ago • 2 comments

Hi, i would like to use the network as backbone for segmentation. And i want to load the label image as well. So i wrote some lines as the image but i caught problem. The code can run for just 1 epoch, by the 2. epoch it shows error in image. Could you please give me some advice how i can solve it? Thank you so much. Screenshot from 2023-02-06 15-32-02

Screenshot from 2023-02-06 15-32-39

lyu124 avatar Feb 06 '23 14:02 lyu124

The fact that the error occurs after a full epoch of training suggests me that the problem might be with the validation dataset. Does validation go well?

windj007 avatar Feb 13 '23 07:02 windj007

Hello, i think the problem occurs at train dataset, i have changed the train dataset loading according to /evaluation/data.py InpaintingDataset loadfile. The problem doesn't exit. Screenshot from 2023-02-13 14-34-35

Screenshot from 2023-02-13 14-35-14

I still got another question. In /saicipainting/evaluation/data.py, when we load image we have divide 255 for each data image and mask image. But for training, in /saicipainting/trainning/data/dataset.py, the images are not divided by 255. Why is it? Screenshot from 2023-02-13 14-31-03 Screenshot from 2023-02-13 14-31-27

Screenshot from 2023-02-13 14-32-20

When i load the label image by evaluating, do i also have to divide it by 255 ?

lyu124 avatar Feb 13 '23 13:02 lyu124