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

error report when evaluate Open-Vocabulary Segmentation for cityscapes #16

Open
koda-11 opened this issue Feb 7, 2024 · 1 comment
Open

Comments

@koda-11
Copy link

koda-11 commented Feb 7, 2024

Hello,

when i try to evaluate Open-Vocabulary Segmentation for cityscapes, there are some following errors

[02/07 15:28:29 detectron2]: Start inference on 500 batches
0it [00:14, ?it/s]
Traceback (most recent call last):
File "/home/user/workspace/Osprey/osprey/eval/eval_open_vocab_seg_detectron2.py", line 634, in
evaluator.process(inputs, outputs)
File "/home/user/workspace/Osprey/detectron2/detectron2/evaluation/evaluator.py", line 88, in process
evaluator.process(inputs, outputs)
File "/home/user/workspace/Osprey/detectron2/detectron2/evaluation/cityscapes_evaluation.py", line 75, in process
class_id = name2label[classes].id
KeyError: 'car,cars'

I finished setup as https://github.com/CircleRadon/Osprey/blob/main/osprey/eval/README.md#:~:text=1.-,Open%2DVocabulary%20Segmentation,-Download%20SentenceBERT%20model

and data preparation as well done.
https://github.com/CircleRadon/Osprey/blob/main/osprey/eval/datasets/README.md

thanks.

@CircleRadon
Copy link
Owner

Hi, @koda-11. You can add a line classes = classes.split(‘,’)[0] at line 74, where the error is raised,
in detectron2/detectron2/evaluation/cityscapes_evaluation.py and it works.

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

2 participants