Giter Club home page Giter Club logo

kitti2tfrecords's Introduction

Kitti2TFrecords

Multiprocessing script for conversion of KITTI dataset to Tensorflow records.

This script is to extract and encode data related to pointcloud, image, calibration and label information as tfrecords. One tfrecord includes 128 samples and has size of around 320 MB. You can specify the number of samples in one tfrecord and you can choose the number of training samples to be encoded. All configuration parameters of the script:

_SOURCE_FOLDER = "/data/datasets/KITTI"
_DESTINATION_FOLDER = "/data/datasets/KITTI_tfrecords-cropped-lw"
_TRAINING_SUBFOLDERS = ["velodyne", "label_2", "image_2", "calib"]
_TESTING_SUBFOLDERS = ["velodyne", "image_2", "calib"]
_FRAMES_PER_TFRECORD = 128
_SAMPLES_FOR_TRAINING = 3713
_CONVERT_TESTING_SAMPLES = True
_OBJ_TYPE_MAP = {"Car": 1, "Pedestrian": 2, "Cyclist": 4}
_VISIBLE_GPUS = [0]
The 3D bounding box elements are encoded in this order:

[x, y, z, length, width, height, rotation]

The order can be easily modified in the function get_bbox3d().

Usage

  1. Download the dataset from https://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d
  • Velodyne point clouds (29 GB): Used as input laser information
  • Training labels of the object data set (5 MB): Used as input label
  • Camera calibration matrices of the object data set (16 MB): For synchronizing images and point clouds, for cropping point clouds, for projection from camera to point cloud coordinate, for visualizing the predictions
  • Left color images of the object data set (12 GB): For cropping point clouds, for projection from camera to point cloud coordinate, for visualizing the predictions
  1. Unzip the files into a folder. Write their directories into the kitti2tfrecord.py and run the script to convert the dataset into TF records!

NOTE: You can crop the point cloud data using this script, because the point clouds are scanned in 360 degrees while the RGB cameras are not (they have a much narrower field of view). In addition, KITTI only provides labels for objects that are within the images. Therefore, we usually need to remove points outside the image coordinates. If you convert the cropped data, then one tfrecord will be around 125 MB.

kitti2tfrecords's People

Contributors

koraykoca avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.