CircleRadon / Osprey

[CVPR2024] The code for "Osprey: Pixel Understanding with Visual Instruction Tuning"
Apache License 2.0
744 stars 42 forks source link

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

Open koda-11 opened 7 months ago

koda-11 commented 7 months ago

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 commented 7 months ago

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.