Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d7cd500
mini
lanbo-xiao Aug 13, 2025
cd9f578
merge
lanbo-xiao Aug 13, 2025
a4f664e
finish kitti360v0.0.1
lanbo-xiao Aug 15, 2025
5b8a207
delete exp/*
lanbo-xiao Aug 15, 2025
0db8c31
fix hydra and other bugs
lanbo-xiao Aug 15, 2025
195080b
merge vis
lanbo-xiao Aug 15, 2025
2d129ee
add pose calibration to align with nuplan
lanbo-xiao Aug 17, 2025
7dd70e6
add pose calibration to align with nuplan
lanbo-xiao Aug 17, 2025
29d9a9d
conflict merge
lanbo-xiao Aug 17, 2025
7110af5
finish dynamic car and static car remains some bug(start and end frame)
lanbo-xiao Aug 18, 2025
26ab014
confict merge
lanbo-xiao Aug 18, 2025
778604d
nearly done kitti_360 but remains some questions
lanbo-xiao Aug 19, 2025
94bc3f4
nearly done kitti_360 but remains some questions
lanbo-xiao Aug 19, 2025
925088d
conflict merge
lanbo-xiao Aug 20, 2025
d1945b0
finish lidar vis and fix some bugs
lanbo-xiao Aug 21, 2025
8669052
merge
lanbo-xiao Aug 24, 2025
62654f3
fix ego_yaw_pitch_roll and get good results in lidar viser
lanbo-xiao Aug 25, 2025
9e87fdd
merge dev_v0.0.7
lanbo-xiao Aug 26, 2025
48b11a9
finish preprocess detection script
lanbo-xiao Aug 27, 2025
ac7fc40
stop tracking jbwang_test script
lanbo-xiao Aug 28, 2025
3dee323
merge dev_v0.0.7
lanbo-xiao Aug 28, 2025
b4d06bd
ready to push
lanbo-xiao Aug 28, 2025
4c12d3d
add fisheyecamera
lanbo-xiao Aug 29, 2025
ccbe592
merge
lanbo-xiao Aug 29, 2025
343092d
merge dev_v0.0.7
lanbo-xiao Sep 14, 2025
4241723
refactor camera.py, create base CameraMetadata and rename origin into…
lanbo-xiao Sep 14, 2025
21f1dcb
add map convert, fix 0004 detection, interpolate dynamic
lanbo-xiao Sep 24, 2025
ad9d33f
only extract timestamp that exists in ego_pose.txt
lanbo-xiao Sep 30, 2025
3eca22e
merge dev_v0.0.7 into kitti360
lanbo-xiao Sep 30, 2025
5c95ecb
merge dev_v0.0.7 into kitti360
lanbo-xiao Sep 30, 2025
5bf2e5a
merge dev_0.0.7 into kitti360 and makes kitti360 compatible with exis…
lanbo-xiao Sep 30, 2025
61bb001
merge dev_v0.0.7 into kitti360
lanbo-xiao Oct 10, 2025
79cb5cd
merge dev_v0.0.7 into kitti360
lanbo-xiao Oct 11, 2025
35962da
refactor kitti360 log_writer and incorporate fisheye camera
lanbo-xiao Oct 14, 2025
4621265
merge dev_v0.0.7 into kitti360
lanbo-xiao Oct 15, 2025
24f4dc4
merge dev_v0.0.7 into kitti360 to align codebase
lanbo-xiao Oct 15, 2025
e189c65
refactor kitti360
lanbo-xiao Oct 16, 2025
9b6473f
refactor kitti360
lanbo-xiao Oct 16, 2025
2785e00
merge dev_v0.0.7 into kiiti360
lanbo-xiao Oct 16, 2025
da8fd0c
merge dev_v0.0.7 into kitti360
lanbo-xiao Oct 28, 2025
230c034
merge dev_v0.0.7 into kitti360
lanbo-xiao Oct 29, 2025
7a5589e
Merge branch 'dev_v0.0.7' into kitti360_0.0.1
lanbo-xiao Oct 29, 2025
7e12332
merge dev_v0.0.7 into kitti360 (lidar related)
lanbo-xiao Oct 29, 2025
d70531f
Merge branch 'dev_v0.0.7' into kitti360_v0.0.1
DanielDauner Oct 31, 2025
867bd3e
Reformatting, testing, modifying vehicle parameters, and changing the…
DanielDauner Nov 1, 2025
a80de1d
Remove the underscore for consistent `kitti360` naming in the package.
DanielDauner Nov 1, 2025
0455f90
Extract 3D road edges for kitti, and a few minor general changes.
DanielDauner Nov 2, 2025
fbd431b
Implement fisheye cameras as separate modality. General refactorings …
DanielDauner Nov 3, 2025
c40ade5
Fixing a few issues not related to KITTI. Testing all dataset (workin…
DanielDauner Nov 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
*.csv
*.log
*.mp4

exp/

# Sphinx documentation
docs/_build/
docs/build/
_build/
.doctrees/

jbwang_*
10 changes: 5 additions & 5 deletions docs/datasets/kitti-360.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ KiTTI-360
:alt: Dataset sample image
:width: 290px

| **Paper:** `Name of Paper <https://example.com/paper>`_
| **Download:** `Documentation <https://example.com/paper>`_
| **Code:** [Code]
| **Documentation:** [License type]
| **Paper:** `KITTI-360: A Novel Dataset and Benchmarks for Urban Scene Understanding in 2D and 3D <https://arxiv.org/pdf/2109.13410>`_
| **Download:** `www.cvlibs.net/datasets/kitti-360 <https://www.cvlibs.net/datasets/kitti-360/user_login.php>`_
| **Code:** `www.github.com/autonomousvision/kitti360Scripts <https://github.com/autonomousvision/kitti360Scripts>`_
| **Documentation:** `kitti-360 Document<https://www.cvlibs.net/datasets/kitti-360/documentation.php>`_
| **License:** [License type]
| **Duration:** [Duration here]
| **Duration:** 320k image
| **Supported Versions:** [Yes/No/Conditions]
| **Redistribution:** [Yes/No/Conditions]

Expand Down
161 changes: 21 additions & 140 deletions notebooks/bev_matplotlib.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"\n",
"\n",
"from py123d.common.multithreading.worker_sequential import Sequential\n",
"# from py123d.datatypes.sensors.camera.pinhole_camera import PinholeCameraType "
"# from py123d.datatypes.sensors.pinhole_camera import PinholeCameraType "
]
},
{
Expand All @@ -22,35 +22,31 @@
"metadata": {},
"outputs": [],
"source": [
"\n",
"# splits = [\"wopd_val\"]\n",
"splits = [\"kitti360\"]\n",
"# splits = [\"nuscenes-mini_val\", \"nuscenes-mini_train\"]\n",
"# splits = [\"nuplan-mini_test\", \"nuplan-mini_train\", \"nuplan-mini_val\"]\n",
"# splits = [\"nuplan_private_test\"]\n",
"# splits = [\"carla_test\"]\n",
"splits = [\"nuscenes-mini_val\", \"nuscenes-mini_train\"]\n",
"# splits = [\"av2-sensor-mini_train\"]\n",
"# splits = [\"pandaset_train\"]\n",
"# log_names = None\n",
"\n",
"\n",
"\n",
"# splits = [\"wopd_val\"]\n",
"# splits = [\"av2-sensor_train\"]\n",
"# splits = [\"pandaset_test\", \"pandaset_val\", \"pandaset_train\"]\n",
"log_names = None\n",
"scene_uuids = None\n",
"\n",
"scene_filter = SceneFilter(\n",
" split_names=splits,\n",
" log_names=log_names,\n",
" scene_uuids=scene_uuids,\n",
" duration_s=None,\n",
" duration_s=30.0,\n",
" history_s=0.0,\n",
" timestamp_threshold_s=20,\n",
" timestamp_threshold_s=30.0,\n",
" shuffle=True,\n",
" # camera_types=[CameraType.CAM_F0],\n",
" # camera_types=[PinholeCameraType.CAM_F0],\n",
")\n",
"scene_builder = ArrowSceneBuilder()\n",
"worker = Sequential()\n",
"# worker = RayDistributed()\n",
"scenes = scene_builder.get_scenes(scene_filter, worker)\n",
"\n",
"print(f\"Found {len(scenes)} scenes\")"
"print(f\"Found {len(scenes)} scenes\")\n"
]
},
{
Expand Down Expand Up @@ -117,9 +113,9 @@
")\n",
"\n",
"ROAD_EDGE_CONFIG: PlotConfig = PlotConfig(\n",
" fill_color=DARKER_GREY.set_brightness(0.0),\n",
" fill_color=DARKER_GREY,\n",
" fill_color_alpha=1.0,\n",
" line_color=DARKER_GREY.set_brightness(0.0),\n",
" line_color=DARKER_GREY,\n",
" line_color_alpha=1.0,\n",
" line_width=1.0,\n",
" line_style=\"-\",\n",
Expand Down Expand Up @@ -148,10 +144,10 @@
" # MapLayer.LANE,\n",
" MapLayer.LANE_GROUP,\n",
" MapLayer.GENERIC_DRIVABLE,\n",
" # MapLayer.CARPARK,\n",
" MapLayer.CARPARK,\n",
" # MapLayer.CROSSWALK,\n",
" # MapLayer.INTERSECTION,\n",
" # MapLayer.WALKWAY,\n",
" MapLayer.WALKWAY,\n",
" MapLayer.ROAD_EDGE,\n",
" MapLayer.ROAD_LINE,\n",
" ]\n",
Expand Down Expand Up @@ -220,10 +216,10 @@
"\n",
" point_2d = ego_vehicle_state.bounding_box.center.state_se2.point_2d\n",
" if map_api is not None:\n",
" # add_debug_map_on_ax(ax, scene.get_map_api(), point_2d, radius=radius, route_lane_group_ids=None)\n",
" add_debug_map_on_ax(ax, scene.get_map_api(), point_2d, radius=radius, route_lane_group_ids=None)\n",
"\n",
"\n",
" add_default_map_on_ax(ax, map_api, point_2d, radius=radius, route_lane_group_ids=None)\n",
" # add_default_map_on_ax(ax, map_api, point_2d, radius=radius, route_lane_group_ids=None)\n",
" # add_traffic_lights_to_ax(ax, traffic_light_detections, scene.get_map_api())\n",
"\n",
" add_box_detections_to_ax(ax, box_detections)\n",
Expand Down Expand Up @@ -256,7 +252,8 @@
"scene = np.random.choice(scenes)\n",
"_plot_scene_on_ax(ax, scene, iteration, radius=80)\n",
"# _plot_scene_on_ax(ax[1], scene, iteration, radius=50)\n",
"# _plot_scene_on_ax(ax[2], scene, iteration, radius=100)\n",
"# _plot_scene_on_ax(ax[2], scene, iteration,\n",
"# radius=100)\n",
"\n",
"plt.show()"
]
Expand Down Expand Up @@ -285,115 +282,7 @@
"id": "4",
"metadata": {},
"outputs": [],
"source": [
"import shapely\n",
"from py123d.conversion.utils.map_utils.road_edge.road_edge_2d_utils import get_road_edge_linear_rings\n",
"\n",
"# from py123d.conversion.utils.map_utils.road_edge.road_edge_3d_utils import lift_road_edges_to_3d\n",
"from py123d.conversion.utils.map_utils.road_edge.road_edge_3d_utils import (\n",
" _interpolate_z_on_segment,\n",
" _split_continuous_segments,\n",
")\n",
"from py123d.geometry.geometry_index import Point3DIndex\n",
"from py123d.geometry.occupancy_map import OccupancyMap2D\n",
"from py123d.geometry.polyline import Polyline3D\n",
"\n",
"\n",
"fix, ax = plt.subplots()\n",
"\n",
"\n",
"def lift_outlines_to_3d(\n",
" outlines_2d: List[shapely.LinearRing],\n",
" boundaries: List[Polyline3D],\n",
" max_distance: float = 10.0,\n",
") -> List[Polyline3D]:\n",
" \"\"\"Lift 2D road edges to 3D by querying elevation from boundary segments.\n",
"\n",
" :param road_edges_2d: List of 2D road edge geometries.\n",
" :param boundaries: List of 3D boundary geometries.\n",
" :param max_distance: Maximum 2D distance for edge-boundary association.\n",
" :return: List of lifted 3D road edge geometries.\n",
" \"\"\"\n",
"\n",
" outlines_3d: List[Polyline3D] = []\n",
"\n",
" if len(outlines_2d) >= 1 and len(boundaries) >= 1:\n",
"\n",
" # 1. Build comprehensive spatial index with all boundary segments\n",
" # NOTE @DanielDauner: We split each boundary polyline into small segments.\n",
" # The spatial indexing uses axis-aligned bounding boxes, where small geometries lead to better performance.\n",
" boundary_segments = []\n",
" for boundary in boundaries:\n",
" coords = boundary.array.reshape(-1, 1, 3)\n",
" segment_coords_boundary = np.concatenate([coords[:-1], coords[1:]], axis=1)\n",
" boundary_segments.append(segment_coords_boundary)\n",
"\n",
" boundary_segments = np.concatenate(boundary_segments, axis=0)\n",
" boundary_segment_linestrings = shapely.creation.linestrings(boundary_segments)\n",
" occupancy_map = OccupancyMap2D(boundary_segment_linestrings)\n",
"\n",
" for linear_ring in outlines_2d:\n",
" points_2d = np.array(linear_ring.coords, dtype=np.float64)\n",
" points_3d = np.zeros((len(points_2d), len(Point3DIndex)), dtype=np.float64)\n",
" points_3d[..., Point3DIndex.XY] = points_2d\n",
"\n",
" # 3. Batch query for all points\n",
" query_points = shapely.creation.points(points_2d)\n",
" results = occupancy_map.query_nearest(query_points, max_distance=max_distance, exclusive=True)\n",
"\n",
" for query_idx, geometry_idx in zip(*results):\n",
" query_point = query_points[query_idx]\n",
" segment_coords = boundary_segments[geometry_idx]\n",
" best_z = _interpolate_z_on_segment(query_point, segment_coords)\n",
" points_3d[query_idx, 2] = best_z\n",
"\n",
" outlines_3d.append(Polyline3D.from_array(points_3d))\n",
"\n",
" return outlines_3d\n",
"\n",
"\n",
"def _extract_intersection_outline(lane_groups: List[AbstractLaneGroup], junction_id: str = 0) -> Polyline3D:\n",
" \"\"\"Helper method to extract intersection outline in 3D from lane group helpers.\"\"\"\n",
"\n",
" # 1. Extract the intersection outlines in 2D\n",
" intersection_polygons: List[shapely.Polygon] = [\n",
" lane_group_helper.shapely_polygon for lane_group_helper in lane_groups\n",
" ]\n",
" # for intersection_polygon in intersection_polygons:\n",
" # ax.plot(*intersection_polygon.exterior.xy)\n",
"\n",
" # for lane_group_helper in lane_groups:\n",
" # ax.plot(*lane_group_helper.outline.linestring.xy, color=\"blue\")\n",
" intersection_edges = get_road_edge_linear_rings(intersection_polygons, add_interiors=False)\n",
"\n",
" # for linear_ring in intersection_edges:\n",
" # ax.plot(*linear_ring.xy, color=\"blue\")\n",
"\n",
" # 2. Lift the 2D outlines to 3D\n",
" lane_group_outlines: List[Polyline3D] = [lane_group_helper.outline_3d for lane_group_helper in lane_groups]\n",
" intersection_outlines = lift_outlines_to_3d(intersection_edges, lane_group_outlines)\n",
"\n",
" print(len(intersection_outlines))\n",
"\n",
" # NOTE: When the intersection has multiple non-overlapping outlines, we cannot return a single outline in 3D.\n",
" # For now, we return the longest outline.\n",
"\n",
" valid_outlines = [outline for outline in intersection_outlines if outline.array.shape[0] > 2]\n",
" assert len(valid_outlines) > 0, f\"No valid intersection outlines found for Junction {junction_id}!\"\n",
"\n",
" longest_outline = max(valid_outlines, key=lambda outline: outline.length)\n",
"\n",
" # for linear_ring in intersection_outlines:\n",
" # ax.plot(*linear_ring.linestring.xy, color=\"red\")\n",
"\n",
" # ax.plot(*longest_outline.linestring.xy, color=\"red\")\n",
" # longest_outline.line\n",
" print(longest_outline.array[:, 2])\n",
" return longest_outline\n",
"\n",
"\n",
"_extract_intersection_outline(lane_groups)"
]
"source": []
},
{
"cell_type": "code",
Expand All @@ -410,14 +299,6 @@
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "7",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
37 changes: 19 additions & 18 deletions notebooks/bev_render.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"from py123d.datatypes.scene.scene_filter import SceneFilter\n",
"\n",
"from py123d.common.multithreading.worker_sequential import Sequential\n",
"# from py123d.datatypes.sensors.camera.pinhole_camera import PinholeCameraType "
"# from py123d.datatypes.sensors.pinhole_camera import PinholeCameraType "
]
},
{
Expand All @@ -21,35 +21,36 @@
"metadata": {},
"outputs": [],
"source": [
"\n",
"# splits = [\"wopd_val\"]\n",
"splits = [\"carla_test\"]\n",
"# splits = [\"nuplan-mini_test\"]\n",
"# splits = [\"av2-sensor-mini_train\"]\n",
"# splits = [\"pandaset_train\"]\n",
"# log_names = None\n",
"\n",
"\n",
"\n",
"# splits = [\"kitti360\"]\n",
"# splits = [\"nuscenes-mini_val\", \"nuscenes-mini_train\"]\n",
"# splits = [\"nuplan-mini_test\", \"nuplan-mini_train\", \"nuplan-mini_val\"]\n",
"# splits = [\"nuplan_private_test\"]\n",
"# splits = [\"carla_test\"]\n",
"splits = [\"wopd_val\"]\n",
"# splits = [\"av2-sensor_train\"]\n",
"# splits = [\"pandaset_test\", \"pandaset_val\", \"pandaset_train\"]\n",
"# log_names = [\"2021.08.24.13.12.55_veh-45_00386_00472\"]\n",
"# log_names = [\"2013_05_28_drive_0000_sync\"]\n",
"# log_names = [\"2013_05_28_drive_0000_sync\"]\n",
"log_names = None\n",
"scene_uuids = None\n",
"scene_uuids = [\"9727e2b3-46b0-51bd-84a9-c516c0993045\"]\n",
"\n",
"scene_filter = SceneFilter(\n",
" split_names=splits,\n",
" log_names=log_names,\n",
" scene_uuids=scene_uuids,\n",
" duration_s=20.0,\n",
" duration_s=None,\n",
" history_s=0.0,\n",
" timestamp_threshold_s=20,\n",
" timestamp_threshold_s=None,\n",
" shuffle=True,\n",
" # camera_types=[CameraType.CAM_F0],\n",
" # camera_types=[PinholeCameraType.CAM_F0],\n",
")\n",
"scene_builder = ArrowSceneBuilder()\n",
"worker = Sequential()\n",
"# worker = RayDistributed()\n",
"scenes = scene_builder.get_scenes(scene_filter, worker)\n",
"\n",
"print(f\"Found {len(scenes)} scenes\")"
"scenes = [scene for scene in scenes if scene.uuid in scene_uuids]\n",
"print(f\"Found {len(scenes)} scenes\")\n"
]
},
{
Expand All @@ -61,7 +62,7 @@
"source": [
"from py123d.visualization.matplotlib.plots import render_scene_animation\n",
"\n",
"for i in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]:\n",
"for i in [0]:\n",
" render_scene_animation(scenes[i], output_path=\"test\", format=\"mp4\", fps=20, step=1, radius=50)"
]
},
Expand Down
20 changes: 10 additions & 10 deletions notebooks/camera_matplotlib.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"from py123d.datatypes.scene.scene_filter import SceneFilter\n",
"\n",
"from py123d.common.multithreading.worker_sequential import Sequential\n",
"from py123d.datatypes.sensors.camera.pinhole_camera import PinholeCameraType"
"from py123d.datatypes.sensors.pinhole_camera import PinholeCameraType"
]
},
{
Expand Down Expand Up @@ -42,7 +42,7 @@
" history_s=0.0,\n",
" timestamp_threshold_s=20,\n",
" shuffle=True,\n",
" camera_types=[PinholeCameraType.CAM_F0],\n",
" pinhole_camera_types=[PinholeCameraType.PCAM_F0],\n",
")\n",
"scene_builder = ArrowSceneBuilder()\n",
"worker = Sequential()\n",
Expand All @@ -67,24 +67,24 @@
"scene = scenes[0]\n",
"\n",
"scene: AbstractScene\n",
"print(scene.uuid, scene.available_camera_types)\n",
"print(scene.uuid, scene.available_pinhole_camera_types)\n",
"\n",
"scale = 3.0\n",
"fig, ax = plt.subplots(2, 3, figsize=(scale * 6, scale * 2.5))\n",
"\n",
"\n",
"camera_ax_mapping = {\n",
" PinholeCameraType.CAM_L0: ax[0, 0],\n",
" PinholeCameraType.CAM_F0: ax[0, 1],\n",
" PinholeCameraType.CAM_R0: ax[0, 2],\n",
" PinholeCameraType.CAM_L1: ax[1, 0],\n",
" PinholeCameraType.CAM_B0: ax[1, 1],\n",
" PinholeCameraType.CAM_R1: ax[1, 2],\n",
" PinholeCameraType.PCAM_L0: ax[0, 0],\n",
" PinholeCameraType.PCAM_F0: ax[0, 1],\n",
" PinholeCameraType.PCAM_R0: ax[0, 2],\n",
" PinholeCameraType.PCAM_L1: ax[1, 0],\n",
" PinholeCameraType.PCAM_B0: ax[1, 1],\n",
" PinholeCameraType.PCAM_R1: ax[1, 2],\n",
"}\n",
"\n",
"\n",
"for camera_type, ax_ in camera_ax_mapping.items():\n",
" camera = scene.get_camera_at_iteration(iteration, camera_type)\n",
" camera = scene.get_pinhole_camera_at_iteration(iteration, camera_type)\n",
" box_detections = scene.get_box_detections_at_iteration(iteration)\n",
" ego_state = scene.get_ego_state_at_iteration(iteration)\n",
"\n",
Expand Down
Loading