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

Unable to perform alpha surface reconstruction on Apple Silicon #6086

Closed
3 tasks done
Piflyer opened this issue Apr 18, 2023 · 4 comments · Fixed by #6998
Closed
3 tasks done

Unable to perform alpha surface reconstruction on Apple Silicon #6086

Piflyer opened this issue Apr 18, 2023 · 4 comments · Fixed by #6998
Labels
bug Not a build issue, this is likely a bug.

Comments

@Piflyer
Copy link

Piflyer commented Apr 18, 2023

Checklist

Describe the issue

I am trying to run alpha surface reconstruction on my M2 Max Macbook Pro, but it keeps on crashing. I am currently using a Conda environment that is configured for ARM. I am currently using Open3D version 17.0 and it is installed from pip.

Steps to reproduce the bug

import open3d as o3d
armadillo_mesh = o3d.data.ArmadilloMesh()
mesh = o3d.io.read_triangle_mesh(armadillo_mesh.path)
pcd = mesh.sample_points_poisson_disk(900)
alpha = 0.03
mesh = o3d.geometry.TriangleMesh.create_from_point_cloud_alpha_shape(pcd, alpha)

Error message

[Open3D WARNING] Creating from empty legacy TriangleMesh.
libc++abi: terminating with uncaught exception of type std::out_of_range: unordered_map::at: key not found

Expected behavior

Being able to successfully do alpha reconstruction

Open3D, Python and System information

- Operating system: macOS 13.2.1
- Python version: Python 3.10.0
- Open3D version: 0.17
- System architecture: arm64 / apple-silicon
- Is this a remote workstation?: no
- How did you install Open3D?: pip

Additional information

No response

@Piflyer Piflyer added the bug Not a build issue, this is likely a bug. label Apr 18, 2023
@Piflyer Piflyer changed the title Summarize the bug (e.g., "Segmentation Fault for Colored Point Cloud Registration") Unable to perform alpha surface reconstruction on Apple Silicon Apr 18, 2023
@yosho27
Copy link

yosho27 commented Jan 28, 2024

Reproduced with a slightly different error message

- Operating system: Windows 10 Pro
- Python version: Python 3.9.13
- Open3D version: 0.18.0
- System architecture: x64-based PC
- Is this a remote workstation?: no
- How did you install Open3D?: pip

[Open3D WARNING] Creating from empty legacy TriangleMesh.

IndexError: invalid unordered_map<K, T> key

Additionally, this can be reproduced with a point cloud at least as small as 6 points
[[4,1,0],[0,0,0],[2,0,0],[0,0,1],[3,1,1],[-2,0,1]] and alpha=1

@hsellik
Copy link

hsellik commented Feb 21, 2024

 - Operating system: macOS Sonoma Version 14.2.1 
 - Python version: Python 3.9.18
 - Open3D version: 0.18.0
 - System architecture: arm64 / apple-silicon / M3
 - Is this a remote workstation?: no
 - How did you install Open3D?: pip

Encountering the same issue on M3 Mac.

@kongbai-account
Copy link

  • Operating system: win10
  • Python version: Python 3.8.0
  • Open3D version: 0.18.0
  • System architecture: x64-based PC
  • Is this a remote workstation?: no
  • How did you install Open3D?: pip

[Open3D WARNING] [CreateFromPointCloudAlphaShape] invalid tetra in TetraMesh
[Open3D WARNING] Creating from empty legacy TriangleMesh.
IndexError: invalid unordered_map<K, T> key

@rxba
Copy link
Contributor

rxba commented Oct 4, 2024

This is a point scale issue, i.e. max_bound (Armadillo) is [62.1 96.4 56.8] and max_bound (Bunny) is [0.061 0.187 0.058]. If the alpha is large enough (e.g. 10), or you scale down the Armadillo, it works again.

The unordered_map key error is caused when the reconstructed mesh becomes empty internally, e.g. because of the aforementioned scale issue. This is a bug and I've opened a PR to fix the error, warn the user and return the empty mesh instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not a build issue, this is likely a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants