Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get greyscale annotation images? #76

Open
PennTao opened this issue Jan 23, 2018 · 4 comments
Open

how to get greyscale annotation images? #76

PennTao opened this issue Jan 23, 2018 · 4 comments

Comments

@PennTao
Copy link

PennTao commented Jan 23, 2018

The original ADE20K dataset does not provide greyscale annotation image, while the PSPNet needs greyscale annotation images for evaluation, is there are script that can convert original images o greyscale?

Or should I just add rgb2gray in eval_acc to turn all color imAnno into geryscale ?

btw, if I don't apply rgb2gray to imAnno, I will get matrix dimension mismatch error while doing IoU

@imjiangjun
Copy link

imjiangjun commented Apr 28, 2018

I met the same problem. This may be helpful:
http://groups.csail.mit.edu/vision/datasets/ADE20K/
You can download and run the tool to get the annotation images, which are index number for the colormap within png:
http://groups.csail.mit.edu/vision/datasets/ADE20K/code.zip

@qizhuli
Copy link

qizhuli commented Apr 28, 2018

rgb2grey won't work because eval_acc does not need a grey image per se; it needs an indexed image, where an index corresponds to a class ID.

@navinranjan7
Copy link

PALETTE or Colormap doesn't match with the mask (annotation) while converting the 'RGB mask' to a single channel class ID. Has anyone encountered the same problem?
I tried multiple approaches to convert to a single-channel Class ID mask.

  1. np.all(np.equal(RGB_mask, colormap[i]))
  2. cv2.inRange(RGB_mask, colormap[i], colormap[i])

@navinranjan7
Copy link

http://data.csail.mit.edu/places/ADEchallenge/ADEChallengeData2016.zip
Can download the ADEChallengeData2016 dataset with annotations for 150 classes.
https://cv.gluon.ai/build/examples_datasets/ade20k.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants