image-segmentation-keras icon indicating copy to clipboard operation
image-segmentation-keras copied to clipboard

More Pretrained Models

Open liu-zg15 opened this issue 4 years ago • 5 comments

Hi @divamgupta ;

Thank you for your great contribution! Everything works fine for me. This repo helps me a lot.

However, I noticed that there are only pretrained models for pspnet. I am wondering are there any more pretrained models(i.e. fcn pretrained model, segnet pretrained on ADE20K). Cause I am working on some project needed to compare performance. While train all models by my own cost too much time. I will be very grateful if you can release more pretrained models!

liu-zg15 avatar Feb 20 '21 04:02 liu-zg15

Meanwhile, I use a image from ADE20K image and use the pretrained model as described in readme. here is my code: `from keras_segmentation.pretrained import pspnet_50_ADE_20K

model=pspnet_50_ADE_20K() out = model.predict_segmentation( inp="./input_image.jpg", out_fname="out.png" )` get th predictions as follows: image is that the correct results? I also use the model.evaluate_segmentation on ADE_20K valdataset. but get the following results: 'frequency_weighted_IU': 0.008458777348417275, 'mean_IU': 0.0008622930610855478, I didn't change other things I think. Why this happened?

liu-zg15 avatar Feb 20 '21 12:02 liu-zg15

The low IoU score could be because the class index of the pre-trained model could be different than the class numbers of the pre-processed ADE dataset.

divamgupta avatar Feb 20 '21 20:02 divamgupta

The low IoU score could be because the class index of the pre-trained model could be different than the class numbers of the pre-processed ADE dataset.

Thank you for your reply. I think that is the reason. However, how to match two different class numbers?(How to get the class numbers of pretrained model? )

liu-zg15 avatar Feb 21 '21 01:02 liu-zg15

@divamgupta and more questions, I noticed that in the original UNET. The Encoder process is : conv1-1 conv1-2

conv2-1 conv2-2 ...... but in your implementation(vanilla encoder), the process is conv1-1

conv2-1 ...... seems in each layer, a convolutional block is missing. And this also happens in decoder process. I am wondering why is that?

liu-zg15 avatar Feb 21 '21 07:02 liu-zg15

@divamgupta @fracpete @bakwc @thomasaarholt Anybody could help me on that?😂

liu-zg15 avatar Feb 24 '21 06:02 liu-zg15