Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NMS doesn‘t seem to work. The visualization of 3D boundingbox in SUNRGBD dataset contains lots of overlapped boxes. #24

Closed
XIDIANPQZ opened this issue Aug 25, 2021 · 21 comments

Comments

@XIDIANPQZ
Copy link

0000001

@filaPro
Copy link
Contributor

filaPro commented Aug 25, 2021

Hi @XIDIANPQZ ,

Can you please try with score_thr=0.15 or more as advised in our readme?

@XIDIANPQZ
Copy link
Author

The system environment is as follows: cuda11.0, python3.8, pytorch1.7.0, torchvision0.8.0, mmdetection3D 0.8.0, mmdet2.8.0, mmcv1.2.5.
I run "python tools/data_converter/sunrgbd_total.py" to process sunrgbd dataset.
For visualization, the command is "python tools/test.py configs/imvoxelnet/imvoxelnet_total_sunrgbd_top27.py checkpoints/20210808_005013.pth --show --show-dir work_dirs/imvoxelnet_total_sunrgbd_top27".
In config file, I adjust the parameter score_thr, but it doesn't work. There are still many overlapped boxes.
During the visualization, "Error!" is printed when the 46 line of "mmdet3D/ops/iou3d/iou3d_utils.py" is passed.

@XIDIANPQZ
Copy link
Author

Hi @XIDIANPQZ ,

Can you please try with score_thr=0.15 or more as advised in our readme?

Thanks. I have tried with different score_thr. The network with high score_thr only detects a bed, but still produces many overlapped boxes

@filaPro
Copy link
Contributor

filaPro commented Aug 25, 2021

0000289
I've tried now this config and model with score_thr=0.15. Looks fine. Not too much overlapping boxes. However it's probably strange why 2 blue boxes appear after nms.

During the visualization, "Error!" is printed when the 46 line of "mmdet3D/ops/iou3d/iou3d_utils.py" is passed.

Can you paste full traceback? I'm not facing any issues. How you were able to run visualization with the error?

@XIDIANPQZ
Copy link
Author

(open-mmlab) lab@lab:~/0pqz/imvoxelnet-master$ python tools/test.py configs/imvoxelnet/imvoxelnet_total_sunrgbd_top27.py '/home/lab/0pqz/imvoxelnet-master/checkpoints/20210808_005013.pth' --show --show-dir work_dirs/imvoxelnet_total_sunrgbd_top27
[                                                  ] 0/50, elapsed: 0s, ETA:/home/lab/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/nn/functional.py:3063: UserWarning: Default upsampling behavior when mode=trilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
  "See the documentation of nn.Upsample for details.".format(mode))
[>                                                 ] 1/50, 1.1 task/s, elapsed: 1s, ETA:    46s
Error!
Error!
[>>                                                ] 2/50, 1.8 task/s, elapsed: 1s, ETA:    26s
Error!
[>>>                                               ] 3/50, 2.4 task/s, elapsed: 1s, ETA:    19s
Error!
Error!
[>>>>                                              ] 4/50, 2.9 task/s, elapsed: 1s, ETA:    16s
Error!
[>>>>>                                             ] 5/50, 3.3 task/s, elapsed: 2s, ETA: 

The 'Error' is printed after each sample completes inference. When I debug the code step by step, I find that the cause is in "mmdet3D/ops/iou3d/iou3d_utils.py".

I am not sure if this is caused by the version of Sofaware.

@XIDIANPQZ
Copy link
Author

This error may be from iou3d.cpp.
if (cudaSuccess != cudaGetLastError()) printf("Error!\n")
However, I don't know the reasons.

@filaPro
Copy link
Contributor

filaPro commented Aug 25, 2021

Never met this before. This message is produced by cuda code here. I think this is caused by your cuda version 11.0, however we use 10.1 in our Dockerfile. Looks like mmdetection3d is not ever tested with 11.0.

@XIDIANPQZ
Copy link
Author

Will this error cause NMS to fail?

@filaPro
Copy link
Contributor

filaPro commented Aug 25, 2021

Yes it can be the reason. Can you please try with torch==1.6.0 and cuda10.1?

@XIDIANPQZ
Copy link
Author

Thank you. I will try the suggest version again.

@XIDIANPQZ
Copy link
Author

I have tried torch==1.6.0 and cuda10.1. But the result is still bad. Can you help me check the software version again in the below?

cudatoolkit            10.1.243
mmdet                  2.10.0
mmdet3d               0.8.0            
mmpycocotools     12.0.3
numba                   0.48.0
numpy                   1.20.1
protobuf                 3.15.2
ptyprocess             0.7.0
pycocotools            2.0.2
python                    3.7
torch                       1.6.0+cu101
torchvision              0.7.0+cu101

In the installation process, the code is as follows. Can you please check the errors?

conda create -n open-mmlab python=3.7 -y
conda activate open-mmlab
conda install pytorch=1.6.0 cudatoolkit=10.1 torchvision -c pytorch
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6.0/index.html  #version 1.3.9
pip install mmdet==2.14.0
pip install mmsegmentation==0.14.1

# download imvoxelnet package and unzip
cd imvoxelnet-master/
pip install -v -e . -i https://pypi.douban.com/simple --trusted-host pypi.douban.com
pip uninstall mmdet        # the version isn't matching.
pip uninstall mmcv-full
pip install mmcv-full==1.2.7 -i https://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install mmdet==2.10.0

git clone https://github.com/lilanxiao/Rotated_IoU rotated_iou
cp -r rotated_iou/cuda_op mmdet3d/ops/rotated_iou
cd mmdet3d/ops/rotated_iou/cuda_op/
python setup.py install

In the testing process, I don't know whether the error is from the config or checkpoints. The code is run in the root dictionary of imvoxelnet-master:
python tools/test.py /home/xd503/PQZ/imvoxelnet-master/configs/imvoxelnet/imvoxelnet_total_sunrgbd_top27.py /home/xd503/PQZ/imvoxelnet-master/checkpoints/20210808_005013.pth --show --show-dir work_dir/

@filaPro
Copy link
Contributor

filaPro commented Aug 26, 2021

Are you still getting this Error! message?

Also the installation process is a bit strange. E.g. you first install mmcv-full==1.3.* with correct cuda and torch binaries, then you uninstall it and after that install mmcv-full==1.2.7 but without correct cuda and torch binaries. Is it possible for you to build our Dockerfile? I strongly recommend this option. Alternatively you can try to follow installation process from Dockerfile, including commands for install mmcv-full and mmdet for single time.

I tried to build the Dockerfile from scratch now, everything looks fine.

@XIDIANPQZ
Copy link
Author

I still get this Error! message, even I directly install the correct version of mmcv-full and mmdet according to the dockerfile.

@XIDIANPQZ
Copy link
Author

I want to try to build the docker-file from scratch. However, I am not familiar to docker. Can you please provide the tutorials of the installation and running? Thank you.

@filaPro
Copy link
Contributor

filaPro commented Aug 26, 2021

Unfortunately have no ideas how to help you, as all package versions are fine :(

About docker, you first need to install nvidia-docker. Commands to build and run can be found in mmdetection3d documentation.

@XIDIANPQZ
Copy link
Author

Thank you for taking the time to help me anyway.

@XIDIANPQZ
Copy link
Author

The only difference is the test data. Can you please send your test file by email? The address is xianpqz2018@163.com . Thank you.

@XIDIANPQZ
Copy link
Author

XIDIANPQZ commented Aug 26, 2021

In the issue of mmdetection3D, there are the similar result in Issue771.

@filaPro
Copy link
Contributor

filaPro commented Aug 26, 2021

Can you please send your test file by email?

Will send you .pkl file with annotations. However I don't think cuda errors can be caused by data.

In the issue of mmdetection3D, there are the similar result in Issue771.

It is also probably not about cuda Error! :(

Btw, you can try to run ImVoxelNet from mmdetection3d on KITTI dataset with their config. And see if the errors are still here.

@XIDIANPQZ
Copy link
Author

Through Docker, the visualization results are great.
Thank you.

@filaPro
Copy link
Contributor

filaPro commented Aug 27, 2021

🎉 Nice to hear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants