isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.45k stars 2.31k forks source link

open3d.visualization.draw_goemetries function not working on Google Colab #1026

Open abhineet99 opened 5 years ago

abhineet99 commented 5 years ago

open3d.visualization.draw_goemetries function not working on Google Colab.

I installed open3d on Google Colab using pip in python3. But this function is not working , it is not showing any error but doesn't produce any output, while other functions still do there job. I think this function returns the visualisation in a new window which is not supported in the browser, any way around this?

JackLangerman commented 5 years ago

I believe this is a headless rendering issue related to #940 #972 .

You may be able to work around using jupyter visualization for some applications:

http://www.open3d.org/docs/tutorial/Basic/jupyter.html

Hopefully headless gets figured out soon though....

abhineet99 commented 5 years ago

When i do visualizer.show() it just says "JVisualizer with 1 geometries" and displays nothing. Mozilla 67.0.4 on Ubuntu 18.04.

Magnetar99 commented 5 years ago

I see the same "JVisualizer with 1 geometries" but nothing to display?

omshinde commented 5 years ago

Facing the same issue on Google Colab! Something like %open3d inline similar to %matplotlib inline using interactive magic functions would be a great help. Thanks!

SapphireEmbers commented 5 years ago

Any progress here?

JihongJu commented 5 years ago

I got the same issue on Kaggle. Nothing was displayed with visualizer.show() To give a bit more information here's the error messages: image

Update

I managed to get it working by installing open3d before running the notebook. And it apparently helps load the jupyter widgets.

dinarkino commented 4 years ago

The same problem in colab. Got this error RuntimeError: [Open3D ERROR] GLFW Error: X11: The DISPLAY environment variable is missing0;m

JVisualizer shows nothing

Thomseeen commented 4 years ago

Can't get it to work in combination with Google Colab either. Using the JVisualizer nothing is printed at all while the error Error has occurred while trying to update output. Error: "Widgets module open3d is not supported" is printed in the dev-tools console.

JayLIU0911 commented 4 years ago

Same problem here in jupyter notebook. Any update?

rjsgml5698 commented 4 years ago

Any update?

robotsir commented 4 years ago

I have the same issue

comingtoyoulive commented 4 years ago

I have the same issue, but what I know is only happening 'RuntimeError: [Open3D ERROR] GLFW Error: GLX: Forward compatibility requested but GLX_ARB_create_context_profile is unavailable'(MAY BE headless ISSUE)

Dource commented 4 years ago

I have the same issue. Get no output with Google Colab and jupyter Notebook

Jaykob commented 4 years ago

Same issue here...

germanros1987 commented 4 years ago

thank you for your "kind" words @pankajbadatia . Could anybody provide the version of Open3D they are using? @yxlao could you take a look at this?

hahakid commented 4 years ago

@germanros1987 open3d 0.10.0.1 o3d.visualization.draw_geometries([pcd]) #works

visualizer = JVisualizer() visualizer.add_geometry(pcd) visualizer.show()

show nothing & return JVisualizer with 1 geometries

jousefm commented 4 years ago

Any progress here? Having the same issue. No visualization at all.

tairch commented 3 years ago

same problem here, JVisualizer returns nothing

EricWiener commented 3 years ago

Same problem here as well

Arnavdas commented 3 years ago

same issue, hope in 2021 someone gives a look

richardagalvez commented 3 years ago

Same issue here. By the looks of it, Open3D has been completely abandoned and another library should be sought out for work in a jupyter environment. ipygany looks promising but I have not worked with it before. If anyone has any suggestions on working with 3D data in jupyter lab / notebooks, please comment, cheers

Jeremy26 commented 3 years ago

Any update?

yiliu-coding commented 3 years ago

Same issue. Any update?

dbacea commented 3 years ago

