windows11下UniAD代码复现
1.环境安装
按照UniAD官方安装文档,安装环境。环境基本与BEVFormer一致(在此之前已安装BEVFormer的环境),需要额外安装几个包:
motmetrics==1.1.3
einops==0.4.1
casadi==3.5.5
pytorch-lightning==1.2.5
2.数据准备
在nuscenes官网下载数据:full dataset(v1.0)中的mini版本, CAN bus expansion , map expansion(v1.3) 。
下载的压缩包保存在本地:D:\Codes\Autonomous_Vehicles\end2end\nuscenes_data目录。
将v1.0-mini.tgz解压,将其中的4个文件(见下图)夹复制到 .\data\nuscenes 目录下:

将nuScenes-map-expansion-v1.3.zip文件解压,将其中的basemap、expansion、prediction这三个文件夹放在.\data\nuscenes\maps 目录下。
将can_bus.zip解压,放在 .\data\nuscenes\ 目录下。
将下面文件中的第30行代码修改为version='v1.0-mini':D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\tools\data_converter\uniad_nuscenes_converter.py

接着,打开 .\tools\uniad_create_data.sh 文件,将version v1.0 改为 v1.0-mini修改如下:

然后,在项目根目录下.\ ,右击鼠标打开git bash命令窗口,进入uniad的虚拟环境中,输入如下命令进行data infos生成(在此之前,需要在.\data\ 目录下创建名为infos的文件夹):
# This will generate nuscenes_infos_temporal_{train,val}.pkl
./tools/uniad_create_data.sh
上述操作后,将在 .\data\infos\ 下生成如下4个文件:

3.验证数据准备
接着,在git bash窗口,进入项目根目录,然后依次输入source activate、conda activate open-mmlab命令激活项目虚拟环境。验证数据准备输入如下指令(1 表示只有一个gpu):
./tools/uniad_dist_eval.sh ./projects/configs/stage1_track_map/base_track_map.py ./ckpts/uniad_base_track_map.pth 1
报错:FileNotFoundError: img file does not exist: data/nuscenes/./data/nuscenes\samples/CAM_FRONT/n008-2018-08-01-15-16-36-0400__CAM_FRONT__1533151603512404.jpg
[ ] 0/81, elapsed: 0s, ETA:Traceback (most recent call last):
File "./tools/test.py", line 267, in <module>
main()
File "./tools/test.py", line 231, in main
outputs = single_gpu_test(model, data_loader, args.show, args.show_dir)
File "d:\programdata\data\anaconda_envs\mmdetection3d\mmdet3d\apis\test.py", line 37, in single_gpu_test
for i, data in enumerate(data_loader):
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\utils\data\dataloader.py", line 521, in __next__
data = self._next_data()
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\utils\data\dataloader.py", line 561, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\utils\data\_utils\fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\utils\data\_utils\fetch.py", line 49, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\datasets\nuscenes_e2e_dataset.py", line 726, in __getitem__
return self.prepare_test_data(idx)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\datasets\nuscenes_e2e_dataset.py", line 254, in prepare_test_data
example = self.pipeline(input_dict)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmdet\datasets\pipelines\compose.py", line 40, in __call__
data = t(data)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\datasets\pipelines\loading.py", line 53, in __call__
img = mmcv.imread(img_path, self.color_type)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\image\io.py", line 176, in imread
check_file_exist(img_or_path,
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\utils\path.py", line 23, in check_file_exist
raise FileNotFoundError(msg_tmpl.format(filename))
FileNotFoundError: img file does not exist: data/nuscenes/./data/nuscenes\samples/CAM_FRONT/n008-2018-08-01-15-16-36-0400__CAM_FRONT__1533151603512404.jpg
在对应路径下可以找到该图片,所以不是没有图片的问题,是图片路径问题,按照该方法,对配置文件base_track_map.py修改:
在 .\projects\configs\stage1_track_map\base_track_map.py 代码第434行,将img_root=data_root 修改为img_root=""如下:
test_pipeline = [
dict(type='LoadMultiViewImageFromFilesInCeph', to_float32=True,
file_client_args=file_client_args, img_root=""), # img_root=data_root for v1.0-train/val, img_root="" for v1.0-mini
dict(type="NormalizeMultiviewImage", **img_norm_cfg),
dict(type="PadMultiViewImage", size_divisor=32),
dict(type='LoadAnnotations3D_E2E',
此外,由于gpu资源少,所以对base_track_map.py原代码还做了如下修改:
# 修改1:代码第49行
# NOTE: You can change queue_length from 5 to 3 to save GPU memory, but at risk of performance drop.
queue_length = 3 # each sequence contains `queue_length` frames. origin is 5.
# 修改2:代码第484、485行
data = dict(
samples_per_gpu=1, # origin is 1
workers_per_gpu=0, # origin is 8
# 修改3:代码第576行
total_epochs = 2 # origin is 6
对 train.py 和 test.py 的修改和在BEVFormer中的“2.训练与测试”对应的文件修改一样。
运行成功,结果如下:
$ ./tools/uniad_dist_eval.sh ./projects/configs/stage1_track_map/base_track_map.py ./ckpts/uniad_base_track_map.pth 1
NOTE: Redirects are currently not supported in Windows or MacOs.
projects.mmdet3d_plugin
======
Loading NuScenes tables for version v1.0-mini...
23 category,
8 attribute,
4 visibility,
911 instance,
12 sensor,
120 calibrated_sensor,
31206 ego_pose,
8 log,
10 scene,
404 sample,
31206 sample_data,
18538 sample_annotation,
4 map,
Done loading in 0.740 seconds.
======
Reverse indexing ...
Done reverse indexing in 0.1 seconds.
======
WARNING!!!!, Only can be used for obtain inference speed!!!!
load checkpoint from local path: ./ckpts/uniad_base_track_map.pth
2024-11-30 21:45:54,350 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.0.conv2 is upgraded to version 2.
2024-11-30 21:45:54,354 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.1.conv2 is upgraded to version 2.
2024-11-30 21:45:54,357 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.2.conv2 is upgraded to version 2.
2024-11-30 21:45:54,360 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.3.conv2 is upgraded to version 2.
2024-11-30 21:45:54,365 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.4.conv2 is upgraded to version 2.
2024-11-30 21:45:54,369 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.5.conv2 is upgraded to version 2.
2024-11-30 21:45:54,374 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.6.conv2 is upgraded to version 2.
2024-11-30 21:45:54,379 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.7.conv2 is upgraded to version 2.
2024-11-30 21:45:54,383 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.8.conv2 is upgraded to version 2.
2024-11-30 21:45:54,387 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.9.conv2 is upgraded to version 2.
2024-11-30 21:45:54,392 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.10.conv2 is upgraded to version 2.
2024-11-30 21:45:54,396 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.11.conv2 is upgraded to version 2.
2024-11-30 21:45:54,401 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.12.conv2 is upgraded to version 2.
2024-11-30 21:45:54,406 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.13.conv2 is upgraded to version 2.
2024-11-30 21:45:54,412 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.14.conv2 is upgraded to version 2.
2024-11-30 21:45:54,416 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.15.conv2 is upgraded to version 2.
2024-11-30 21:45:54,421 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.16.conv2 is upgraded to version 2.
2024-11-30 21:45:54,425 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.17.conv2 is upgraded to version 2.
2024-11-30 21:45:54,429 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.18.conv2 is upgraded to version 2.
2024-11-30 21:45:54,434 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.19.conv2 is upgraded to version 2.
2024-11-30 21:45:54,438 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.20.conv2 is upgraded to version 2.
2024-11-30 21:45:54,443 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.21.conv2 is upgraded to version 2.
2024-11-30 21:45:54,448 - root - INFO - ModulatedDeformConvPack img_backbone.layer3.22.conv2 is upgraded to version 2.
2024-11-30 21:45:54,453 - root - INFO - ModulatedDeformConvPack img_backbone.layer4.0.conv2 is upgraded to version 2.
2024-11-30 21:45:54,461 - root - INFO - ModulatedDeformConvPack img_backbone.layer4.1.conv2 is upgraded to version 2.
2024-11-30 21:45:54,466 - root - INFO - ModulatedDeformConvPack img_backbone.layer4.2.conv2 is upgraded to version 2.
The model and loaded state dict do not match exactly
unexpected key in source state_dict: bbox_size_fc.weight, bbox_size_fc.bias, occ_head.bev_light_proj.conv_layers.0.conv.weight, occ_head.bev_light_proj.conv_layers.0.bn.weight, occ_head.bev_light_proj.conv_layers.0.bn.bias, occ_head.bev_light_proj.conv_l
-------------------这里有一些数据,太多了,不展示了----------------------
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 81/81, 0.3 task/s, elapsed: 273s, ETA: 0s
writing results to output/results.pkl
Start to convert detection format...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 81/81, 71.6 task/s, elapsed: 1s, ETA: 0s
Results writes to test\base_track_map\Sat_Nov_30_21_50_27_2024\results_nusc.json
Start to convert detection format...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 81/81, 14.6 task/s, elapsed: 6s, ETA: 0s
Results writes to test\base_track_map\Sat_Nov_30_21_50_27_2024\results_nusc_det.json
Initializing nuScenes detection evaluation
Loaded results from test\base_track_map\Sat_Nov_30_21_50_27_2024\results_nusc_det.json. Found detections for 81 samples.
Loading annotations for mini_val split from nuScenes version: v1.0-mini
100%|▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒| 81/81 [00:00<00:00, 245.36it/s]
Loaded ground truth annotations for 81 samples.
Filtering predictions
=> Original number of boxes: 20135
=> After distance based filtering: 20130
=> After LIDAR and RADAR points based filtering: 20130
=> After bike rack filtering: 20005
Filtering ground truth annotations
=> Original number of boxes: 4441
=> After distance based filtering: 3785
=> After LIDAR and RADAR points based filtering: 3393
=> After bike rack filtering: 3393
Accumulating metric data...
Calculating metrics...
Saving metrics to: test\base_track_map\Sat_Nov_30_21_50_27_2024\det
mAP: 0.3663
mATE: 0.7677
mASE: 0.4669
mAOE: 0.6149
mAVE: 0.5953
mAAE: 0.3211
NDS: 0.4066
Eval time: 5.7s
Per-class results:
Object Class AP ATE ASE AOE AVE AAE
car 0.660 0.442 0.153 0.094 0.163 0.115
truck 0.456 0.829 0.185 0.059 0.086 0.000
bus 0.512 0.926 0.115 0.158 1.254 0.255
trailer 0.000 1.000 1.000 1.000 1.000 1.000
construction_vehicle 0.000 1.000 1.000 1.000 1.000 1.000
pedestrian 0.524 0.699 0.254 0.384 0.267 0.194
motorcycle 0.490 0.653 0.332 0.932 0.065 0.006
bicycle 0.367 0.707 0.240 0.907 0.927 0.000
traffic_cone 0.654 0.421 0.389 nan nan nan
barrier 0.000 1.000 1.000 1.000 nan nan
======
Loading NuScenes tables for version v1.0-mini...
23 category,
8 attribute,
4 visibility,
911 instance,
12 sensor,
120 calibrated_sensor,
31206 ego_pose,
8 log,
10 scene,
404 sample,
31206 sample_data,
18538 sample_annotation,
4 map,
Done loading in 1.140 seconds.
======
Reverse indexing ...
Done reverse indexing in 0.2 seconds.
======
Initializing nuScenes tracking evaluation
Loaded results from test\base_track_map\Sat_Nov_30_21_50_27_2024\results_nusc.json. Found detections for 81 samples.
Loading annotations for mini_val split from nuScenes version: v1.0-mini
100%|▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒| 81/81 [00:00<00:00, 253.34it/s]
Loaded ground truth annotations for 81 samples.
Filtering tracks
=> Original number of boxes: 3884
=> After distance based filtering: 3883
=> After LIDAR and RADAR points based filtering: 3883
=> After bike rack filtering: 3837
Filtering ground truth tracks
=> Original number of boxes: 4402
=> After distance based filtering: 3748
=> After LIDAR and RADAR points based filtering: 3358
=> After bike rack filtering: 3358
Accumulating metric data...
Computing metrics for class bicycle...
Computed thresholds
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4541 0.217 0.797 0.585 21 41 23 17 1 42 23 18 1
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5021 0.190 0.766 0.537 21 41 21 19 1 39 21 17 1
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5810 0.571 0.719 0.512 21 41 21 20 0 30 21 9 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5972 0.810 0.719 0.512 21 41 21 20 0 25 21 4 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6465 1.000 0.601 0.439 21 41 18 23 0 18 18 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6726 1.000 0.601 0.439 21 41 18 23 0 18 18 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6742 1.000 0.637 0.244 21 41 10 31 0 10 10 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6786 1.000 0.637 0.244 21 41 10 31 0 10 10 0 0
Computing metrics for class bus...
Computed thresholds 18.90it/s]
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8511 0.929 0.890 0.848 33 33 28 5 0 30 28 2 0
Computing metrics for class car...
Computed thresholds 1.02it/s]
MOTAR MOTP Recall Frames1.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4342 0.687 0.572 0.798 81 2188 1737 443 8 2289 1737 544 8
MOTAR MOTP Recall Frames3.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5289 0.752 0.563 0.781 81 2188 1703 479 6 2132 1703 423 6
MOTAR MOTP Recall Frames2.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5441 0.758 0.564 0.758 81 2188 1655 529 4 2059 1655 400 4
MOTAR MOTP Recall Frames3.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5735 0.790 0.560 0.741 81 2188 1617 567 4 1961 1617 340 4
MOTAR MOTP Recall Frames2.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5853 0.787 0.549 0.713 81 2188 1556 629 3 1891 1556 332 3
MOTAR MOTP Recall Frames4.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5996 0.791 0.545 0.678 81 2188 1482 704 2 1794 1482 310 2
MOTAR MOTP Recall Frames3.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6133 0.810 0.535 0.671 81 2188 1466 720 2 1747 1466 279 2
MOTAR MOTP Recall Frames4.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6415 0.846 0.535 0.647 81 2188 1413 773 2 1633 1413 218 2
MOTAR MOTP Recall Frames6.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6517 0.845 0.530 0.628 81 2188 1371 815 2 1585 1371 212 2
MOTAR MOTP Recall Frames6.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6643 0.838 0.515 0.600 81 2188 1311 875 2 1525 1311 212 2
MOTAR MOTP Recall Frames3.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6780 0.832 0.516 0.577 81 2188 1261 925 2 1475 1261 212 2
MOTAR MOTP Recall Frames7.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6813 0.825 0.510 0.553 81 2188 1208 978 2 1421 1208 211 2
MOTAR MOTP Recall Frames8.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7080 0.822 0.509 0.535 81 2188 1170 1017 1 1379 1170 208 1
MOTAR MOTP Recall Frames3.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7145 0.819 0.513 0.516 81 2188 1129 1058 1 1334 1129 204 1
MOTAR MOTP Recall Frames9.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7290 0.844 0.515 0.504 81 2188 1102 1086 0 1274 1102 172 0
MOTAR MOTP Recall Frames0.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7346 0.870 0.510 0.471 81 2188 1031 1157 0 1165 1031 134 0
MOTAR MOTP Recall Frames0.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7354 0.866 0.515 0.457 81 2188 1000 1188 0 1134 1000 134 0
MOTAR MOTP Recall Frames2.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7427 0.889 0.513 0.424 81 2188 928 1260 0 1031 928 103 0
MOTAR MOTP Recall Frames1.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7441 0.908 0.496 0.406 81 2188 888 1300 0 970 888 82 0
MOTAR MOTP Recall Frames0.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7522 0.902 0.493 0.383 81 2188 839 1349 0 921 839 82 0
MOTAR MOTP Recall Frames0.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7562 0.927 0.489 0.375 81 2188 821 1367 0 881 821 60 0
MOTAR MOTP Recall Frames2.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7633 0.933 0.482 0.333 81 2188 729 1459 0 778 729 49 0
MOTAR MOTP Recall Frames2.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7700 0.931 0.477 0.304 81 2188 665 1523 0 711 665 46 0
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7792 0.938 0.482 0.278 81 2188 608 1580 0 646 608 38 0
MOTAR MOTP Recall Frames5.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7897 0.943 0.476 0.250 81 2188 546 1642 0 577 546 31 0
MOTAR MOTP Recall Frames8.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7923 0.939 0.452 0.226 81 2188 495 1693 0 525 495 30 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7986 0.936 0.451 0.214 81 2188 468 1720 0 498 468 30 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8113 0.957 0.448 0.180 81 2188 393 1795 0 410 393 17 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8216 0.962 0.436 0.158 81 2188 346 1842 0 359 346 13 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8264 0.969 0.447 0.147 81 2188 321 1867 0 331 321 10 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8433 0.977 0.434 0.117 81 2188 257 1931 0 263 257 6 0
Computing metrics for class motorcycle...
Computed thresholds
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5148 0.967 0.744 0.554 49 224 123 100 1 128 123 4 1
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5517 0.966 0.759 0.527 49 224 117 106 1 122 117 4 1
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5764 0.960 0.780 0.451 49 224 101 123 0 105 101 4 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6009 0.952 0.663 0.375 49 224 84 140 0 88 84 4 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6287 0.941 0.589 0.304 49 224 68 156 0 72 68 4 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6863 0.933 0.573 0.268 49 224 60 164 0 64 60 4 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7780 1.000 0.509 0.188 49 224 42 182 0 42 42 0 0
Computing metrics for class pedestrian...
Computed thresholds 2.13it/s]
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4025 0.000 0.820 0.818 67 1088 827 198 63 1756 827 866 63
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4301 0.043 0.835 0.809 67 1088 820 208 60 1665 820 785 60
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4750 0.153 0.833 0.789 67 1088 803 230 55 1538 803 680 55
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4766 0.185 0.836 0.788 67 1088 802 231 55 1511 802 654 55
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5076 0.279 0.817 0.773 66 1088 792 247 49 1412 792 571 49
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5198 0.381 0.819 0.764 66 1088 783 257 48 1316 783 485 48
MOTAR MOTP Recall Frames5.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5541 0.461 0.811 0.739 66 1088 759 284 45 1213 759 409 45
MOTAR MOTP Recall Frames3.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5901 0.575 0.808 0.724 66 1088 748 300 40 1106 748 318 40
MOTAR MOTP Recall Frames6.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6149 0.641 0.803 0.699 66 1088 724 328 36 1020 724 260 36
MOTAR MOTP Recall Frames4.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6581 0.714 0.792 0.672 65 1088 704 357 27 932 704 201 27
MOTAR MOTP Recall Frames5.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6855 0.778 0.756 0.647 65 1088 685 384 19 856 685 152 19
MOTAR MOTP Recall Frames6.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6989 0.812 0.739 0.605 65 1088 644 430 14 779 644 121 14
MOTAR MOTP Recall Frames8.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7053 0.874 0.735 0.585 65 1088 628 451 9 716 628 79 9
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7157 0.874 0.711 0.560 65 1088 602 479 7 685 602 76 7
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7187 0.887 0.720 0.541 65 1088 584 499 5 655 584 66 5
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7309 0.900 0.709 0.500 65 1088 539 544 5 598 539 54 5
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7322 0.898 0.700 0.491 65 1088 529 554 5 588 529 54 5
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7440 0.889 0.719 0.445 65 1088 479 604 5 537 479 53 5
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7489 0.890 0.727 0.432 65 1088 465 618 5 521 465 51 5
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7516 0.894 0.722 0.415 65 1088 445 637 6 498 445 47 6
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7588 0.931 0.734 0.402 65 1088 432 651 5 467 432 30 5
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7736 0.922 0.738 0.358 65 1088 385 699 4 419 385 30 4
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7784 0.908 0.774 0.321 65 1088 346 739 3 381 346 32 3
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7819 0.907 0.748 0.289 65 1088 311 774 3 343 311 29 3
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7878 0.898 0.750 0.265 65 1088 285 800 3 317 285 29 3
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7906 0.902 0.730 0.256 65 1088 275 810 3 305 275 27 3
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8020 0.902 0.768 0.217 65 1088 234 852 2 259 234 23 2
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8119 0.931 0.731 0.188 65 1088 204 883 1 219 204 14 1
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8322 0.966 0.764 0.160 65 1088 174 914 0 180 174 6 0
Computing metrics for class trailer...
Computing metrics for class truck...
Computed thresholds
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7679 1.000 0.714 0.747 57 95 71 24 0 71 71 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7988 1.000 0.744 0.453 57 95 43 52 0 43 43 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8534 1.000 0.830 0.305 57 95 29 66 0 29 29 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8697 1.000 0.830 0.305 57 95 29 66 0 29 29 0 0
Calculating metrics...
Saving metrics to: test\base_track_map\Sat_Nov_30_21_50_27_2024\track
### Final results ###
Per-class results:
AMOTA AMOTP RECALL MOTAR GT MOTA MOTP MT ML FAF TP FP FN IDS FRAG TID LGD
bicycle 0.440 1.326 0.439 1.000 41 0.439 0.601 1 4 0.0 18 0 23 0 00.50 1.00
bus 0.766 1.084 0.848 0.929 33 0.788 0.890 1 0 6.1 28 2 5 0 00.00 2.50
car 0.672 0.841 0.781 0.752 2188 0.585 0.563 66 17 522.2 1703 423 479 6 81.59 1.78
motorcy 0.481 1.326 0.554 0.967 224 0.531 0.744 2 1 8.2 123 4 100 1 23.75 4.15
pedestr 0.510 1.104 0.585 0.874 1088 0.505 0.735 23 21 121.5 628 79 451 9 14 1.31 2.31
trailer nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
truck 0.725 1.101 0.747 1.000 95 0.747 0.714 2 1 0.0 71 0 24 0 11.33 2.17
Aggregated results:
AMOTA 0.599
AMOTP 1.130
RECALL 0.659
MOTAR 0.920
GT 611
MOTA 0.599
MOTP 0.708
MT 95
ML 44
FAF 109.7
TP 2571
FP 508
FN 1082
IDS 16
FRAG 25
TID 1.42
LGD 2.32
Eval time: 36.2s
4. 训练Training
在 .\projects\configs\stage1_track_map\base_track_map.py 代码第371行,将img_root=data_root 修改为img_root=""如下:
train_pipeline = [
dict(type="LoadMultiViewImageFromFilesInCeph", to_float32=True, file_client_args=file_client_args, img_root=""), # img_root=data_root for v1.0-train/val, img_root="" for v1.0-mini
运行如下命令:
# N_GPUS is the number of GPUs used. Recommended >=8. But here is 1.
./tools/uniad_dist_train.sh ./projects/configs/stage1_track_map/base_track_map.py 1
报错:
2024-11-30 22:43:04,532 - mmdet - INFO - workflow: [('train', 1)], max: 2 epochs
2024-11-30 22:43:04,533 - mmdet - INFO - Checkpoints will be saved to D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\projects\work_dirs\stage1_track_map\base_track_map by HardDiskBackend.
Traceback (most recent call last):
File "./tools/train.py", line 260, in <module>
main()
File "./tools/train.py", line 249, in main
custom_train_model(
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\apis\train.py", line 21, in custom_train_model
custom_train_detector(
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\apis\mmdet_train.py", line 194, in custom_train_detector
runner.run(data_loaders, cfg.workflow)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 127, in run
epoch_runner(data_loaders[i], **kwargs)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 50, in train
self.run_iter(data_batch, train_mode=True, **kwargs)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 29, in run_iter
outputs = self.model.train_step(data_batch, self.optimizer,
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\parallel\data_parallel.py", line 75, in train_step
return self.module.train_step(*inputs[0], **kwargs[0])
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmdet\models\detectors\base.py", line 237, in train_step
losses = self(**data)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\detectors\uniad_e2e.py", line 81, in forward
return self.forward_train(**kwargs)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\fp16_utils.py", line 98, in new_func
return old_func(*args, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\detectors\uniad_e2e.py", line 163, in forward_train
losses_track, outs_track = self.forward_track_train(img, gt_bboxes_3d, gt_labels_3d, gt_past_traj, gt_past_traj_mask, gt_inds, gt_sdc_bbox, gt_sdc_label,
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\fp16_utils.py", line 98, in new_func
return old_func(*args, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\detectors\uniad_track.py", line 555, in forward_track_train
frame_res = self._forward_single_frame_train(
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\fp16_utils.py", line 98, in new_func
return old_func(*args, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\detectors\uniad_track.py", line 453, in _forward_single_frame_train
track_instances, matched_indices = self.criterion.match_for_single_frame(
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\losses\track_loss.py", line 475, in match_for_single_frame
new_matched_indices = match_for_single_decoder_layer(
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\losses\track_loss.py", line 454, in match_for_single_decoder_layer
src_idx, tgt_idx = matcher.assign(bbox_pred, cls_pred, gt_bboxes,
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\core\bbox\assigners\hungarian_assigner_3d_track.py", line 94, in assign
cls_cost = self.cls_cost(cls_pred, gt_labels)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmdet\core\bbox\match_costs\match_cost.py", line 97, in __call__
cls_cost = pos_cost[:, gt_labels] - neg_cost[:, gt_labels]
IndexError: tensors used as indices must be long, byte or bool tensors
解决方法:在track_loss.py中修改:
又报新错: RuntimeError: Index put requires the source and destination dtypes match, got Long for the destination and Int for the source.
Traceback (most recent call last):
File "./tools/train.py", line 260, in <module>
main()
File "./tools/train.py", line 249, in main
custom_train_model(
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\apis\train.py", line 21, in custom_train_model
custom_train_detector(
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\apis\mmdet_train.py", line 194, in custom_train_detector
runner.run(data_loaders, cfg.workflow)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 127, in run
epoch_runner(data_loaders[i], **kwargs)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 50, in train
self.run_iter(data_batch, train_mode=True, **kwargs)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 29, in run_iter
outputs = self.model.train_step(data_batch, self.optimizer,
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\parallel\data_parallel.py", line 75, in train_step
return self.module.train_step(*inputs[0], **kwargs[0])
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmdet\models\detectors\base.py", line 237, in train_step
losses = self(**data)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\detectors\uniad_e2e.py", line 81, in forward
return self.forward_train(**kwargs)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\fp16_utils.py", line 98, in new_func
return old_func(*args, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\detectors\uniad_e2e.py", line 163, in forward_train
losses_track, outs_track = self.forward_track_train(img, gt_bboxes_3d, gt_labels_3d, gt_past_traj, gt_past_traj_mask, gt_inds, gt_sdc_bbox, gt_sdc_label,
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\fp16_utils.py", line 98, in new_func
return old_func(*args, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\detectors\uniad_track.py", line 555, in forward_track_train
frame_res = self._forward_single_frame_train(
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\fp16_utils.py", line 98, in new_func
return old_func(*args, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\detectors\uniad_track.py", line 453, in _forward_single_frame_train
track_instances, matched_indices = self.criterion.match_for_single_frame(
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\losses\track_loss.py", line 517, in match_for_single_frame
new_track_loss = self.get_loss(
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\losses\track_loss.py", line 189, in get_loss
return loss_map[loss](outputs, gt_instances, indices, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\losses\track_loss.py", line 319, in loss_labels
labels_per_img[J != -1] = gt_per_img.labels[J[J != -1]]
RuntimeError: Index put requires the source and destination dtypes match, got Long for the destination and Int for the source.
解决方法:对 projects/mmdet3d_plugin/losses/track_loss.py文件代码第315行修改:
for gt_per_img, (_, J) in zip(gt_instances, indices):
labels_per_img = torch.ones_like(J) * self.num_classes
# print("labels_per_img's dtype is : ", labels_per_img.dtype) # torch.int64--->long
# print("gt_per_img.labels's dtype is", gt_per_img.labels.dtype) # torch.int32
# set labels of track-appear slots to num_classes
if len(gt_per_img) > 0:
#修改:原代码没有下面这1行代码,为了解决RuntimeError: Index put requires the source and destination dtypes match, got Long for the destination and Int for the source. 而添加
gt_per_img.labels = gt_per_img.labels.long() # Tensor gt_per_img.labels datatype converter to long
labels_per_img[J != -1] = gt_per_img.labels[J[J != -1]]
labels.append(labels_per_img)
按照上述办法可以成功跑通训练trainning环节,但是我的显卡显存只有6G,爆显存了:
$ ./tools/uniad_dist_train.sh ./projects/configs/stage1_track_map/base_track_map.py 1
NOTE: Redirects are currently not supported in Windows or MacOs.
projects.mmdet3d_plugin
'gcc' is not recognized as an internal or external command,
operable program or batch file.
2024-12-01 11:11:03,566 - mmdet - INFO - Environment info:
------------------------------------------------------------
sys.platform: win32
Python: 3.8.19 (default, Mar 20 2024, 19:55:45) [MSC v.1916 64 bit (AMD64)]
CUDA available: True
GPU 0: NVIDIA GeForce RTX 4050 Laptop GPU
CUDA_HOME: D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3
NVCC: Build cuda_11.3.r11.3/compiler.29920130_0
GCC: n/a
PyTorch: 1.10.0+cu113
PyTorch compiling details: PyTorch built with:
- C++ Version: 199711
- MSVC 192829337
- Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v2.2.3 (Git Hash 7336ca9f055cf1bfa13efb658fe15dc9b41f0740)
- OpenMP 2019
- LAPACK is enabled (usually provided by MKL)
- CPU capability usage: AVX512
- CUDA Runtime 11.3
- NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=compute_37
- CuDNN 8.2
- Magma 2.5.4
- Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.3, CUDNN_VERSION=8.2.0, CXX_COMPILER=C:/w/b/windows/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -DUSE_PTHREADPOOL -openmp:experimental -IC:/w/b/windows/mkl/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.10.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON,
TorchVision: 0.11.0+cu113
OpenCV: 4.10.0
MMCV: 1.4.0
MMCV Compiler: MSVC 191627051
MMCV CUDA Compiler: 11.3
MMDetection: 2.14.0
MMSegmentation: 0.14.1
MMDetection3D: 0.17.1+7b5bf15
--------------------
2024-12-01 11:11:16,999 - mmdet - INFO - workflow: [('train', 1)], max: 2 epochs
2024-12-01 11:11:17,001 - mmdet - INFO - Checkpoints will be saved to D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\projects\work_dirs\stage1_track_map\base_track_map by HardDiskBackend.
Traceback (most recent call last):
File "./tools/train.py", line 260, in <module>
main()
File "./tools/train.py", line 249, in main
custom_train_model(
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\apis\train.py", line 21, in custom_train_model
custom_train_detector(
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\apis\mmdet_train.py", line 194, in custom_train_detector
runner.run(data_loaders, cfg.workflow)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 127, in run
epoch_runner(data_loaders[i], **kwargs)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 50, in train
self.run_iter(data_batch, train_mode=True, **kwargs)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 29, in run_iter
outputs = self.model.train_step(data_batch, self.optimizer,
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\parallel\data_parallel.py", line 75, in train_step
return self.module.train_step(*inputs[0], **kwargs[0])
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmdet\models\detectors\base.py", line 237, in train_step
losses = self(**data)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\detectors\uniad_e2e.py", line 81, in forward
return self.forward_train(**kwargs)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\fp16_utils.py", line 98, in new_func
return old_func(*args, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\detectors\uniad_e2e.py", line 163, in forward_train
losses_track, outs_track = self.forward_track_train(img, gt_bboxes_3d, gt_labels_3d, gt_past_traj, gt_past_traj_mask, gt_inds, gt_sdc_bbox, gt_sdc_label,
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\fp16_utils.py", line 98, in new_func
return old_func(*args, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\detectors\uniad_track.py", line 555, in forward_track_train
frame_res = self._forward_single_frame_train(
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\fp16_utils.py", line 98, in new_func
return old_func(*args, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\detectors\uniad_track.py", line 385, in _forward_single_frame_train
bev_embed, bev_pos = self.get_bevs(
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\detectors\uniad_track.py", line 348, in get_bevs
bev_embed, bev_pos = self.pts_bbox_head.get_bev_features(
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\dense_heads\track_head.py", line 149, in get_bev_features
bev_embed = self.transformer.get_bev_features(
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\fp16_utils.py", line 98, in new_func
return old_func(*args, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\modules\transformer.py", line 179, in get_bev_features
bev_embed = self.encoder(
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\fp16_utils.py", line 98, in new_func
return old_func(*args, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\modules\encoder.py", line 211, in forward
output = layer(
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\modules\encoder.py", line 379, in forward
query = self.attentions[attn_index](
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\runner\fp16_utils.py", line 186, in new_func
return old_func(*args, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\modules\spatial_cross_attention.py", line 161, in forward
queries = self.deformable_attention(query=queries_rebatch.view(bs*self.num_cams, max_len, self.embed_dims), key=key, value=value,
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\modules\spatial_cross_attention.py", line 389, in forward
output = MultiScaleDeformableAttnFunction.apply(
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\cuda\amp\autocast_mode.py", line 94, in decorate_fwd
return fwd(*args, **kwargs)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\uniad\modules\multi_scale_deformable_attn_function.py", line 118, in forward
output = ext_module.ms_deform_attn_forward(
RuntimeError: CUDA out of memory. Tried to allocate 56.00 MiB (GPU 0; 6.00 GiB total capacity; 16.82 GiB already allocated; 0 bytes free; 17.09 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
5.可视化
在pycharm直接运行run.py,出现以下错误:
Traceback (most recent call last):
File "D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\tools\analysis_tools\visualize\run.py", line 346, in <module>
main(args)
File "D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\tools\analysis_tools\visualize\run.py", line 308, in main
viser = Visualizer(version='v1.0-mini', predroot=args.predroot, dataroot='D:/Codes/Autonomous_Vehicles/end2end/Uni_ad/data/nuscenes', **render_cfg)
File "D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\tools\analysis_tools\visualize\run.py", line 62, in __init__
self.predictions = self._parse_predictions_multitask_pkl(predroot)
File "D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\tools\analysis_tools\visualize\run.py", line 85, in _parse_predictions_multitask_pkl
outputs = outputs['bbox_results'] # origin
TypeError: list indices must be integers or slices, not str
结合代码上下文,推测应该将报错的最后一行 outputs = outputs['bbox_results'] 注释掉,再次运行报错如下:
Traceback (most recent call last):
File "D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\tools\analysis_tools\visualize\run.py", line 346, in <module>
main(args)
File "D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\tools\analysis_tools\visualize\run.py", line 308, in main
viser = Visualizer(version='v1.0-mini', predroot=args.predroot, dataroot='D:/Codes/Autonomous_Vehicles/end2end/Uni_ad/data/nuscenes', **render_cfg)
File "D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\tools\analysis_tools\visualize\run.py", line 62, in __init__
self.predictions = self._parse_predictions_multitask_pkl(predroot)
File "D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\tools\analysis_tools\visualize\run.py", line 119, in _parse_predictions_multitask_pkl
trajs = outputs[k][f'traj'].numpy()
KeyError: 'traj'
参考网上办法,
# 先运行以下命令
./tools/uniad_dist_eval.sh ./projects/configs/stage2_e2e/base_e2e.py ./ckpts/uniad_base_e2e.pth 1
# 再运行以下命令
python ./tools/analysis_tools/visualize/run.py --predroot ./output/results.pkl --out_folder ./mydata/viz --demo_video mini_val_final.avi --project_to_cam True
运行上述第一条命令,报错如下:TypeError: cannot pickle 'dict_keys' object
[ ] 0/81, elapsed: 0s, ETA:Traceback (most recent call last):
File "./tools/test.py", line 267, in <module>
main()
File "./tools/test.py", line 231, in main
outputs = single_gpu_test(model, data_loader, args.show, args.show_dir)
File "d:\programdata\data\anaconda_envs\mmdetection3d\mmdet3d\apis\test.py", line 37, in single_gpu_test
for i, data in enumerate(data_loader):
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\utils\data\dataloader.py", line 359, in __iter__
return self._get_iterator()
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\utils\data\dataloader.py", line 305, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\utils\data\dataloader.py", line 918, in __init__
w.start()
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\multiprocessing\process.py", line 121, in start
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\multiprocessing\spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\multiprocessing\spawn.py", line 126, in _main
self = reduction.pickle.load(from_parent)
EOFError: Ran out of input
self._popen = self._Popen(self)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\multiprocessing\context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\multiprocessing\context.py", line 327, in _Popen
return Popen(process_obj)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\multiprocessing\popen_spawn_win32.py", line 93, in __init__
reduction.dump(process_obj, to_child)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle 'dict_keys' object
按照Arnold-FY-Chen的方法,在我的虚拟环境安装路径下这个文件D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\Lib\site-packages\nuscenes\eval\detection\data_classes.py里,代码第39行修改如下可解决:
self.class_names = list(self.class_range.keys()) # 原代码没有加 list() :为了解决TypeError: cannot pickle 'dict_keys' object
接着还是报错:FileNotFoundError: img file does not exist: data/nuscenes/./data/nuscenes\samples/CAM_FRONT/n008-2018-08-01-15-16-36-0400__CAM_FRONT__1533151603512404.jpg
File "./tools/test.py", line 231, in main
outputs = single_gpu_test(model, data_loader, args.show, args.show_dir)
File "d:\programdata\data\anaconda_envs\mmdetection3d\mmdet3d\apis\test.py", line 37, in single_gpu_test
for i, data in enumerate(data_loader):
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\utils\data\dataloader.py", line 521, in __next__
data = self._next_data()
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\utils\data\dataloader.py", line 561, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\utils\data\_utils\fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\torch\utils\data\_utils\fetch.py", line 49, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\datasets\nuscenes_e2e_dataset.py", line 726, in __getitem__
return self.prepare_test_data(idx)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\datasets\nuscenes_e2e_dataset.py", line 254, in prepare_test_data
example = self.pipeline(input_dict)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmdet\datasets\pipelines\compose.py", line 40, in __call__
data = t(data)
File "D:\Codes/Autonomous_Vehicles/end2end/Uni_ad\projects\mmdet3d_plugin\datasets\pipelines\loading.py", line 53, in __call__
img = mmcv.imread(img_path, self.color_type)
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\image\io.py", line 176, in imread
check_file_exist(img_or_path,
File "D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\mmcv\utils\path.py", line 23, in check_file_exist
raise FileNotFoundError(msg_tmpl.format(filename))
FileNotFoundError: img file does not exist: data/nuscenes/./data/nuscenes\samples/CAM_FRONT/n008-2018-08-01-15-16-36-0400__CAM_FRONT__1533151603512404.jpg
按照对配置文件base_track_map.py修改,对base_e2e.py做出相同的修改即可。
再次运行第一条命令:
# 先运行以下命令
./tools/uniad_dist_eval.sh ./projects/configs/stage2_e2e/base_e2e.py ./ckpts/uniad_base_e2e.pth 1
# 再运行以下命令
python ./tools/analysis_tools/visualize/run.py --predroot ./output/results.pkl --out_folder ./mydata/viz --demo_video mini_val_final.avi --project_to_cam True
运行成功结果如下 :
---------------运行成功部分结果如下-----------------------------
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 81/81, 0.2 task/s, elapsed: 365s, ETA: 0s
writing results to output/results.pkl
Start to convert detection format...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 81/81, 35.7 task/s, elapsed: 2s, ETA: 0s
Results writes to test\base_e2e\Sun_Dec__1_21_53_46_2024\results_nusc.json
Start to convert detection format...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 81/81, 15.2 task/s, elapsed: 5s, ETA: 0s
Results writes to test\base_e2e\Sun_Dec__1_21_53_46_2024\results_nusc_det.json
Initializing nuScenes detection evaluation
Loaded results from test\base_e2e\Sun_Dec__1_21_53_46_2024\results_nusc_det.json. Found detections for 81 samples.
Loading annotations for mini_val split from nuScenes version: v1.0-mini
100%|▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒| 81/81 [00:00<00:00, 194.55it/s]
Loaded ground truth annotations for 81 samples.
Filtering predictions
=> Original number of boxes: 20632
=> After distance based filtering: 20627
=> After LIDAR and RADAR points based filtering: 20627
=> After bike rack filtering: 20515
Filtering ground truth annotations
=> Original number of boxes: 4441
=> After distance based filtering: 3785
=> After LIDAR and RADAR points based filtering: 3393
=> After bike rack filtering: 3393
Accumulating metric data...
Calculating metrics...
Saving metrics to: test\base_e2e\Sun_Dec__1_21_53_46_2024\det
mAP: 0.3692
mATE: 0.7400
mASE: 0.4663
mAOE: 0.6459
mAVE: 0.6110
mAAE: 0.2920
NDS: 0.4091
Eval time: 5.7s
Per-class results:
Object Class AP ATE ASE AOE AVE AAE
car 0.656 0.438 0.155 0.113 0.168 0.106
truck 0.474 0.846 0.183 0.083 0.094 0.000
bus 0.536 0.709 0.167 0.110 1.329 0.036
trailer 0.000 1.000 1.000 1.000 1.000 1.000
construction_vehicle 0.000 1.000 1.000 1.000 1.000 1.000
pedestrian 0.481 0.744 0.262 0.440 0.303 0.194
motorcycle 0.487 0.693 0.352 1.089 0.063 0.000
bicycle 0.507 0.583 0.213 0.979 0.932 0.000
traffic_cone 0.551 0.386 0.331 nan nan nan
barrier 0.000 1.000 1.000 1.000 nan nan
======
Loading NuScenes tables for version v1.0-mini...
23 category,
8 attribute,
4 visibility,
911 instance,
12 sensor,
120 calibrated_sensor,
31206 ego_pose,
8 log,
10 scene,
404 sample,
31206 sample_data,
18538 sample_annotation,
4 map,
Done loading in 0.958 seconds.
======
Reverse indexing ...
Done reverse indexing in 0.2 seconds.
======
Initializing nuScenes tracking evaluation
Loaded results from test\base_e2e\Sun_Dec__1_21_53_46_2024\results_nusc.json. Found detections for 81 samples.
Loading annotations for mini_val split from nuScenes version: v1.0-mini
100%|▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒| 81/81 [00:00<00:00, 268.20it/s]
Loaded ground truth annotations for 81 samples.
Filtering tracks
=> Original number of boxes: 3948
=> After distance based filtering: 3948
=> After LIDAR and RADAR points based filtering: 3948
=> After bike rack filtering: 3924
Filtering ground truth tracks
=> Original number of boxes: 4402
=> After distance based filtering: 3748
=> After LIDAR and RADAR points based filtering: 3358
=> After bike rack filtering: 3358
Accumulating metric data...
Computing metrics for class bicycle...
Computed thresholds
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4288 0.692 0.596 0.659 21 41 26 14 1 35 26 8 1
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4489 0.619 0.633 0.537 21 41 21 19 1 30 21 8 1
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4613 0.682 0.634 0.537 21 41 22 19 0 29 22 7 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5180 0.857 0.644 0.512 21 41 21 20 0 24 21 3 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5351 0.857 0.644 0.512 21 41 21 20 0 24 21 3 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5976 1.000 0.609 0.463 21 41 19 22 0 19 19 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6306 1.000 0.609 0.463 21 41 19 22 0 19 19 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6411 1.000 0.608 0.244 21 41 10 31 0 10 10 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6924 1.000 0.608 0.244 21 41 10 31 0 10 10 0 0
Computing metrics for class bus...
Computed thresholds 17.67it/s]
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8691 0.926 0.823 0.818 33 33 27 6 0 29 27 2 0
Computing metrics for class car...
Computed thresholds 1.24s/it]
MOTAR MOTP Recall Frames1.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4355 0.644 0.579 0.797 81 2188 1734 445 9 2360 1734 617 9
MOTAR MOTP Recall Frames3.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4996 0.723 0.575 0.776 81 2188 1691 490 7 2166 1691 468 7
MOTAR MOTP Recall Frames2.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5090 0.736 0.568 0.766 81 2188 1670 511 7 2118 1670 441 7
MOTAR MOTP Recall Frames5.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5522 0.773 0.551 0.731 81 2188 1596 588 4 1963 1596 363 4
MOTAR MOTP Recall Frames6.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5982 0.814 0.549 0.708 81 2188 1547 639 2 1837 1547 288 2
MOTAR MOTP Recall Frames5.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6020 0.827 0.547 0.692 81 2188 1513 673 2 1776 1513 261 2
MOTAR MOTP Recall Frames5.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6142 0.839 0.539 0.670 81 2188 1463 723 2 1701 1463 236 2
MOTAR MOTP Recall Frames6.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6429 0.867 0.532 0.651 81 2188 1425 763 0 1615 1425 190 0
MOTAR MOTP Recall Frames6.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6558 0.883 0.525 0.631 81 2188 1380 808 0 1541 1380 161 0
MOTAR MOTP Recall Frames7.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6673 0.898 0.526 0.611 81 2188 1337 851 0 1474 1337 137 0
MOTAR MOTP Recall Frames8.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6761 0.905 0.523 0.589 81 2188 1288 900 0 1411 1288 123 0
MOTAR MOTP Recall Frames8.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6787 0.900 0.519 0.564 81 2188 1235 953 0 1358 1235 123 0
MOTAR MOTP Recall Frames9.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6965 0.895 0.525 0.537 81 2188 1176 1012 0 1299 1176 123 0
MOTAR MOTP Recall Frames9.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7144 0.904 0.522 0.509 81 2188 1114 1074 0 1221 1114 107 0
MOTAR MOTP Recall Frames8.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7250 0.914 0.520 0.495 81 2188 1083 1105 0 1176 1083 93 0
MOTAR MOTP Recall Frames4.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7367 0.922 0.518 0.466 81 2188 1020 1168 0 1100 1020 80 0
MOTAR MOTP Recall Frames0.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7667 0.920 0.504 0.441 81 2188 964 1224 0 1041 964 77 0
MOTAR MOTP Recall Frames1.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7703 0.916 0.501 0.420 81 2188 919 1269 0 996 919 77 0
MOTAR MOTP Recall Frames2.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7777 0.922 0.479 0.389 81 2188 851 1337 0 917 851 66 0
MOTAR MOTP Recall Frames1.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7824 0.921 0.479 0.374 81 2188 819 1369 0 884 819 65 0
MOTAR MOTP Recall Frames4.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7851 0.935 0.464 0.352 81 2188 770 1418 0 820 770 50 0
MOTAR MOTP Recall Frames3.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8003 0.939 0.469 0.308 81 2188 673 1515 0 714 673 41 0
MOTAR MOTP Recall Frames4.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8240 0.939 0.464 0.285 81 2188 624 1564 0 662 624 38 0
MOTAR MOTP Recall Frames5.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8250 0.941 0.475 0.264 81 2188 578 1610 0 612 578 34 0
MOTAR MOTP Recall Frames6.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8285 0.941 0.475 0.248 81 2188 543 1645 0 575 543 32 0
MOTAR MOTP Recall Frames5.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8386 0.935 0.464 0.227 81 2188 496 1692 0 528 496 32 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8474 0.955 0.457 0.192 81 2188 421 1767 0 440 421 19 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8510 0.951 0.460 0.179 81 2188 391 1797 0 410 391 19 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8552 0.951 0.459 0.150 81 2188 328 1860 0 344 328 16 0
MOTAR MOTP Recall Frames4.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8625 0.967 0.448 0.124 81 2188 271 1917 0 280 271 9 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8713 0.965 0.438 0.103 81 2188 226 1962 0 234 226 8 0
Computing metrics for class motorcycle...
Computed thresholds
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5028 1.000 0.662 0.473 49 224 105 118 1 106 105 0 1
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5653 1.000 0.663 0.469 49 224 104 119 1 105 104 0 1
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5726 1.000 0.607 0.442 49 224 99 125 0 99 99 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7040 1.000 0.571 0.415 49 224 93 131 0 93 93 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7054 1.000 0.555 0.366 49 224 82 142 0 82 82 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7088 1.000 0.554 0.308 49 224 69 155 0 69 69 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7186 1.000 0.538 0.259 49 224 58 166 0 58 58 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7325 1.000 0.538 0.259 49 224 58 166 0 58 58 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7933 1.000 0.464 0.188 49 224 42 182 0 42 42 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8085 1.000 0.446 0.125 49 224 28 196 0 28 28 0 0
Computing metrics for class pedestrian...
Computed thresholds 2.08it/s]
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4023 0.000 0.837 0.820 66 1088 813 196 79 1989 813 1097 79
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4382 0.000 0.849 0.813 66 1088 805 203 80 1817 805 932 80
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4631 0.000 0.836 0.799 66 1088 797 219 72 1714 797 845 72
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4758 0.023 0.832 0.788 66 1088 788 231 69 1627 788 770 69
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4921 0.149 0.830 0.781 66 1088 784 238 66 1517 784 667 66
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.4936 0.161 0.829 0.770 66 1088 775 250 63 1488 775 650 63
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5007 0.189 0.839 0.757 66 1088 767 264 57 1446 767 622 57
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5193 0.323 0.840 0.740 66 1088 755 283 50 1316 755 511 50
MOTAR MOTP Recall Framest/GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5388 0.375 0.820 0.716 66 1088 731 309 48 1236 731 457 48
MOTAR MOTP Recall Frames4.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5633 0.516 0.811 0.676 66 1088 694 353 41 1071 694 336 41
MOTAR MOTP Recall Frames5.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5888 0.515 0.800 0.632 66 1088 655 400 33 1006 655 318 33
MOTAR MOTP Recall Frames6.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.5969 0.523 0.797 0.618 66 1088 640 416 32 977 640 305 32
MOTAR MOTP Recall Frames5.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6076 0.560 0.778 0.604 66 1088 630 431 27 934 630 277 27
MOTAR MOTP Recall Frames5.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6314 0.603 0.783 0.580 66 1088 609 457 22 873 609 242 22
MOTAR MOTP Recall Frames8.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6363 0.584 0.766 0.551 66 1088 579 489 20 840 579 241 20
MOTAR MOTP Recall Frames8.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6377 0.567 0.780 0.528 66 1088 556 513 19 816 556 241 19
MOTAR MOTP Recall Frames7.GTit/s] GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6577 0.619 0.770 0.517 66 1088 546 525 17 771 546 208 17
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6821 0.755 0.784 0.472 66 1088 498 574 16 636 498 122 16
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.6942 0.772 0.782 0.461 66 1088 486 586 16 613 486 111 16
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7020 0.773 0.798 0.406 66 1088 431 646 11 540 431 98 11
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7225 0.843 0.772 0.358 66 1088 382 698 8 450 382 60 8
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7312 0.873 0.769 0.346 66 1088 370 712 6 423 370 47 6
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7587 0.954 0.724 0.287 66 1088 307 776 5 326 307 14 5
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7643 0.963 0.718 0.252 66 1088 270 814 4 284 270 10 4
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8014 0.970 0.674 0.221 66 1088 237 848 3 247 237 7 3
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8126 0.980 0.630 0.188 65 1088 202 883 3 209 202 4 3
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8176 0.983 0.564 0.160 65 1088 173 914 1 177 173 3 1
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8176 0.981 0.593 0.143 65 1088 155 932 1 159 155 3 1
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8210 0.992 0.664 0.112 65 1088 122 966 0 123 122 1 0
Computing metrics for class trailer...
Computing metrics for class truck...
Computed thresholds
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.7513 1.000 0.660 0.737 57 95 70 25 0 70 70 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8100 1.000 0.670 0.453 57 95 43 52 0 43 43 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8686 1.000 0.735 0.305 57 95 29 66 0 29 29 0 0
MOTAR MOTP Recall Frames GT GT-Mtch GT-Miss GT-IDS Pred Pred-TP Pred-FP Pred-IDS
thr_0.8862 1.000 0.735 0.305 57 95 29 66 0 29 29 0 0
Calculating metrics...
Saving metrics to: test\base_e2e\Sun_Dec__1_21_53_46_2024\track
### Final results ###
Per-class results:
AMOTA AMOTP RECALL MOTAR GT MOTA MOTP MT ML FAF TP FP FN IDS FRAG TID LGD
bicycle 0.537 1.167 0.463 1.000 41 0.463 0.609 2 4 0.0 19 0 22 0 0 0.33 0.83
bus 0.741 1.059 0.818 0.926 33 0.758 0.823 1 0 6.1 27 2 6 0 0 0.00 3.00
car 0.689 0.841 0.708 0.814 2188 0.575 0.549 59 25 355.6 1547 288 639 2 11 1.51 1.76
motorcy 0.425 1.382 0.473 1.000 224 0.469 0.662 2 2 0.0 105 0 118 1 1 3.94 4.11
pedestr 0.414 1.107 0.472 0.755 1088 0.346 0.784 19 28 184.8 498 122 574 16 8 1.94 2.55
trailer nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
truck 0.700 1.082 0.737 1.000 95 0.737 0.660 2 1 0.0 70 0 25 0 1 1.33 2.17
Aggregated results:
AMOTA 0.584
AMOTP 1.106
RECALL 0.612
MOTAR 0.916
GT 611
MOTA 0.558
MOTP 0.681
MT 85
ML 60
FAF 91.1
TP 2266
FP 412
FN 1384
IDS 19
FRAG 21
TID 1.51
LGD 2.40
Eval time: 35.0s
Rendering curves
Initializing nuScenes detection evaluation
Loaded results from test\base_e2e\Sun_Dec__1_21_53_46_2024\results_nusc.json. Found detections for 81 samples.
Loading annotations for mini_val split from nuScenes version: v1.0-mini
100%|▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒| 81/81 [00:01<00:00, 47.70it/s]
Loaded ground truth annotations for 81 samples.
Filtering predictions
=> Original number of boxes: 3948
=> After distance based filtering: 3948
=> After LIDAR and RADAR points based filtering: 3948
=> After bike rack filtering: 3948
Filtering ground truth annotations
=> Original number of boxes: 4441
=> After distance based filtering: 3808
=> After LIDAR and RADAR points based filtering: 3407
=> After bike rack filtering: 3407
--------------------------------------------------
Evaluate on motion category, merge class for vehicles and pedestrians...
evaluate standard motion metrics...
Accumulating metric data...
Calculating metrics...
+----------------------+-------------+-------------+---------------+
| class names | min_ade_err | min_fde_err | miss_rate_err |
+----------------------+-------------+-------------+---------------+
| car | 0.4587 | 0.5609 | 0.0689 |
| truck | 1.0000 | 1.0000 | 1.0000 |
| bus | 1.0000 | 1.0000 | 1.0000 |
| trailer | 1.0000 | 1.0000 | 1.0000 |
| construction_vehicle | 1.0000 | 1.0000 | 1.0000 |
| pedestrian | 0.7756 | 0.9683 | 0.1040 |
| motorcycle | 1.0000 | 1.0000 | 1.0000 |
| bicycle | 1.0000 | 1.0000 | 1.0000 |
| traffic_cone | 1.0000 | 1.0000 | 1.0000 |
| barrier | 1.0000 | 1.0000 | 1.0000 |
+----------------------+-------------+-------------+---------------+
Saving metrics to: test\base_e2e\Sun_Dec__1_21_53_46_2024
mAP: 0.1014
mATE: 0.9157
mASE: 0.8420
mAOE: 0.8406
mAVE: 0.8090
mAAE: 0.7867
NDS: 0.1313
Eval time: 6.6s
Per-class results:
Object Class AP ATE ASE AOE AVE AAE
car 0.565 0.443 0.163 0.144 0.188 0.101
truck 0.000 1.000 1.000 1.000 1.000 1.000
bus 0.000 1.000 1.000 1.000 1.000 1.000
trailer 0.000 1.000 1.000 1.000 1.000 1.000
construction_vehicle 0.000 1.000 1.000 1.000 1.000 1.000
pedestrian 0.448 0.714 0.256 0.421 0.284 0.193
motorcycle 0.000 1.000 1.000 1.000 1.000 1.000
bicycle 0.000 1.000 1.000 1.000 1.000 1.000
traffic_cone 0.000 1.000 1.000 nan nan nan
barrier 0.000 1.000 1.000 1.000 nan nan
evaluate motion mAP-minFDE metrics...
Accumulating metric data...
Calculating metrics...
+----------------------+-------------+-------------+---------------+
| class names | min_ade_err | min_fde_err | miss_rate_err |
+----------------------+-------------+-------------+---------------+
| car | 0.2685 | 0.2582 | 0.0144 |
| truck | 1.0000 | 1.0000 | 1.0000 |
| bus | 1.0000 | 1.0000 | 1.0000 |
| trailer | 1.0000 | 1.0000 | 1.0000 |
| construction_vehicle | 1.0000 | 1.0000 | 1.0000 |
| pedestrian | 0.5298 | 0.6161 | 0.0037 |
| motorcycle | 1.0000 | 1.0000 | 1.0000 |
| bicycle | 1.0000 | 1.0000 | 1.0000 |
| traffic_cone | 1.0000 | 1.0000 | 1.0000 |
| barrier | 1.0000 | 1.0000 | 1.0000 |
+----------------------+-------------+-------------+---------------+
Saving metrics to: test\base_e2e\Sun_Dec__1_21_53_46_2024
mAP: 0.0653
mATE: 0.8821
mASE: 0.8402
mAOE: 0.8361
mAVE: 0.7942
mAAE: 0.7857
NDS: 0.1188
Eval time: 2.1s
Per-class results:
Object Class AP ATE ASE AOE AVE AAE
car 0.410 0.325 0.161 0.133 0.105 0.082
truck 0.000 1.000 1.000 1.000 1.000 1.000
bus 0.000 1.000 1.000 1.000 1.000 1.000
trailer 0.000 1.000 1.000 1.000 1.000 1.000
construction_vehicle 0.000 1.000 1.000 1.000 1.000 1.000
pedestrian 0.243 0.496 0.242 0.392 0.249 0.203
motorcycle 0.000 1.000 1.000 1.000 1.000 1.000
bicycle 0.000 1.000 1.000 1.000 1.000 1.000
traffic_cone 0.000 1.000 1.000 nan nan nan
barrier 0.000 1.000 1.000 1.000 nan nan
evaluate EPA motion metrics...
Accumulating metric data...
1656 568 2305
EPA car 0.595227763144348
0 0 0
EPA truck 0.0
0 0 0
EPA bus 0.0
0 0 0
EPA trailer 0.0
0 0 0
EPA construction_vehicle 0.0
691 708 1067
EPA pedestrian 0.31583879741481913
0 0 0
EPA motorcycle 0.0
0 0 0
EPA bicycle 0.0
0 0 0
EPA traffic_cone 0.0
0 0 0
EPA barrier 0.0
Calculating metrics...
+----------------------+-------------+-------------+---------------+
| class names | min_ade_err | min_fde_err | miss_rate_err |
+----------------------+-------------+-------------+---------------+
| car | 0.3575 | 0.3388 | 0.0133 |
| truck | 1.0000 | 1.0000 | 1.0000 |
| bus | 1.0000 | 1.0000 | 1.0000 |
| trailer | 1.0000 | 1.0000 | 1.0000 |
| construction_vehicle | 1.0000 | 1.0000 | 1.0000 |
| pedestrian | 0.6671 | 0.7197 | 0.0037 |
| motorcycle | 1.0000 | 1.0000 | 1.0000 |
| bicycle | 1.0000 | 1.0000 | 1.0000 |
| traffic_cone | 1.0000 | 1.0000 | 1.0000 |
| barrier | 1.0000 | 1.0000 | 1.0000 |
+----------------------+-------------+-------------+---------------+
Saving metrics to: test\base_e2e\Sun_Dec__1_21_53_46_2024
mAP: 0.1026
mATE: 0.9140
mASE: 0.8416
mAOE: 0.8370
mAVE: 0.7942
mAAE: 0.7858
NDS: 0.1340
Eval time: 4.0s
Per-class results:
Object Class AP ATE ASE AOE AVE AAE
car 0.578 0.439 0.165 0.144 0.114 0.085
truck 0.000 1.000 1.000 1.000 1.000 1.000
bus 0.000 1.000 1.000 1.000 1.000 1.000
trailer 0.000 1.000 1.000 1.000 1.000 1.000
construction_vehicle 0.000 1.000 1.000 1.000 1.000 1.000
pedestrian 0.448 0.701 0.251 0.388 0.240 0.202
motorcycle 0.000 1.000 1.000 1.000 1.000 1.000
bicycle 0.000 1.000 1.000 1.000 1.000 1.000
traffic_cone 0.000 1.000 1.000 nan nan nan
barrier 0.000 1.000 1.000 1.000 nan nan
--------------------------------------------------
Evaluate on detection category...
Initializing nuScenes detection evaluation
Loaded results from test\base_e2e\Sun_Dec__1_21_53_46_2024\results_nusc.json. Found detections for 81 samples.
Loading annotations for mini_val split from nuScenes version: v1.0-mini
100%|▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒| 81/81 [00:01<00:00, 48.47it/s]
Loaded ground truth annotations for 81 samples.
Filtering predictions
=> Original number of boxes: 3948
=> After distance based filtering: 3948
=> After LIDAR and RADAR points based filtering: 3948
=> After bike rack filtering: 3924
Filtering ground truth annotations
=> Original number of boxes: 4441
=> After distance based filtering: 3785
=> After LIDAR and RADAR points based filtering: 3393
=> After bike rack filtering: 3393
evaluate standard motion metrics...
Accumulating metric data...
Calculating metrics...
+----------------------+-------------+-------------+---------------+
| class names | min_ade_err | min_fde_err | miss_rate_err |
+----------------------+-------------+-------------+---------------+
| car | 0.4160 | 0.5008 | 0.0607 |
| truck | 0.5939 | 0.5541 | 0.0000 |
| bus | 2.4687 | 4.5910 | 0.9445 |
| trailer | 1.0000 | 1.0000 | 1.0000 |
| construction_vehicle | 1.0000 | 1.0000 | 1.0000 |
| pedestrian | 0.7756 | 0.9683 | 0.1040 |
| motorcycle | 0.4740 | 0.4866 | 0.0000 |
| bicycle | 0.5067 | 0.4627 | 0.0684 |
| traffic_cone | 1.0000 | 1.0000 | 1.0000 |
| barrier | 1.0000 | 1.0000 | 1.0000 |
+----------------------+-------------+-------------+---------------+
Saving metrics to: test\base_e2e\Sun_Dec__1_21_53_46_2024
mAP: 0.3908
mATE: 0.7829
mASE: 0.5353
mAOE: 0.6380
mAVE: 0.6059
mAAE: 0.2925
NDS: 0.4099
Eval time: 1.7s
Per-class results:
Object Class AP ATE ASE AOE AVE AAE
car 0.766 0.413 0.153 0.106 0.169 0.111
truck 0.700 0.852 0.182 0.082 0.095 0.000
bus 0.782 0.709 0.167 0.110 1.329 0.036
trailer 0.000 1.000 1.000 1.000 1.000 1.000
construction_vehicle 0.000 1.000 1.000 1.000 1.000 1.000
pedestrian 0.637 0.714 0.256 0.421 0.284 0.193
motorcycle 0.432 0.575 0.383 1.056 0.068 0.000
bicycle 0.591 0.566 0.210 0.967 0.903 0.000
traffic_cone 0.000 1.000 1.000 nan nan nan
barrier 0.000 1.000 1.000 1.000 nan nan
evaluate EPA motion metrics...
Accumulating metric data...
Calculating metrics...
+----------------------+-------------+-------------+---------------+
| class names | min_ade_err | min_fde_err | miss_rate_err |
+----------------------+-------------+-------------+---------------+
| car | 0.2575 | 0.2477 | 0.0152 |
| truck | 0.3215 | 0.2839 | 0.0000 |
| bus | 1.0000 | 1.0000 | 1.0000 |
| trailer | 1.0000 | 1.0000 | 1.0000 |
| construction_vehicle | 1.0000 | 1.0000 | 1.0000 |
| pedestrian | 0.5298 | 0.6161 | 0.0037 |
| motorcycle | 0.3716 | 0.3797 | 0.0000 |
| bicycle | 0.5500 | 0.4884 | 0.0815 |
| traffic_cone | 1.0000 | 1.0000 | 1.0000 |
| barrier | 1.0000 | 1.0000 | 1.0000 |
+----------------------+-------------+-------------+---------------+
Saving metrics to: test\base_e2e\Sun_Dec__1_21_53_46_2024
mAP: 0.1552
mATE: 0.7245
mASE: 0.6133
mAOE: 0.7148
mAVE: 0.5314
mAAE: 0.4117
NDS: 0.2781
Eval time: 2.0s
Per-class results:
Object Class AP ATE ASE AOE AVE AAE
car 0.457 0.311 0.151 0.091 0.101 0.090
truck 0.288 0.464 0.168 0.079 0.054 0.000
bus 0.000 1.000 1.000 1.000 1.000 1.000
trailer 0.000 1.000 1.000 1.000 1.000 1.000
construction_vehicle 0.000 1.000 1.000 1.000 1.000 1.000
pedestrian 0.243 0.496 0.242 0.392 0.249 0.203
motorcycle 0.267 0.466 0.387 1.130 0.070 0.000
bicycle 0.297 0.508 0.185 0.741 0.778 0.000
traffic_cone 0.000 1.000 1.000 nan nan nan
barrier 0.000 1.000 1.000 1.000 nan nan
evaluate EPA motion metrics...
Accumulating metric data...
1449 536 1913
EPA car 0.6173549366578415
68 0 95
EPA truck 0.7157893983379581
5 4 33
EPA bus 0.09090906336088989
0 0 0
EPA trailer 0.0
0 0 0
EPA construction_vehicle 0.0
691 708 1067
EPA pedestrian 0.31583879741481913
104 4 214
EPA motorcycle 0.47663549174600506
21 10 36
EPA bicycle 0.4444443209876886
0 0 0
EPA traffic_cone 0.0
0 0 0
EPA barrier 0.0
Calculating metrics...
+----------------------+-------------+-------------+---------------+
| class names | min_ade_err | min_fde_err | miss_rate_err |
+----------------------+-------------+-------------+---------------+
| car | 0.3340 | 0.3155 | 0.0142 |
| truck | 0.6090 | 0.5683 | 0.0000 |
| bus | 1.4343 | 1.4915 | 0.0000 |
| trailer | 1.0000 | 1.0000 | 1.0000 |
| construction_vehicle | 1.0000 | 1.0000 | 1.0000 |
| pedestrian | 0.6671 | 0.7197 | 0.0037 |
| motorcycle | 0.4801 | 0.4932 | 0.0000 |
| bicycle | 0.5675 | 0.5152 | 0.0769 |
| traffic_cone | 1.0000 | 1.0000 | 1.0000 |
| barrier | 1.0000 | 1.0000 | 1.0000 |
+----------------------+-------------+-------------+---------------+
Saving metrics to: test\base_e2e\Sun_Dec__1_21_53_46_2024
mAP: 0.2554
mATE: 0.8370
mASE: 0.5349
mAOE: 0.6088
mAVE: 0.4623
mAAE: 0.3451
NDS: 0.3489
Eval time: 3.8s
Per-class results:
Object Class AP ATE ASE AOE AVE AAE
car 0.622 0.408 0.155 0.105 0.110 0.093
truck 0.658 0.850 0.182 0.076 0.094 0.000
bus 0.005 1.258 0.187 0.049 0.299 0.466
trailer 0.000 1.000 1.000 1.000 1.000 1.000
construction_vehicle 0.000 1.000 1.000 1.000 1.000 1.000
pedestrian 0.448 0.701 0.251 0.388 0.240 0.202
motorcycle 0.415 0.579 0.384 1.058 0.069 0.000
bicycle 0.407 0.572 0.190 0.803 0.887 0.000
traffic_cone 0.000 1.000 1.000 nan nan nan
barrier 0.000 1.000 1.000 1.000 nan nan
接着,运行下面的第2行指令:(发现不好在pycharm命令窗口里运行,会报错找不到安装包),改为在run.py里设置好指令要求的路径,直接在pycharm运行run.py:
# 先运行以下命令
./tools/uniad_dist_eval.sh ./projects/configs/stage2_e2e/base_e2e.py ./ckpts/uniad_base_e2e.pth 1
# 再运行以下命令
python ./tools/analysis_tools/visualize/run.py --predroot ./output/results.pkl --out_folder ./mydata/viz --demo_video mini_val_final.avi --project_to_cam True
报错:KeyError: 'command'
通过打印outputs内容:显示其包含81个dict,每个dict内容如下:
occ
planning
token
track_bbox_results
boxes_3d
scores_3d
labels_3d
track_scores
track_ids
sdc_boxes_3d
sdc_scores_3d
sdc_track_scores
sdc_track_bbox_results
boxes_3d_det
scores_3d_det
labels_3d_det
traj_0
traj_scores_0
traj_1
traj_scores_1
traj
traj_scores
ret_iou
修改如下:show_command设置为True

又报错:KeyError: 'planning_traj'
Traceback (most recent call last):
File "D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\tools\analysis_tools\visualize\run.py", line 347, in <module>
main(args)
File "D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\tools\analysis_tools\visualize\run.py", line 309, in main
viser = Visualizer(version='v1.0-mini', predroot=args.predroot, dataroot='D:/Codes/Autonomous_Vehicles/end2end/Uni_ad/data/nuscenes', **render_cfg)
File "D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\tools\analysis_tools\visualize\run.py", line 62, in __init__
self.predictions = self._parse_predictions_multitask_pkl(predroot)
File "D:\Codes\Autonomous_Vehicles\end2end\Uni_ad\tools\analysis_tools\visualize\run.py", line 207, in _parse_predictions_multitask_pkl
outputs[k]['planning_traj'][0].cpu().detach().numpy(),
KeyError: 'planning_traj'
调试时查看outputs构成中没有'planning_traj'这个key,只有'planning',于是修改run.py代码第207行:
接着,修改run.py的main()函数,以下注释为修改部分:
def main(args):
render_cfg = dict(
with_occ_map=False,
with_map=False,
with_planning=True,
with_pred_box=True,
with_pred_traj=True,
show_gt_boxes=False,
show_lidar=False,
show_command=False, # origin is True, set False is to solve : KeyError: 'command'
show_hd_map=False,
show_sdc_car=False, # origin is True, set False is to solve : cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:196: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
show_legend=False, # origin is True, set False is to solve : [ WARN:0@19.561] global loadsave.cpp:241 cv::findDecoder imread_('sources/legend.png'): can't open/read file: check file path/integrity
show_sdc_traj=False
)
再在pycharm中直接运行run.py,运行成功,生成一些.jpg文件:
Loading NuScenes tables for version v1.0-mini...
23 category,
8 attribute,
4 visibility,
911 instance,
12 sensor,
120 calibrated_sensor,
31206 ego_pose,
8 log,
10 scene,
404 sample,
31206 sample_data,
18538 sample_annotation,
4 map,
Done loading in 0.689 seconds.
======
Reverse indexing ...
Done reverse indexing in 0.1 seconds.
======
saving to D:/Codes/Autonomous_Vehicles/end2end/Uni_ad/mydata/viz/039.jpg
D:\ProgramData\Data\Anaconda_envs\envs\open-mmlab\lib\site-packages\nuscenes\utils\geometry_utils.py:52: RuntimeWarning: invalid value encountered in divide
points = points / points[2:3, :].repeat(3, 0).reshape(3, nbr_points)
saving to D:/Codes/Autonomous_Vehicles/end2end/Uni_ad/mydata/viz/039_cam.jpg
saving to D:/Codes/Autonomous_Vehicles/end2end/Uni_ad/mydata/viz/040.jpg
saving to D:/Codes/Autonomous_Vehicles/end2end/Uni_ad/mydata/viz/040_cam.jpg
saving to D:/Codes/Autonomous_Vehicles/end2end/Uni_ad/mydata/viz/041.jpg
--------------------由于篇幅限制,只展示部分--------------------------------


更多推荐
所有评论(0)