image-segmentation-keras
image-segmentation-keras copied to clipboard
I get all output predicted images of single color
@mttlutkarsh I had the same issue, the following modifications worked for me:
- The problem i was trying to solve had only two classes(object and background). I compiled the VGGsegnet model with a binary_crossentropy loss
- Making sure that the binary mask had only 1's and 0's as my mask contained 255 and 0 as the max and min.
- Make sure you are loading the right model for testing as the code saves models at every epoch. Hope this is helpful. Good luck!
Have you ever run into the loss = Nan problem in training VGGsegnet , or which one of your optimizers and loss functions you choose to run successfully? @vbhavank @divamgupta
Have you solved it and how
@mttlutkarsh I had the same issue, the following modifications worked for me:
- The problem i was trying to solve had only two classes(object and background). I compiled the VGGsegnet model with a binary_crossentropy loss
- Making sure that the binary mask had only 1's and 0's as my mask contained 255 and 0 as the max and min.
- Make sure you are loading the right model for testing as the code saves models at every epoch. Hope this is helpful. Good luck!
for 2, can l ask how to deal the mask,like this picture, green and black isbackground, red is seg part. Thank u very much!

@vbhavank for 1, it works, thanks
@Ysoleil i think for green and black should be set to black(pixel 0) ,and red be set to pixel 1
@Vincentlinzesheng can you tell me in which folder can I find the predicted output images please?