Dex1B 0.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dex1b-0.0.2/.github/workflows/python-publish.yml +36 -0
- dex1b-0.0.2/.github/workflows/test.yml +21 -0
- dex1b-0.0.2/.gitignore +207 -0
- dex1b-0.0.2/Dex1B/Dex1B.py +116 -0
- dex1b-0.0.2/Dex1B/__init__.py +0 -0
- dex1b-0.0.2/LICENSE +21 -0
- dex1b-0.0.2/PKG-INFO +72 -0
- dex1b-0.0.2/README.md +26 -0
- dex1b-0.0.2/fig3.png +0 -0
- dex1b-0.0.2/pyproject.toml +62 -0
- dex1b-0.0.2/tests/test_dex1b.py +17 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# This workflow will upload a Python Package using Twine when a release is created
|
|
2
|
+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
|
3
|
+
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
release:
|
|
13
|
+
types: [published]
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
deploy:
|
|
17
|
+
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v2
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v2
|
|
24
|
+
with:
|
|
25
|
+
python-version: '3.x'
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: |
|
|
28
|
+
python -m pip install --upgrade pip
|
|
29
|
+
pip install build
|
|
30
|
+
- name: Build package
|
|
31
|
+
run: python -m build
|
|
32
|
+
- name: Publish package
|
|
33
|
+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
|
|
34
|
+
with:
|
|
35
|
+
user: __token__
|
|
36
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Pytest
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
|
|
4
|
+
jobs:
|
|
5
|
+
build:
|
|
6
|
+
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v4
|
|
11
|
+
- name: Set up Python 3.10
|
|
12
|
+
uses: actions/setup-python@v5
|
|
13
|
+
with:
|
|
14
|
+
python-version: "3.10"
|
|
15
|
+
- name: Install dependencies
|
|
16
|
+
run: |
|
|
17
|
+
python -m pip install --upgrade pip
|
|
18
|
+
python -m pip install -e .[test]
|
|
19
|
+
- name: Test with pytest
|
|
20
|
+
run: |
|
|
21
|
+
python -m pytest tests/
|
dex1b-0.0.2/.gitignore
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import torch
|
|
2
|
+
from torch import cdist
|
|
3
|
+
from torch.nn import Module, ModuleList
|
|
4
|
+
|
|
5
|
+
from x_transformers import Encoder
|
|
6
|
+
|
|
7
|
+
from x_mlps_pytorch import MLP
|
|
8
|
+
|
|
9
|
+
import einx
|
|
10
|
+
from einops import rearrange
|
|
11
|
+
|
|
12
|
+
# helpers
|
|
13
|
+
|
|
14
|
+
def exists(v):
|
|
15
|
+
return v is not None
|
|
16
|
+
|
|
17
|
+
def default(v, d):
|
|
18
|
+
return v if exists(v) else d
|
|
19
|
+
|
|
20
|
+
# losses
|
|
21
|
+
|
|
22
|
+
def simple_sdf_loss(
|
|
23
|
+
surface_points, # (b n 3)
|
|
24
|
+
hand_points, # (b m 3)
|
|
25
|
+
hand_point_radius, # (b m)
|
|
26
|
+
mask = None # (b n) | none
|
|
27
|
+
):
|
|
28
|
+
"""
|
|
29
|
+
add their simple penetration loss in section IV
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
dist = cdist(hand_points, surface_points)
|
|
33
|
+
|
|
34
|
+
hand_to_all_surface = einx.subtract('b m, b m n', hand_point_radius, dist).relu() # max(0, radius - dist)
|
|
35
|
+
|
|
36
|
+
if exists(mask):
|
|
37
|
+
mask_value = torch.finfo(hand_to_all_surface.dtype).max
|
|
38
|
+
hand_to_all_surface = einx.where('b n, b m n,', mask, hand_to_all_surface, mask_value)
|
|
39
|
+
|
|
40
|
+
hand_to_closest_dist = hand_to_all_surface.amin(dim = -1)
|
|
41
|
+
|
|
42
|
+
return hand_to_closest_dist.sum()
|
|
43
|
+
|
|
44
|
+
# classes
|
|
45
|
+
|
|
46
|
+
class PointTransformer(Module):
|
|
47
|
+
""" https://arxiv.org/abs/2312.10035v1 """
|
|
48
|
+
|
|
49
|
+
def __init__(self):
|
|
50
|
+
super().__init__()
|
|
51
|
+
|
|
52
|
+
class CVAE(Module):
|
|
53
|
+
def __init__(
|
|
54
|
+
self,
|
|
55
|
+
dim,
|
|
56
|
+
dim_hiddens = (256, 512, 256), # from Table 6. in paper
|
|
57
|
+
kl_loss_weight = 1e-4
|
|
58
|
+
):
|
|
59
|
+
super().__init__()
|
|
60
|
+
assert len(dim_hiddens) > 0
|
|
61
|
+
dim_latent = default_layer_sizes[-1]
|
|
62
|
+
|
|
63
|
+
self.encode = MLP(dim, *default_layer_sizes)
|
|
64
|
+
|
|
65
|
+
self.to_mean_log_variance = nn.Linear(dim_latent, dim_latent * 2, bias = False)
|
|
66
|
+
|
|
67
|
+
self.decode = MLP(*default_layer_sizes, dim)
|
|
68
|
+
|
|
69
|
+
# loss weights
|
|
70
|
+
|
|
71
|
+
self.kl_loss_weight = kl_loss_weight
|
|
72
|
+
|
|
73
|
+
def forward(
|
|
74
|
+
self,
|
|
75
|
+
inp, # (b d)
|
|
76
|
+
return_loss = False
|
|
77
|
+
):
|
|
78
|
+
|
|
79
|
+
encoded = self.encode(inp)
|
|
80
|
+
|
|
81
|
+
mean, log_variance = self.to_mean_log_variance(encoded).chunk(2, dim = -1)
|
|
82
|
+
|
|
83
|
+
std = (0.5 * log_variance).exp()
|
|
84
|
+
|
|
85
|
+
noise = torch.randn_like(mean)
|
|
86
|
+
|
|
87
|
+
reparamed = mean + std * noise
|
|
88
|
+
|
|
89
|
+
recon = self.decode(reparamed)
|
|
90
|
+
|
|
91
|
+
if not return_loss:
|
|
92
|
+
return recon
|
|
93
|
+
|
|
94
|
+
mse_loss = F.mse_loss(recon, inp)
|
|
95
|
+
|
|
96
|
+
kl_loss = 0.5 * (mean.square() + log_variance.exp() - log_variance - 1.).sum(dim = -1).mean()
|
|
97
|
+
|
|
98
|
+
total_loss = (
|
|
99
|
+
mse_loss +
|
|
100
|
+
kl_loss * self.kl_loss_weight
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
loss_breakdown = (mse_loss, kl_loss)
|
|
104
|
+
|
|
105
|
+
return total_loss, loss_breakdown
|
|
106
|
+
|
|
107
|
+
class DexSimple(Module):
|
|
108
|
+
def __init__(
|
|
109
|
+
self,
|
|
110
|
+
point_transformer: PointTransformer,
|
|
111
|
+
cvae: CVAE
|
|
112
|
+
):
|
|
113
|
+
super().__init__()
|
|
114
|
+
|
|
115
|
+
self.pointnet = pointnet
|
|
116
|
+
self.cvae = cvae
|
|
File without changes
|
dex1b-0.0.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Phil Wang
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
dex1b-0.0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: Dex1B
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: MMDiT
|
|
5
|
+
Project-URL: Homepage, https://pypi.org/project/Dex1B/
|
|
6
|
+
Project-URL: Repository, https://github.com/lucidrains/Dex1B
|
|
7
|
+
Author-email: Phil Wang <lucidrains@gmail.com>
|
|
8
|
+
License: MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2025 Phil Wang
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Keywords: artificial intelligence,deep learning,dexterity,scaling,synthetic data
|
|
31
|
+
Classifier: Development Status :: 4 - Beta
|
|
32
|
+
Classifier: Intended Audience :: Developers
|
|
33
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
34
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
35
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
36
|
+
Requires-Python: >=3.9
|
|
37
|
+
Requires-Dist: einops>=0.8.0
|
|
38
|
+
Requires-Dist: gotennet-pytorch>=0.3.1
|
|
39
|
+
Requires-Dist: torch>=2.0
|
|
40
|
+
Requires-Dist: x-mlps-pytorch
|
|
41
|
+
Requires-Dist: x-transformers>=2.5.3
|
|
42
|
+
Provides-Extra: examples
|
|
43
|
+
Provides-Extra: test
|
|
44
|
+
Requires-Dist: pytest; extra == 'test'
|
|
45
|
+
Description-Content-Type: text/markdown
|
|
46
|
+
|
|
47
|
+
<img src="./fig3.png" width="400px"></img>
|
|
48
|
+
|
|
49
|
+
## Dex1B (wip)
|
|
50
|
+
|
|
51
|
+
## Citations
|
|
52
|
+
|
|
53
|
+
```bibtex
|
|
54
|
+
@inproceedings{ye2025dex1b,
|
|
55
|
+
title = {Dex1B: Learning with 1B Demonstrations for Dexterous Manipulation},
|
|
56
|
+
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},
|
|
57
|
+
booktitle = {Robotics: Science and Systems (RSS)},
|
|
58
|
+
year = {2025}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```bibtex
|
|
63
|
+
@misc{wu2024pointtransformerv3simpler,
|
|
64
|
+
title = {Point Transformer V3: Simpler, Faster, Stronger},
|
|
65
|
+
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},
|
|
66
|
+
year = {2024},
|
|
67
|
+
eprint = {2312.10035},
|
|
68
|
+
archivePrefix = {arXiv},
|
|
69
|
+
primaryClass = {cs.CV},
|
|
70
|
+
url = {https://arxiv.org/abs/2312.10035},
|
|
71
|
+
}
|
|
72
|
+
```
|
dex1b-0.0.2/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<img src="./fig3.png" width="400px"></img>
|
|
2
|
+
|
|
3
|
+
## Dex1B (wip)
|
|
4
|
+
|
|
5
|
+
## Citations
|
|
6
|
+
|
|
7
|
+
```bibtex
|
|
8
|
+
@inproceedings{ye2025dex1b,
|
|
9
|
+
title = {Dex1B: Learning with 1B Demonstrations for Dexterous Manipulation},
|
|
10
|
+
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},
|
|
11
|
+
booktitle = {Robotics: Science and Systems (RSS)},
|
|
12
|
+
year = {2025}
|
|
13
|
+
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```bibtex
|
|
17
|
+
@misc{wu2024pointtransformerv3simpler,
|
|
18
|
+
title = {Point Transformer V3: Simpler, Faster, Stronger},
|
|
19
|
+
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},
|
|
20
|
+
year = {2024},
|
|
21
|
+
eprint = {2312.10035},
|
|
22
|
+
archivePrefix = {arXiv},
|
|
23
|
+
primaryClass = {cs.CV},
|
|
24
|
+
url = {https://arxiv.org/abs/2312.10035},
|
|
25
|
+
}
|
|
26
|
+
```
|
dex1b-0.0.2/fig3.png
ADDED
|
Binary file
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "Dex1B"
|
|
3
|
+
version = "0.0.2"
|
|
4
|
+
description = "MMDiT"
|
|
5
|
+
authors = [
|
|
6
|
+
{ name = "Phil Wang", email = "lucidrains@gmail.com" }
|
|
7
|
+
]
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">= 3.9"
|
|
10
|
+
license = { file = "LICENSE" }
|
|
11
|
+
keywords = [
|
|
12
|
+
'artificial intelligence',
|
|
13
|
+
'deep learning',
|
|
14
|
+
'dexterity',
|
|
15
|
+
'scaling',
|
|
16
|
+
'synthetic data'
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
classifiers=[
|
|
20
|
+
'Development Status :: 4 - Beta',
|
|
21
|
+
'Intended Audience :: Developers',
|
|
22
|
+
'Topic :: Scientific/Engineering :: Artificial Intelligence',
|
|
23
|
+
'License :: OSI Approved :: MIT License',
|
|
24
|
+
'Programming Language :: Python :: 3.9',
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
dependencies = [
|
|
28
|
+
"einops>=0.8.0",
|
|
29
|
+
"gotennet-pytorch>=0.3.1",
|
|
30
|
+
"torch>=2.0",
|
|
31
|
+
"x-mlps-pytorch",
|
|
32
|
+
"x-transformers>=2.5.3",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://pypi.org/project/Dex1B/"
|
|
37
|
+
Repository = "https://github.com/lucidrains/Dex1B"
|
|
38
|
+
|
|
39
|
+
[project.optional-dependencies]
|
|
40
|
+
examples = []
|
|
41
|
+
test = [
|
|
42
|
+
"pytest"
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
[tool.pytest.ini_options]
|
|
46
|
+
pythonpath = [
|
|
47
|
+
"."
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
[build-system]
|
|
51
|
+
requires = ["hatchling"]
|
|
52
|
+
build-backend = "hatchling.build"
|
|
53
|
+
|
|
54
|
+
[tool.rye]
|
|
55
|
+
managed = true
|
|
56
|
+
dev-dependencies = []
|
|
57
|
+
|
|
58
|
+
[tool.hatch.metadata]
|
|
59
|
+
allow-direct-references = true
|
|
60
|
+
|
|
61
|
+
[tool.hatch.build.targets.wheel]
|
|
62
|
+
packages = ["Dex1B"]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
import torch
|
|
4
|
+
|
|
5
|
+
def test_sdf():
|
|
6
|
+
from Dex1B.Dex1B import simple_sdf_loss
|
|
7
|
+
|
|
8
|
+
surface_points = torch.randn(2, 1024, 3).requires_grad_()
|
|
9
|
+
mask = torch.randint(0, 2, (2, 1024)).bool()
|
|
10
|
+
|
|
11
|
+
hand_points = torch.randn(2, 16, 3)
|
|
12
|
+
hand_point_radius = torch.rand(2, 16)
|
|
13
|
+
|
|
14
|
+
sdf_loss = simple_sdf_loss(surface_points, hand_points, hand_point_radius, mask)
|
|
15
|
+
sdf_loss.backward()
|
|
16
|
+
|
|
17
|
+
assert sdf_loss.numel() == 1
|