open-mmlab / mmdetection3d

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

Inference using existing models and standard datasets - imvoxelnet - Kitti #694

Closed chetanmreddy closed 3 years ago

chetanmreddy commented 3 years ago

Hello @Tai-Wang @filaPro

I am trying to do inference using the instructions here

python tools/test.py configs/imvoxelnet/imvoxelnet_kitti-3d-car.py checkpoints/imvoxelnet_kitti-3d-car_20210610_152323-b9abba85.pth --show --show-dir ./data/kitti/show_results/

I have prepared the KITTI dataset as required.

But getting the following error:

`(open-mmlab) root@cmudi001-nx-interactive-pod-1:/cmudi001-nx-1/mmdetection3d# python tools/test.py configs/imvoxelnet/imvoxelnet_kitti-3d-car.py checkpoints/imvoxelnet_kitti-3d-car_20210610_152323-b9abba85.pth --show --show-dir ./data/kitti/show_results/

/opt/conda/envs/open-mmlab/lib/python3.7/site-packages/mmdet/core/anchor/builder.py:16: UserWarning: build_anchor_generator would be deprecated soon, please use build_prior_generator 'build_anchor_generator would be deprecated soon, please use '

Use load_from_local loader [ ] 0/3769, elapsed: 0s, ETA:/opt/conda/envs/open-mmlab/lib/python3.7/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /opt/conda/conda-bld/pytorch_1623448224956/work/c10/core/TensorImpl.h:1156.)

return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode) Traceback (most recent call last): File "tools/test.py", line 214, in main() File "tools/test.py", line 184, in main outputs = single_gpu_test(model, data_loader, args.show, args.show_dir) File "/cmudi001-nx-1/mmdetection3d/mmdet3d/apis/test.py", line 51, in single_gpu_test if batch_size == 1 and isinstance(data['img'][0], TypeError: 'DataContainer' object is not subscriptable`

Can you please help me with this? Thank you

UPDATE: When I use --out instead of --show and --show-dir as shown above, it works fine.

filaPro commented 3 years ago

Hi @chetanmreddy,

Unfortunately current version of ImVoxelNet is not ready for visualization, as it is not inherited from Base3DDetector and does not have show_results method.

As a temporary solution, you can run the same command on the same data in ImVoxelNet authors repo.