VIRL-Platform / VIRL

(ECCV 2024) Code for V-IRL: Grounding Virtual Intelligence in Real Life
https://virl-platform.github.io/
313 stars 11 forks source link

How can I run the agent offline? #5

Open Simona0212 opened 1 month ago

Simona0212 commented 1 month ago

I am interested in the image data collection and processing of your excellent platform.

I notice that your project seems not providing offline configs but offline init method (in GoogleMapAPI class):

def init_offline(self, offline_cfg):
        self.panorama_dir = offline_cfg.PANORAMA_DIR
        self.mapping_path = offline_cfg.GPS_TO_PANO_PATH

        if self.panorama_dir != 'None':
            self.offline_pano = True
            print(f'Offline panorama mode is enabled. Panorama dir: {self.panorama_dir}')

        if self.mapping_path != 'None':
            self.offline_mapping = True
            print(f'Offline mapping mode is enabled. Mapping path: {self.mapping_path}')
            self.gps_to_pano_mapping = pickle.load(open(self.mapping_path, 'rb'))

        # TODO: add place information

How can I run it offline and what data and configs is required?

Additionally, can I download street view images to local from google maps with your existed pipeline and how can I make it?

Looking foward to your reply and thanks a lot!

Simona0212 commented 1 month ago

Specifically speaking, I find OFFLINE configs in tools/cfgs/base_configs/default.yaml but fail to get access to PANORAMA_DIR and GPS_TO_PANO_PATH. How can I solve it?


PLATFORM:
  STREET_VIEW:
    SIZE: [ 640, 640 ]
    HEADING: 0
    PITCH: 0
    FOV: 60
    SOURCE: outdoor

  MOVER:
    WEB_DRIVER_PATH: /home/jihan/chromedriver
    FILE_TEMPLATE: panorama_no_street_view_template
    HEADLESS: False

    # moving query mode
    STREET_VIEW_QUERY: True
    RADIUS_QUERY:
      ENABLED: True
      CONDITION_HEADING_RANGE: 30
      MAX_RADIUS: 10
      DELTA_RADIUS: 3
      DELTA_HEADING: 45
      HEADING_RANGE: 20

  OFFLINE:
    ENABLED: False
    # for get street view
    PANORAMA_DIR: None # /data/projects/VIRL_internal/output/snapshot/vln/all_panos
    # for relocating points to panorama id
    GPS_TO_PANO_PATH: None # /data/projects/VIRL_internal/output/snapshot/vln/gps_pano_mapping.pkl
    # If the distance between two points is less than this value, 
    # they are considered the same point.
    # Otherwise, will call the online method.
    MAPPING_RADIUS: 5

    # TODO: for nearby search
    place_info_path: None
jihanyang commented 1 month ago

Thanks for your question. I will write guidelines for this part.