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

Trying to reduce the number of classes of Mseg #32

Open
jdavidd opened this issue May 6, 2021 · 0 comments
Open

Trying to reduce the number of classes of Mseg #32

jdavidd opened this issue May 6, 2021 · 0 comments

Comments

@jdavidd
Copy link

jdavidd commented May 6, 2021

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:

  • When you said add 'crosswalk' to universal taxonomy you refer to add a new line in MSeg_master.tsv for this class? I should do this also for, curb (curb, curb cut)? are there other files, i should change?

  • I want to keep only 64 classes, so this means I only remove them (their lines) from MSeg_master.tsv and add to final line to unlabeled, and also modify the tsv file for every dataset (ex. ade20k-151_to_ade20k-150.tsv and ade20k-151_to_ade20k-150-relabeled.tsv).

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.

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

1 participant