You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
get fixed by changing the --palette cityscapes to --palette ade
I met the same problem as you @vgg4resnet, and I tried to use the cmd: python demo/image_demo.py demo/demo.png configs/swin/upernet_swin_base_patch4_window7_512x1024_80k.py checkpoint/swin_base_iter_80000.pth --device cuda:0 --palette ade
It still didn't work:
Use load_from_local loader
Traceback (most recent call last):
File "demo/image_demo.py", line 29, in <module>
main()
File "demo/image_demo.py", line 25, in main
show_result_pyplot(model, args.img, result, get_palette(args.palette))
File "/root/zsh5/foodseg/Swin-Transformer-Semantic-Segmentation/mmseg/apis/inference.py", line 115, in show_result_pyplot
img = model.show_result(img, result, palette=palette, show=False)
File "/root/zsh5/foodseg/Swin-Transformer-Semantic-Segmentation/mmseg/models/segmentors/base.py", line 246, in show_result
assert palette.shape[0] == len(self.CLASSES)
TypeError: object of type 'NoneType' has no len()
(open-mmlab) root@ncut-vServer-Evc:~/myproject/SETR# python tools/test.py configs/SETR/SETR_MLA_480x480_80k_pascal_context_bs_8_MS.py iter_80000.pth --eval mIoU --show-dir output
2021-04-19 16:36:47,064 - mmseg - INFO - Loaded 1 images
load pre-trained weight from imagenet21k
[ ] 0/1, elapsed: 0s, ETA:Traceback (most recent call last):
File "tools/test.py", line 151, in
main()
File "tools/test.py", line 128, in main
outputs = single_gpu_test(model, data_loader, args.show, args.show_dir)
File "/root/SETR/mmseg/apis/test.py", line 62, in single_gpu_test
out_file=out_file)
File "/root/SETR/mmseg/models/segmentors/base.py", line 246, in show_result
assert palette.shape[0] == len(self.CLASSES)
The text was updated successfully, but these errors were encountered: