Open YangChen1234567 opened 10 months ago
I am running into something similar when I try to use my own dataset. I suspect the issue is related to the definition of the 3D bounding boxes. In the Nuscenes this conversion is made: https://github.com/open-mmlab/mmdetection3d/blob/fe25f7a51d36e3702f961e198894580d83c4387b/mmdet3d/datasets/nuscenes_dataset.py#L184
Whereas in the Waymo dataset this conversion is made: https://github.com/open-mmlab/mmdetection3d/blob/fe25f7a51d36e3702f961e198894580d83c4387b/mmdet3d/datasets/waymo_dataset.py#L169
Could you try to replace the conversion of the Nuscenes with the conversion defined in the Waymo dataset?
yes, it's different. But I visualized the detection result with test.py, found that the orientation and location is correct. It seems that there is no relationship between low mAP and definition of gt_bboxes_3d??? Anyway, I will try it. Thank you very much~~~
I am running into something similar when I try to use my own dataset. I suspect the issue is related to the definition of the 3D bounding boxes. In the Nuscenes this conversion is made:
Whereas in the Waymo dataset this conversion is made:
Could you try to replace the conversion of the Nuscenes with the conversion defined in the Waymo dataset?
yes, it's different. But I visualized the detection result with test.py, found that the orientation and location is correct. It seems that there is no relationship between low mAP and definition of gt_bboxes_3d??? Anyway, I will try it. Thank you very much~~~
Please ignore my suggestion, it seems I had some mix-up regarding bbox definitions with my own code.
Any progress on the nuScenes dataset?
Please ignore my suggestion, it seems I had some mix-up regarding bbox definitions with my own code.
Any progress on the nuScenes dataset?
no progress.....
@YangChen1234567 Is it only Nuscenes? Or did you also test it on waymo with bad results?
@YangChen1234567 Is it only Nuscenes? Or did you also test it on waymo with bad results?
I just train DSVT on Nuscenes, didn't train or test it on waymo.....
I will train it on waymo the next couple of days and report if I am able to reproduce the results.
However, it would be quite nice to have it trained on nuscenes.
I will train it on waymo the next couple of days and report if I am able to reproduce the results.
However, it would be quite nice to have it trained on nuscenes. ok~~~~
@MarvinKlemp Hi~ Have you reproduced DSVT on Waymo dataset?
@YangChen1234567 No im still struggling with creating the data ... the official docker doesn't work. But I'm on it, unfortunately the process dies after like 5 or 6 hours... So it might take some time until I fixed all errors
Training is running now I will report you the results in ~6h
@YangChen1234567 on waymo I can recreate the results.
I could try to recreate your NUS training. But I need some time to generate the GT for NUS.
OBJECT_TYPE_TYPE_VEHICLE_LEVEL_1: [mAP 0.751092] [mAPH 0.746194]
OBJECT_TYPE_TYPE_VEHICLE_LEVEL_2: [mAP 0.666377] [mAPH 0.661924]
OBJECT_TYPE_TYPE_PEDESTRIAN_LEVEL_1: [mAP 0.79377] [mAPH 0.718119]
OBJECT_TYPE_TYPE_PEDESTRIAN_LEVEL_2: [mAP 0.716397] [mAPH 0.64581]
OBJECT_TYPE_TYPE_SIGN_LEVEL_1: [mAP 0] [mAPH 0]
OBJECT_TYPE_TYPE_SIGN_LEVEL_2: [mAP 0] [mAPH 0]
OBJECT_TYPE_TYPE_CYCLIST_LEVEL_1: [mAP 0.716416] [mAPH 0.705113]
OBJECT_TYPE_TYPE_CYCLIST_LEVEL_2: [mAP 0.689657] [mAPH 0.678767]
RANGE_TYPE_VEHICLE_[0, 30)_LEVEL_1: [mAP 0.916769] [mAPH 0.912312]
RANGE_TYPE_VEHICLE_[0, 30)_LEVEL_2: [mAP 0.904136] [mAPH 0.899727]
RANGE_TYPE_VEHICLE_[30, 50)_LEVEL_1: [mAP 0.735015] [mAPH 0.729594]
RANGE_TYPE_VEHICLE_[30, 50)_LEVEL_2: [mAP 0.669861] [mAPH 0.664837]
RANGE_TYPE_VEHICLE_[50, +inf)_LEVEL_1: [mAP 0.511822] [mAPH 0.505538]
RANGE_TYPE_VEHICLE_[50, +inf)_LEVEL_2: [mAP 0.394505] [mAPH 0.389454]
RANGE_TYPE_PEDESTRIAN_[0, 30)_LEVEL_1: [mAP 0.842599] [mAPH 0.776197]
RANGE_TYPE_PEDESTRIAN_[0, 30)_LEVEL_2: [mAP 0.805566] [mAPH 0.740443]
RANGE_TYPE_PEDESTRIAN_[30, 50)_LEVEL_1: [mAP 0.78144] [mAPH 0.700494]
RANGE_TYPE_PEDESTRIAN_[30, 50)_LEVEL_2: [mAP 0.714023] [mAPH 0.63854]
RANGE_TYPE_PEDESTRIAN_[50, +inf)_LEVEL_1: [mAP 0.694307] [mAPH 0.595241]
RANGE_TYPE_PEDESTRIAN_[50, +inf)_LEVEL_2: [mAP 0.559821] [mAPH 0.476233]
RANGE_TYPE_SIGN_[0, 30)_LEVEL_1: [mAP 0] [mAPH 0]
RANGE_TYPE_SIGN_[0, 30)_LEVEL_2: [mAP 0] [mAPH 0]
RANGE_TYPE_SIGN_[30, 50)_LEVEL_1: [mAP 0] [mAPH 0]
RANGE_TYPE_SIGN_[30, 50)_LEVEL_2: [mAP 0] [mAPH 0]
RANGE_TYPE_SIGN_[50, +inf)_LEVEL_1: [mAP 0] [mAPH 0]
RANGE_TYPE_SIGN_[50, +inf)_LEVEL_2: [mAP 0] [mAPH 0]
RANGE_TYPE_CYCLIST_[0, 30)_LEVEL_1: [mAP 0.805891] [mAPH 0.795459]
RANGE_TYPE_CYCLIST_[0, 30)_LEVEL_2: [mAP 0.800108] [mAPH 0.789751]
RANGE_TYPE_CYCLIST_[30, 50)_LEVEL_1: [mAP 0.677743] [mAPH 0.666282]
RANGE_TYPE_CYCLIST_[30, 50)_LEVEL_2: [mAP 0.639797] [mAPH 0.628965]
RANGE_TYPE_CYCLIST_[50, +inf)_LEVEL_1: [mAP 0.54664] [mAPH 0.530787]
RANGE_TYPE_CYCLIST_[50, +inf)_LEVEL_2: [mAP 0.508892] [mAPH 0.494123]
Eval Using 216s
@YangChen1234567
I trained it using your config. However, I am unable to run the evaluation using your config
Formating bboxes of pred_instances_3d
Start to convert detection format...
[ ] 0/6019, elapsed: 0s, ETA:Traceback (most recent call last):
File "tools/test.py", line 149, in <module>
main()
File "tools/test.py", line 145, in main
runner.test()
File "/usr/local/lib/python3.8/dist-packages/mmengine/runner/runner.py", line 1823, in test
metrics = self.test_loop.run() # type: ignore
File "/usr/local/lib/python3.8/dist-packages/mmengine/runner/loops.py", line 446, in run
metrics = self.evaluator.evaluate(len(self.dataloader.dataset))
File "/usr/local/lib/python3.8/dist-packages/mmengine/evaluator/evaluator.py", line 79, in evaluate
_results = metric.evaluate(size)
File "/usr/local/lib/python3.8/dist-packages/mmengine/evaluator/metric.py", line 133, in evaluate
_metrics = self.compute_metrics(results) # type: ignore
File "/workspace/mmdetection3d/mmdet3d/evaluation/metrics/nuscenes_metric.py", line 166, in compute_metrics
result_dict, tmp_dir = self.format_results(results, classes,
File "/workspace/mmdetection3d/mmdet3d/evaluation/metrics/nuscenes_metric.py", line 307, in format_results
result_dict[name] = self._format_lidar_bbox(
File "/workspace/mmdetection3d/mmdet3d/evaluation/metrics/nuscenes_metric.py", line 512, in _format_lidar_bbox
boxes = lidar_nusc_box_to_global(self.data_infos[sample_idx],
File "/workspace/mmdetection3d/mmdet3d/evaluation/metrics/nuscenes_metric.py", line 653, in lidar_nusc_box_to_global
box.rotate(
File "/usr/local/lib/python3.8/dist-packages/nuscenes/utils/data_classes.py", line 601, in rotate
self.velocity = np.dot(quaternion.rotation_matrix, self.velocity)
File "<__array_function__ internals>", line 180, in dot
ValueError: shapes (3,3) and (1,) not aligned: 3 (dim 1) != 1 (dim 0)
Did you encounter something similar? I didn't notice it until the last epoch, as you disabled validation during training and i can eval other methods on NUS without such errors
EDIT: Fixed it by adding code_size = 9 and a head for vel
BTW: I can confirm that with your config I get quite bad results.
Evaluating bboxes of pred_instances_3d
mAP: 0.3820
mATE: 0.3414
mASE: 0.2582
mAOE: 0.3073
mAVE: 1.3762
mAAE: 0.4810
NDS: 0.4522
Eval time: 132.7s
Per-class results:
Object Class AP ATE ASE AOE AVE AAE
car 0.753 0.181 0.152 0.098 1.878 0.479
truck 0.402 0.292 0.173 0.125 1.198 0.391
bus 0.474 0.327 0.177 0.064 2.334 0.655
trailer 0.131 0.479 0.224 0.561 0.813 0.312
construction_vehicle 0.086 0.817 0.422 0.967 0.191 0.383
pedestrian 0.717 0.152 0.270 0.331 1.047 0.821
motorcycle 0.433 0.203 0.245 0.219 2.374 0.550
bicycle 0.207 0.177 0.273 0.296 1.175 0.258
traffic_cone 0.406 0.179 0.337 nan nan nan
barrier 0.210 0.606 0.308 0.105 nan nan
@YangChen1234567 on waymo I can recreate the results.
I could try to recreate your NUS training. But I need some time to generate the GT for NUS.
OBJECT_TYPE_TYPE_VEHICLE_LEVEL_1: [mAP 0.751092] [mAPH 0.746194] OBJECT_TYPE_TYPE_VEHICLE_LEVEL_2: [mAP 0.666377] [mAPH 0.661924] OBJECT_TYPE_TYPE_PEDESTRIAN_LEVEL_1: [mAP 0.79377] [mAPH 0.718119] OBJECT_TYPE_TYPE_PEDESTRIAN_LEVEL_2: [mAP 0.716397] [mAPH 0.64581] OBJECT_TYPE_TYPE_SIGN_LEVEL_1: [mAP 0] [mAPH 0] OBJECT_TYPE_TYPE_SIGN_LEVEL_2: [mAP 0] [mAPH 0] OBJECT_TYPE_TYPE_CYCLIST_LEVEL_1: [mAP 0.716416] [mAPH 0.705113] OBJECT_TYPE_TYPE_CYCLIST_LEVEL_2: [mAP 0.689657] [mAPH 0.678767] RANGE_TYPE_VEHICLE_[0, 30)_LEVEL_1: [mAP 0.916769] [mAPH 0.912312] RANGE_TYPE_VEHICLE_[0, 30)_LEVEL_2: [mAP 0.904136] [mAPH 0.899727] RANGE_TYPE_VEHICLE_[30, 50)_LEVEL_1: [mAP 0.735015] [mAPH 0.729594] RANGE_TYPE_VEHICLE_[30, 50)_LEVEL_2: [mAP 0.669861] [mAPH 0.664837] RANGE_TYPE_VEHICLE_[50, +inf)_LEVEL_1: [mAP 0.511822] [mAPH 0.505538] RANGE_TYPE_VEHICLE_[50, +inf)_LEVEL_2: [mAP 0.394505] [mAPH 0.389454] RANGE_TYPE_PEDESTRIAN_[0, 30)_LEVEL_1: [mAP 0.842599] [mAPH 0.776197] RANGE_TYPE_PEDESTRIAN_[0, 30)_LEVEL_2: [mAP 0.805566] [mAPH 0.740443] RANGE_TYPE_PEDESTRIAN_[30, 50)_LEVEL_1: [mAP 0.78144] [mAPH 0.700494] RANGE_TYPE_PEDESTRIAN_[30, 50)_LEVEL_2: [mAP 0.714023] [mAPH 0.63854] RANGE_TYPE_PEDESTRIAN_[50, +inf)_LEVEL_1: [mAP 0.694307] [mAPH 0.595241] RANGE_TYPE_PEDESTRIAN_[50, +inf)_LEVEL_2: [mAP 0.559821] [mAPH 0.476233] RANGE_TYPE_SIGN_[0, 30)_LEVEL_1: [mAP 0] [mAPH 0] RANGE_TYPE_SIGN_[0, 30)_LEVEL_2: [mAP 0] [mAPH 0] RANGE_TYPE_SIGN_[30, 50)_LEVEL_1: [mAP 0] [mAPH 0] RANGE_TYPE_SIGN_[30, 50)_LEVEL_2: [mAP 0] [mAPH 0] RANGE_TYPE_SIGN_[50, +inf)_LEVEL_1: [mAP 0] [mAPH 0] RANGE_TYPE_SIGN_[50, +inf)_LEVEL_2: [mAP 0] [mAPH 0] RANGE_TYPE_CYCLIST_[0, 30)_LEVEL_1: [mAP 0.805891] [mAPH 0.795459] RANGE_TYPE_CYCLIST_[0, 30)_LEVEL_2: [mAP 0.800108] [mAPH 0.789751] RANGE_TYPE_CYCLIST_[30, 50)_LEVEL_1: [mAP 0.677743] [mAPH 0.666282] RANGE_TYPE_CYCLIST_[30, 50)_LEVEL_2: [mAP 0.639797] [mAPH 0.628965] RANGE_TYPE_CYCLIST_[50, +inf)_LEVEL_1: [mAP 0.54664] [mAPH 0.530787] RANGE_TYPE_CYCLIST_[50, +inf)_LEVEL_2: [mAP 0.508892] [mAPH 0.494123] Eval Using 216s
Great!
@JingweiZhang12 @Tai-Wang Any ideas on the NUS results?
(I've seen you strongly worked on support DSTV)
BTW: I can confirm that with your config I get quite bad results.
Evaluating bboxes of pred_instances_3d mAP: 0.3820 mATE: 0.3414 mASE: 0.2582 mAOE: 0.3073 mAVE: 1.3762 mAAE: 0.4810 NDS: 0.4522 Eval time: 132.7s Per-class results: Object Class AP ATE ASE AOE AVE AAE car 0.753 0.181 0.152 0.098 1.878 0.479 truck 0.402 0.292 0.173 0.125 1.198 0.391 bus 0.474 0.327 0.177 0.064 2.334 0.655 trailer 0.131 0.479 0.224 0.561 0.813 0.312 construction_vehicle 0.086 0.817 0.422 0.967 0.191 0.383 pedestrian 0.717 0.152 0.270 0.331 1.047 0.821 motorcycle 0.433 0.203 0.245 0.219 2.374 0.550 bicycle 0.207 0.177 0.273 0.296 1.175 0.258 traffic_cone 0.406 0.179 0.337 nan nan nan barrier 0.210 0.606 0.308 0.105 nan nan
I'm here. Your training results is similar with mine. In DSVT, the CenterHead didn't predict velocity and can't using multiple "task head" to predict objects (if set multi task, there will be some mistakes), so I used official CenterHead to train DSVT on nuscenes datatset., but the mAP is still low and I don't know why......
BTW: I can confirm that with your config I get quite bad results.
Evaluating bboxes of pred_instances_3d mAP: 0.3820 mATE: 0.3414 mASE: 0.2582 mAOE: 0.3073 mAVE: 1.3762 mAAE: 0.4810 NDS: 0.4522 Eval time: 132.7s Per-class results: Object Class AP ATE ASE AOE AVE AAE car 0.753 0.181 0.152 0.098 1.878 0.479 truck 0.402 0.292 0.173 0.125 1.198 0.391 bus 0.474 0.327 0.177 0.064 2.334 0.655 trailer 0.131 0.479 0.224 0.561 0.813 0.312 construction_vehicle 0.086 0.817 0.422 0.967 0.191 0.383 pedestrian 0.717 0.152 0.270 0.331 1.047 0.821 motorcycle 0.433 0.203 0.245 0.219 2.374 0.550 bicycle 0.207 0.177 0.273 0.296 1.175 0.258 traffic_cone 0.406 0.179 0.337 nan nan nan barrier 0.210 0.606 0.308 0.105 nan nan
I'm here. Your training results is similar with mine. In DSVT, the CenterHead didn't predict velocity and can't using multiple "task head" to predict objects (if set multi task, there will be some mistakes), so I used official CenterHead to train DSVT on nuscenes datatset., but the mAP is still low and I don't know why......
May I ask if there are any follow-up results? I've recently encountered this issue as well.
@shuaizg I stopped working on it, on my custom dataset I get good results.
Prerequisite
Task
I'm using the official example scripts/configs for the officially supported tasks/models/datasets.
Branch
1.x branch https://github.com/open-mmlab/mmdetection3d/tree/dev-1.x
Environment
torch: 1.10.1 cuda: 11.4 spconv: 2.3.6 mmdet3d: 1.2.0 mmdet: 3.1.0 mmcv: 2.0.1 mmengine: 0.8.5
Hi~ I used your DSVT code to train model on Nuscenes datasets, but the mAP and NDS is very low, why? how should i modify the config file??? And I wonder if you will support DSVT training process on Nuscenes datasets(with transfusion head)?
Reproduces the problem - command or script
bash tools/dist_train.sh projects/DSVT/configs/dsvt_voxel03_res-second_secfpn_centerheadDSVT_8xb1-cyclic-20e_nuscenes.py 1
Reproduces the problem - error message
Here is the config file I used and evaluation results on Nuscenes datasets.