--- license: apache-2.0 datasets: - lerobot/aloha_sim_insertion_human tags: - act-policy - model_hub_mixin - pytorch_model_hub_mixin - robotics pipeline_tag: robotics --- # Model Card for ACT/AlohaInsertion Action Chunking Transformer Policy (as per [Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware](https://arxiv.org/abs/2304.13705)) trained for the `AlohaInsertion` environment from [gym-aloha](https://github.com/huggingface/gym-aloha). ![demo](demo.gif) ## How to Get Started with the Model See the [LeRobot library](https://github.com/huggingface/lerobot) (particularly the [evaluation script](https://github.com/huggingface/lerobot/blob/main/lerobot/scripts/eval.py)) for instructions on how to load and evaluate this model. ## Training Details Trained with [LeRobot@3c0a209](https://github.com/huggingface/lerobot/tree/3c0a209f9fac4d2a57617e686a7f2a2309144ba2). The model was trained using [LeRobot's training script](https://github.com/huggingface/lerobot/blob/main/lerobot/scripts/train.py) and with the [aloha_sim_insertion_human](https://huggingface.co/datasets/lerobot/aloha_sim_insertion_human) dataset, using this command: ```bash python lerobot/scripts/train.py \ --output_dir=outputs/train/act_aloha_insertion \ --policy.type=act \ --dataset.repo_id=lerobot/aloha_sim_insertion_human \ --env.type=aloha \ --env.task=AlohaInsertion-v0 \ --wandb.enable=true ``` The training curves may be found at https://wandb.ai/aliberts/lerobot/runs/qxcub3cg. The current model corresponds to the checkpoint at 100k steps. This took about 1h50 to train on an Nvida A100. ## Evaluation The model was evaluated on the `AlohaInsertion` task from [gym-aloha](https://github.com/huggingface/gym-aloha) and compared to a similar model trained with the original [ACT repository](https://github.com/tonyzhaozh/act). Each episode marks a success if the peg is successfully picked by one robot arm and inserted into the socket held by the other robot arm. Here are the success rate results for 500 episodes worth of evaluation. The "Theirs" column is the metric as reported in the original paper. The results of each of the individual rollouts may be found in [eval_info.json](eval_info.json). |Ours|Theirs -|-|- Success rate for 500 episodes (%) | 20.6 | 20 It was produced after training with this command: ```bash python lerobot/scripts/eval.py \ --policy.path=outputs/train/act_aloha_insertion/checkpoints/last/pretrained_model \ --output_dir=outputs/eval/act_aloha_insertion/last \ --env.type=aloha \ --env.task=AlohaInsertion-v0 \ --eval.n_episodes=500 \ --eval.batch_size=50 \ --device=cuda \ --use_amp=false ``` The original code was heavily refactored, and some bugs were spotted along the way. The differences in code may account for the difference in success rate. Another possibility is that our simulation environment may use slightly different heuristics to evaluate success (we've observed that success is registered as soon as the second arm's gripper makes antipodal contact with the cube). Finally, one should observe that the in-training evaluation jumps up towards the end of training. This may need further investigation (Is it statistically significant? If so, what is the cause?).