wkentaro / imgviz

Image Visualization Tools (object detection, semantic and instance segmentation)

Home Page:https://imgviz.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enhancement: make specific label transparant in semantic visualization

penguinflys opened this issue · comments

there are background classes In most semantic segmentation tasks, which is not necessary to be visualized, I think it would be great if there is an option to pass transparent ids

I will contribute the code if it is okay

Sounds good. Maybe the alpha parameter in label2rgb could be modified as a list or a dict. What are your thoughts?

Yes, good proposal

  1. I think it is safe to add the option of transparent_ids as a list, and set it default as None. This might makes the function too redundant.
  2. Your suggestion is also good, we just need to handle the input with isinstance(alpha, float), then cast it to be a list by default.

Which method do you prefer? I prefer your solution

I agree with you.

A pull request is already pushed, please review