Downloads · 30 days
13
33% of all-time downloads
calebescobedo/sensor-diffusion-policy-table-camera-epoch220
sensor-diffusion-policy-table-camera-epoch220 is a machine learning model from calebescobedo. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Diffusion policy model trained on proximity sensor data with table camera images.
Downloads · 30 days
13
33% of all-time downloads
All-time downloads
40
Public
Parameters
261M
1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1 GB · 100%
From the Hugging Face model README
Diffusion policy model trained on proximity sensor data with table camera images.
The model expects the following inputs:
observation.state (STATE)(batch, 1, 7)observation.goal (STATE)(batch, 1, 3)observation.images.table_camera (VISUAL)(batch, 1, 3, 480, 640)observation.proximity (STATE)(batch, 1, 128)action (ACTION)(batch, 7)from lerobot.policies.diffusion.modeling_diffusion import DiffusionPolicy
from lerobot.policies.factory import make_pre_post_processors
import torch
# Load model and processors
repo_id = "calebescobedo/sensor-diffusion-policy-table-camera-epoch220"
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
policy = DiffusionPolicy.from_pretrained(repo_id)
policy.eval()
policy.to(device)
preprocessor, postprocessor = make_pre_post_processors(
policy_cfg=policy.config,
pretrained_path=repo_id
)
# Prepare input batch
# Note: You need to encode proximity sensors using the ProximityAutoencoder first
batch = {
"observation.state": torch.tensor([...]), # Shape: (batch, 1, 7)
"observation.goal": torch.tensor([...]), # Shape: (batch, 1, 3)
"observation.images.table_camera": torch.tensor([...]), # Shape: (batch, 1, 3, 480, 640)
"observation.proximity": torch.tensor([...]), # Shape: (batch, 1, 128) - encoded
}
# Predict action
with torch.no_grad():
batch_processed = preprocessor(batch) # Normalizes inputs
actions = policy.select_action(batch_processed) # Returns normalized actions
actions = postprocessor(actions) # Unnormalizes to raw joint positions
# actions shape: (batch, 7) - joint positions in radians
The proximity sensors must be encoded before use. You need to load the ProximityAutoencoder:
from architectures.proximity_autoencoder import ProximityAutoencoder
import torch
# Load proximity encoder
encoder_path = "path/to/proximity_autoencoder.pth"
ae_model = ProximityAutoencoder(num_sensors=37, depth_channels=1, latent_dim=128, use_attention=True)
ae_model.load_state_dict(torch.load(encoder_path, map_location='cpu'))
proximity_encoder = ae_model.encoder
proximity_encoder.eval()
# Encode proximity sensors (37 sensors × 8×8 depth maps)
# raw_proximity shape: (batch, 37, 8, 8)
encoded_proximity = proximity_encoder(raw_proximity) # Shape: (batch, 128)
Dataset statistics are included in config.json under the dataset_stats key. These are used for normalization/unnormalization and were computed from the training dataset:
/home/caleb/datasets/sensor/roboset_20260117_014645/*.h5 (20 files, ~500 trajectories)If you use this model, please cite:
@misc{sensor-diffusion-policy-epoch220,
author = {Caleb Escobedo},
title = {Sensor Diffusion Policy - Epoch 220},
year = {2025},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/calebescobedo/sensor-diffusion-policy-table-camera-epoch220}}
}