-
Create a conda environment and install dependencies as specified in TNT.
-
Install the apex module.
git clone https://github.com/ptrblck/apex.git cd apex git checkout apex_no_distributed pip install -v --no-cache-dir ./
-
Install the Argoverse 1 API.
-
Download TFD/TFD-Example into ./dataset/v2x-seq-tfd with ${DATA_ROOT}
# Download TFD-Example into ./dataset/v2x-seq-tfd bash tools/dataset_example_download.sh # export DATA_ROOT, change the DATA_ROOT to TFD-Example data root export DATA_ROOT=${PWD}'/dataset/v2x-seq-tfd/V2X-Seq-TFD-Example'
-
Merge Multiple Maps into One Map
# Merge Multiple Maps into One Map python tools/data_converter/maps_merge.py --data_root ${DATA_ROOT}
-
Preprocess Cooperative-view Trajectories
# Preprocess Cooperative-view Trajectories --split train/val python tools/trajectory_fusion/fusion_for_prediction.py --data_root ${DATA_ROOT} --split train python tools/data_converter/tfd_converter.py --data_root ${DATA_ROOT} --split train python tools/trajectory_fusion/fusion_for_prediction.py --data_root ${DATA_ROOT} --split val python tools/data_converter/tfd_converter.py --data_root ${DATA_ROOT} --split val
-
DATA Preprocess
# Preprocess Raw Data cd projects/TNT_plugin python core/util/preprocessor/tfd_preprocess.py --root ${DATA_ROOT}/cooperative-vehicle-infrastructure/fusion_for_prediction python core/util/preprocessor/tfd_preprocess.py --root ${DATA_ROOT}/cooperative-vehicle-infrastructure/vehicle-trajectories python core/util/preprocessor/tfd_preprocess.py --root ${DATA_ROOT}/single-vehicle/trajectories python core/util/preprocessor/tfd_preprocess.py --root ${DATA_ROOT}/single-infrastructure/trajectories
-
Train the PP-VIC with TNT for Online task
cd projects/TNT_plugin bash tnt_train.sh ${GPU_ID} ${DATA_ROOT}/cooperative-vehicle-infrastructure/fusion_for_prediction/interm_data
-
Train the TNT for Offline task
cd projects/TNT_plugin # Pretrained with infrastructure trajectories bash tnt_pretrain.sh ${GPU_ID} ${DATA_ROOT}/single-infrastructure/trajectories/interm_data # Finetune with vehicle trajectories and pretrained model bash tnt_finetune.sh ${GPU_ID} ${DATA_ROOT}/cooperative-vehicle-infrastructure/vehicle-trajectories/interm_data ${PTH}
-
Evaluate the Trained PP-VIC with TNT for Online task. We have provided the trained online.pth.
cd projects/TNT_plugin bash tnt_eval.sh ${GPU_ID} ${DATA_ROOT}/cooperative-vehicle-infrastructure/fusion_for_prediction/interm_data ${PTH}
-
Evaluate the TNT for Offline task. We have provided the trained offline.pth.
cd projects/TNT_plugin bash tnt_eval.sh ${GPU_ID} ${DATA_ROOT}/cooperative-vehicle-infrastructure/vehicle-trajectories/interm_data ${PTH}