dingjiansw101 / ZegFormer

Official code for "Decoupling Zero-Shot Semantic Segmentation"
Other
163 stars 4 forks source link

Running inference without downloading the datasets #11

Closed rsadiq closed 2 years ago

rsadiq commented 2 years ago

Hi, Thank you for the amazing work, Is there a way to get predictions on a new test image without downloading the whole datsets ? e.g when I run python3 demo/demo.py --config-file configs/coco-stuff/zegformer_R101_bs32_60k_vit16_coco-stuff_gzss_eval.yaml --input figures/dumy.png --output figures/dumdum.png --opts MODEL.WEIGHTS checkpoints/zegformer_R101_bs32_60k_vit16_coco-stuff.pt I get the error message FileNotFoundError: [Errno 2] No such file or directory: 'datasets/coco/coco_stuff/split/seen_classnames.json'

Can I have these seen_classnames.json files, like the .npy files you have uploaded? Or Can you explain the format of expected .json files so I can generate myself?

dingjiansw101 commented 2 years ago

Hi, you can refer to these files. https://github.com/dingjiansw101/ZegFormer/blob/main/datasets/coco-stuff/create_cocostuff_class_names_json.py https://github.com/dingjiansw101/ZegFormer/blob/main/datasets/ade20k-full-frequency-split/create_ade-frequency_json.py You may not need to download the whole datasets, and just run the python script. The json files contain classe names. You can define the class names and generate the json by yourself.

rsadiq commented 2 years ago

Thanks.