Skip to content
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

problem of visualize #155

Open
Gatswei opened this issue Aug 13, 2024 · 0 comments
Open

problem of visualize #155

Gatswei opened this issue Aug 13, 2024 · 0 comments

Comments

@Gatswei
Copy link

Gatswei commented Aug 13, 2024

Great work! I met a problem when I try to visualize. How can I solve this problem?
python demo/image_demo.py demo/demo.png local_configs/segformer/B1/segformer.b1.512x512.ade.160k.py /data/segformer.b1.512x512.ade.160k.pth --device cuda:0 --palette cityscapes
Use load_from_local loader
Traceback (most recent call last):
File "demo/image_demo.py", line 29, in
main()
File "demo/image_demo.py", line 25, in main
show_result_pyplot(model, args.img, result, get_palette(args.palette))
File "/code/SegFormer-master/mmseg/apis/inference.py", line 115, in show_result_pyplot
img = model.show_result(img, result, palette=palette, show=False)
File "/code/SegFormer-master/mmseg/models/segmentors/base.py", line 246, in show_result
assert palette.shape[0] == len(self.CLASSES)
AssertionError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant