SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.11598 · 2020

Deep 3D Portrait from a Single Image

arXiv · PDF · Open in the Atlas

Code that ran

3 of 20 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; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 0 failures of our instrument; 17 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/2004.11598.json · badge: /api/ran/2004.11598.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
sicxu/Deep3dPortrait canonical (classifier label)
classifier basis: census
3 ran · 17 no recorded run
FunctionStatusWhere it lives
compute_faceshape Ran
ran on a synthesized input
sicxu/Deep3dPortrait/utils/recon_face.py
code served (permissive licence) · get_code("173d710f02251597")
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. 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 numpy as np

class FaceModel:
    def __init__(self):
        # idBase: (num_vertices * 3, num_id_coeffs)
        # We need 80 id coefficients, so shape is (3*num_vertices, 80)
        num_vertices = 50
        self.idBase = np.random.randn(num_vertices * 3, 80).astype(np.float32)
        
        # exBase: (num_vertices * 3, num_ex_coeffs)
        # We need 64 ex coefficients, so shape is (3*num_vertices, 64)
        self.exBase = np.random.randn(num_vertices * 3, 64).astype(np.float32)
        
        # meanshape: (num_vertices * 3,)
        self.meanshape = np.random.randn(num_vertices * 3).astype(np.float32)
        
        # keypoints: indices into the vertices for 2D landmarks
        self.keypoints = np.array([0, 5, 10, 15, 20], dtype=np.int32)

# Create coefficient array with shape (1, 257)
# Structure: 80 id + 64 ex + 80 tex + 3 angles + 27 gamma + 3 translation = 257
coeff = np.random.randn(1, 257).astype(np.float32)

# Create facemodel
facemodel = FaceModel()

# inv_params: [scale, offset]
# scale is a scalar, offset is [2,] for x,y translation
inv_params = [100.0, np.array([50.0, 50.0], dtype=np.float32)]

ARGS = {
    'coeff': coeff,
    'facemodel': facemodel,
    'inv_params': inv_params
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
realign Ran
ran on a synthesized input
sicxu/Deep3dPortrait/restore_from_crop.py
code served (permissive licence) · get_code("8710be7e4f7fa644")
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 3, dtype family float; no output shape is stated. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T00:55:05Z. 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 numpy as np
import cv2

# Create a small test image (256x256 RGB)
img = np.random.randint(0, 256, size=(256, 256, 3), dtype=np.uint8).astype(np.float32)

# crop_param: [scale, left, up]
crop_param = [0.5, 10, 15]

# Raw dimensions for output
raw_w = 384
raw_h = 512

# Interpolation method from cv2
interpolation = cv2.INTER_LINEAR

# Optional crop dimensions (default 256x256)
crop_h = 256
crop_w = 256

ARGS = {
    "img": img,
    "crop_param": crop_param,
    "raw_w": raw_w,
    "raw_h": raw_h,
    "interpolation": interpolation,
    "crop_h": crop_h,
    "crop_w": crop_w,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float — no output shape is stated: no later run recorded an output shape for this sample (observed_output and metamorphic_properties carry none; shape_contract and output_contract record ndim only)
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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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
remove_small_area Ran
ran on a synthesized input
sicxu/Deep3dPortrait/utils/construct_triangles.py
code served (permissive licence) · get_code("ac5ba15755d66d5b")
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 2, dtype family float; no output shape is stated. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T00:55:05Z. 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 numpy as np
import torch

# Create a small binary mask for testing
mask = np.random.randint(0, 2, size=(8, 10)).astype(np.float32)

# Ensure there are some connected components
mask[0:2, 0:2] = 1
mask[5:7, 8:10] = 1

# Define threshold for removing small objects
thres = 20

ARGS = {
    "mask": mask,
    "thres": thres
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float — no output shape is stated: no later run recorded an output shape for this sample (observed_output and metamorphic_properties carry none; shape_contract and output_contract record ndim only)
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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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
POS Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/preprocess.py
code served (permissive licence) · get_code("d536967c5e11597f")
How it ran

no invocation recorded.

compute_center2d Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/recon_face.py
code served (permissive licence) · get_code("b8786d0b13aac98a")
How it ran

no invocation recorded.

create_renderer_graph Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/create_renderer.py
code served (permissive licence) · get_code("ee2db1eb19e754a4")
How it ran

no invocation recorded.

crop Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/preprocess.py
code served (permissive licence) · get_code("2d2887e9b1122741")
How it ran

no invocation recorded.

dis Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/construct_triangles.py
code served (permissive licence) · get_code("662a487c04c13418")
How it ran

no invocation recorded.

filter_tri Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/construct_triangles.py
code served (permissive licence) · get_code("3e66aac74b1c38fc")
How it ran

no invocation recorded.

get_face_texture Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/recon_depth.py
code served (permissive licence) · get_code("7414f4cae46cefe7")
How it ran

no invocation recorded.

get_pixel_value Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/recon_depth.py
code served (permissive licence) · get_code("2ecc1190b44eddf2")
How it ran

no invocation recorded.

img_padding Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/preprocess.py
code served (permissive licence) · get_code("4dc075fcf7407b8a")
How it ran

no invocation recorded.

load_center3d Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/loader.py
code served (permissive licence) · get_code("2bc9452d367e1171")
How it ran

no invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/loader.py
code served (permissive licence) · get_code("86e1f9d5e618f721")
How it ran

no invocation recorded.

load_depthrecon_graph Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/step3_get_head_geometry.py
code served (permissive licence) · get_code("6a71686037b8bd23")
How it ran

no invocation recorded.

load_facerecon_graph Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/step1_recon_3d_face.py
code served (permissive licence) · get_code("371d5b83a5979e45")
How it ran

no invocation recorded.

load_lm3d Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/loader.py
code served (permissive licence) · get_code("204c417df51f29c1")
How it ran

no invocation recorded.

split_coeff Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/recon_face.py
code served (permissive licence) · get_code("c1c8a3a93c9755a8")
How it ran

no invocation recorded.

split_data Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/recon_depth.py
code served (permissive licence) · get_code("45db1a35605cd38f")
How it ran

no invocation recorded.

split_segmask Not yet run
unverified (harvested, no recorded run)
sicxu/Deep3dPortrait/utils/face_parsing.py
code served (permissive licence) · get_code("41c5386a01f254ab")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 19 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
POS 1 other paper
1 dated earlier
1903.08527 (2019-03)
Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set

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

In this paper, we present a learning-based approach for recovering the 3D geometry of human head from a single portrait image. Our method is learned in an unsupervised manner without any ground-truth 3D data. We represent the head geometry with a parametric 3D face model together with a depth map for other head regions including hair and ear. A two-step geometry learning scheme is proposed to learn 3D head reconstruction from in-the-wild face images, where we first learn face shape on single images using self-reconstruction and then learn hair and ear geometry using pairs of images in a stereo-matching fashion. The second step is based on the output of the first to not only improve the accuracy but also ensure the consistency of overall head geometry. We evaluate the accuracy of our method both in 3D and with pose manipulation tasks on 2D images. We alter pose based on the recovered geometry and apply a refinement network trained with adversarial learning to ameliorate the reprojected images and translate them to the real image domain. Extensive evaluations and comparison with previous methods show that our new method can produce high-fidelity 3D head geometry and head pose manipulation results.

For agents

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

get_harvested_code_for_paper("2004.11598")
get_code_for_paper("2004.11598")
have("2004.11598")

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

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

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

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

Connect an agent — have() is free.