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

cityscapes annotations problem #8

Open
jxlijunhao opened this issue Mar 17, 2018 · 1 comment
Open

cityscapes annotations problem #8

jxlijunhao opened this issue Mar 17, 2018 · 1 comment

Comments

@jxlijunhao
Copy link

Hi,
I'm not understand why you set all instance id to 1,
cleaned_db_instance_annotation = np.stack(cleaned_db_instance_annotation, axis=2) instance_annotation = cleaned_db_instance_annotation.copy() instance_annotation[instance_annotation != 0] = 1

@Wizaron
Copy link
Owner

Wizaron commented Mar 17, 2018

Hey,

instance_annotation is a numpy array of shape (image_height, image_width, number_of_instances) and stores instance annotations as a one-hot vector at each channel.
semantic_annotation is a numpy array of shape (image_height, image_width) and stores semantic class indexes.

cleaned_db_instance_annotation at line 149 is a numpy array of shape (image_height, image_width, number_of_instances) and each channel stores instance annotations with their semantic class index.

Therefore, I converted cleaned_db_instance_annotation to one-hot instance_annotation at line 153.

Also, I did not experiment with cityscapes dataset yet. There may be bugs in dataset creation procedure.

Thanks.

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

2 participants