halbielee / EPS

Official PyTorch implementation of "Railroad is not a Train: Saliency as Pseudo-pixel Supervision for Weakly Supervised Semantic Segmentation", CVPR2021
89 stars 13 forks source link

Train EPS on other dataset. #13

Closed JimmyMa99 closed 2 years ago

JimmyMa99 commented 2 years ago

I want to know about how to train EPS on coco17. I think I should get the cls_labels.npy in the file metadata/coco. Can you tell me how to transfer the official json to the .npy?

halbielee commented 2 years ago

Hello, @JimmyMa99

If you want to use another dataset (e.g., ms-coco 2017), you should know the labels for each image and make the class labels into binary vector. So, you have to get 'label list' from the json file and convert it to ".npy" file.

The official cocodataset provides how to handle the json file. Please check the official github.

JimmyMa99 commented 2 years ago

Thanks, @halbielee

I have written a tool to read the json of the coco17 dataset according to the format, maybe other researchers who wish to use your project can go to the following link to set up cls_labels.npy for the coco17 dataset. https://github.com/JimmyMa99/coco17-get-cls_label/tree/main

halbielee commented 2 years ago

How nice you are, @JimmyMa99!

I think what you did can help other researchers as you said. I will post your way to set up "cls_labels.npy" for coco17 dataset on the README file!

Thank you!