Converts KITTI 3D Object Detection Evaluation 2017 Object Pose Estimation training dataset
to Falling Things Format.
The code was written and tested with Python 3.8.
pip3 install pyjson pyyaml numpy Pillow scipy
-
Download the following from KITTI 3D Object Detection Website:
-
Extract files so that your directory tree is as follows:
.
├── calib
│ ├── 000000.txt
│ ├── 000001.txt
│ └── ...
├── image_2
│ ├── 000000.png
│ ├── 000001.png
│ └── ...
└── label_2
├── 000000.txt
├── 000001.txt
└── ...
usage: convert.py [-h] --kitti-dir DIR --output-dir DIR [--distance-in-cm] [--save-camera-info] [--debug]
Converts given KITTI 3D Object Detection Training Dataset to Falling Things Format.
optional arguments:
-h, --help show this help message and exit
--kitti-dir DIR Path to KITTI root directory.
--output-dir DIR Path to store converted dataset.
--distance-in-cm Distance unit for output dataset is centimeters.
--save-camera-info Stores CameraInfo yaml files for each frame.
--debug Draws cuboids on the output image.
- Does not create the
_object_settings.json
and_camera_settings.json
- Ccclusion is handled as follows:
kitti_occlusion_to_fat_occlusion = {0: 0.0, 1: 0.25, 2: 0.75, 3: 0.0}
. - Since KITTI does not provide a
visibility
value, the following code reproduces thevisibility
:
visibility = 1.0 - truncation
visibility = max(0, visibility - occlusion)