Package: adataset
Convert datasetadatasetis used to convert datasets (nuScenes, KITTI, ApolloScape) to Apollo record file. This way we can guaranteethe consistency of training data and test data, including sensor intrinsics and extrinsics parameter files, thus speeding up model validation.Installpip3 install adatasetUsageWe first introduce the use of the command, and then introduce how to use the dataset withadataset.Command optionsThe options foradatasetcommand are as follows:--dataset(-d) Choose the dataset, support listn, k, a, w, means "n:nuScenes, k:KITTI, a:ApolloScape, 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 listrcd, cal, pcd, means "rcd:record, cal:calibration, pcd:pointcloud", default isrcd.Convert record filesYou can use below command to convert dataset to Apollo record file. For example convert nuScenes dataset indataset_pathto Apollo record. Theoutputdefault is the current directory, and thetypedefault isrcd.adataset-d=n-i=dataset_pathThe name of the nuScenes record file isscene_token.record, and KITTI isresult.record, and ApolloScape isframe_id.recordConvert calibration filesYou 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=calCamera intrinsicsCamera intrinsics matrix. reflinkD: 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 matrixConvert PCD fileYou can use below command to convert dataset lidar pcd to normal pcl file, which can display in visualization tools such aspcl_viewer.adataset-d=n-i=dataset_lidar_pcd_file-t=pcdIf you do not specify a name, the default name of the pcd file isresult.pcd, saved in the current directory.Dataset introductionThere are differences between the data sets, so introduce them separately.nuScenesnuScenes Minicompared 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-miniThen 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=pcdKITTIWe useKITTI raw datato generate Apollo record file. Be sure to download[synced+rectified data]but not[unsynced+unrectified data]. Note that the calibration data are in[calibration].datasetThe KITTI raw data is as follows.2011_09_26_drive_0015_sync
 -image_00
 -image_01
 -image_02
 -image_03
 -oxts
 -velodyne_pointsThen 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=pcdcalibrationThe KITTI calibration data is as follows:2011_09_26
 -calib_cam_to_cam.txt
 -calib_imu_to_velo.txt
 -calib_velo_to_cam.txtThen we can use the following command to generate the Apollo "calibration" files.adataset -d=k -i=path/to/2011_09_26 -t=calApolloScapeWe useApolloScapeDetection/Tracking dataset to generate record file.The ApolloScape Detection/Tracking data is as follow.Training data
 -detection_train_pcd_1.zip
 -detection_train_bin_1.zip
 -detection_train_label.zip
 -...
 -tracking_train_pose.zip

Testing data
 -detection_test_pcd_1.zip
 -detection_test_bin_1.zip
 -...
 -tracking_test_pose.zipBefore generating record file, we should organize data folders as follow(use test data for example).├── tracking_test
    ├── pcd
        ├── result_9048_2_frame
            ├── 2.bin
            ├── 7.bin
            └── ...
        └── ...
    ├── pose
        ├── result_9048_2_frame
            ├── 2_pose.txt
            ├── 7_pose.txt
            └── ...
        └── ...Then we can use the following command to generate the "record/calibration/pcd" file.// record
python main.py -d=a -i=tracking_test/ -o=records/ -t=rcd
// calibration
python main.py -d=a -i=tracking_test/ -o=records/ -t=cal
// pcd
python main.py -d=a -i=data_path/data.bin -o=data_path/result.pcd -t=pcd