open-mmlab / mmdetection3d

OpenMMLab's next-generation platform for general 3D object detection.
https://mmdetection3d.readthedocs.io/en/latest/
Apache License 2.0
5.23k stars 1.54k forks source link

MVXNET model #1342

Closed youssefAlaaThabet closed 2 years ago

youssefAlaaThabet commented 2 years ago

I was trying to test the pre-trained model MVXNET with kitti Dataset .but, i am getting a very low detection accuracy the command i use in the terminal :python3 tools/test.py configs/mvxnet/dv_mvx-fpn_second_secfpn_adamw_2x8_80e_kitti-3d-3class.py checkpoints/dv_mvx-fpn_second_secfpn_adamw_2x8_80e_kitti-3d-3class_20200621_003904-10140f2d.pth --eval mAP --eval-options 'out_dir=./results'

Output: Results of pts_bbox:

----------- AP11 Results ------------

Pedestrian AP11@0.50, 0.50, 0.50: bbox AP11:68.8621, 65.7912, 60.6896 bev AP11:56.2594, 50.8190, 49.0869 3d AP11:46.8595, 43.4513, 40.1458 aos AP11:31.06, 29.33, 27.13 Pedestrian AP11@0.50, 0.25, 0.25: bbox AP11:68.8621, 65.7912, 60.6896 bev AP11:77.0948, 75.5451, 70.4090 3d AP11:77.0559, 75.4364, 70.2875 aos AP11:31.06, 29.33, 27.13 Cyclist AP11@0.50, 0.50, 0.50: bbox AP11:27.4432, 23.2737, 23.0413 bev AP11:0.7392, 0.3477, 0.3598 3d AP11:0.7214, 0.3358, 0.3542 aos AP11:12.19, 10.22, 10.10 Cyclist AP11@0.50, 0.25, 0.25: bbox AP11:27.4432, 23.2737, 23.0413 bev AP11:5.6951, 4.7072, 4.6506 3d AP11:3.5302, 3.2633, 3.3580 aos AP11:12.19, 10.22, 10.10 Car AP11@0.70, 0.70, 0.70: bbox AP11:1.2619, 2.2698, 2.8771 bev AP11:0.0439, 0.1237, 0.1212 3d AP11:0.0338, 0.0736, 0.0745 aos AP11:0.54, 0.92, 1.20 Car AP11@0.70, 0.50, 0.50: bbox AP11:1.2619, 2.2698, 2.8771 bev AP11:0.1255, 0.3081, 0.3457 3d AP11:0.1076, 0.2857, 0.2613 aos AP11:0.54, 0.92, 1.20

Overall AP11@easy, moderate, hard: bbox AP11:32.5224, 30.4449, 28.8694 bev AP11:19.0142, 17.0968, 16.5227 3d AP11:15.8716, 14.6202, 13.5248 aos AP11:14.60, 13.49, 12.81

----------- AP40 Results ------------

Pedestrian AP40@0.50, 0.50, 0.50: bbox AP40:68.8742, 65.2042, 60.6444 bev AP40:54.7777, 50.2949, 46.5695 3d AP40:44.9903, 40.6389, 37.4821 aos AP40:30.51, 28.65, 26.75 Pedestrian AP40@0.50, 0.25, 0.25: bbox AP40:68.8742, 65.2042, 60.6444 bev AP40:78.4909, 75.8185, 71.4164 3d AP40:78.4439, 75.6713, 71.2291 aos AP40:30.51, 28.65, 26.75 Cyclist AP40@0.50, 0.50, 0.50: bbox AP40:25.7837, 21.8586, 21.3067 bev AP40:0.4463, 0.2279, 0.2141 3d AP40:0.4381, 0.2232, 0.1988 aos AP40:11.40, 9.51, 9.27 Cyclist AP40@0.50, 0.25, 0.25: bbox AP40:25.7837, 21.8586, 21.3067 bev AP40:4.8948, 4.0941, 4.0133 3d AP40:2.8087, 2.5944, 2.5795 aos AP40:11.40, 9.51, 9.27 Car AP40@0.70, 0.70, 0.70: bbox AP40:0.9275, 1.7297, 2.1996 bev AP40:0.0121, 0.0340, 0.0333 3d AP40:0.0093, 0.0202, 0.0205 aos AP40:0.35, 0.66, 0.86 Car AP40@0.70, 0.50, 0.50: bbox AP40:0.9275, 1.7297, 2.1996 bev AP40:0.0690, 0.2434, 0.2719 3d AP40:0.0592, 0.2328, 0.1437 aos AP40:0.35, 0.66, 0.86

Overall AP40@easy, moderate, hard: bbox AP40:31.8618, 29.5975, 28.0503 bev AP40:18.4120, 16.8523, 15.6057 3d AP40:15.1459, 13.6274, 12.5671 aos AP40:14.09, 12.94, 12.29

ZCMax commented 2 years ago

We updated our coordinate system since v1.0.0.rc0 branch, the checkpoints provided now are trained before coordinate refactor, and the new checkpoints are being prepared. We suggest you to switch to the v0.18.0 branch (or before) to obtain the right results.

youssefAlaaThabet commented 2 years ago

i switched to the v0.18.0 branch, then i run the command "pip install -e ." now i am trying to run this command "python3 tools/test.py configs/mvxnet/dv_mvx-fpn_second_secfpn_adamw_2x8_80e_kitti-3d-3class.py checkpoints/dv_mvx-fpn_second_secfpn_adamw_2x8_80e_kitti-3d-3class_20200621_003904-10140f2d.pth --eval mAP --eval-options 'out_dir=./results' " but i got this error raise KeyError(f'{name} is already registered ' KeyError: 'SparseConv2d is already registered in conv layer'

ZCMax commented 2 years ago

What's you mmcv version? It seems you install the latest mmcv version?

youssefAlaaThabet commented 2 years ago

how can i know the version i am using ?.I used this command "pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.7.1/index.html

ZCMax commented 2 years ago

pip uninstall mmcv-full pip install mmcv-full==1.3.18 -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.7.1/index.html

youssefAlaaThabet commented 2 years ago

thank you so much for your help. i tried to install mmcv,but i have this error now raceback (most recent call last): File "tools/test.py", line 13, in from mmdet3d.apis import single_gpu_test File "/home/youssef/mmdetection3d/mmdet3d/apis/init.py", line 2, in from .inference import (convert_SyncBN, inference_detector, File "/home/youssef/mmdetection3d/mmdet3d/apis/inference.py", line 11, in from mmdet3d.core import (Box3DMode, CameraInstance3DBoxes, File "/home/youssef/mmdetection3d/mmdet3d/core/init.py", line 2, in from .anchor import # noqa: F401, F403 File "/home/youssef/mmdetection3d/mmdet3d/core/anchor/init.py", line 2, in from mmdet.core.anchor import build_prior_generator File "/home/youssef/.local/lib/python3.8/site-packages/mmdet/core/init.py", line 3, in from .bbox import # noqa: F401, F403 File "/home/youssef/.local/lib/python3.8/site-packages/mmdet/core/bbox/init.py", line 8, in from .samplers import (BaseSampler, CombinedSampler, File "/home/youssef/.local/lib/python3.8/site-packages/mmdet/core/bbox/samplers/init.py", line 10, in from .score_hlr_sampler import ScoreHLRSampler File "/home/youssef/.local/lib/python3.8/site-packages/mmdet/core/bbox/samplers/score_hlr_sampler.py", line 3, in from mmcv.ops import nms_match File "/home/youssef/.local/lib/python3.8/site-packages/mmcv/ops/init.py", line 2, in from .assign_score_withk import assign_score_withk File "/home/youssef/.local/lib/python3.8/site-packages/mmcv/ops/assign_score_withk.py", line 5, in ext_module = ext_loader.load_ext( File "/home/youssef/.local/lib/python3.8/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext ext = importlib.import_module('mmcv.' + name) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: /home/youssef/.local/lib/python3.8/site-packages/mmcv/_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: _Z27points_in_boxes_cpu_forwardN2at6TensorES0S0

ZCMax commented 2 years ago

Please check whether the Pytorch used for compiling your mmcv is the same as the runtime version. Can you run python mmdet3d/utils/collect_env.py to collect your environment info?

youssefAlaaThabet commented 2 years ago

i got the same error Traceback (most recent call last): File "mmdet3d/utils/collect_env.py", line 21, in for name, val in collect_env().items(): File "mmdet3d/utils/collect_env.py", line 12, in collect_env env_info = collect_base_env() File "/home/youssef/.local/lib/python3.8/site-packages/mmcv/utils/env.py", line 87, in collect_env from mmcv.ops import get_compiler_version, get_compiling_cuda_version File "/home/youssef/.local/lib/python3.8/site-packages/mmcv/ops/init.py", line 2, in from .assign_score_withk import assign_score_withk File "/home/youssef/.local/lib/python3.8/site-packages/mmcv/ops/assign_score_withk.py", line 5, in ext_module = ext_loader.load_ext( File "/home/youssef/.local/lib/python3.8/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext ext = importlib.import_module('mmcv.' + name) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: /home/youssef/.local/lib/python3.8/site-packages/mmcv/_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: _Z27points_in_boxes_cpu_forwardN2at6TensorES0S0

ZCMax commented 2 years ago

I suggest you to recreate a conda environment to install dependencies according to our doc.

youssefAlaaThabet commented 2 years ago

sorry .but, I am new in using deep learning.I did not use conda before.would it take too long for the updated pre-trained model to be finished?

youssefAlaaThabet commented 2 years ago

i followed the instructions here "https://mmdetection3d.readthedocs.io/en/latest/getting_started.html"when i used the master branch and it worked and i was able to test the model

ZCMax commented 2 years ago

sorry .but, I am new in using deep learning.I did not use conda before.would it take too long for the updated pre-trained model to be finished?

It won't take much time to update the new checkpoints

ZCMax commented 2 years ago

i followed the instructions here "https://mmdetection3d.readthedocs.io/en/latest/getting_started.html"when i used the master branch and it worked and i was able to test the model

Great!

youssefAlaaThabet commented 2 years ago

i fixed the problem, thank you so much for your help.

ZCMax commented 2 years ago

Close due to the problem solved.