-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
91 lines (73 loc) · 6.36 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta name="google-site-verification" content="MOS7MyuAqyv5QL2Rgee96lQx51MxWIpG0QmoJUXwSaY" />
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Kitti2TFrecords | Convert KITTI 3D point cloud dataset to Tensorflow records</title>
<meta name="generator" content="Jekyll v3.9.3" />
<meta property="og:title" content="Kitti2TFrecords" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="Convert KITTI 3D point cloud dataset to Tensorflow records" />
<meta property="og:description" content="Convert KITTI 3D point cloud dataset to Tensorflow records" />
<link rel="canonical" href="https://koraykoca.github.io/Kitti2TFrecords/" />
<meta property="og:url" content="https://koraykoca.github.io/Kitti2TFrecords/" />
<meta property="og:site_name" content="Kitti2TFrecords" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Kitti2TFrecords" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebSite","description":"Multiprocessing script for conversion of KITTI point cloud dataset to Tensorflow records","headline":"Kitti2TFrecords","name":"Kitti2TFrecords","url":"https://koraykoca.github.io/Kitti2TFrecords/"}</script>
<!-- End Jekyll SEO tag -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preload" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap" as="style" type="text/css" crossorigin>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#157878">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="stylesheet" href="/Kitti2TFrecords/assets/css/style.css?v=8fe152dc7ceb732eab7731deeb045f5cada31a8b">
<!-- start custom head snippets, customize with your own _includes/head-custom.html file -->
<!-- Setup Google Analytics -->
<!-- You can set your favicon here -->
<!-- link rel="shortcut icon" type="image/x-icon" href="/Kitti2TFrecords/favicon.ico" -->
<!-- end custom head snippets -->
</head>
<body>
<a id="skip-to-content" href="#content">Skip to the content.</a>
<header class="page-header" role="banner">
<h1 class="project-name">Kitti2TFrecords</h1>
<h2 class="project-tagline">Multiprocessing script for conversion of KITTI point cloud dataset to Tensorflow records</h2>
<a href="https://github.com/koraykoca/Kitti2TFrecords" class="btn">View on GitHub</a>
</header>
<main id="content" class="main-content" role="main">
<h1 id="kitti2tfrecords">Kitti2TFrecords</h1>
<p>Multiprocessing script for conversion of KITTI dataset to Tensorflow records.</p>
<p>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 <a href="https://github.com/koraykoca/Kitti2TFrecords/blob/7979b1e1352e780b3aee3ec7d39753046639ea66/kitti2tfrecords.py#L10-L18">can be found here</a>.
The 3D bounding box elements are encoded in this order:</p>
<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">,</span> <span class="n">length</span><span class="p">,</span> <span class="n">width</span><span class="p">,</span> <span class="n">height</span><span class="p">,</span> <span class="n">rotation</span><span class="p">]</span>
</code></pre></div></div>
<p>The order can be easily modified in the function <a href="https://github.com/koraykoca/Kitti2TFrecords/blob/7979b1e1352e780b3aee3ec7d39753046639ea66/tfrecordsutils.py#L55">get_bbox3d()</a>.</p>
<ul>
<li>The converted dataset can be loaded using <a href="https://www.tensorflow.org/api_docs/python/tf/data/TFRecordDataset">TFRecord dataset</a>.</li>
<li>An example/test function <a href="https://github.com/koraykoca/Kitti2TFrecords/blob/7979b1e1352e780b3aee3ec7d39753046639ea66/kitti2tfrecords.py#L333">convert_from_tfrecords()</a> is also available to parse the encoded tfrecord data.</li>
</ul>
<h2 id="usage">Usage</h2>
<p>1) Download the dataset from <a href="https://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d">cvlibs.net</a>:</p>
<ul>
<li>Velodyne point clouds (29 GB): Used as input laser information</li>
<li>Training labels of the object data set (5 MB): Used as input label</li>
<li>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</li>
<li>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</li>
</ul>
<p>2) Unzip the files into a folder. Write their directories into the kitti2tfrecord.py and run the script to convert the dataset into TF records!</p>
<p>NOTE: You can crop the point cloud data using <a href="https://github.com/qianguih/voxelnet/blob/master/data/crop.py">this script</a>, 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.</p>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
<script>anchors.add();</script>
<footer class="site-footer">
<span class="site-footer-owner"><a href="https://github.com/koraykoca/Kitti2TFrecords">Kitti2TFrecords</a> is maintained by <a href="https://github.com/koraykoca">koraykoca</a>.</span>
</footer>
</main>
</body>
</html>