how to get greyscale annotation images?
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
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
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.
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.
- np.all(np.equal(RGB_mask, colormap[i]))
- cv2.inRange(RGB_mask, colormap[i], colormap[i])
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