Argoverse2¶
Argoverse2 dataset management module aiming to access sensor data through log ids.
city:
"ATX": "Austin, Texas"
"DTW": "Detroit, Michigan"
"MIA": "Miami, Florida"
"PAO": "Palo Alto, California"
"PIT": "Pittsburgh, PA"
"WDC": "Washington, DC"
city origin:
"ATX": (30.27464237939507, -97.7404457407424)
"DTW": (42.29993066912924, -83.17555750783717)
"MIA": (25.77452579915163, -80.19656914449405)
"PAO": (37.416065, -122.13571963362166)
"PIT": (40.44177902989321, -80.01294377242584)
"WDC": (38.889377, -77.0355047439081)
Functions¶
Module Level¶
- scene_point_etk.argoverse2.set_sensor_root(sensor_root=None, overwrite=True)¶
Module-level function to initialize and setup the Argoverse2 sensor dataset root directory and log id mapping.
Directory structure example:
<sensor_root> ├── 00a6ffc1-6ce9-3bc3-a060-6006e9893a1a <- log_id │ ├── annotations.feather │ ├── calibration │ ├── city_SE3_egovehicle.feather │ ├── map │ └── ... (1 more files) ├── 01bb304d-7bd8-35f8-bbef-7086b688e35e ├── 022af476-9937-3e70-be52-f65420d52703 └── ...Parameters:
- sensor_root (str | None, optional):
Root directory of the Argoverse2 dataset. If None, the value from scene_point_etk/config.json is used.
- overwrite (bool | True, optional):
If True, update scene_point_etk/config.json with the provided sensor_root.
Log IDs¶
- scene_point_etk.argoverse2.check_log_id(log_id)¶
Check if the log id can be located by this module.
For Example:
>> import scene_point_etk.argoverse2 as av2 # the log id without '-' >> log_id = "00a6ffc16ce93bc3a0606006e9893a1a" >> av2.set_sensor_root(sensor_root="a correct directory") >> av2.check_log_id(log_id) # no error >> av2.set_sensor_root(sensor_root="an incorrect directory") >> av2.check_log_id(log_id) "ValueError: Log id 00a6ffc16ce93bc3a0606006e9893a1a not found" >> log_id = "non_existing_log_id" >> av2.set_sensor_root(sensor_root="a correct directory") >> av2.check_log_id(log_id) "ValueError: Log id non_existing_log_id not found"
- scene_point_etk.argoverse2.list_log_ids()¶
list over all available log ids
- scene_point_etk.argoverse2.list_log_ids_by_mode(mode='test')¶
list over all available log_ids for a category: ‘train’, ‘val’, ‘test’
- scene_point_etk.argoverse2.get_city_from_log_id(log_id)¶
Cities¶
- scene_point_etk.argoverse2.check_city(city)¶
- scene_point_etk.argoverse2.list_cities()¶
- scene_point_etk.argoverse2.get_log_ids_from_city(city)¶
Images and Cameras¶
- scene_point_etk.argoverse2.list_cameras_by_log_id(log_id)¶
Lidar Sweeps¶
- scene_point_etk.argoverse2.list_sweep_files_by_log_id(log_id)¶
Classes¶
Images and Cameras¶
- class scene_point_etk.argoverse2.ImageSequence(log_id, camera='ring_front_center')¶
- get_an_image(index)¶
get an image as a HxWx3 numpy array by an integer index.
- property figsize¶
Return the figure size as (height, width).
- property intrinsic¶
Return the intrinsic matrix as a 3x3 numpy array.
- property extrinsic¶
Return the extrinsic matrices as a Nx4x4 numpy array.
- resize(H, W)¶
Return a resized copy of the image sequence with new height H and width W.
- get_a_depth_map(index, points, invalid_value=-1, min_distance=0.0, max_distance=inf, return_details=False)¶
Get a depth map as a HxW numpy array by an integer index and 3D points.
Args:
- index (int):
index of the image in the sequence.
- points (np.ndarray):
Nx3 array of 3D points in world coordinates.
- invalid_value (float | nan):
value to assign to pixels where no points project.
- min_distance (float):
minimum distance from the camera to consider a point valid.
- max_distance (float):
maximum distance from the camera to consider a point valid.
- return_details (bool):
whether to return additional details as a dictionary.
Returns:
- depth_map (np.ndarray):
HxW array representing the depth map.
- details (dict, optional):
additional details if return_details is True.
- align_timestamps(timestamps)¶
Return a copy of the Timestamps with rows aligned to the given timestamps.
- class scene_point_etk.argoverse2.CameraSequence(log_id, cameras=['ring_front_center', 'ring_front_left', 'ring_front_right', 'ring_rear_left', 'ring_rear_right', 'ring_side_left', 'ring_side_right', 'stereo_front_left', 'stereo_front_right'])¶
- align_timestamps(timestamps)¶
Return a copy of the CameraSequence with cameras aligned to the given timestamps.
Lidar Sweeps¶
- class scene_point_etk.argoverse2.Sweep(path, coordinate='map')¶
- class scene_point_etk.argoverse2.SweepSequence(log_id, coordinate='map')¶
3D Annotations¶
- class scene_point_etk.argoverse2.Annotations(log_id, coordinate='map')¶