第八步:模型推理——pi0.5 推理命令
部署统一使用
lerobot-rollout,用法和参数见命令行说明。
Ubuntu
- 删除原有的数据集(如有)
Shell
sudo chmod 666 /dev/ttyACM*
sudo rm -rf /home/<你的用户名>/.cache/huggingface/lerobot/<你的用户名>/rollout_lerobot_my_dataset_shake_hands
export TOKENIZERS_PARALLELISM=false- 部署命令行
Shell
lerobot-rollout \
--strategy.type=base \
--robot.type=so101_follower \
--robot.port=/dev/ttyACM0 \
--robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 1280, height: 720, fps: 30, fourcc: "MJPG"}}" \
--robot.id=my_follower_arm \
--policy.path=/home/<你的用户名>/Downloads/lerobot_output/shake/pi05/50K/pretrained_model \
--task="Shake Hands" \
--duration=60 \
--display_data=falseMac
- 删除原有的数据集(如有)
Shell
sudo rm -rf /Users/<你的用户名>/.cache/huggingface/lerobot/<你的用户名>/rollout_lerobot_my_dataset_shake_hands- 部署命令行
Shell
lerobot-rollout \
--strategy.type=base \
--robot.type=so101_follower \
--robot.port=/dev/tty.usbmodem5AAF2193061 \
--robot.cameras="{front: {type: opencv, index_or_path: 0, width: 1280, height: 720, fps: 30, fourcc: "MJPG"}}" \
--robot.id=my_follower_arm \
--policy.freeze_vision_encoder=false \
--policy.dtype=bfloat16 \
--policy.compile_model=true \
--policy.device=cpu \
--policy.path=/Users/<你的用户名>/Downloads/7-lerobot/shake/pi05/50K/pretrained_model \
--task="Shake Hands" \
--duration=60 \
--display_data=false

推理很慢的原因
数据集太小了
显卡显存不够,需要上50系显卡

