Skip to content

Conversation

anhtu293
Copy link
Contributor

General description of your pull request with the list of new features and/or bugs.

  • How to fix: remove unsqueeze in encode_abosolute
  • Result after fixing
>>> from aloscene import Depth
>>> import torch
>>> depth = Depth(torch.zeros((1, 128, 128)), is_absolute=False)
>>> depth.encode_absolute()
tensor(
	scale=1
	shift=0
	distortion=1.0
	is_planar=True
	is_absolute=True
	projection=pinhole
	[[[100000000., 100000000., 100000000.,  ..., 100000000.,
          100000000., 100000000.],
         [100000000., 100000000., 100000000.,  ..., 100000000.,
          100000000., 100000000.],
         [100000000., 100000000., 100000000.,  ..., 100000000.,
          100000000., 100000000.],
         ...,
         [100000000., 100000000., 100000000.,  ..., 100000000.,
          100000000., 100000000.],
         [100000000., 100000000., 100000000.,  ..., 100000000.,
          100000000., 100000000.],
         [100000000., 100000000., 100000000.,  ..., 100000000.,
          100000000., 100000000.]]])
>>> depth.encode_absolute(keep_negative=True)
tensor(
	scale=1
	shift=0
	distortion=1.0
	is_planar=True
	is_absolute=True
	projection=pinhole
	[[[100000000., 100000000., 100000000.,  ..., 100000000.,
          100000000., 100000000.],
         [100000000., 100000000., 100000000.,  ..., 100000000.,
          100000000., 100000000.],
         [100000000., 100000000., 100000000.,  ..., 100000000.,
          100000000., 100000000.],
         ...,
         [100000000., 100000000., 100000000.,  ..., 100000000.,
          100000000., 100000000.],
         [100000000., 100000000., 100000000.,  ..., 100000000.,
          100000000., 100000000.],
         [100000000., 100000000., 100000000.,  ..., 100000000.,
          100000000., 100000000.]]])
>>> 


This pull request includes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@anhtu293 anhtu293 requested a review from Data-Iab March 16, 2023 09:58
@anhtu293 anhtu293 self-assigned this Mar 16, 2023
Copy link
Collaborator

@Data-Iab Data-Iab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unsqueeze was there due the a low level torch __getitem__ issue in the previous versions. Thanks for fixing

@Data-Iab Data-Iab merged commit 2e2cb9e into dev Mar 22, 2023
@thibo73800 thibo73800 deleted the fix_#337 branch March 22, 2023 10:18
@anhtu293 anhtu293 mentioned this pull request Apr 5, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants