If you are collecting your first SO-101 dataset, the biggest variable is not a training setting but how those 50 demonstrations are distributed. Follow this guide and you will end up with a dataset recorded from a planned set of start positions, with bad episodes found and removed. Installation and training commands are in the SO-101 ACT training guide, and policy choice is in the demo-count selection guide.
Why plan the distribution first
Imitation policies do poorly on situations absent from their data. The ACT paper reports 80-90% success on six real tasks from about ten minutes of demonstrations on low-cost hardware, a result that depends on a well-scoped task. Collect all 50 from one spot and you get a policy that only works at that spot. Spread them too widely and each region is starved of examples.
The official documentation puts numbers on that balance. Start with grasping an object at different locations and placing it in a bin, and record at least 50 episodes at 10 per location. Once grasping is reliable, gradually add locations, grasp techniques and camera positions.
What you need before starting
- A calibrated SO-101 leader and follower pair
- One or two fixed cameras
- A Hugging Face token with write access
- The dataset tools extra:
pip install 'lerobot[dataset]'
Step 1: Divide start positions into zones
Split the workspace into five zones and assign ten episodes each. The zone layout is not an official rule; it is one way to apply “10 per location” to a real table.
| Zone | Object start | Target | First index (example) | Last index (example) |
|---|---|---|---|---|
| A | Front left | 10 | 0 | 9 |
| B | Front right | 10 | 10 | 19 |
| C | Center | 10 | 20 | 29 |
| D | Rear left | 10 | 30 | 39 |
| E | Rear right | 10 | 40 | 49 |
Mark the zones with tape and vary position and orientation slightly inside each. Recording zone by zone means episode numbers alone will later tell you whether failures cluster in one area.
Estimate the session length beforehand. The defaults are 60 seconds each for the episode and the reset.
| Setting | Episode | Reset | 50 episodes | Frames at 30 fps |
|---|---|---|---|---|
| Defaults | 60 s | 60 s | 100 min | 90,000 |
| Assumed short pick-and-place | 20 s | 10 s | 25 min | 30,000 |
If the task finishes within 15 seconds there is no reason to record the default window. Set the episode slightly longer than the task and press n to move on when you finish early. Frame count also feeds the training time estimate.
Step 2: Lock down cameras and lighting
The camera documentation and Hugging Face’s dataset checklist combine into these criteria.
| Item | Criterion | Source |
|---|---|---|
| Camera position | Rigidly mounted, never moved between recording and deployment | Camera docs |
| Framing | Object, gripper and target visible in at least one camera | Camera docs |
| Lighting | Diffuse and consistent; avoid direct sun, reflections, moving shadows | Camera docs |
| Resolution | 640×480 at 30 fps is enough for most tasks | Camera docs |
| Views | Two camera views preferred | Checklist |
| Motion in frame | Leader arm and human limbs stay out of frame | Checklist |
| Camera names | Named by location, such as images.top or images.wrist.left | Checklist |
| Task text | A concrete objective, 25-50 characters | Checklist |
The official framing test is simple: without looking at the robot, could you do the task using only the camera images? If the gripper hides the object for long stretches, add a wrist camera or move the existing one.
Step 3: Record against a clear standard
Consistent grasping is what the documentation explicitly requires. The other rows below translate that into things you can check at the bench, and should be read as recommendations.
| Check | Good demonstration | Re-record |
|---|---|---|
| Speed | Similar pace across demonstrations | Pauses or sudden bursts |
| Gripper timing | Closes once after contact | Opens and closes repeatedly |
| Approach | Same direction each time | Approach direction varies widely |
| Occlusion | Object stays visible | Arm hides the object for long periods |
| End pose | Returns to a defined pose | Ends in arbitrary poses |
lerobot-record \
--robot.type=so101_follower \
--robot.port=/dev/ttyACM0 \
--robot.id=my_follower_arm \
--robot.cameras="{ top: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}, wrist: {type: opencv, index_or_path: 1, width: 640, height: 480, fps: 30}}" \
--teleop.type=so101_leader \
--teleop.port=/dev/ttyACM1 \
--teleop.id=my_leader_arm \
--dataset.repo_id=${HF_USER}/so101_cup_to_bin \
--dataset.num_episodes=50 \
--dataset.episode_time_s=20 \
--dataset.reset_time_s=10 \
--dataset.single_task="Pick up the red cup and place it in the bin"
There are three keyboard controls while recording. → or n ends the current segment early, ← or r cancels the episode and re-records it, and ESC or q stops the session, encodes the video and uploads.
Rejecting an episode costs least at the moment it happens. Press r if you knocked the object out of place, teleoperation dropped, or the task did not finish. A near-miss that you corrected right away can stay: it shows the policy how to recover from the same drift at runtime. Keep these to a small share, though, or the policy starts learning hesitation.
Step 4: Spot suspects with visualization
Open the dataset in the LeRobot Dataset Visualizer. According to the dataset tools guide, camera streams play in sync above per-joint state and action charts, and the Advanced menu offers statistics and filtering to flag problematic episodes.
Look for these patterns in the charts.
- Flat stretches: Long periods without motion usually mean teleoperation stalled.
- Spikes: A big jump in a single frame can indicate a bus error or a calibration problem.
- Length outliers: Episodes much longer or shorter than the rest suggest hesitation or an early stop.
- Zone clustering: If suspects concentrate in one zone, fix framing or reach there first.
To inspect locally in Rerun:
lerobot-dataset-viz --repo-id ${HF_USER}/so101_cup_to_bin --episode-index 7
Step 5: Use replay to separate causes
Play suspect episodes back on the real robot. If replay works but the trained policy fails, suspect the demonstration distribution. If replay itself misses the object, the cause may be the arm’s repeatability or inconsistent object placement.
lerobot-replay \
--robot.type=so101_follower \
--robot.port=/dev/ttyACM0 \
--robot.id=my_follower_arm \
--dataset.repo_id=${HF_USER}/so101_cup_to_bin \
--dataset.episode=7
Step 6: Delete bad episodes and keep the original
lerobot-edit-dataset can write a new dataset without the listed episodes. Save under a new name so that you can change your criteria later.
lerobot-edit-dataset \
--repo_id ${HF_USER}/so101_cup_to_bin \
--new_repo_id ${HF_USER}/so101_cup_to_bin_clean \
--operation.type delete_episodes \
--operation.episode_indices "[3, 7, 28]"
Recount episodes per zone afterwards. If one zone lost far more than the others, rebalance it with --resume=true, and remember that --dataset.num_episodes then means the number to add.
Four dataset checks before you start training
Confirm that zone counts are balanced, that every demonstration can be understood from the camera view, that the task sentence is specific, and that the original and cleaned datasets are stored separately. Then train an ACT baseline on this dataset, so that later differences between models can be attributed to the model rather than to the data.