ViT-Adapter icon indicating copy to clipboard operation
ViT-Adapter copied to clipboard

ValueError: Unrecognized dataset: coco_stuff

Open Tsardoz opened this issue 3 years ago • 2 comments

!CUDA_VISIBLE_DEVICES=0 python image_demo.py
configs/coco_stuff164k/mask2former_beit_adapter_large_896_80k_cocostuff164k_ss.py
pretrained/mask2former_beit_adapter_large_896_80k_cocostuff164k.pth.tar
/data/sample1.jpg
--palette coco_stuff

Traceback (most recent call last): File "image_demo.py", line 58, in main() File "image_demo.py", line 42, in main model.CLASSES = get_classes(args.palette) File "/opt/conda/lib/python3.7/site-packages/mmseg/core/evaluation/class_names.py", line 133, in get_classes raise ValueError(f'Unrecognized dataset: {dataset}') ValueError: Unrecognized dataset: coco_stuff

In get_classes these are the only datasets hard coded: cityscapes, ade and voc. Do I have to embed the classes inside this script? Surely there is a better way...

Tsardoz avatar Aug 21 '22 16:08 Tsardoz

!CUDA_VISIBLE_DEVICES=0 python image_demo.py configs/coco_stuff164k/mask2former_beit_adapter_large_896_80k_cocostuff164k_ss.py pretrained/mask2former_beit_adapter_large_896_80k_cocostuff164k.pth.tar /data/sample1.jpg --palette coco_stuff

Traceback (most recent call last): File "image_demo.py", line 58, in main() File "image_demo.py", line 42, in main model.CLASSES = get_classes(args.palette) File "/opt/conda/lib/python3.7/site-packages/mmseg/core/evaluation/class_names.py", line 133, in get_classes raise ValueError(f'Unrecognized dataset: {dataset}') ValueError: Unrecognized dataset: coco_stuff

In get_classes these are the only datasets hard coded: cityscapes, ade and voc. Do I have to embed the classes inside this script? Surely there is a better way...

Hi! I think you can try 'cocostuff' not 'coco_stuff' as the dataset name.

duanduanduanyuchen avatar Aug 21 '22 16:08 duanduanduanyuchen

Thanks but that did not work either. I embedded the codes into class_names.py and it worked class_names.txt .

Tsardoz avatar Aug 21 '22 16:08 Tsardoz

添加自己的数据集的时候,请修改python环境里的mmseg下的文件,而不是项目里的mmseg文件

EchoRaven avatar Mar 10 '23 11:03 EchoRaven