mseg-dataset / mseg-api

An Official Repo of CVPR '20 "MSeg: A Composite Dataset for Multi-Domain Segmentation"
Other
249 stars 45 forks source link

Trying to reduce the number of classes of Mseg #32

Open jdavidd opened 3 years ago

jdavidd commented 3 years ago

Hi, @johnwlambert I want to make something similar with the dataset (as mentioned by someone in the issues, who wanted to add crosswalk), but also add curb and curb cut. So for this until now i figured out, that I should modify the tsv files of dataset you mentioned above. But I dont know if this is complete, so I have two questions:

Until now I changed MSeg_master.tsv to have my selected classes, and move the other to unlabeled, and then also changed the state in every 'name_of_dataset.tsv' to unlabeled for the deleted one. I run, remap functions and everything works ok. But when I try to relabel, on ade_20k it worked, but stopped on BDD. When I run with old bdd.tsv works, with the new tsv it catch an assert:

File "/home/ubuntu/data/datasets/mseg/mseg_files/mseg-api/mseg/utils/mask_utils.py", line 920, in swap_px_inside_mask assert np.allclose(np.unique(label_img[y,x]), np.array([old_val], dtype=np.uint8))

This is the new bdd.tsv: bdd bdd-relabeled building building road road sidewalk sidewalk_pavement terrain terrain person unlabeled rider rider_other traffic sign traffic_sign traffic light traffic_light sky sky pole unlabeled fence unlabeled vegetation vegetation bicycle bicycle car car motorcycle motorcycle bus bus train unlabeled truck unlabeled wall wall unlabeled unlabeled

Waiting for you response.