Initial snapshot: hand motion pipeline (Dyn-HaMR + dex-retargeting + SPIDER)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 14:13:49 +08:00
commit 7e4ef6f98b
7002 changed files with 1452249 additions and 0 deletions
@@ -0,0 +1,30 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp
import tempfile
import torch.nn as nn
from tools.deployment.pytorch2onnx import _convert_batchnorm, pytorch2onnx
class DummyModel(nn.Module):
def __init__(self):
super().__init__()
self.conv = nn.Conv3d(1, 2, 1)
self.bn = nn.SyncBatchNorm(2)
def forward(self, x):
return self.bn(self.conv(x))
def forward_dummy(self, x):
return (self.forward(x), )
def test_onnx_exporting():
with tempfile.TemporaryDirectory() as tmpdir:
out_file = osp.join(tmpdir, 'tmp.onnx')
model = DummyModel()
model = _convert_batchnorm(model)
# test exporting
pytorch2onnx(model, (1, 1, 1, 1, 1), output_file=out_file)