4
4
import open3d
5
5
6
6
if open3d .core .cuda .device_count () > 0 :
7
- import open3d .ml .tf .ops as ml_ops
7
+ from open3d .ml .tf .ops import furthest_point_sampling , three_nn , three_interpolate , three_interpolate_grad , ball_query
8
8
9
9
10
10
def furthest_point_sample (xyz , npoint ):
@@ -18,7 +18,7 @@ def furthest_point_sample(xyz, npoint):
18
18
if not open3d .core .cuda .device_count () > 0 :
19
19
raise NotImplementedError
20
20
21
- output = ml_ops . furthest_point_sampling (xyz , npoint )
21
+ output = furthest_point_sampling (xyz , npoint )
22
22
return output
23
23
24
24
@@ -37,7 +37,7 @@ def three_nn_gpu(query_pts, data_pts):
37
37
if not open3d .core .cuda .device_count () > 0 :
38
38
raise NotImplementedError
39
39
40
- dist2 , idx = ml_ops . three_nn (query_pts , data_pts )
40
+ dist2 , idx = three_nn (query_pts , data_pts )
41
41
return tf .sqrt (dist2 ), idx
42
42
43
43
@@ -56,7 +56,7 @@ def three_interpolate_gpu(features, idx, weight):
56
56
if not open3d .core .cuda .device_count () > 0 :
57
57
raise NotImplementedError
58
58
59
- output = ml_ops . three_interpolate (features , idx , weight )
59
+ output = three_interpolate (features , idx , weight )
60
60
return output
61
61
62
62
@@ -71,7 +71,7 @@ def _tree_interpolate_gradient(op, grad_out):
71
71
72
72
m = features .shape [2 ]
73
73
74
- grad_features = ml_ops . three_interpolate_grad (grad_out , idx , weight , m )
74
+ grad_features = three_interpolate_grad (grad_out , idx , weight , m )
75
75
return grad_features , None , None
76
76
77
77
@@ -87,7 +87,7 @@ def ball_query_gpu(radius, nsample, xyz, new_xyz):
87
87
if not open3d .core .cuda .device_count () > 0 :
88
88
raise NotImplementedError
89
89
90
- idx = ml_ops . ball_query (xyz , new_xyz , radius , nsample )
90
+ idx = ball_query (xyz , new_xyz , radius , nsample )
91
91
return idx
92
92
93
93
0 commit comments