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

Questions about the Good Semantics to localize experiment(Fig 10.) #40

Open
99angpaka opened this issue Nov 17, 2023 · 1 comment
Open

Comments

@99angpaka
Copy link

Hello, Sarlin. your research is very intersting! Thank you for your good research.

However, I asked a question about the experimental design of "Good Semantics to localize".
loca

As described in the "which map elements are most important? section in the Appendix, how did you experiment by removing objects?

Exactly, I want to know how you removed each element from the map and I also want to ask if it is included in the code.

Thank you.

@sarlinpe
Copy link
Collaborator

sarlinpe commented Nov 20, 2023

This figure was generated by running the MGL evaluation and successively masking out each of the different classes with the mask_index argument:

mask_index: Optional[Tuple[int]] = None,

if mask_index is not None:
mask = batch["map"][0, mask_index[0]] == (mask_index[1] + 1)
batch["map"][0, mask_index[0]][mask] = 0

It is a tuple (index_type, index_class) where index_type$\in\{0,1,2\}$ (areas, ways, or nodes), and index_class is the index of the class in the list of the corresponding type maploc.osm.parser.Groups.[areas|ways|nodes]:

class Groups:
areas = list(Patterns.areas)
ways = list(Patterns.ways)
nodes = list(Patterns.nodes)

Results for each class can thus be obtained with:

from maploc.evaluation.mapillary import run

results = {}
for index_type, classes in enumerate((Groups.areas, Groups.ways, Groups.types)):
    for index_class, class_name in enumerate(classes):
        results[class_name] = run(..., mask_index=(index_type, index_class))

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