Skip to content

Commit 6f20f8f

Browse files
committed
style(rename): rename tests folder to tools where includes visualization&conversion scripts etc.
docs(tools): update scripts under tools.
1 parent 5b7f1d6 commit 6f20f8f

8 files changed

Lines changed: 44 additions & 24 deletions

File tree

3_vis.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 tests/scene_flow.py flow_mode="flow_est" to visualize the flow.
11+
# then use tools/scene_flow.py flow_mode="flow_est" to visualize the flow.
1212
"""
1313

1414
import torch

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ You can try following methods in our code without any effort to make your own be
3333
- [x] [SeFlow](https://arxiv.org/abs/2407.01702) (Ours 🚀): ECCV 2024
3434
- [x] [DeFlow](https://arxiv.org/abs/2401.16122) (Ours 🚀): ICRA 2024
3535
- [x] [FastFlow3d](https://arxiv.org/abs/2103.01306): RA-L 2021
36-
- [x] [ZeroFlow](https://arxiv.org/abs/2305.10424): ICLR 2024, their pre-trained weight can covert into our format easily through [the script](tests/zerof2ours.py).
36+
- [x] [ZeroFlow](https://arxiv.org/abs/2305.10424): ICLR 2024, their pre-trained weight can covert into our format easily through [the script](tools/zerof2ours.py).
3737
- [ ] [NSFP](https://arxiv.org/abs/2111.01253): NeurIPS 2021, faster 3x than original version because of [our CUDA speed up](assets/cuda/README.md), same (slightly better) performance. Done coding, public after review.
3838
- [ ] [FastNSF](https://arxiv.org/abs/2304.09121): ICCV 2023. Done coding, public after review.
3939
<!-- - [ ] [Flow4D](https://arxiv.org/abs/2407.07995): 1st supervise network in the new leaderboard. Done coding, public after review. -->
@@ -160,11 +160,11 @@ python 3_vis.py checkpoint=/home/kin/seflow_best.ckpt dataset_path=/home/kin/dat
160160
# The output of above command will be like:
161161
Model: DeFlow, Checkpoint from: /home/kin/model_zoo/v2/seflow_best.ckpt
162162
We already write the flow_est into the dataset, please run following commend to visualize the flow. Copy and paste it to your terminal:
163-
python tests/scene_flow.py --flow_mode 'seflow_best' --data_dir /home/kin/data/av2/preprocess_v2/sensor/vis
163+
python tools/scene_flow.py --flow_mode 'seflow_best' --data_dir /home/kin/data/av2/preprocess_v2/sensor/vis
164164
Enjoy! ^v^ ------
165165

166166
# Then run the command in the terminal:
167-
python tests/scene_flow.py --flow_mode 'seflow_best' --data_dir /home/kin/data/av2/preprocess_v2/sensor/vis
167+
python tools/scene_flow.py --flow_mode 'seflow_best' --data_dir /home/kin/data/av2/preprocess_v2/sensor/vis
168168
```
169169

170170
https://github.com/user-attachments/assets/f031d1a2-2d2f-4947-a01f-834ed1c146e6

dataprocess/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Or you can run testing file to visualize the data.
140140

141141
```bash
142142
# view gt flow
143-
python3 tests/scene_flow.py --data_dir /home/kin/data/av2/preprocess/sensor/mini --flow_mode flow
143+
python3 tools/scene_flow.py --data_dir /home/kin/data/av2/preprocess/sensor/mini --flow_mode flow
144144

145-
python3 tests/scene_flow.py --data_dir /home/kin/data/waymo/preprocess/val --flow_mode flow
145+
python3 tools/scene_flow.py --data_dir /home/kin/data/waymo/preprocess/val --flow_mode flow
146146
```

scripts/pl_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def on_validation_epoch_end(self):
214214

215215
if self.save_res:
216216
print(f"We already write the flow_est into the dataset, please run following commend to visualize the flow. Copy and paste it to your terminal:")
217-
print(f"python tests/scene_flow.py --flow_mode '{self.vis_name}' --data_dir {self.dataset_path}")
217+
print(f"python tools/scene_flow.py --flow_mode '{self.vis_name}' --data_dir {self.dataset_path}")
218218
print(f"Enjoy! ^v^ ------ \n")
219219

220220
def eval_only_step_(self, batch, res_dict):
@@ -310,5 +310,5 @@ def on_test_epoch_end(self):
310310
self.model.timer.print(random_colors=False, bold=False)
311311
print(f"\n\nModel: {self.model.__class__.__name__}, Checkpoint from: {self.load_checkpoint_path}")
312312
print(f"We already write the flow_est into the dataset, please run following commend to visualize the flow. Copy and paste it to your terminal:")
313-
print(f"python tests/scene_flow.py --flow_mode '{self.vis_name}' --data_dir {self.dataset_path}")
313+
print(f"python tools/scene_flow.py --flow_mode '{self.vis_name}' --data_dir {self.dataset_path}")
314314
print(f"Enjoy! ^v^ ------ \n")

tests/README.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

tools/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Tools
2+
---
3+
4+
Here we introduce some tools to help you:
5+
- visualize the data and results.
6+
- convert the pretrained model from others.
7+
- ... More to come.
8+
9+
## Visualization
10+
11+
run `tools/scene_flow.py` to view the scene flow dataset with ground truth flow. Note the color wheel in under world coordinate.
12+
13+
```bash
14+
# view gt flow
15+
python3 tools/scene_flow.py --data_dir /home/kin/data/av2/preprocess/sensor/mini --flow_mode flow
16+
17+
# view est flow
18+
python3 tools/scene_flow.py --data_dir /home/kin/data/av2/preprocess/sensor/mini --flow_mode deflow_best
19+
python3 tools/scene_flow.py --data_dir /home/kin/data/av2/preprocess/sensor/mini --flow_mode seflow_best
20+
```
21+
22+
Demo Effect (press `SPACE` to stop and start in the visualization window):
23+
24+
https://github.com/user-attachments/assets/f031d1a2-2d2f-4947-a01f-834ed1c146e6
25+
26+
## Conversion
27+
28+
run `tools/zero2ours.py` to convert the ZeroFlow pretrained model to our codebase.
29+
30+
```bash
31+
python tools/zero2ours.py --model_path /home/kin/nsfp_distilatation_3x_49_epochs.ckpt --reference_path /home/kin/fastflow3d.ckpt --output_path /home/kin/zeroflow3x.ckpt
32+
```
33+
34+
- model_path, you can download from: [kylevedder/zeroflow_weights](https://github.com/kylevedder/zeroflow_weights/tree/master/argo)
35+
- reference_path, you can download fastflow3d model from: [zendo](https://zenodo.org/records/12632962)
36+
- output_path, the converted model path. You can then run any evaluation script and visualization script with the converted model.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)