Skip to content

Commit fa809e4

Browse files
committed
feat: Update CC-3DT++ and config refactor.
1 parent c832021 commit fa809e4

39 files changed

+76
-99
lines changed

README.md

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
## Quickstart
1414

15-
You can checkout our [documentation](https://docs.vis.xyz/4d/index.html).
15+
You can checkout our [documentation](https://vis4d.readthedocs.io).
1616

1717
You can use the [template](https://github.com/SysCV/vis4d-template) here to start your own project with Vis4D.
1818

@@ -24,7 +24,7 @@ Installation is as easy as
2424
python3 -m pip install vis4d
2525
```
2626

27-
[For more detailed information, check out our installation guide](docs/source/user_guide/install.rst)
27+
[For more detailed information, check out our installation guide](https://vis4d.readthedocs.io/en/latest/user_guide/install.html)
2828

2929
## Basic CLI usage
3030

@@ -33,19 +33,13 @@ python3 -m pip install vis4d
3333
```bash
3434
# vis4d.engine
3535
vis4d fit --config vis4d/zoo/faster_rcnn/faster_rcnn_coco.py --gpus 1
36-
37-
# vis4d.pl
38-
vis4d-pl fit --config vis4d/zoo/faster_rcnn/faster_rcnn_coco.py --gpus 1
3936
```
4037

4138
- To test a model
4239

4340
```bash
4441
# vis4d.engine
4542
vis4d test --config vis4d/zoo/faster_rcnn/faster_rcnn_coco.py --gpus 1
46-
47-
# vis4d.pl
48-
vis4d-pl test --config vis4d/zoo/faster_rcnn/faster_rcnn_coco.py --gpus 1
4943
```
5044

5145
## DDP
@@ -55,43 +49,27 @@ vis4d-pl test --config vis4d/zoo/faster_rcnn/faster_rcnn_coco.py --gpus 1
5549
- Local machine / SLURM interactivate job (`job-name=bash`)
5650

5751
```bash
58-
# vis4d.engine
59-
./scripts/dist_train.sh <config-file> <num-gpus>
60-
61-
# vis4d.pl
62-
vis4d-pl fit --config <config-file> --gpus <num-gpus>
52+
vis4d fit --config <config-file> --gpus <num-gpus>
6353
```
6454

6555
- SLURM
6656

6757
```bash
68-
# vis4d.engine
69-
srun vis4d fit --config <config-file> --gpus <num-gpus> --slurm True
70-
71-
# vis4d.pl
72-
srun vis4d-pl fit --config <config-file> --gpus <num-gpus>
58+
srun vis4d fit --config <config-file> --gpus <num-gpus>
7359
```
7460

7561
### Testing
7662

7763
- Local machine / SLURM interactivate job (`job-name=bash`)
7864

7965
```bash
80-
# vis4d.engine
81-
./scripts/dist_test.sh <config-file> <num-gpus>
82-
83-
# vis4d.pl
84-
vis4d-pl test --config <config-file> --gpus <num-gpus>
66+
vis4d test --config <config-file> --gpus <num-gpus>
8567
```
8668

8769
- SLURM
8870

8971
```bash
90-
# vis4d.engine
91-
srun vis4d test --config <config-file> --gpus <num-gpus> --slurm True
92-
93-
# vis4d.pl
94-
srun vis4d-pl test --config <config-file> --gpus <num-gpus>
72+
srun vis4d test --config <config-file> --gpus <num-gpus>
9573
```
9674

9775
## Acknowledgement

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,10 @@ dependencies = {file = ["requirements/install.txt"]}
136136
include = ["vis4d*"]
137137

138138
[project.urls]
139-
"Documentation" = "https://docs.vis.xyz/4d"
139+
"Documentation" = "https://vis4d.readthedocs.io"
140140
"Source" = "https://github.com/syscv/vis4d"
141-
"Tracker" = "https://github.com/syscv/"
141+
"Tracker" = "https://github.com/syscv/vis4d/issues"
142142

143143
[project.scripts]
144144
vis4d = "vis4d.engine.run:entrypoint"
145-
vis4d-pl = "vis4d.pl.run:entrypoint"
146145
vis4d-zoo = "vis4d.zoo.run:entrypoint"

scripts/eval_nusc/README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,16 @@ pip install -r nusc.txt
1010
```
1111

1212
### Run
13-
- $WORK_DIR is your output folder which contains the prediction json file.
14-
- $VERSION is `mini` or `trainval` to select mini or validation split.
15-
1613
```bash
1714
# Detection
18-
python eval.py \
15+
python run.py \
1916
--input $FOLDER_OF_PREDICTION \
2017
--version $VERSION \
2118
--dataroot $NUSC_DATA_ROOT \
2219
--mode detection
2320

2421
# Tracking
25-
python eval.py \
22+
python run.py \
2623
--input $FOLDER_OF_PREDICTION \
2724
--version $VERSION \
2825
--dataroot $NUSC_DATA_ROOT \
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,14 @@ def print_metric_summary(metric_summary_path: str) -> None:
9797
parser.add_argument(
9898
"--version",
9999
"-v",
100-
choices=["v1.0-trainval", "v1.0-test", "v1.0-mini"],
100+
choices=["trainval", "mini"],
101101
help="NuScenes dataset version to convert.",
102102
)
103103
parser.add_argument(
104104
"--dataroot",
105105
"-d",
106106
help="NuScenes dataset root.",
107+
default="./data/nuscenes",
107108
)
108109
parser.add_argument(
109110
"-m",
@@ -120,7 +121,7 @@ def print_metric_summary(metric_summary_path: str) -> None:
120121
metric = "track_3d"
121122

122123
evaluate(
123-
args.version,
124+
f"v1.0-{args.version}",
124125
args.dataroot,
125126
args.mode,
126127
args.input,

tests/vis4d-test-data

Submodule vis4d-test-data updated 41 files

vis4d/op/track3d/cc_3dt.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ def _filter_detections(
115115
class_ids: Tensor,
116116
embeddings: Tensor,
117117
velocities: Tensor | None = None,
118-
) -> tuple[Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor]:
118+
) -> tuple[
119+
Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor | None, Tensor
120+
]:
119121
"""Remove overlapping objects across classes via nms.
120122
121123
Args:
@@ -239,7 +241,7 @@ def depth_ordering(
239241
)
240242
for v in obsvvv_velocities:
241243
velsim_weight_list.append(
242-
F.pairwise_distance(
244+
F.pairwise_distance( # pylint: disable=not-callable
243245
v, memory_velocities[:, -3:]
244246
).unsqueeze(0)
245247
)

vis4d/vis/image/functional.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def imshow(
3030
image: ArrayLike,
3131
image_mode: str = "RGB",
3232
image_viewer: ImageViewerBackend = MatplotlibImageViewer(),
33-
file_path: str | None = None,
3433
) -> None:
3534
"""Shows a single image.
3635
@@ -39,7 +38,6 @@ def imshow(
3938
image_mode (str, optional): Image Mode. Defaults to "RGB".
4039
image_viewer (ImageViewerBackend, optional): The Image viewer backend
4140
to use. Defaults to MatplotlibImageViewer().
42-
file_path (str): The path to save the image to. Defaults to None.
4341
"""
4442
image = preprocess_image(image, image_mode)
4543
image_viewer.show_images([image])
@@ -264,8 +262,6 @@ def imshow_masks(
264262
n_colors: int = 50,
265263
image_mode: str = "RGB",
266264
canvas: CanvasBackend = PillowCanvasBackend(),
267-
image_viewer: ImageViewerBackend = MatplotlibImageViewer(),
268-
file_path: str | None = None,
269265
) -> None:
270266
"""Shows semantic masks overlayed over the given image.
271267
@@ -280,14 +276,10 @@ def imshow_masks(
280276
image_mode (str, optional): Image Mode.. Defaults to "RGB".
281277
canvas (CanvasBackend, optional): Canvas backend to use.
282278
Defaults to PillowCanvasBackend().
283-
image_viewer (ImageViewerBackend, optional): The Image viewer backend
284-
to use. Defaults to MatplotlibImageViewer().
285-
file_path (str): The path to save the image to. Defaults to None.
286279
"""
287280
imshow(
288281
draw_masks(image, masks, class_ids, n_colors, image_mode, canvas),
289282
image_mode,
290-
image_viewer,
291283
)
292284

293285

@@ -427,8 +419,8 @@ def imshow_track_matches(
427419
r_canvas = draw_bboxes(
428420
ref_image, ref_box[batch_i], image_mode=image_mode
429421
)
430-
k_canvas = k_canvas.as_numpy_image()
431-
r_canvas = r_canvas.as_numpy_image()
432-
stacked_img = np.vstack([k_canvas, r_canvas])
422+
k_np_img = k_canvas.as_numpy_image()
423+
r_np_img = r_canvas.as_numpy_image()
424+
stacked_img = np.vstack([k_np_img, r_np_img])
433425

434426
imshow(stacked_img, image_mode, image_viewer)

vis4d/zoo/bdd100k/faster_rcnn/faster_rcnn_r50_1x_bdd100k.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def get_config() -> ExperimentConfig:
127127
class_config(
128128
VisualizerCallback,
129129
visualizer=class_config(BoundingBoxVisualizer, vis_freq=100),
130-
save_prefix=config.output_dir,
130+
output_dir=config.output_dir,
131131
test_connector=class_config(
132132
CallbackConnector, key_mapping=CONN_BBOX_2D_VIS
133133
),

vis4d/zoo/bdd100k/faster_rcnn/faster_rcnn_r50_3x_bdd100k.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def get_config() -> ExperimentConfig:
128128
class_config(
129129
VisualizerCallback,
130130
visualizer=class_config(BoundingBoxVisualizer, vis_freq=100),
131-
save_prefix=config.output_dir,
131+
output_dir=config.output_dir,
132132
test_connector=class_config(
133133
CallbackConnector, key_mapping=CONN_BBOX_2D_VIS
134134
),

vis4d/zoo/bdd100k/mask_rcnn/mask_rcnn_r50_1x_bdd100k.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def get_config() -> ExperimentConfig:
133133
class_config(
134134
VisualizerCallback,
135135
visualizer=class_config(SegMaskVisualizer, vis_freq=25),
136-
save_prefix=config.output_dir,
136+
output_dir=config.output_dir,
137137
test_connector=class_config(
138138
CallbackConnector, key_mapping=CONN_INS_MASK_2D_VIS
139139
),

0 commit comments

Comments
 (0)