results get worse when points are on manifold surface
Karbo123 opened this issue · comments
Thanks for releasing this amazing project! I have read your thesis and tried your code.
I learned from your thesis that:
[1] The limitation of gStar4D is that it is not quite efficient for input points from the surface of an object.
[2] This is because the quality of the output of gFlip3D is not as good for points on a surface as it is for points distributed inside a volume.
It seem that your thesis mainly focuses on speedup rather than accuracy, and your method is surely efficient and exact for those nearly randomly distributed points (e.g. gaussian noise). But after some experiments, I found that your method deviates from the ground truth (the exact solution) severely when points are on a manifold (e.g. a sphere, or even a cube defined by its eight vertices).
I also noticed that one of your testing instance, Brain
, has some interior points inside its surface, and therefore achieves the best performance, as seen below
[3] In contrast, the Brain input has both surface points and points from inside the object. gFlip3D performs better on Brain than all the other inputs.
For example, in my experiments, for 1000 points distributed on a unit sphere, scipy
found 1992 simplices in total, while gDel3D found 3051 (after removal of the last infinity point index). I also test the total volume of all the tetrahedrons, scipy
has 4.136784915799923
, and gDel3D has 4.540920245600749
V: 1001 E: 5989 F: 9976 T: 4988 Euler: 0
Euler check: Pass
Orient check: Pass
Adjacency check: Pass
Convex hull facets: 1996
Delaunay check: Pass
---- SUMMARY ----
PointNum 1000
FP Mode Double
TotalTime (ms) 120.21
InitTime 140519199.47
SplitTime 2.28
FlipTime 106.36
RelocateTime 0.84
SortTime 0.25
OutTime 0.23
SplayingTime 6.53
# Flips 9496
# Failed verts 14
# Final stars 35
elapsed: t1-t0=0.1481635570526123
I also tried a cube with its 8 vertices inside the range [-1, 1]^3. Your method only got 5 simplices while scipy
got 6. The simplices index obtained by your method is:
faces_vert_indices=tensor([[0, 1, 3, 4],
[0, 2, 3, 4],
[1, 3, 4, 5],
[2, 3, 4, 6],
[3, 4, 6, 7]])
the input point cloud is:
x=tensor([[-1., -1., -1.],
[-1., -1., 1.],
[-1., 1., -1.],
[-1., 1., 1.],
[ 1., -1., -1.],
[ 1., -1., 1.],
[ 1., 1., -1.],
[ 1., 1., 1.]], device='cuda:0', dtype=torch.float64)
I found that scipy
got the right volume of 8.0, while your method had the wrong number:
volume(scipy_gt.tolist())=8.0
volume(faces_vert_indices.tolist())=6.666666666666667
So I was wondering how we can get more accurate results for points on a manifold surface?