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

rr.Tensor with image-like shape does not show in viewer #3569

Closed
roym899 opened this issue Sep 30, 2023 · 0 comments · Fixed by #3583
Closed

rr.Tensor with image-like shape does not show in viewer #3569

roym899 opened this issue Sep 30, 2023 · 0 comments · Fixed by #3583
Assignees
Labels
🪳 bug Something isn't working

Comments

@roym899
Copy link
Collaborator

roym899 commented Sep 30, 2023

Describe the bug
Seems like tensors that have a shape like (H, W, C=1 or 3 or 4) do not show up in the viewer.

To Reproduce

import numpy as np
import rerun as rr

rr.init("tensor", spawn=True)
rr.log("tensor", rr.Tensor(np.random.rand(100,100,3)))

shows the empty viewer.

Rerun version

rerun_py 0.9.0-alpha.4 [rustc 1.72.1 (d5c2e9c34 2023-09-13), LLVM 16.0.5] x86_64-unknown-linux-gnu db71899, built 2023-09-30T10:33:12Z
@roym899 roym899 added 🪳 bug Something isn't working 👀 needs triage This issue needs to be triaged by the Rerun team labels Sep 30, 2023
@Wumpf Wumpf removed the 👀 needs triage This issue needs to be triaged by the Rerun team label Sep 30, 2023
@Wumpf Wumpf self-assigned this Oct 2, 2023
Wumpf added a commit that referenced this issue Oct 2, 2023
### What

* Fixes #3569

Testcode:
```
import numpy as np
import rerun as rr

rr.init("tensor", spawn=True)
rr.log("tensor", rr.Tensor(np.asarray(np.random.rand(100, 100, 3) * 255, dtype=np.uint8)))
rr.log("image", rr.Image(np.random.rand(100, 100, 3)))
```

Before the `tensor` entity wouldn't show anything, now this shows two
space views:
<img width="1737" alt="image"
src="https://github.com/rerun-io/rerun/assets/1220815/4542e132-b54e-4a2f-a722-a99fac262830">


In fact, we didn't allow tensor views for anything image shaped _at all_
before!

Tested with `python ./scripts/run_all.py --fast` and (todo!) webdemo
that this didn't break heuristic

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/3583) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/3583)
- [Docs
preview](https://rerun.io/preview/51350829da593ce510e685754a5df4df4a3fb4fe/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/51350829da593ce510e685754a5df4df4a3fb4fe/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants