Instructions to use spikefly/pi05-arx-stack-three-cups-step30k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LeRobot
How to use spikefly/pi05-arx-stack-three-cups-step30k with LeRobot:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download deploy/example_client_fn.py from spikefly/pi05-arx-stack-three-cups-step30k: direct link, hf CLI and curl.
- Browser
- Download file 532 Bytes
-
https://huggingface.co/spikefly/pi05-arx-stack-three-cups-step30k/resolve/main/deploy/example_client_fn.py
- Command line
-
hf download hf://spikefly/pi05-arx-stack-three-cups-step30k/deploy/example_client_fn.py
-
curl -L -o example_client_fn.py https://huggingface.co/spikefly/pi05-arx-stack-three-cups-step30k/resolve/main/deploy/example_client_fn.py
532 Bytes
| """Template for `fit_check_pi05.py --client-fn example_client_fn:opencv_camera_to_tensor --client-frame-format bgr`. | |
| Replace the body with YOUR robot-side code path (camera frame -> model image tensor). Must return float (3, H, W) in [0, 1].""" | |
| import numpy as np | |
| import torch | |
| def opencv_camera_to_tensor(frame_bgr_uint8: np.ndarray) -> torch.Tensor: | |
| rgb = frame_bgr_uint8[:, :, ::-1] # OpenCV delivers BGR; the model was trained on RGB | |
| return torch.from_numpy(np.ascontiguousarray(rgb)).permute(2, 0, 1).float() / 255.0 | |