Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bbox_transform.py #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/utils/bbox_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ def rotate_pc_along_y_torch(pc, rot_angle):
:param rot_angle: (N)
:return:
"""
# Convert tensor to n rows, 1 column
cosa = torch.cos(rot_angle).view(-1, 1)
sina = torch.sin(rot_angle).view(-1, 1)


# Concatenates the given sequence of seq tensors in the given dimension (here in the dimension 1/ columns)
raw_1 = torch.cat([cosa, -sina], dim=1)
raw_2 = torch.cat([sina, cosa], dim=1)
R = torch.cat((raw_1.unsqueeze(dim=1), raw_2.unsqueeze(dim=1)), dim=1) # (N, 2, 2)
Expand Down