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

[Bug] 运行mmdetection3d里面的pcd_demo.py的时候出现这个问题AttributeError: 'NoneType' object has no attribute 'convert_to_pinhole_camera_parameters' #2737

Open
3 tasks done
yuzhenboo opened this issue Sep 17, 2023 · 30 comments

Comments

@yuzhenboo
Copy link

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

main branch https://github.com/open-mmlab/mmdetection3d

Environment

TorchVision: 0.15.1+cu117
OpenCV: 4.8.0
MMEngine: 0.8.4
MMDetection: 3.0.0
MMDetection3D: 1.2.0+0f9dfa9
spconv2.0: False

Reproduces the problem - code sample

(pt20gpu) ljLi@sstd:~/mmdetection3d$ python demo/pcd_demo.py demo/data/kitti/000008.bin configs/pointpillars/pointpillars_hv_secfpn_8xb6-160e_kitti-3d-car.py hv_pointpillars_secfpn_6x8_160e_kitti-3d-car_20220331_134606-d42d15ed.pth --show
/home/ljLi/mmdetection3d/mmdet3d/models/dense_heads/anchor3d_head.py:94: UserWarning: dir_offset and dir_limit_offset will be depressed and be incorporated into box coder in the future
warnings.warn(
Loads checkpoint by local backend from path: hv_pointpillars_secfpn_6x8_160e_kitti-3d-car_20220331_134606-d42d15ed.pth
/home/ljLi/anaconda3/envs/pt20gpu/lib/python3.9/site-packages/mmengine/visualization/visualizer.py:196: UserWarning: Failed to add <class 'mmengine.visualization.vis_backend.LocalVisBackend'>, please provide the save_dir argument.
warnings.warn(f'Failed to add {vis_backend.class}, '
/home/ljLi/anaconda3/envs/pt20gpu/lib/python3.9/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3483.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
[Open3D WARNING] GLFW Error: X11: Failed to open display :0.0
[Open3D WARNING] Failed to initialize GLFW
[Open3D WARNING] GLFW Error: The GLFW library is not initialized
Traceback (most recent call last):
File "/home/ljLi/mmdetection3d/demo/pcd_demo.py", line 60, in
main(args)
File "/home/ljLi/mmdetection3d/demo/pcd_demo.py", line 46, in main
visualizer.add_datasample(
File "/home/ljLi/anaconda3/envs/pt20gpu/lib/python3.9/site-packages/mmengine/dist/utils.py", line 401, in wrapper
return func(*args, **kwargs)
File "/home/ljLi/mmdetection3d/mmdet3d/visualization/local_visualizer.py", line 1071, in add_datasample
self.show(
File "/home/ljLi/anaconda3/envs/pt20gpu/lib/python3.9/site-packages/mmengine/dist/utils.py", line 401, in wrapper
return func(*args, **kwargs)
File "/home/ljLi/mmdetection3d/mmdet3d/visualization/local_visualizer.py", line 863, in show
self.view_control.convert_to_pinhole_camera_parameters() # noqa: E501
AttributeError: 'NoneType' object has no attribute 'convert_to_pinhole_camera_parameters'

Reproduces the problem - command or script

python demo/pcd_demo.py demo/data/kitti/000008.bin configs/pointpillars/pointpillars_hv_secfpn_8xb6-160e_kitti-3d-car.py hv_pointpillars_secfpn_6x8_160e_kitti-3d-car_20220331_134606-d42d15ed.pth --show

Reproduces the problem - error message

AttributeError: 'NoneType' object has no attribute 'convert_to_pinhole_camera_parameters'

Additional information

No response

@ioeddk
Copy link

ioeddk commented Sep 21, 2023

Any updates? I have the same problem.

@Chuanheliu1
Copy link

yeah, encounter the same problem

@yuzhenboo
Copy link
Author

问题还是没有解决

@sunjiahao1999
Copy link
Collaborator

It seems to you run this demo on remote server. You should not use "--show" when $DISPLAY is None.

@sunjiahao1999
Copy link
Collaborator

We will add a warning in this case.

@yuzhenboo
Copy link
Author

就是当我没有输入--show的时候,依然没办法成功将结果输出到output中

@yuzhenboo
Copy link
Author

就是当我没有输入--show的时候,依然没办法成功将结果输出到output中

@thiesymon
Copy link

thiesymon commented Oct 18, 2023

it also does not work without "--show"

@yuzhenboo
Copy link
Author

some question!!!!

what?

@ppsychoo
Copy link

Have you solve it? I have the same question!!!

@Tzu-Hsiang-Lin
Copy link

I solved the problem by setting conda-forge as my priority installation channel before installing PyTorch. Here is the link that shows you how to set the channel: https://ostechnix.com/enable-conda-forge-channel-for-conda-package-manager/
Some of the package bugs have been fixed in the conda-forge channel but not in the default channel.

@caiyi4gis
Copy link

I met and fixed the same problem when Open3D calls OpenGL, possibly due to dual graphics on the laptop.
Follow these steps:

  1. Check 'nvidia-settings' for only the item < GPU 0 - Nvidia GeForce ...> .
  2. If yes, try 'sudo prime-select nvidia'.

@samueleruffino99
Copy link

Is it possible to run this command on WSL2?

@lin0711
Copy link

lin0711 commented Mar 30, 2024

I met and fixed the same problem when Open3D calls OpenGL, possibly due to dual graphics on the laptop. Follow these steps:

  1. Check 'nvidia-settings' for only the item < GPU 0 - Nvidia GeForce ...> .
  2. If yes, try 'sudo prime-select nvidia'.

please speak it in detail, thanks

@hyf493
Copy link

hyf493 commented Apr 9, 2024

hello,Has this problem been resolved? I encountered this issue while running tools/misc/browse_dataset.py

@AndrewSkywalker6666
Copy link

I encountered the same issue.

@yuzhenboo
Copy link
Author

hello,Has this problem been resolved? I encountered this issue while running tools/misc/browse_dataset.py

Sorry,I still have not resolved this question

@mhmdrz-mirdamadi
Copy link

Same problem

@YJJ1125
Copy link

YJJ1125 commented May 11, 2024

请问是用的纯点云数据进行训练的吗?

@yuzhenboo
Copy link
Author

yuzhenboo commented May 11, 2024 via email

@hyf493
Copy link

hyf493 commented May 13, 2024 via email

@hyf493
Copy link

hyf493 commented May 13, 2024 via email

@hyf493
Copy link

hyf493 commented May 13, 2024 via email

@YJJ1125

This comment was marked as resolved.

@hyf493
Copy link

hyf493 commented May 13, 2024 via email

@woreom
Copy link

woreom commented Aug 26, 2024

Is it possible to run this command on WSL2?

I used to do it, but for some reason now I'm getting this error

@CaptainTrojan
Copy link

Same issue here.

@again-a
Copy link

again-a commented Nov 25, 2024

pip install open3d=0.16.0

@leecyang
Copy link

leecyang commented Nov 25, 2024

当 Open3D 调用 OpenGL 时,我遇到并修复了同样的问题,这可能是由于笔记本电脑上的双显卡。 请执行以下步骤:

1. 检查“nvidia-settings”,仅查看 GPU 0 - Nvidia GeForce <项 ...> .

2. 如果是,请尝试 'sudo prime-select nvidia'。

非常感谢!您的回答解决了我的问题。我将我的处理办法附在下面:

  1. 将缺失的依赖包全部通过pip安装而不止运行pip install -v -e .
  2. 删去--show之后我的代码正确输出了结果,验证了我的猜想可能是ubuntu双显卡的问题。
  3. 按照您的回答进行操作。
  4. 重启电脑。

@572468483
Copy link

same problem.
Have you solve it?

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