instance-segmentation-pytorch icon indicating copy to clipboard operation
instance-segmentation-pytorch copied to clipboard

cityscapes annotations problem

Open jxlijunhao opened this issue 7 years ago • 1 comments

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

jxlijunhao avatar Mar 17 '18 07:03 jxlijunhao

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.

Wizaron avatar Mar 17 '18 08:03 Wizaron