Commit 93a2b097 authored by liyinhao's avatar liyinhao
Browse files

move rotate range to the init function

parent f5d86d36
...@@ -97,12 +97,13 @@ class IndoorRotateData(object): ...@@ -97,12 +97,13 @@ class IndoorRotateData(object):
def __init__(self, name): def __init__(self, name):
assert name in ['scannet', 'sunrgbd'] assert name in ['scannet', 'sunrgbd']
self.name = name self.name = name
self.rot_range = np.pi / 3
def __call__(self, results): def __call__(self, results):
point_cloud = results.get('point_cloud', None) point_cloud = results.get('point_cloud', None)
gt_boxes = results.get('gt_boxes', None) gt_boxes = results.get('gt_boxes', None)
rot_angle = (np.random.random() * np.pi / rot_angle = (np.random.random() *
3) - np.pi / 6 # -30 ~ +30 degree self.rot_range) - self.rot_range / 2 # -30 ~ +30 degree
rot_mat = _rotz(rot_angle) rot_mat = _rotz(rot_angle)
point_cloud[:, 0:3] = np.dot(point_cloud[:, 0:3], point_cloud[:, 0:3] = np.dot(point_cloud[:, 0:3],
np.transpose(rot_mat)) np.transpose(rot_mat))
......
0.97944 0.011827 0.20136 0.011827 0.99319 -0.11586 -0.20136 0.11586 0.97264
529.5 0 0 0 529.5 0 365 265 1
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