Downloads · 30 days
11
17% of all-time downloads
calebescobedo/sensor-diffusion-policy-v1
sensor-diffusion-policy-v1 is a robotics model from calebescobedo. Use it for the robotics task on the model card, and read the license before you ship it in a product. It is set up for lerobot. The card lists the license as mit.
A goal-conditioned Diffusion Policy trained on sensor datasets. The model predicts joint positions (next positions along trajectory) conditioned on the current observation (joint positions, table camera image) and a g…
Downloads · 30 days
11
17% of all-time downloads
All-time downloads
64
Public
Parameters
261M
2.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1 GB · 100%
From the Hugging Face model README
A goal-conditioned Diffusion Policy trained on sensor datasets. The model predicts joint positions (next positions along trajectory) conditioned on the current observation (joint positions, table camera image) and a goal cartesian position.
observation.state: Shape (batch, 1, 7) - Joint positions (7 DOF arm)observation.goal: Shape (batch, 1, 3) - Goal cartesian position (X, Y, Z)observation.images.table_camera: Shape (batch, 1, 3, 480, 640) - Table camera RGB imagesaction: Shape (batch, 16, 7) - Joint positions (7 DOF) for 16-step horizon (next positions along trajectory)Note: The model outputs a full 16-step horizon. Use select_action() to get the first step (batch, 7), or predict_action_chunk() to get the full horizon (batch, 16, 7).
Images (observation.images.table_camera):
[0, 255] to [0, 1] by dividing by 255.0State (observation.state):
(state - min) / (max - min) using dataset statistics (handled by preprocessor)Goal (observation.goal):
(goal - min) / (max - min) using dataset statistics (handled by preprocessor)Actions (action):
action * (max - min) + min using dataset statistics (handled by postprocessor)from lerobot.policies.diffusion.modeling_diffusion import DiffusionPolicy
from lerobot.policies.factory import make_pre_post_processors
# Load model
policy = DiffusionPolicy.from_pretrained("calebescobedo/sensor-diffusion-policy-v1")
# Load preprocessor and postprocessor from the same repo
preprocessor, postprocessor = make_pre_post_processors(
policy_cfg=policy.config,
pretrained_path="calebescobedo/sensor-diffusion-policy-v1"
)
# Prepare inputs
batch = {
'observation.state': state_tensor, # (batch, 1, 7) - raw joint positions
'observation.goal': goal_tensor, # (batch, 1, 3) - raw goal xyz
'observation.images.table_camera': table_img, # (batch, 1, 3, 480, 640) - uint8 [0,255] or float [0,1]
}
# Inference
policy.eval()
with torch.no_grad():
batch = preprocessor(batch) # Normalizes inputs
actions = policy.select_action(batch) # Returns normalized actions
actions = postprocessor(actions) # Unnormalizes to raw joint positions
[0.454, -0.133, 0.522] (constant)MIT License