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,41 @@
import torch
import lietorch
import numpy as np
from lietorch import SE3
from factor_graph import FactorGraph
class DroidBackend:
def __init__(self, net, video, args):
self.video = video
self.update_op = net.update
# global optimization window
self.t0 = 0
self.t1 = 0
self.upsample = args.upsample
self.beta = args.beta
self.backend_thresh = args.backend_thresh
self.backend_radius = args.backend_radius
self.backend_nms = args.backend_nms
@torch.no_grad()
def __call__(self, steps=12):
""" main update """
t = self.video.counter.value
if not self.video.stereo and not torch.any(self.video.disps_sens):
self.video.normalize()
graph = FactorGraph(self.video, self.update_op, corr_impl="alt", max_factors=16*t, upsample=self.upsample)
graph.add_proximity_factors(rad=self.backend_radius,
nms=self.backend_nms,
thresh=self.backend_thresh,
beta=self.beta)
graph.update_lowmem(steps=steps)
graph.clear_edges()
self.video.dirty[:t] = True