The same as VAD data format.
Refer to tools/traj_clustering.py, which will cluster all trajectories to 4096 classes. The following component will be saved:
- Cluster centroids: saved in
npyformat - MiniBatchKMeans sklearn model: saved in
pklformat - Visualization as follows:
Assume run on 2-GPUs machine. RTX4090 or higher is recommended.
torchrun --nproc_per_node=2 \
--master_port=28510 \
adzoo/vad/train.py \
adzoo/vad/configs/VAD/VADv2_voca4096_config.py \
--launcher=pytorch \
--deterministicHere we use VADv2_voca4096_config.py as example to show the most frequently-used config
num_cams: camera config, 8 for nuplan and 6 for nuscenes.class_names: detection classes, here we combine the objects in both nusc and nuplan dataset.col_class: objects that involved in collision penalty loss.map_classes: layers in maps (.JSON). For example['divider', 'ped_crossing', 'boundary']for nuplan;['lane_divider', 'road_edge', 'crosswalk', 'centerline']for nuscenes.plan_fut_mode: number of clusters for VADv2.plan_anchors_path: path to store clusters. Note: Different numpy version will cause issue loading/saving the.npyfile. The example usenumpy==1.24.1forcluster_centers_ori. -data_root: root path for dataset. -ann_file_train/ann_file_test: path to annotation files, usually in.pklformat. Essentially is a list of dict where each dict is meta infos of single frame. -ann_file_map: check Tools section inREADME.mdfor Convert Nuplan Map to Json Tools.load_fromandresume_from: if to load pre-trained models. See documents formmcv.
torchrun --nproc_per_node=1 --master_port=28512 \
./adzoo/vad/test.py \
./adzoo/vad/configs/VAD/VADv2_voca4096_config.py \
path-2-your-model \
--launcher=pytorch \
--eval=bbox