-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from Visual-Behavior/add_pose_label
Noisy aug, pose update, depth abs, render, batch_list
- Loading branch information
Showing
6 changed files
with
187 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from aloscene.camera_calib import CameraExtrinsic | ||
import torch | ||
|
||
|
||
class Pose(CameraExtrinsic): | ||
"""Pose Tensor. Usually use to store World2Frame coordinates | ||
Parameters | ||
---------- | ||
x: torch.Tensor | ||
Pose matrix | ||
""" | ||
|
||
@staticmethod | ||
def __new__(cls, x, *args, names=(None, None), **kwargs): | ||
tensor = super().__new__(cls, x, *args, names=names, **kwargs) | ||
return tensor | ||
|
||
def __init__(self, x, *args, **kwargs): | ||
super().__init__(x) | ||
|
||
def _hflip(self, *args, **kwargs): | ||
return self.clone() | ||
|
||
def _vflip(self, *args, **kwargs): | ||
return self.clone() | ||
|
||
def _resize(self, *args, **kwargs): | ||
# Resize image does not change cam extrinsic | ||
return self.clone() | ||
|
||
def _crop(self, *args, **kwargs): | ||
# Cropping image does not change cam extrinsic | ||
return self.clone() | ||
|
||
def _pad(self, *args, **kwargs): | ||
# Padding image does not change cam extrinsic | ||
return self.clone() |