Open jxlijunhao opened 6 years ago
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.
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