SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.03953 · ICCV · 2021

SNARF: Differentiable Forward Skinning for Animating Non-Rigid Neural Implicit Shapes

Yufeng Zheng, Otmar Hilliges, Andreas Geiger, Xu Chen, Michael Black

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2104.03953.json · badge: /api/ran/2104.03953.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
xuchen-ethz/SNARF canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
broyden Ran
ran; our contract draft was wrong, not the code
xuchen-ethz/SNARF/lib/model/broyden.py
code served (permissive licence) · get_code("876e716af6ec6e34")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Define a simple function g that takes x and mask, returns [N, D, 1]
class SimpleG:
    def __call__(self, x, mask=None):
        # x shape: [N, D, 1]
        # Return a simple function output of same shape
        return x ** 2 - 0.5

# Set up parameters
N = 2  # batch size
D = 4  # dimension

# Initial x: [N, D, 1]
x_init = torch.randn(N, D, 1)

# Initial inverse Jacobian: [N, D, D]
# Use identity matrix scaled appropriately
J_inv_init = torch.eye(D).unsqueeze(0).expand(N, -1, -1).clone()

# Function g
g = SimpleG()

# Other parameters
max_steps = 50
cvg_thresh = 1e-05
dvg_thresh = 1
eps = 1e-06

ARGS = {
    'g': g,
    'x_init': x_init,
    'J_inv_init': J_inv_init,
    'max_steps': max_steps,
    'cvg_thresh': cvg_thresh,
    'dvg_thresh': dvg_thresh,
    'eps': eps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calculate_iou Ran
ran, honoured the contract we drafted
xuchen-ethz/SNARF/lib/model/metrics.py
code served (permissive licence) · get_code("74929499f390a6b9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small binary tensors for ground truth and prediction
# These represent binary masks (e.g., for segmentation)
gt = torch.randint(0, 2, (2, 4), dtype=torch.bool)
prediction = torch.randint(0, 2, (2, 4), dtype=torch.bool)

ARGS = {
    "gt": gt,
    "prediction": prediction,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_embedder Ran
ran; our contract draft was wrong, not the code
xuchen-ethz/SNARF/lib/model/network.py
code served (permissive licence) · get_code("40caf9fbfe050a14")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    'multires': 4
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
hierarchical_softmax Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xuchen-ethz/SNARF/lib/model/helpers.py
code served (permissive licence) · get_code("a277c1c958d7611b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 24) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function expects a 3D tensor x with shape (n_batch, n_point, n_dim)
# Looking at the function body, it accesses x[:, [0]], x[:, [1, 2, 3]], x[:, [4, 5, 6]], etc.
# The maximum index accessed is 24, so n_dim must be at least 25
# Let's create a small tensor with:
# - n_batch = 2
# - n_point = 3
# - n_dim = 25 (to accommodate all the indexing operations)

x = torch.randn(2, 3, 25)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 3, 24) — shape (2, 3, 24) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
masked_softmax Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xuchen-ethz/SNARF/lib/model/helpers.py
code served (permissive licence) · get_code("1a68f2ff6472e1fc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 1) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

torch.manual_seed(0)

# Construct arguments for masked_softmax
# vec: a tensor of logits/values
# mask: a boolean tensor with same shape as vec
# dim: dimension along which to apply softmax
# mode: either 'softmax' or 'max'
# soft_blend: blending parameter for softmax mode

vec = torch.randn(2, 4)  # batch_size=2, dim=4
mask = torch.tensor([
    [True, True, False, True],
    [True, False, True, True]
])  # boolean mask matching vec shape

ARGS = {
    'vec': vec,
    'mask': mask,
    'dim': -1,
    'mode': 'softmax',
    'soft_blend': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 1) — shape (2, 1) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rectify_pose Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xuchen-ethz/SNARF/lib/model/helpers.py
code served (permissive licence) · get_code("6883b22def79a831")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (72,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import cv2
import numpy as np
import torch

torch.manual_seed(0)

# Create valid arguments for rectify_pose
pose = np.random.randn(72,).astype(np.float32)
root_abs = np.random.randn(3,).astype(np.float32)

ARGS = {
    "pose": pose,
    "root_abs": root_abs,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (72,) — shape (72,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
skinning Ran
ran; our contract draft was wrong, not the code
xuchen-ethz/SNARF/lib/model/deformer.py
code served (permissive licence) · get_code("6018c352d472bd22")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Parameters:
# x: canonical points [B, N, D]
# w: weights [B, N, J]
# tfs: bone transformations [B, J, D+1, D+1]
# inverse: boolean flag

B = 2  # batch size
N = 3  # number of points
J = 4  # number of joints
D = 3  # spatial dimension

# x: canonical points [B, N, D]
x = torch.randn(B, N, D)

# w: skinning weights [B, N, J]
w = torch.randn(B, N, J)
w = F.softmax(w, dim=-1)  # normalize weights to sum to 1

# tfs: bone transformation matrices [B, J, D+1, D+1]
# These should be valid transformation matrices (homogeneous coordinates)
tfs = torch.randn(B, J, D+1, D+1)

# inverse: boolean flag
inverse = False

ARGS = {
    "x": x,
    "w": w,
    "tfs": tfs,
    "inverse": inverse,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 3, 3) — shape (2, 3, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
to_np Ran
ran; our contract draft was wrong, not the code
xuchen-ethz/SNARF/preprocess/body_model.py
pointer only (licence: MIT); the stored copy get_code serves, from wjrzm/VP-MoCap, is pointer only (licence: NONE) · get_code("43ebe3b786b2d59b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from wjrzm/VP-MoCap, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

to_tensor Ran
ran; our contract draft was wrong, not the code
xuchen-ethz/SNARF/preprocess/body_model.py
code served (permissive licence) · get_code("94904a5bd2e1074f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Test case 1: numpy array
array_numpy = np.array([1.0, 2.0, 3.0, 4.0])

# Test case 2: python list
array_list = [1.0, 2.0, 3.0, 4.0]

# Test case 3: already a torch tensor (should not convert)
array_torch = torch.tensor([1.0, 2.0, 3.0, 4.0])

# Use the numpy array as the primary test case
ARGS = {
    "array": array_numpy,
    "dtype": torch.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 3 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
to_np 9 other papers
9 later · 1 only as an assembly brick
2112.07471 (2021-12)
I M Avatar: Implicit Morphable Head Avatars from Videos
2203.12575 (2022-03)
NeuMan: Neural Human Radiance Field from a Single Video
2307.13459 (2023-07)
Weakly-supervised 3D Pose Transfer with Keypoints
and 6 more not named here
to_tensor 6 other papers
6 later
2112.07471 (2021-12)
I M Avatar: Implicit Morphable Head Avatars from Videos
2307.13459 (2023-07)
Weakly-supervised 3D Pose Transfer with Keypoints
2312.02069 (2023-12)
GaussianAvatars: Photorealistic Head Avatars with Rigged 3D Gaussians
and 3 more not named here
get_embedder 5 other papers
1 dated earlier, 4 later
2003.09852 (2020-03)
Multiview Neural Surface Reconstruction by Disentangling Geometry and Appearance
2112.07471 (2021-12)
I M Avatar: Implicit Morphable Head Avatars from Videos
2204.01139 (2022-04)
BNV-Fusion: Dense 3D Reconstruction using Bi-level Neural Volume Fusion
and 2 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Neural implicit surface representations have emerged as a promising paradigm to capture 3D shapes in a continuous and resolution-independent manner. However, adapting them to articulated shapes is non-trivial. Existing approaches learn a backward warp field that maps deformed to canonical points. However, this is problematic since the backward warp field is pose dependent and thus requires large amounts of data to learn. To address this, we introduce SNARF, which combines the advantages of linear blend skinning (LBS) for polygonal meshes with those of neural implicit surfaces by learning a forward deformation field without direct supervision. This deformation field is defined in canonical, pose-independent, space, enabling generalization to unseen poses. Learning the deformation field from posed meshes alone is challenging since the correspondences of deformed points are defined implicitly and may not be unique under changes of topology. We propose a forward skinning model that finds all canonical correspondences of any deformed point using iterative root finding. We derive analytical gradients via implicit differentiation, enabling end-to-end training from 3D meshes with bone transformations. Compared to state-of-the-art neural implicit representations, our approach generalizes better to unseen poses while preserving accuracy. We demonstrate our method in challenging scenarios on (clothed) 3D humans in diverse and unseen poses.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2104.03953")
get_code_for_paper("2104.03953")
have("2104.03953")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2104.03953.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2104.03953.svg)](https://syntology.ai/paper/2104.03953)

Connect an agent — have() is free.