unet
unet copied to clipboard
Creating labels for multi class segmentation
Thanks for your code, I have a problem that when I run the code for multi-class segmentation all my images are detected to be in class1. I create the labels of my image by assigning the pixel value to 0 (background) or 1(class1) or 2 (class2) or 3(class3).
then I assigned the color value in data part to each class for the visualization purpose
Is it correct?
Thanks for your code, I have a problem that when I run the code for multi-class segmentation all my images are detected to be in class1. I create the labels of my image by assigning the pixel value to 0 (background) or 1(class1) or 2 (class2) or 3(class3).
then I assigned the color value in data part to each class for the visualization purpose
Is it correct?
Yes,it is reasonable. maybe number of each class is not in balance?
@wuyang0329 Thanks for your reply.. then why it detects all the samples as sample in class 1? Currently, when I train the network all the predictions are white. (white color (255,255, 255) is defined for my class1)
then what is your suggestion for class imbalance?
@wuyang0329 Thanks for your reply.. then why it detects all the samples as sample in class 1? Currently, when I train the network all the predictions are white. (white color (255,255, 255) is defined for my class1)
then what is your suggestion for class imbalance?
what‘s the color mode of you image,you should set right color image mode in data.py at line 55 and 56, I guess your label image’s color mode is not right I am sorry that I can‘t not give you any suggestion for data imbalance problem.
@wuyang0329 Thanks for your reply.. then why it detects all the samples as sample in class 1? Currently, when I train the network all the predictions are white. (white color (255,255, 255) is defined for my class1) then what is your suggestion for class imbalance?
what‘s the color mode of you image,you should set right color image mode in data.py at line 55 and 56, I guess your label image’s color mode is not right I am sorry that I can‘t not give you any suggestion for data imbalance problem.
the color modes are set to rgb. the problem is that I have changed the coor for class one from white (255,55,255) to any other but yet I get a fully white prediction for my pictures
I guess your dataset is too small to train on this model or your train epochs is less
@wuyang0329 Thanks for your reply.. then why it detects all the samples as sample in class 1? Currently, when I train the network all the predictions are white. (white color (255,255, 255) is defined for my class1) then what is your suggestion for class imbalance?
what‘s the color mode of you image,you should set right color image mode in data.py at line 55 and 56, I guess your label image’s color mode is not right I am sorry that I can‘t not give you any suggestion for data imbalance problem.
the color modes are set to rgb. the problem is that I have changed the coor for class one from white (255,55,255) to any other but yet I get a fully white prediction for my pictures
What format are your pictures?
@wuyang0329 Thanks for your reply.. then why it detects all the samples as sample in class 1? Currently, when I train the network all the predictions are white. (white color (255,255, 255) is defined for my class1) then what is your suggestion for class imbalance?
what‘s the color mode of you image,you should set right color image mode in data.py at line 55 and 56, I guess your label image’s color mode is not right I am sorry that I can‘t not give you any suggestion for data imbalance problem.
the color modes are set to rgb. the problem is that I have changed the coor for class one from white (255,55,255) to any other but yet I get a fully white prediction for my pictures
What format are your pictures?
I'm using .jpg for the images and png for the ground truth. I have already changed the image type in line 61 to jpg.
@wuyang0329 Have you, yourself tried the code for multi-class segmentation? I have almost given up with it, I guess it's not gonna work
@wuyang0329 Have you, yourself tried the code for multi-class segmentation? I have almost given up with it, I guess it's not gonna work
I have tried this code in Camvid dataset you can download this dataset and compare this dataset with your dataset.
@wuyang0329 Have you, yourself tried the code for multi-class segmentation? I have almost given up with it, I guess it's not gonna work
I have tried this code in Camvid dataset you can download this dataset and compare this dataset with your dataset.
I will have a second look and compare it.
@wuyang0329 I have checked the images and labels and compared with the camvid dataset its similar. I have created my labels as below: assuming the image size is 4x4 so my label is like this: 0 0 0 0 0 1 1 0 2 0 0 0 0 0 3 3 In which the 0 is for class 0 =backgrounfd and 1 for class 1 and so on.
Hello,
The issue should be in ImageDataGenerator
where
classes=[self.image_folder]
should be
classes=None