mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-24 21:19:53 +00:00
feat(viz): render depth observations as rr.DepthImage in Viridis
This commit is contained in:
@@ -107,7 +107,14 @@ def log_rerun_data(
|
|||||||
for i, vi in enumerate(arr):
|
for i, vi in enumerate(arr):
|
||||||
rr.log(f"{key}_{i}", rr.Scalars(float(vi)))
|
rr.log(f"{key}_{i}", rr.Scalars(float(vi)))
|
||||||
else:
|
else:
|
||||||
img_entity = rr.Image(arr).compress() if compress_images else rr.Image(arr)
|
if arr.shape[-1] == 1:
|
||||||
|
img_entity = (
|
||||||
|
rr.DepthImage(arr, colormap=rr.components.Colormap.Viridis).compress()
|
||||||
|
if compress_images
|
||||||
|
else rr.rr.DepthImage(arr, colormap=rr.components.Colormap.Viridis)
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
img_entity = rr.Image(arr).compress() if compress_images else rr.Image(arr)
|
||||||
rr.log(key, entity=img_entity, static=True)
|
rr.log(key, entity=img_entity, static=True)
|
||||||
|
|
||||||
if action:
|
if action:
|
||||||
|
|||||||
Reference in New Issue
Block a user