juntang-zhuang / ShelfNet

implementation for paper "ShelfNet for fast semantic segmentation"
MIT License
252 stars 41 forks source link

results on cityscapes #6

Closed noahzn closed 5 years ago

noahzn commented 5 years ago

Hi, I tried to run the test code on cityscapes data set, and I changed the crop_size in option.py to 768, but I found the mean IoU was about 60%. Do I need to change the base_size? Or do you know how can I achieve the results reported in your paper? I used pretrained resnet50 provided by you. Thanks a lot!

juntang-zhuang commented 5 years ago

Hi, thanks for your interest. I tested it again today and achieved the same result as reported, with base size 1024, crop size 768. In the code it was base size 608, crop size 512. I corrected it in the code. For multi-scale evaluation, the image is resized into multiple scales of base size. I think this is the reason (1024 v.s. 608, the image is blurred). Please tell me if the problem still exists. (For PASCAL, base_size = 608, crop_size = 512)

noahzn commented 5 years ago

Hi, thanks for your interest. I tested it again today and achieved the same result as reported, with base size 1024, crop size 768. In the code it was base size 608, crop size 512. I corrected it in the code. For multi-scale evaluation, the image is resized into multiple scales of base size. I think this is the reason (1024 v.s. 608, the image is blurred). Please tell me if the problem still exists. (For PASCAL, base_size = 608, crop_size = 512)

Hi, Thank you very much for your quick response. I'm trying to train the network on custom data set. Can I feed an image of any size? I noticed you crop the image and make the size of images height == weight. Is it possible if I input an image with size 300*1000?

juntang-zhuang commented 5 years ago

Hi, you can use input of different size. You may need to modify dataloader and the multi-evaluation function to deal with different shapes.

noahzn commented 5 years ago

Hi, I ran test_single_scale.py to test on cityscapes val set (500 images), and I still could only achieve about 0.5 IoU. I used 'eval' mode and your shared pretrained resnet50 weights. Do you have any ideas?

juntang-zhuang commented 5 years ago

Hi, thanks for your interest. For the single-scale test, I re-run it again and achieved 0.9416 acc, 0.6909 mIoU on validation dataset, and 72.24 on test set on the evaluation server. Please double check your code is from the branch citys and the most recent version (I updated it a few times, not sure which version you forked). Also, please double check your dataset preparation. The file info.json should be "{"std": [0.1829540508368939, 0.18656561047509476, 0.18447508988480435], "mean": [0.29010095242892997, 0.32808144844279574, 0.28696394422942517]}". Please check if you downloaded the correct pre-trained weights.

juntang-zhuang commented 5 years ago

Hi, it occurred to me that, are you using the dataset cityscapes.py file provided in Pytorch-Encoding repo? The dataset file I used is different from their repo. Please stick to our implementation.

noahzn commented 5 years ago

Yes, I should use your cityscapes file. Thank you!