Instructions to use spikefly/pi05-arx-stack-three-cups-step20k 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-step20k 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
File size: 537 Bytes
25cf72f | 1 2 3 4 5 6 7 8 9 10 | """Template for `fit_check_pi05_cups.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
|