Our paper describes our data export based on CARLA. For more information, see the official CARLA documentation: Official Documentation.
[HomePage]Paper][Data Download: GoogleDrive HuggingFace]
SS3DM: Benchmarking Street-View Surface Reconstruction with a Synthetic 3D Mesh Dataset
Yubin Hu*, Kairui Wen*, Heng Zhou, Xiaoyang Guo, Yong-Jin Liu
NeurIPS 2024 Track on Dataset and Benchmark
🌟 [2024/11/07] We've uploaded the data to GoogleDrive and HuggingFace!
🥳 [2024/09/26] Our paper is accepted by NeurIPS 2024 Track on Dataset and Benchmark.
-
Install and configure CARLA. For installing CARLA's Python library, refer to the official documentation. We recommend using Python 3.7.
-
Install the prerequisite libraries used in the code.
pip3 install -r requirements.txt
-
Open the CARLA simulator, choose one of the cities, load it, and then click "Run" in the top right corner. Here, we will use Town02 as an example.
-
In the
path.txtof our codebase, select a path (you can also define your own path), and modifyexport/export_car_manager.pywith theroute_pointsandtransform. Setroute_pointsto the coordinates of all points along the path, and settransformto the coordinates and rotation corresponding to the starting point. For example, if we choose theTown_02 300framespath, the modified code snippet should look like this:route_points = [ carla.Location(x=4610.736328 / 100, y=28746.634766 / 100, z=22.363468 / 100), carla.Location(x=4589.283203 / 100, y=20432.091797 / 100, z=22.353996 / 100) ] transform = carla.Transform(carla.Location(x=4610.736328 / 100, y=28746.634766 / 100, z=22.363468 / 100), carla.Rotation(pitch=0.025818, yaw=-89.975494, roll=0.000184))
-
Modify the
frame_countinexport/export.pyto the desired number of frames, which in this example is 300 frames. This variable is located at line 114 of the code. -
Run
export/export.pyand wait for the export to complete. The data will be exported to the directory whereexport.pyis located. -
(Optional) If you need to convert the data to Streetsurf format, copy
parse2streetsurf.pyfromdata_processingto the exported data'sdata/directory and run it to convert the data format.
By default, the exported data in data/ will contain 8 folders, each storing the following types of data:
- The
depthsfolder contains depth data captured by the depth camera, stored inexrformat. For specific parameters of the depth camera, please refer to our paper. Each frame's data is aligned with the RGB camera. - The
imagesfolder contains image data captured by the RGB camera. - The
inssegfolder contains instance segmentation data from the instance annotation camera, where each color in the image represents a different entity. The same entity will have the same color across different frames from different cameras. Each frame's data is aligned with the RGB camera. - The
lidarsfolder contains point cloud data from the LiDAR, stored innpzformat. For specific parameters, please refer to our paper or thelidar2ply.pyscript. - The
posesfolder contains the positional information for each frame's camera, including the rotation matrix from Camera 5 (front camera) to the world coordinate system and the rotation matrices from different cameras to the front camera. - The
semsegfolder contains image data from the semantic segmentation camera; refer to the CARLA official documentation for the semantic meanings corresponding to colors. Each frame's data is aligned with the RGB camera. - The
vehiclesandwalkersfolders contain information about other vehicles and pedestrians. This section of the information is not yet fully processed and will be supplemented in future updates.
-
Our dataset may involve multiple coordinate systems; therefore, we provide coordinate transformation scripts located in the
coord_transformfolder.fbx2obj_axis.pyis used to convert the coordinate system of the fbx files exported from CARLA (after being converted toobjfiles) to the world coordinate system we use. -
The scripts related to data export are located in the
exportfolder.We provide
path.txt, which records all routes included in our dataset (Note: the frame count may not be accurate, as we made minor adjustments based on the route length);We provide
export.pyfor exporting data. When running it, please ensure that you have correctly configured CARLA, and it will export the data to thedata/folder in the same directory.If you need to modify the route and frame count in
export.py, please editexport_car_manager.pyand changeframe_countinexport.py.We provide
fbx2obj.py, located in themiscfolder. This script converts thefbxfiles exported from CARLA toobjfiles. Please note that CARLA does not export materials when exportingfbxfiles, so you will need to handle the materials to some extent. -
To facilitate the processing of the dataset, we provide data processing scripts located in the
miscfolder.parse2streetsurf.pyis used to convert data exported from CARLA into training data formatted like Streetsurf.Currently, it has two modes: when
convert_flagisFalse, place it in thedatafolder and run it to convert the data in the current folder;When
convert_flagisTrue, it can recursively convert all data in the current subfolder. Please note that we have not debugged this functionality, so we do not recommend enabling this option. -
We also provide data visualization scripts to help visualize some of the data, located in the
miscfolder.lidar2ply.pyis used to convert point clouds stored innpzformat in our dataset toplyformat for easier viewing;semseg2png.pyis used to convert instance segmentation data stored innpzformat in our dataset topngformat for visualization.
