isl-org / Open3D

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

GPU-enabled / multi-threaded implementation of ball pivoting surface recon #3511

Open VisionaryMind opened 3 years ago

VisionaryMind commented 3 years ago

Is your feature request related to a problem? Please describe. We are attempting to use the Ball Pivoting algorithm to create surfaces on large point cloud datasets. Typical size for a single cloud in our pipeline is ~10 million points. Here is a brief sample of the Python implementation:

 meshcloud = o3d.io.read_point_cloud(os.path.join(cdir,"cloud_1621465770.655823.ply"))

# Mesh from Ball Pivoting

distances = meshcloud.compute_nearest_neighbor_distance()
avg_dist = np.mean(distances)
radius = 3 * avg_dist

rec_mesh = o3d.geometry.TriangleMesh.create_from_point_cloud_ball_pivoting(meshcloud, o3d.utility.DoubleVector([radius, radius * 2]))

During the pivoting operation, it is clear that O3D is not using the GPU (at all). I can verify that after loading the mesh, its data type is open3d.cuda.pybind.geometry.PointCloud. Further, not only is O3D not running this operation across the GPU, but there is no multi-threading, as we see on Poisson recon. Only a single CPU (among 32 cores) is maxed out at 100 at any given time, while the others are hovering around zero.

The reconstruction never finishes -- at least not within a 30-minute time-frame. The calculated radius for a pointset of ~10 million points is ~.08, but taking this down to .05 or smaller does not seem to speed up the process. We have hundreds of these kinds of clouds in a single dataset, and it is mandatory we find a way to perform surface recon more efficiently.

Describe the solution you'd like The solution may already exist, and if it does, please point me in the direction of the relevant documentation. For now, I see that ball pivoting only takes a point cloud and radii as arguments. At the very least, it would be helpful to be able to load the points onto the GPU and then perform the ball pivoting operations directly on GPU. Either that or partition the points into bins, process them in parallel, and then concatenate them with an additional BPA cycle at the edges.

Describe alternatives you've considered We have worked extensively with Poisson and found its results to be unsatisfactorily noisy, regardless of octree depth. BPA makes better sense, given the density of our dataset. It may be possible to break the set down into 100,000 point chunks, for example, and using Python multi-processing to run them in parallel, but then we have the problem of surface disconnects at the edges. The entire dataset is well over 500 million points, so we are already making a compromise taking it down to 10 mil.

We don't want to decimate these clouds, so as not to lose important cm-level features. If you can provide any guidance on how we might increase the speed of our pipeline, it would be greatly appreciated!

waveleaf27 commented 1 year ago

Is there any update for this request? @ssheorey @pablospe @VisionaryMind

1215232494 commented 1 year ago

Is there any update for this request? @ssheorey @pablospe @waveleaf27 @VisionaryMind

satyajitghana commented 1 year ago

I found a multi-threaded implementation of ball pivoting: http://www.ipol.im/pub/art/2014/81/

ssheorey commented 1 year ago

Hi @VisionaryMind @satyajitghana we would welcome community contributions for multi-threaded / gpu implementations.

benjaminum commented 1 year ago

I found a multi-threaded implementation of ball pivoting: http://www.ipol.im/pub/art/2014/81/

The license of the example implementation is GPL

houzey2 commented 10 months ago

I found a multi-threaded implementation of ball pivoting: http://www.ipol.im/pub/art/2014/81/

Hi, I met the Error: an unknown error occurred. when trying to use the link to run my point cloud. Do you have any ideas about why it happens?

purepani commented 3 months ago

I found a multi-threaded implementation of ball pivoting: http://www.ipol.im/pub/art/2014/81/

The license of the example implementation is GPL

@benjaminum Would it be a problem to make an implementation of the algorithm based on the paper(not the example implementation)?