Commit fefbdd12 authored by liyinhao's avatar liyinhao
Browse files

change np.pi

parent 6060ff80
......@@ -133,7 +133,7 @@ class IndoorGlobalRotScale(object):
def __init__(self, use_height=True, rot_range=None, scale_range=None):
self.use_height = use_height
self.rot_range = rot_range
self.rot_range = np.pi * np.array(rot_range)
self.scale_range = scale_range
def _rotz(self, t):
......
......@@ -64,7 +64,7 @@ def test_indoor_flip_data():
def test_global_rot_scale():
np.random.seed(0)
sunrgbd_augment = IndoorGlobalRotScale(
True, rot_range=[-np.pi / 6, np.pi / 6], scale_range=[0.85, 1.15])
True, rot_range=[-1 / 6, 1 / 6], scale_range=[0.85, 1.15])
sunrgbd_results = dict()
sunrgbd_results['points'] = np.array(
[[1.02828765e+00, 3.65790772e+00, 1.97294697e-01, 1.61959505e+00],
......@@ -101,7 +101,7 @@ def test_global_rot_scale():
np.random.seed(0)
scannet_augment = IndoorGlobalRotScale(
True, rot_range=[-np.pi * 1 / 36, np.pi * 1 / 36], scale_range=None)
True, rot_range=[-1 * 1 / 36, 1 / 36], scale_range=None)
scannet_results = dict()
scannet_results['points'] = np.array(
[[1.6110241e+00, -1.6903955e-01, 5.8115810e-01, 5.9897250e-01],
......
......@@ -25,7 +25,7 @@ def test_scannet_pipeline():
dict(
type='IndoorGlobalRotScale',
use_height=True,
rot_range=[-np.pi * 1 / 36, np.pi * 1 / 36],
rot_range=[-1 / 36, 1 / 36],
scale_range=None),
dict(type='DefaultFormatBundle3D', class_names=class_names),
dict(
......@@ -108,7 +108,7 @@ def test_sunrgbd_pipeline():
dict(
type='IndoorGlobalRotScale',
use_height=True,
rot_range=[-np.pi / 6, np.pi / 6],
rot_range=[-1 / 6, 1 / 6],
scale_range=[0.85, 1.15]),
dict(type='IndoorPointSample', num_points=5),
dict(type='DefaultFormatBundle3D', class_names=class_names),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment