ZiqinZhou66 / ZegCLIP

Official implement of CVPR2023 ZegCLIP: Towards Adapting CLIP for Zero-shot Semantic Segmentation
MIT License
195 stars 17 forks source link

Zero-Shot on ADE20k #8

Open Maddy12 opened 1 year ago

Maddy12 commented 1 year ago

Because other approaches like ODISE and Mask2Former evaluate on ADE20k, I was wondering if there was a script or summary of instructions on how to evaluate on cross-dataset on ADE20k-150?

Thanks so much!

ZiqinZhou66 commented 1 year ago

I appreciate your interest in our work.

Thanks to the MMSeg toolkit, our model can be easily tested on ADE20K-150 by following these step:

  1. Write 'configs/base/datasets/dataloader/ade.py' based on the '/Path/to/site-packages/mmseg/datasets/ade.py'. The evaluation function needed to be modified for better display.
  2. Write 'configs/open_vocabulary/coco-to-ade.py'. Please refer to the script 'configs/cross_dataset/coco-to-context.py'.
  3. If desired, prepare the text embeddings of ADE20K for faster inference using 'configs/base/datasets/text_embedding/get_embedding.ipynb'.
  4. Ensure that the ADE20K dataset is prepared in MMSeg format.
  5. Run this command for evaluation on ADE20K: python test.py ./configs/cross_dataset/coco-to-ade.py Path/to/coco/vpt_seg_zero_80k_12_100_multi/iter_80000.pth --eval=mIoU

We hope that these steps will be helpful for testing our model on ADE20K-150 using the MMSeg toolkit.