Skip to content

Commit 62dadf3

Browse files
Add nuScenes data processing into codebase (#6)
* conf(nus): update ground segmentation in nuscenes. * conf(nus): update ground segmentation in nuscenes. * feat(data): core extraction py file for nuscenes. * Add NusMap to Argoverse 2 for consistent evaluation afterward. * style(model): update a basemodel to avoid repeating the same fn, etc. * will nus training need to update the dataloader, it will involved by DeltaFlow merge there. * docs: fix typo on dataprocess README. tested successfully on all fn. * Add flow check in nus from supervised training later. --------- Co-authored-by: EdwardLeeLPZ <EdwardLeeLPZ@users.noreply.github.com>
1 parent 1aa726a commit 62dadf3

File tree

15 files changed

+542
-70
lines changed

15 files changed

+542
-70
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Contributing to OpenSceneFlow
1+
# Contributing to [OpenSceneFlow](https://github.com/KTH-RPL/OpenSceneFlow)
22

33
We want to make contributing to this project as easy and transparent as possible. We welcome any contributions, from bug fixes to new features. If you're interested in adding your own scene flow method, this guide will walk you through the process.
44

55
## Adding a New Method
66

7-
Here is a quick guide to integrating a new method into the OpenSceneFlow codebase.
7+
Here is a quick guide to integrating a new method into the [OpenSceneFlow](https://github.com/KTH-RPL/OpenSceneFlow) codebase.
88

99
### 1. Data Preparation
1010

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
💞 If you find [*OpenSceneFlow*](https://github.com/KTH-RPL/OpenSceneFlow) useful to your research, please cite [**our works** 📖](#cite-us) and [give a star 🌟](https://github.com/KTH-RPL/OpenSceneFlow) as encouragement. (੭ˊ꒳​ˋ)੭✧
1010

1111
OpenSceneFlow is a codebase for point cloud scene flow estimation.
12-
It is also an official implementation of the following papers (sored by the time of publication):
12+
It is also an official implementation of the following papers (sorted by the time of publication):
1313

1414
- **HiMo: High-Speed Objects Motion Compensation in Point Clouds** (SeFlow++)
1515
*Qingwen Zhang, Ajinkya Khoche, Yi Yang, Li Ling, Sina Sharif Mansouri, Olov Andersson, Patric Jensfelt*
@@ -101,7 +101,7 @@ If you prefer to build the Docker image by yourself, Check [build-docker-image](
101101

102102
## 1. Data Preparation
103103

104-
Refer to [dataprocess/README.md](dataprocess/README.md) for dataset download instructions. Currently, we support **Argoverse 2**, **Waymo**, and **custom datasets** (more datasets will be added in the future).
104+
Refer to [dataprocess/README.md](dataprocess/README.md) for dataset download instructions. Currently, we support **Argoverse 2**, **Waymo**, **nuScenes** and **custom datasets** (more datasets will be added in the future).
105105

106106
After downloading, convert the raw data to `.h5` format for easy training, evaluation, and visualization. Follow the steps in [dataprocess/README.md#process](dataprocess/README.md#process).
107107

assets/docs/nuscenes.png

144 KB
Loading

conf/others/nuscenes.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
[important]
3+
height = 1.85 # sensor height. 雷达传感器高度,主要是+offset
4+
5+
# 整个雷点点云以自己为中心 分为多少个segment,每个segment又分成多少个bin
6+
[segments]
7+
r_min = 0.1 # minimum point distance. 感兴趣的区域
8+
r_max = 80 # maximum point distance.
9+
n_segments = 360 # number of radial segments.
10+
n_bins = 160 # number of radial bins.
11+
12+
13+
[ground]
14+
# 直线的 slope 斜率,一个seg里拟合的线斜率
15+
min_slope = 0.0 # minimum slope of a ground line. [T_m_small]
16+
max_slope = 0.1 # maximum slope of a ground line. [T_m]
17+
# 如果拟合点超过这个 long threshold,判断其 height 变化是否超过 max_long_height
18+
long_threshold = 2.0 # Distance at which points are considered far from each other. [T_d_prev]
19+
max_long_height = 0.3 # maximum height change to previous point in long line. [T_b]
20+
# 如果没有超过 long threshold,判断现在拟合的点与fitline高度变化是否超过 max_start_height
21+
max_start_height = 0.2 # Maximum heigh of starting line to be labelled ground.
22+
# 最大的拟合误差,超过这个误差的点不会被加入 line 拟合
23+
max_fit_error = 0.1 # maximum error of a point during line fit. [T_RMSE: will sqaure inside code.]
24+
25+
# 判断是否是地面点的时候,需要满足的条件:
26+
max_dist_to_line = 0.2 # maximum vertical distance of point to line to be considered ground. [T_d_ground]
27+
line_search_angle = 2.0 # How far to search for a line in angular direction [rad].
28+
29+
[general]
30+
n_threads = 8 # number of threads for parallel processing.
31+
verbose = false # if you don't want to see every output, set this to false.

dataprocess/README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ We've updated the process dataset for:
1010

1111
- [x] Argoverse 2.0: check [here](#argoverse-20). The process script Involved from [DeFlow](https://github.com/KTH-RPL/DeFlow).
1212
- [x] Waymo: check [here](#waymo-dataset). The process script was involved from [SeFlow](https://github.com/KTH-RPL/SeFlow).
13-
- [ ] nuScenes: done coding, public after review. Will be involved later by another paper.
13+
- [x] nuScenes: check [here](#nuscenes), The process script was involved from [DeltaFlow](https://github.com/Kin-Zhang/DeltaFlow).
1414
- [ ] TruckScene: done coding, public after review. Will be involved later by another paper.
1515
- [ ] ZOD (w/o gt): done coding, public after review. Will be involved later by another paper.
1616

@@ -77,6 +77,20 @@ You need sign up an account at [nuScenes](https://www.nuscenes.org/) to download
7777
![](../assets/docs/nuscenes.png)
7878

7979

80+
Extracting & processing nuScenes require special handling:
81+
82+
* Frame Rate: The raw LiDAR data is captured at 20Hz, while ground truth (GT) annotations are only available at 2Hz.
83+
* Resampling: To standardize the data for consistent evaluation, we downsample the LiDAR point clouds to 10Hz. It is a GT-guided process that guarantees all annotated 2Hz frames are preserved within the final 10Hz sequence.
84+
* The ground truth scene flow is generated using the official per-object velocity labels provided in the dataset, calculated between the resampled 10Hz frames.
85+
86+
87+
#### Dataset frames
88+
89+
| Dataset | # Total Scene | # Total Frames |
90+
| ------- | ------------- | -------------- |
91+
| train | 700 | 137575 / 27392 (w. gt) |
92+
| val | 150 | 29126 / 5798 (w.gt) |
93+
8094
### Waymo Dataset
8195

8296
To download the Waymo dataset, you need to register an account at [Waymo Open Dataset](https://waymo.com/open/). You also need to install gcloud SDK and authenticate your account. Please refer to [this page](https://cloud.google.com/sdk/docs/install) for more details.
@@ -123,6 +137,9 @@ python dataprocess/extract_av2.py --av2_type sensor --data_mode train --argo_dir
123137

124138
# waymo:
125139
python dataprocess/extract_waymo.py --mode train --flow_data_dir /home/kin/data/waymo/flowlabel --map_dir /home/kin/data/waymo/flowlabel/map --output_dir /home/kin/data/waymo/preprocess --nproc 48
140+
141+
# nus:
142+
python dataprocess/extract_nus.py --mode v1.0-trainval --output_dir /home/kin/data/nus/h5py/full --nproc 24
126143
```
127144

128145

0 commit comments

Comments
 (0)