Same issue on Google Colab with Open3D version 0.12.0. Using the code from the official documentation plots nothing (see http://www.open3d.org/docs/latest/tutorial/Basic/jupyter.html). I've also tried with: o3d.visualization.draw_geometries([pcd]), which does not plot anything and it raises the following warnings: [Open3D WARNING] GLFW Error: X11: The DISPLAY environment variable is missing0;m [Open3D WARNING] Failed to initialize GLFW0;m [Open3D WARNING] [DrawGeometries] Failed creating OpenGL window.0;m

EricWiener commented 3 years ago

This is a work-around, not a solution, but I created a package bbox-utils that allows you to perform common operations and visualizations with bounding boxes. I use Open3D to handle the geometry operations, but I then display the point cloud using Plotly. If you're interested please feel free to take a look: https://github.com/EricWiener/bbox-utils.

Here's a demo Jupyter notebook that shows how to display a bounding box in a point cloud. Here's a colab notebook.

abdelhakimbenkrama commented 3 years ago

same problem

UnaNancyOwen commented 3 years ago

Hi, all! You can visualize Open3D geometries on Google Colab using Plotly. It works fine on Google Colab. 👍 https://colab.research.google.com/drive/1CR_HDvJ2AnjJV3Bf5vwP70K0hx3RcdMb?usp=sharing 2021-03-02

wtseng530 commented 3 years ago

@UnaNancyOwen amazing thanks for sharing!

BupyeongHealer commented 3 years ago

@UnaNancyOwen Thanks for sharing!! I solve the problem.

MehdiMaboudi commented 3 years ago

Hi, all! You can visualize Open3D geometries on Google Colab using Plotly. It works fine on Google Colab. 👍 https://colab.research.google.com/drive/1CR_HDvJ2AnjJV3Bf5vwP70K0hx3RcdMb?usp=sharing 2021-03-02

Thanks for sharing !

Jeremy26 commented 3 years ago

The Colab solution didn't work properly for me. It did work on the rabbit, but not on a point cloud file that I wanted to use and that was working fine with the visualizer. To tell you more, there seem to be a Z problem, everything is up to the sky.

Screenshot 2021-05-28 at 15 48 37

Here's a workaround that works:

#!pip install pypotree
import pypotree 
cloud = np.asarray(o3d.io.read_point_cloud(pcd_file).points)
#xyz = np.random.random((100000,3)) #working
cloudpath = pypotree.generate_cloud_for_display(cloud)
pypotree.display_cloud_colab(cloudpath)

Not as beautiful as Open3D though, and we can only draw a cloud:

Screenshot 2021-05-28 at 15 50 31
joshberry commented 3 years ago

I'm running into the same issues on Google Colab.

It would be great if someone from the dev team could leave a comment indicating if this is something they plan to address or not. Seems like support for visualizations in hosted notebooks would be very useful given Open3D's target audience and use cases.

germanros1987 commented 2 years ago

We understand the frustration regarding Colab. The limitation is not from Open3D side, but from Colab itself. Colab doesn't allow for 3rd party plugins, which prevents Open3D from running properly.

Open3D has support for Jupyter notebooks, but it seems that Colab will remain out of our grasp until the Colab team changes their philosophy regarding 3rd party widgets.

YifuTao commented 2 years ago

The Colab solution didn't work properly for me. It did work on the rabbit, but not on a point cloud file that I wanted to use and that was working fine with the visualizer. To tell you more, there seem to be a Z problem, everything is up to the sky. Screenshot 2021-05-28 at 15 48 37

Here's a workaround that works:

#!pip install pypotree
import pypotree 
cloud = np.asarray(o3d.io.read_point_cloud(pcd_file).points)
#xyz = np.random.random((100000,3)) #working
cloudpath = pypotree.generate_cloud_for_display(cloud)
pypotree.display_cloud_colab(cloudpath)

Not as beautiful as Open3D though, and we can only draw a cloud: Screenshot 2021-05-28 at 15 50 31

The reason of your visualisation looking strange is the scale of the z axis. By default Plotly makes xyz axis the same length. The z axis, with smaller range compared to x and y for a point cloud, is thus "streched" in your visualisation.

You can add aspectmode='data' in the configuration for layout.scene to make your visualisation suitable for a point cloud. I put an example here: https://colab.research.google.com/drive/1MiJIdCOQppVoseCKH0vMo0go2p2EbK3G?authuser=0#scrollTo=rU2wKace2Ll7

kqdidit119 commented 1 year ago

Is this Organization participating in GSoC 2023? Will it be there for projects?

SteppenWolver commented 4 months ago

I'm using o3d with python 3.11.9 on Windows11.

It seems a number of o3d.geometry simply stop the python program without any error or other message. The same happens with o3d.visualization.draw_geometries.

I've worked with o3d several years ago and never experienced this type of problem back then...

Any ideas ?

kodaigit commented 2 months ago

I'm using o3d with python 3.11.9 on Windows11.

It seems a number of o3d.geometry simply stop the python program without any error or other message. The same happens with o3d.visualization.draw_geometries.

I've worked with o3d several years ago and never experienced this type of problem back then...

Any ideas ?

Same here