-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do use the pretrained models of ICNet that are provided? #125
Comments
Hi, @gshdong .
Then run |
@adam9500370 I run python validate.py --config icnet_cityscapes.yml --model_path icnet_cityscapes_train_30k.pth that is provided by you for validation. However, I get only 0.0198757906223 miou. How do I get your 65.86 miou. I'm confused. |
https://github.com/meetshah1995/pytorch-semseg/blob/4778145c7179bd14be034a35baf7dca3b85c81f2/validate.py#L35-L41 And replace https://github.com/meetshah1995/pytorch-semseg/blob/6efd0b5baf11cb11f828390c24a5d10808a6e51c/validate.py#L40 with |
@adam9500370 I set img_norm=False and version="pascal" arguments in cityscapes_loader.py. However, I get 0.0516289067284 miou. I don't know what's wrong. Can you send me your successful code, my email is [email protected]. Thank you very much! |
https://github.com/meetshah1995/pytorch-semseg/blob/6efd0b5baf11cb11f828390c24a5d10808a6e51c/ptsemseg/models/icnet.py#L182 And you can create a config file (icnet_cityscapes.yml) as the followings:
|
@adam9500370 Thank you very much for helping me solve this problem. This problem is caused by different pytorch versions. I change my pytorch from 0.4 to 0.3. I get 66+% miou. Thank you again! |
@adam9500370 Do you train the ICNet models by yourself now? Could you please share how you trained ICNet models? |
No, I don't train ICNet models by myself. Maybe you can refer to original paper for more details.
|
Ok, thank you very much! |
HI @adam9500370 Thank you so much for the pretrained models and the implementation. I wanted to use the same for an interim step in another learning task. I proceeded as follows:
python3 test.py --model_path /home/ambareesh/Project_276C/gym_torcs/DDPG_PyTorch_Vanilla/pytorch-semseg/icnetBN_cityscapes_trainval_90k_bn.pth --dataset camvid --img_path _11.jpeg I got the following error: Read Input Image from : _11.jpeg I'm guessing there was a size mismatch (saved model has 19 classes whereas the data loader is trying to get 12?) because of the "--dataset" option. So I hardcoded this in test.py: and ran the same command again to get the following error /usr/local/lib/python3.6/dist-packages/scipy/misc/pilutil.py:482: FutureWarning: Conversion of the second argument of issubdtype from Question: If so, where do I change the image size in the model? (to make sure that one of your pre-trained models works out of the box for me) I am not very concerned about the accuracy of the model, I am using it for feature extraction, planning to extract the encoded layer in between, after everything starts to work. Thank you! |
Because You can refer to my previous comment to solve the second error. |
@gshdong Hi, have you trained the ICNet yourself? And would you mind sharign how's the performance? |
@adam9500370 Thank you for getting back! I tried your suggestion, but I seem to have some trouble with the dataloader part. The error seems to be the one mentioned here, so I'm assuming I haven't configured the dataset path clearly. I had downloaded this dataset leftImg8bit_trainvaltest.zip (11GB) [md5] from the specified link. Is there some path variable I need to modify? I am using the model for test i.e a single forward pass(or eval mode), and hence the command I'm using (from the repo readme) is: P.S - The error specifically is in this line from cityscapes_loader.py (line 82) |
Because of this commit, it seems that
|
@meetshah1995 @adam9500370 The pretrained models of ICNet come from #81. I do not how to use.
The text was updated successfully, but these errors were encountered: