def test_roi_pool(ml): values0 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/roi_pool/values0.npy' ) values1 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/roi_pool/values1.npy' ) values2 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/roi_pool/values2.npy' ) sampled_pts_num = 512 ans0, ans1 = mltest.run_op(ml, ml.device, True, ml.ops.roi_pool, values0, values1, values2, sampled_pts_num) expected0 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/roi_pool/out0.npy' ) expected1 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/roi_pool/out1.npy' ) np.testing.assert_equal(ans0, expected0) np.testing.assert_equal(ans1, expected1)
def test_furthest_point_sampling(ml): values = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/sampling/values.npy' ) samples = 4096 ans = mltest.run_op(ml, ml.device, True, ml.ops.furthest_point_sampling, values, samples) expected = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/sampling/out.npy' ) np.testing.assert_equal(ans, expected)
def test_group_pts(ml): values0 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/group_pts/values0.npy' ) values1 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/group_pts/values1.npy' ) ans = mltest.run_op(ml, ml.device, True, ml.ops.group_points, values0, values1) expected = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/group_pts/out.npy' ) np.testing.assert_equal(ans, expected)
def test_query_pts(ml): values0 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/query_pts/values0.npy' ) values1 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/query_pts/values1.npy' ) sample = 16 radius = 0.1 ans = mltest.run_op(ml, ml.device, True, ml.ops.ball_query, values0, values1, radius, sample) expected = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/query_pts/out.npy' ) np.testing.assert_equal(ans, expected)
def test_three_interp(ml): values0 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/three_interp/values0.npy' ) values1 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/three_interp/values1.npy' ) values2 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/three_interp/values2.npy' ) ans = mltest.run_op(ml, ml.device, True, ml.ops.three_interpolate, values0, values1, values2) expected = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/three_interp/out.npy' ) np.testing.assert_equal(ans, expected)
def test_three_nn(ml): values0 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/three_nn/values0.npy' ) values1 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/three_nn/values1.npy' ) ans0, ans1 = mltest.run_op(ml, ml.device, True, ml.ops.three_nn, values0, values1) expected0 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/three_nn/out0.npy' ) expected1 = mltest.fetch_numpy( 'https://storage.googleapis.com/isl-datasets/open3d-dev/test/ml_ops/data/three_nn/out1.npy' ) np.testing.assert_equal(ans0, expected0) np.testing.assert_equal(ans1, expected1)