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

Add visualize_dataset_html with http.server #188

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

Cadene
Copy link
Collaborator

@Cadene Cadene commented May 17, 2024

What this does

  • Add a faster and lightweight option to visualize datasets available at visualize_dataset_html.py
  • Add possibility to run inference of a network and visualize its output

New commands

  • Visualize data stored on a local machine:
local$ python lerobot/scripts/visualize_dataset_html.py \
    --repo-id lerobot/pusht

local$ open http://localhost:9090
  • Visualize data stored on a distant machine with a local viewer:
distant$ python lerobot/scripts/visualize_dataset_html.py \
    --repo-id lerobot/pusht

local$ ssh -L 9090:localhost:9090 distant  # create a ssh tunnel
local$ open http://localhost:9090
  • Select episodes to visualize:
python lerobot/scripts/visualize_dataset_html.py \
    --repo-id lerobot/pusht \
    --episodes 7 3 5 1 4

How it was tested

  • Tried all datasets:
datasets=(
  "pusht_image"
  "xarm_lift_medium_image"
  "xarm_lift_medium_replay_image"
  "xarm_push_medium_image"
  "xarm_push_medium_replay_image"
  "aloha_sim_insertion_human_image"
  "aloha_sim_insertion_scripted_image"
  "aloha_sim_transfer_cube_human_image"
  "aloha_sim_transfer_cube_scripted_image"
  "pusht"
  "xarm_lift_medium"
  "xarm_lift_medium_replay"
  "xarm_push_medium"
  "xarm_push_medium_replay"
  "aloha_sim_insertion_human"
  "aloha_sim_insertion_scripted"
  "aloha_sim_transfer_cube_human"
  "aloha_sim_transfer_cube_scripted"
  "aloha_mobile_cabinet"
  "aloha_mobile_chair"
  "aloha_mobile_elevator"
  "aloha_mobile_shrimp"
  "aloha_mobile_wash_pan"
  "aloha_mobile_wipe_wine"
  "aloha_static_battery"
  "aloha_static_candy"
  "aloha_static_coffee"
  "aloha_static_coffee_new"
  "aloha_static_cups_open"
  "aloha_static_fork_pick_up"
  "aloha_static_pingpong_test"
  "aloha_static_pro_pencil"
  "aloha_static_screw_driver"
  "aloha_static_tape"
  "aloha_static_thread_velcro"
  "aloha_static_towel"
  "aloha_static_vinh_cup"
  "aloha_static_vinh_cup_left"
  "aloha_static_ziploc_slide"
  "umi_cup_in_the_wild"
)
for dataset in "${datasets[@]}"; do
  python lerobot/scripts/visualize_dataset.py --repo-id lerobot/${dataset} --episode-indices 0 --serve 0
done;

This change is Reviewable

@Cadene Cadene changed the title [WIP] Improve visualize_dataset [WIP] Add visualize_dataset with light webserver May 19, 2024
@Cadene Cadene force-pushed the user/rcadene/2024_05_17_improve_visualize_dataset branch from 50f3d1b to a64c8a0 Compare May 19, 2024 20:47
@Cadene Cadene changed the title [WIP] Add visualize_dataset with light webserver [WIP] Add visualize_dataset with http.server May 19, 2024
@Cadene Cadene self-assigned this May 19, 2024
@Cadene Cadene added ✨ Enhancement New feature or request 🗃️ Dataset Something dataset-related labels May 19, 2024
@Cadene Cadene force-pushed the user/rcadene/2024_05_17_improve_visualize_dataset branch 2 times, most recently from 885cb9d to bf740f8 Compare May 21, 2024 21:34
@Cadene Cadene force-pushed the user/rcadene/2024_05_17_improve_visualize_dataset branch from 939209e to b502a82 Compare June 13, 2024 16:32
@Cadene Cadene marked this pull request as ready for review June 14, 2024 11:27
@Cadene Cadene requested a review from aliberts June 14, 2024 11:27
@Cadene Cadene changed the title [WIP] Add visualize_dataset with http.server Add visualize_dataset_gtml with http.server Jun 14, 2024
@Cadene Cadene changed the title Add visualize_dataset_gtml with http.server Add visualize_dataset_html with http.server Jul 17, 2024
pyproject.toml Outdated Show resolved Hide resolved
@Cadene Cadene force-pushed the user/rcadene/2024_05_17_improve_visualize_dataset branch from 57451d4 to ca7f207 Compare August 6, 2024 14:16
Copy link
Collaborator

@michel-aractingi michel-aractingi left a comment

Choose a reason for hiding this comment

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

Very cool!

@Cadene Cadene merged commit 2252b42 into main Aug 8, 2024
7 checks passed
@Cadene Cadene deleted the user/rcadene/2024_05_17_improve_visualize_dataset branch August 8, 2024 17:19
amandip7 pushed a commit to amandip7/lerobot that referenced this pull request Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗃️ Dataset Something dataset-related ✨ Enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants