argoverse / argoverse-api

Official GitHub repository for Argoverse dataset
https://www.argoverse.org
Other
839 stars 240 forks source link

ArgoVerseMap root folder hardcoding #197

Closed venice-erin closed 3 years ago

venice-erin commented 3 years ago

Hi,

I would like to request some changes to map_api.py

  1. First, I think we could make it more flexible to assign the map_file_path in the constructor instead of hardcoding it as follows:

    ROOT = Path(__file__).resolve().parent.parent.parent  # ../../..
    MAP_FILES_ROOT = ROOT / "map_files"

    Proposed change:

    class ArgoverseMap:
    """
    This class provides the interface to our vector maps and rasterized maps. Exact lane boundaries
    are not provided, but can be hallucinated if one considers an average lane width.
    """
    
    def __init__(self, map_files_root: str = str(ROOT / 'map_files')) -> None:
        """ Initialize the Argoverse Map. """
    
        self.map_files_root = map_files_root

With that, instead of this:

xml_fpath = MAP_FILES_ROOT / f"pruned_argoverse_{city_name}_{city_id}_vector_map.xml"

we change it to this:

 xml_fpath = self.map_files_root + f"/pruned_argoverse_{city_name}_{city_id}_vector_map.xml"

Let me know if this is OK and i can raise a PR~

johnwlambert commented 3 years ago

Hi @venice-erin, thanks for your interest in Argoverse. If you think there is a clean way to do it without breaking backwards-compatibility, I'd be for it. Maybe an optional default arg is a good way to go. Are you looking to use the Argoverse map-api with data from another dataset?

benjaminrwilson commented 3 years ago

Closed due to inactivity.