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

Saytap dataset all image/wrist_image are 0s #85

Open
sandhawalia opened this issue Jul 31, 2024 · 0 comments
Open

Saytap dataset all image/wrist_image are 0s #85

sandhawalia opened this issue Jul 31, 2024 · 0 comments

Comments

@sandhawalia
Copy link

sandhawalia commented Jul 31, 2024

utokyo_saytap_converted_externally_to_rlds

At version 0.1.0 all image in utokyo_saytap_converted_externally_to_rlds as well as wrist_image are empty frames (all 0s)

Screen Recording 2024-07-31 at 16 19 34

gs://gresearch/robotics/utokyo_saytap_converted_externally_to_rlds/0.1.0
Screenshot 2024-07-31 at 16 09 44

Steps to reproduce

pip install rerun-sdk
pip install rerun-notebook
dataset = 'utokyo_saytap_converted_externally_to_rlds' 
display_key = 'image'

b = tfds.builder_from_directory(builder_dir=dataset2path(dataset))
ds = b.as_dataset(split='train[:10]').shuffle(10)   # take only first 10 episodes
b.info.features['steps']
episode = next(iter(ds))

images = [step['observation']['image'] for step in episode['steps']]
actions = {
    # 'rotation_delta': [step['action']['rotation_delta'] for step in episode['steps']],
    'action': [step['action'] for step in episode['steps']]
}
pil_images = [Image.fromarray(image.numpy()) for image in images]

rr.init("Open Embodiment X")
timesteps = len(pil_images)

for tidx in range(timesteps):
    rr.set_time_sequence("frame_idx", tidx)
    rr.set_time_seconds("sensor_time", 0.33 * tidx)

    rr.log("input", rr.Image(np.array(pil_images[tidx])))

for action_name, scalers in actions.items():

    for tidx, scaler in enumerate(scalers):

        rr.set_time_sequence("frame_idx", tidx)
        for idx, val in enumerate(scaler):
            rr.log(
                    f"action/{action_name}/{idx}",
                    rr.Scalar(val),
                )

 rr.notebook_show(width=1200, height=800)

Here's a rerun.io saytap-episode.rrd.zip which you play here — https://rerun.io/viewer

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

No branches or pull requests

1 participant