-
Notifications
You must be signed in to change notification settings - Fork 223
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
Error in visualization of CWD test results. #52
Comments
you can change File "/home/sunshiding/mmsegmentation-master/mmseg/models/segmentors/base.py", line 242, in show_result |
Thanks for your issue. This is probably due to the fact that the |
Could you please modify |
Thank you very much, this problem has been solved perfectly. |
* [Refactor] add enum class and use functions to get configuration (open-mmlab#40) * add task and codebase enum class * use funcitons to get config * Refactor wrappers of mmcls and mmseg (open-mmlab#41) * move wrappers of cls & det to apis * remove get_classes_from_config * rename onnx_helper to onnx_utils * move import to outside of class * refactor ortwrappers * Refactor build dataset and dataloader for mmseg (open-mmlab#44) * refactor build_dataset and build_dataloader for mmcls and mmseg * remove repeated classes * set build_dataloader with shuffle=False * [Refactor] pplwrapper and mmocr refactor (open-mmlab#46) * add * add pplwrapper and refactor mmocr * fix lint * remove unused arguments * apply dict input for pplwrapper and ortwrapper * add condition before import ppl and ort stuff * update ppl (open-mmlab#51) * Refactor return value and extract_model (open-mmlab#54) * remove ret_value * refactor extract_model * fix typo * resolve comments * [Refactor] Refactor model inference pipeline (open-mmlab#52) * move attribute_to_dict to extract_model * simplify the inference and visualization * remove unused import * [Feature] Support SRCNN in mmedit with ONNXRuntime and TensorRT (open-mmlab#45) * finish mmedit-ort * edit __init__ files * add noqa * add tensorrt support * 1. Rename "base.py" 2. Move srcnn.py to correct directory * fix bugs * remove figures * align to refactor-v1 * update comment in srcnn * fix lint * newfunc -> new_func * Add visualize.py split visualize() in each codebase * fix lint * fix lint * remove unnecessary code in ORTRestorer * remove .api * edit super(), remove dataset * [Refactor]: Change name of split to partition (open-mmlab#57) * refactor mmcls configs * refactor mmdet configs and split params * rename rest split to partition from master * remove base.py * fix init of inference class * fix mmocr init, add show_result alias Co-authored-by: AllentDan <41138331+AllentDan@users.noreply.github.com> Co-authored-by: RunningLeon <maningsheng@sensetime.com> Co-authored-by: Yifan Zhou <singlezombie@163.com>
I get an error when I execute the following command:
python tools/mmseg/test_mmseg.py /home/sunshiding/mmrazor/work_dirs/cwd_cls_head_pspnet_r50_d8_pspnet_r18_d8_512x512_voc12/cwd_cls_head_pspnet_r50_d8_pspnet_r18_d8_512x512_voc12.py /home/sunshiding/mmrazor/work_dirs/cwd_cls_head_pspnet_r50_d8_pspnet_r18_d8_512x512_voc12/iter_4000.pth --show-dir ./results/cwd_cls_head_pspnet_r50_d8_pspnet_r18_d8_512x512_voc12
The error is as follows:
load checkpoint from local path: /home/sunshiding/mmrazor/work_dirs/cwd_cls_head_pspnet_r50_d8_pspnet_r18_d8_512x512_voc12/iter_4000.pth
[ ] 0/115, elapsed: 0s, ETA:Traceback (most recent call last):
File "tools/mmseg/test_mmseg.py", line 248, in
main()
File "tools/mmseg/test_mmseg.py", line 210, in main
format_args=eval_kwargs)
File "/home/sunshiding/mmsegmentation-master/mmseg/apis/test.py", line 140, in single_gpu_test
opacity=opacity)
File "/home/sunshiding/.conda/envs/razor/lib/python3.7/site-packages/mmrazor/models/algorithms/base.py", line 170, in show_result
return self.architecture.show_result(img, result, **kwargs)
File "/home/sunshiding/.conda/envs/razor/lib/python3.7/site-packages/mmrazor/models/architectures/base.py", line 41, in show_result
return self.model.show_result(img, result, **kwargs)
File "/home/sunshiding/mmsegmentation-master/mmseg/models/segmentors/base.py", line 242, in show_result
assert palette.shape[0] == len(self.CLASSES)
File "/home/sunshiding/.conda/envs/razor/lib/python3.7/site-packages/torch/nn/modules/module.py", line 779, in getattr
type(self).name, name))
torch.nn.modules.module.ModuleAttributeError: 'EncoderDecoder' object has no attribute 'CLASSES'
The text was updated successfully, but these errors were encountered: