You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-18Lines changed: 9 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,35 +50,26 @@ seq002 = dataset['002']
50
50
51
51
#### Loading
52
52
The devkit will automatically search the sequence directory for available sensor and meta data and prepare the path for a loading step. At this point no point clouds or images have been loaded into memory.
53
-
To execute the loading of sensor and meta data into memory, we simply call the `load()` method on the sequence object. This will load all available sensor and meta data. If only specific sensors or meta data is required, there are more specific methods available.
53
+
To execute the loading of sensor and meta data into memory, we simply call the `load()` method on the sequence object. This will load all available sensor and meta data. If only specific sensors or meta data is required, there are more specific methods available which can also be chained to each other.
54
54
```python
55
55
seq002.load()
56
56
57
57
# OR
58
58
59
-
seq002.load_lidar()
60
-
seq002.load_camera()
61
-
seq002.load_gps_poses()
62
-
seq002.load_timestamps()
63
-
seq002.load_cuboids()
64
-
```
65
-
66
-
Since not everybody might want to work with full sampling rate, each of the `load()` methods accept a _3-tuple_ which serves as a slicing information. In the following example, we want every second frame between frame 10 and frame 50 loaded. It is equivalent to slicing a python array using `my_array[10:50:2]`.
67
-
```python
68
-
seq002.load((10, 50, 2))
59
+
seq002.load_lidar().load_cuboids()
69
60
```
70
61
71
62
#### Data Access
72
63
73
64
##### LiDAR
74
65
The LiDAR point clouds are stored as [pandas.DataFrames](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html#pandas.DataFrame) and therefore allow to leverage their extensive API for data manipulation. This includes the simple return as a [numpy.ndarray](https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html).
Each camera name has its recordings loaded as [Pillow Image](https://pillow.readthedocs.io/en/stable/reference/Image.html) object, and can be accessed via normal list slicing. In the following example, we select the first image from the front camera and display it using the Pillow library in Python.
90
81
```python
91
82
front_camera = seq002.camera['front_camera']
92
-
img0 = front_camera.data[0]
83
+
img0 = front_camera[0]
93
84
img0.show()
94
85
```
95
86
Afterwards the extensive Pillow Image API can be used for image manipulation, conversion or export.
@@ -101,18 +92,18 @@ In addition to the sensor data, the loaded data set also contains the following
101
92
102
93
These can be directly accessed through the known list slicing operations, and read in their dict format. For example, the following example shows how to get the GPS coordinates of the vehicle on the first frame.
103
94
```python
104
-
pose0 = seq002.gps_poses.data[0]
95
+
pose0 = seq002.gps[0]
105
96
lat0 = pose0['lat']
106
97
long0 = pose0['long']
107
98
```
108
99
109
100
#### Annotations
110
101
111
102
The LiDAR Cuboid annotations are also stored inside the sequence object as a [pandas.DataFrames](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html#pandas.DataFrame) for each timestamp.
112
-
The position coordinates (`positin.x`,`position.y`,`position.z`) are located at the center of a cuboid. `dimensions.x` is the width of the cuboid from left to right, `dimensions.y` is the length of the cuboid from front to back and `dimensions.z` is the height of the cuboid from top to bottom.
103
+
The position coordinates (`position.x`,`position.y`,`position.z`) are located at the center of a cuboid. `dimensions.x` is the width of the cuboid from left to right, `dimensions.y` is the length of the cuboid from front to back and `dimensions.z` is the height of the cuboid from top to bottom.
0 commit comments