-
-
Notifications
You must be signed in to change notification settings - Fork 948
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
Init point cloud and video augmentation module #2374
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shijianjian shouldnt we define a Pointcloud data structure too ? Do you have something in mind whether to represent dense or sparse pointcloud and how to deal with the memory footprint for the dense case ?
kornia/augmentation/pc/base.py
Outdated
def transform_tensor(self, input: Tensor) -> Tuple[Tensor, Optional[Tensor], Optional[Tensor], Optional[Tensor]]: | ||
"""Split a given tensor to [xyz, normal, rgb, others]. | ||
|
||
Of which xyz is required, while the rest are optional. | ||
""" | ||
C = input.size(-1) | ||
if C < 3: | ||
raise RuntimeError( | ||
f"Insufficient input channels. We expect at least (B, N, C) and C >= 3. Got {input.shape}." | ||
) | ||
if C == 3: | ||
return input, None, None, None | ||
if C < 6: | ||
return input[..., :3], None, None, input[..., 3:] | ||
if C == 6: | ||
return input[..., :3], input[..., 3:], None, None | ||
if C < 9: | ||
return input[..., :3], input[..., 3:6], None, input[..., 6:] | ||
if C == 9: | ||
return input[..., :3], input[..., 3:6], input[..., 6:], None | ||
return input[..., :3], input[..., 3:6], input[..., 6:9], input[9:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edgarriba The fields for a point cloud object can be represented like above.
Also, I think we should support .from_open3d
and .to_opend3d
.
http://www.open3d.org/docs/release/python_api/open3d.geometry.PointCloud.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100% agree
This sounds good. I've been trying out some RGBD stuff and was wondering the same. Perhaps we can open a different discussion thread(issue) for this. |
@edgarriba @cjpurackal Can you point me some links as references? I am not sure what to do on this. Probably worth having RGBD data structure. |
@cjpurackal can you start that thread ? Very often RGBD are just 4xHxW but depending how we want to target pointclouds it can be defined as a just as sparse vectors |
will do |
as part of #2719 plan, we have deleted the |
Changes
Fixes # (issue)
Type of change
Checklist