Skip to content

Commit d8198f2

Browse files
committed
docs(readme): update visualization readme.
1 parent 568f481 commit d8198f2

4 files changed

Lines changed: 11 additions & 14 deletions

File tree

save.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# listed on the above website.
99
1010
# Description: produce flow based on model predict and write into the dataset,
11-
# then use tools/scene_flow.py flow_mode="flow_est" to visualize the flow.
11+
# then use `tools/visualization.py` to visualize the flow.
1212
"""
1313

1414
import torch

tools/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Here we introduce some tools to help you:
88

99
## Visualization
1010

11-
run `tools/scene_flow.py` to view the scene flow dataset with ground truth flow. Note the color wheel in under world coordinate.
11+
run `tools/visualization.py` to view the scene flow dataset with ground truth flow. Note the color wheel in under world coordinate.
1212

1313
```bash
1414
# view gt flow
15-
python3 tools/scene_flow.py --data_dir /home/kin/data/av2/preprocess/sensor/mini --res_name flow
15+
python3 tools/visualization.py --data_dir /home/kin/data/av2/preprocess/sensor/mini --res_name flow
1616

1717
# view est flow
18-
python3 tools/scene_flow.py --data_dir /home/kin/data/av2/preprocess/sensor/mini --res_name deflow_best
19-
python3 tools/scene_flow.py --data_dir /home/kin/data/av2/preprocess/sensor/mini --res_name seflow_best
18+
python3 tools/visualization.py --data_dir /home/kin/data/av2/preprocess/sensor/mini --res_name deflow_best
19+
python3 tools/visualization.py --data_dir /home/kin/data/av2/preprocess/sensor/mini --res_name seflow_best
2020
```
2121

2222
Demo Effect (press `SPACE` to stop and start in the visualization window):

tools/visualization.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
def check_flow(
2828
data_dir: str ="/home/kin/data/av2/preprocess/sensor/mini",
2929
res_name: str = "flow", # "flow", "flow_est"
30-
start_id: int = -1,
30+
start_id: int = 0,
3131
point_size: float = 3.0,
3232
):
3333
dataset = HDF5Data(data_dir, vis_name=res_name, flow_view=True)
@@ -37,10 +37,7 @@ def check_flow(
3737
opt.background_color = np.asarray([80/255, 90/255, 110/255])
3838
opt.point_size = point_size
3939

40-
for data_id in (pbar := tqdm(range(0, len(dataset)))):
41-
# for easy stop and jump to any id, and save same id always from 0.
42-
if data_id < start_id and start_id != -1:
43-
continue
40+
for data_id in (pbar := tqdm(range(start_id, len(dataset)))):
4441
data = dataset[data_id]
4542
now_scene_id = data['scene_id']
4643
pbar.set_description(f"id: {data_id}, scene_id: {now_scene_id}, timestamp: {data['timestamp']}")
@@ -77,10 +74,7 @@ def vis(
7774
# opt.background_color = np.asarray([1, 1, 1])
7875
opt.point_size = point_size
7976

80-
for data_id in (pbar := tqdm(range(0, len(dataset)))):
81-
# for easy stop and jump to any id, and save same id always from 0.
82-
if data_id < start_id and start_id != -1:
83-
continue
77+
for data_id in (pbar := tqdm(range(start_id, len(dataset)))):
8478
data = dataset[data_id]
8579
now_scene_id = data['scene_id']
8680
pbar.set_description(f"id: {data_id}, scene_id: {now_scene_id}, timestamp: {data['timestamp']}")

tools/write4conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
'''
2+
# Usage for old model file to new version code
3+
'''
14
import torch
25
import fire, time
36

0 commit comments

Comments
 (0)