Closed ksindwan closed 3 years ago
What do you exactly mean by not working? As per your output, I believe your result images are in result_demo/
folder (did you check it ?). Based on what you have pasted, demo.py
did what it is suppose to do.
_"unexpected key in source state_dict: mask_head.0.conv_res.conv.weight, mask_head.0.conv_res.conv.bias, mask_head.1.conv_res.conv.weight, mask_head.1.conv_res.conv.bias, mask_head.2.conv_res.conv.weight, mask_head.2.convres.conv.bias"
What does this mean ?
It is a warning and the reason is -> The model and loaded state dict do not match exactly
. I am not sure which pre-trained model are you using, but probably your mask head is used during training and not available for testing/demo etc.
I am using this model _"CascadeRCNNCPmodel.pth.stu". This file only consists of the weights and not the architecture, right ?
Thanks for your error report and we appreciate it a lot.
Checklist
Describe the bug A clear and concise description of what the bug is.
['demo/1.png', 'demo/3.png', 'demo/2.png'] The model and loaded state dict do not match exactly
unexpected key in source state_dict: mask_head.0.conv_res.conv.weight, mask_head.0.conv_res.conv.bias, mask_head.1.conv_res.conv.weight, mask_head.1.conv_res.conv.bias, mask_head.2.conv_res.conv.weight, mask_head.2.conv_res.conv.bias
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 3/3, 0.5 task/s, elapsed: 6s, ETA: 0s /content/Pedestron/tools/../mmdet/apis/inference.py:39: UserWarning: Class names are not saved in the checkpoint's meta data, use COCO classes by default. warnings.warn('Class names are not saved in the checkpoint\'s ' /usr/local/lib/python3.7/site-packages/torch/nn/functional.py:2479: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. "See the documentation of nn.Upsample for details.".format(mode))
Reproduction
Environment
$PATH
,$LD_LIBRARY_PATH
,$PYTHONPATH
, etc.)Error traceback If applicable, paste the error trackback here.
Bug fix If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!