Skip to main content

Dex1B - Learning with 1B Demonstrations for Dexterous Manipulation

Project description

Dex1B (wip)

Implementation of DexSimple, the generative model and data generation pipeline from Dex1B: Learning with 1B Demonstrations for Dexterous Manipulation

Install

pip install Dex1B

Usage

import torch
from Dex1B import DexSimple

model = DexSimple(
    dim_pose = 25,
    num_frames = 1,
    condition_on_local_point_feature = False
)

hand_pose = torch.randn(2, 1, 25)
points = torch.randn(2, 1024, 3)

# forward loss

loss = model(hand_pose, points)
loss.backward()

# sample hand poses

sampled_pose = model.sample(points) # (2, 1, 25)

Condition on associated local object point feature for debiased data generation:

import torch
from Dex1B import DexSimple, associate_pose_with_object_point, debias_sample

model = DexSimple(
    dim_pose = 25,
    condition_on_local_point_feature = True
)

points = torch.randn(2, 1024, 3)
hand_pose = torch.randn(2, 1, 25)

# associate hand pose with object point along heading direction

assoc_point_indices = associate_pose_with_object_point(
    palm_center = torch.randn(2, 3),
    thumb_tip = torch.randn(2, 3),
    middle_finger_tip = torch.randn(2, 3),
    points = points
)

loss = model(hand_pose, points, assoc_point_indices = assoc_point_indices)
loss.backward()

# debiased sampling - sample associated points inversely proportional to frequency counts

counts = torch.randint(0, 50, (1024,)) # action count per point
sampled_point_indices = debias_sample(counts, num_samples = 32)

Gradient post-optimization on sampled poses:

import torch
from Dex1B import post_optimize, HandGeometry

# differentiable forward kinematics module returning hand geometry spheres

class HandFK(torch.nn.Module):
    def __init__(self, dim_pose = 25):
        super().__init__()
        self.fc = torch.nn.Linear(dim_pose, 16 * 3)

    def forward(self, pose):
        centers = self.fc(pose).reshape(pose.shape[0], 16, 3)
        radii = torch.full((16,), 0.02, device = pose.device)
        return HandGeometry(centers, radii)

hand_pose = torch.randn(2, 25)
surface_points = torch.randn(2, 1024, 3)

refined_pose = post_optimize(
    hand_pose,
    hand_fk = HandFK(dim_pose = 25),
    surface_points = surface_points,
    steps = 100
)

Citations

@inproceedings{ye2025dex1b,
    title   = {Dex1B: Learning with 1B Demonstrations for Dexterous Manipulation},
    author  = {Ye, Jianglong and Wang, Keyi and Yuan, Chengjing and Yang, Ruihan and Li, Yiquan and Zhu, Jiyue and Qin, Yuzhe and Zou, Xueyan and Wang, Xiaolong},
    booktitle = {Robotics: Science and Systems (RSS)},
    year    = {2025}
}
@misc{wu2024pointtransformerv3simpler,
    title   = {Point Transformer V3: Simpler, Faster, Stronger},
    author  = {Xiaoyang Wu and Li Jiang and Peng-Shuai Wang and Zhijian Liu and Xihui Liu and Yu Qiao and Wanli Ouyang and Tong He and Hengshuang Zhao},
    year    = {2024},
    eprint  = {2312.10035},
    archivePrefix = {arXiv},
    primaryClass = {cs.CV},
    url     = {https://arxiv.org/abs/2312.10035},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dex1b-0.0.5.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dex1b-0.0.5-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file dex1b-0.0.5.tar.gz.

File metadata

  • Download URL: dex1b-0.0.5.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for dex1b-0.0.5.tar.gz
Algorithm Hash digest
SHA256 1c843e8861c01dc8cc2a75db1c2e434bd802d3260f358a20f784e62399457c7f
MD5 734874370c0f3623c481d561c702e07e
BLAKE2b-256 d8b42a837f8aaacac50bc2a3e0cf89ae533da9046b8bce2f987532157e1d54a4

See more details on using hashes here.

File details

Details for the file dex1b-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: dex1b-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for dex1b-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2b2b81f5829d873921929d0df421d166d3c99a29fba04dde9541563978669dcc
MD5 5a1da2391a0c419d373257590f25c884
BLAKE2b-256 f80845365bea28e16523d4e5474ef94c7bb4033c267fa63e70871c2339acdbb5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page