Skip to main content

Dataset conversion to Apollo record tool

Project description

Convert dataset

adataset is used to convert datasets (nuScenes, KITTI) to Apollo record file. This way we can guarantee the consistency of training data and test data, including sensor intrinsics and extrinsics parameter files, thus speeding up model validation.

Install

pip3 install adataset

Usage

We first introduce the use of the command, and then introduce how to use the dataset with adataset.

Command options

The options for adataset command are as follows:

  • --dataset(-d) Choose the dataset, support list n, k, w, means "n:nuScenes, k:KITTI, w:Waymo"
  • --input(-i) Set the dataset input directory.
  • --output(-o) Set the output directory, default is the current directory.
  • --type(-t) Choose conversion type, support list rcd, cal, pcd, means "rcd:record, cal:calibration, pcd:pointcloud", default is rcd.

Convert record files

You can use below command to convert dataset to Apollo record file. For example convert nuScenes dataset in dataset_path to Apollo record. The output default is the current directory, and the type default is rcd.

adataset -d=n -i=dataset_path

The name of the nuScenes record file is scene_token.record, and KITTI is result.record.

Convert calibration files

You can use below command to convert dataset to apollo calibration files. There maybe multi sense in one dataset, and we create calibration files for each scene.

adataset -d=n -i=dataset_path -t=cal
Camera intrinsics

Camera intrinsics matrix. ref link

  • D: The distortion parameters, size depending on the distortion model. For "plumb_bob", the 5 parameters are: (k1, k2, t1, t2, k3).
  • K: Intrinsic camera matrix for the raw (distorted) images.
  • R: Rectification matrix (stereo cameras only)
  • P: Projection/camera matrix

Convert PCD file

You can use below command to convert dataset lidar pcd to normal pcl file, which can display in visualization tools such as pcl_viewer.

adataset -d=n -i=dataset_lidar_pcd_file -t=pcd

If you do not specify a name, the default name of the pcd file is result.pcd, saved in the current directory.

Dataset introduction

There are differences between the data sets, so introduce them separately.

nuScenes

nuScenes Mini compared with the full amount of data, the Mini data set is relatively small. The nuScenes Mini data set is as follows.

nuScenes-Mini
 -maps
 -samples
 -sweeps
 -v1.0-mini

Then we can use the following command to generate the "record/calibration/pcd" file.

// record
adataset -d=n -i=path/to/nuScenes-Mini
// calibration
adataset -d=n -i=path/to/nuScenes-Mini -t=cal
// pcd
adataset -d=n -i=path/to/nuScenes-Mini/samples/LIDAR_TOP/n015-2018-11-21-19-38-26+0800__LIDAR_TOP__1542801007446751.pcd.bin -t=pcd

KITTI

We use KITTI raw data to generate Apollo record file. Be sure to download [synced+rectified data] but not [unsynced+unrectified data]. Note that the calibration data are in [calibration].

dataset

The KITTI raw data is as follows.

2011_09_26_drive_0015_sync
 -image_00
 -image_01
 -image_02
 -image_03
 -oxts
 -velodyne_points

Then we can use the following command to generate the "record/pcd" file.

// record
adataset -d=k -i=path/to/2011_09_26_drive_0015_sync
// pcd
adataset -d=k -i=path/to/2011_09_26/2011_09_26_drive_0015_sync/velodyne_points/data/0000000113.bin -t=pcd
calibration

The KITTI calibration data is as follows:

2011_09_26
 -calib_cam_to_cam.txt
 -calib_imu_to_velo.txt
 -calib_velo_to_cam.txt

Then we can use the following command to generate the Apollo "calibration" files.

adataset -d=k -i=path/to/2011_09_26 -t=cal

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adataset-0.1.0.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adataset-0.1.0-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

Details for the file adataset-0.1.0.tar.gz.

File metadata

  • Download URL: adataset-0.1.0.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for adataset-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2aebe7607dfcdda2938b193d4d9856fd3fc334a45b39615f05888216a2975f17
MD5 1d68d3f1bd652c12b94bb2e2113cd99e
BLAKE2b-256 5cb626b71b853b1ea01b4e5cd5ebdc1877f8fd60dde74425d6e09c85c6fa8f0d

See more details on using hashes here.

File details

Details for the file adataset-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: adataset-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for adataset-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 916ebfe2fa57a4e3680dc3ae568da9ebfa41452e32a77f9005a66e6da94ab7b3
MD5 a4cfee96f4abda4f92574d9c492258d9
BLAKE2b-256 4a2af2e2d6a7330c3ef2dd65465e1506fe3a19e080c96bb78029154827e76906

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page