SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.09180 · CVPR · 2021

PPR10K: A Large-Scale Portrait Photo Retouching Dataset with Human-Region Mask and Group-Level Consistency

Lei Zhang, Xuansong Xie, Jie Liang, Hui Zeng, Miaomiao Cui

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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, 1 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2105.09180.json · badge: /api/ran/2105.09180.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
csjliang/PPR10K canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
channel_convert Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
csjliang/PPR10K/code_3DLUT/datasets_GLC.py
code served (permissive licence) · get_code("0aec9570e63f02ac")
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 list, ndim 4, dtype family int; 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 numpy as np
import cv2

torch_import_successful = True
try:
    import torch
except:
    torch_import_successful = False

# Create test images for the img_list
# BGR image: shape (height, width, channels)
bgr_img_1 = np.random.randint(0, 256, (4, 5, 3), dtype=np.uint8)
bgr_img_2 = np.random.randint(0, 256, (4, 5, 3), dtype=np.uint8)
bgr_img_list = [bgr_img_1, bgr_img_2]

# Gray image: shape (height, width) for GRAY2BGR conversion
gray_img_1 = np.random.randint(0, 256, (4, 5), dtype=np.uint8)
gray_img_2 = np.random.randint(0, 256, (4, 5), dtype=np.uint8)
gray_img_list = [gray_img_1, gray_img_2]

# Test case 1: BGR to gray conversion
ARGS = {
    'in_c': 3,
    'tar_type': 'gray',
    'img_list': bgr_img_list
}
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 list, ndim 4, dtype family int — a list 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
get_GT_attribute_statistics Ran
ran; our contract draft was wrong, not the code
csjliang/PPR10K/utils/data_augment_get_target_xmp.py
code served (permissive licence) · get_code("bb81279f14e916aa")
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
import numpy as np

# Analyze the function to understand what each_key should contain
# The function expects each_key to be a dict with keys for various image attributes
# Each key maps to a list/array of values

# Create sample data for each_key with realistic attribute values
torch.manual_seed(0)

each_key = {
    'Exposure2012': [0.5, 1.2, -0.3, 0.8, 1.5, -0.1, 0.9, 1.1, 0.2, 0.7],
    'Contrast2012': [10, 20, 15, 5, 25, 18, 12, 8, 22, 11],
    'Highlights2012': [30, 50, 20, 40, 60, 35, 45, 25, 55, 38],
    'Shadows2012': [-20, -10, -15, -5, -30, -12, -25, -8, -18, -22],
    'Whites2012': [5, 15, 10, 20, 8, 12, 18, 6, 14, 11],
    'Blacks2012': [-10, -5, -8, -15, -3, -12, -7, -9, -4, -11],
    'Clarity2012': [15, 25, 10, 30, 20, 12, 28, 18, 22, 16],
    'Dehaze': [0, 10, 5, 20, 15, 8, 12, 3, 18, 7],
    'Tint': [-10, 5, 0, 15, -5, 10, 3, -8, 12, 2],
    'Saturation': [20, 30, 10, 40, 25, 15, 35, 5, 28, 22],
    'Temperature': [3000, 5000, 4000, 6000, 3500, 5500, 4500, 3800, 5800, 4200],
    'Vibrance': [10, 20, 5, 25, 15, 8, 22, 12, 18, 10],
}

num_steps = 5

ARGS = {
    'num_steps': num_steps,
    'each_key': each_key,
}
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 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
normalize Ran
ran; our contract draft was wrong, not the code
csjliang/PPR10K/code_3DLUT/torchvision_x_functional.py
code served (permissive licence) · get_code("0a30c75f6ce11b84")
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 (3, 4, 5) 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 a tensor image of size (C, H, W)
# C=3 channels, H=4 height, W=5 width
tensor = torch.randn(3, 4, 5, dtype=torch.float32)

# Define mean and std sequences for each channel
mean = [0.485, 0.456, 0.406]
std = [0.229, 0.224, 0.225]

ARGS = {
    'tensor': tensor,
    'mean': mean,
    'std': std,
    'inplace': False
}
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 (3, 4, 5) — shape (3, 4, 5) 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
preserve_channel_dim Ran
ran; our contract draft was wrong, not the code
csjliang/PPR10K/code_3DLUT/torchvision_x_functional.py
code served (permissive licence) · get_code("e9005bd74922b43b")
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 function. 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
from functools import wraps

def preserve_channel_dim(func):
    """Preserve dummy channel dim."""

    @wraps(func)
    def wrapped_function(img, *args, **kwargs):
        shape = img.shape
        result = func(img, *args, **kwargs)
        if len(shape) == 3 and shape[-1] == 1 and (len(result.shape) == 2):
            result = np.expand_dims(result, axis=-1)
        return result
    return wrapped_function


# Create a simple test function to decorate
def simple_image_func(img):
    """A simple function that takes an image and returns a processed version."""
    # Simulate some processing that might reduce dimensions
    if len(img.shape) == 3:
        return np.mean(img, axis=-1)
    return img


# Apply the decorator
decorated_func = preserve_channel_dim(simple_image_func)

# Create test images
# Image with shape (4, 3, 1) - 4x3 spatial dims with 1 channel
img_with_channel = np.random.rand(4, 3, 1).astype(np.float32)

ARGS = {
    "func": simple_image_func,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
read_img Ran
ran, honoured the contract we drafted
csjliang/PPR10K/code_3DLUT/datasets_GLC.py
code served (permissive licence) · get_code("1eb64e103338a8c4")
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, shape (4, 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 numpy as np
import tempfile
import os

# Create a temporary image file for testing
# We'll create a simple uint8 BGR image
temp_dir = tempfile.gettempdir()
test_image_path = os.path.join(temp_dir, "test_read_img.png")

# Create a simple test image: 4x3 BGR image with uint8 values
test_img = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)
import cv2
cv2.imwrite(test_image_path, test_img)

ARGS = {
    "path": test_image_path
}
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, shape (4, 3, 3) — shape (4, 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_tensor Ran
ran, violated the contract we drafted
csjliang/PPR10K/code_3DLUT/torchvision_x_functional.py
code served (permissive licence) · get_code("4d111d02727d38b5")
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, 4, 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 numpy as np
import torch

torch.manual_seed(0)

# Test case 1: uint8 image (2D)
img_uint8_2d = np.random.randint(0, 256, size=(4, 3), dtype=np.uint8)

# Test case 2: uint8 image (3D)
img_uint8_3d = np.random.randint(0, 256, size=(4, 3, 2), dtype=np.uint8)

# Test case 3: uint16 image
img_uint16 = np.random.randint(0, 65536, size=(4, 3, 2), dtype=np.uint16)

# Test case 4: float32 image
img_float32 = np.random.rand(4, 3, 2).astype(np.float32)

# Test case 5: float64 image
img_float64 = np.random.rand(4, 3, 2).astype(np.float64)

ARGS = {
    "img": img_uint8_3d
}
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 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
read_xmp_and_statis Not yet run
unverified (harvested, no recorded run)
csjliang/PPR10K/utils/data_augment_get_target_xmp.py
code served (permissive licence) · get_code("283881432c907e93")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 4 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
normalize 1 other paper
1 later
2508.16121 (2025-08)
Lightweight and Fast Real-time Image Enhancement via Decomposition of the Spatial-aware Lookup Tables
preserve_channel_dim 1 other paper
1 later
2508.16121 (2025-08)
Lightweight and Fast Real-time Image Enhancement via Decomposition of the Spatial-aware Lookup Tables
to_tensor 1 other paper
1 later
2508.16121 (2025-08)
Lightweight and Fast Real-time Image Enhancement via Decomposition of the Spatial-aware Lookup Tables

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

Different from general photo retouching tasks, portrait photo retouching (PPR), which aims to enhance the visual quality of a collection of flat-looking portrait photos, has its special and practical requirements such as human-region priority (HRP) and group-level consistency (GLC). HRP requires that more attention should be paid to human regions, while GLC requires that a group of portrait photos should be retouched to a consistent tone. Models trained on existing general photo retouching datasets, however, can hardly meet these requirements of PPR. To facilitate the research on this high-frequency task, we construct a largescale PPR dataset, namely PPR10K, which is the first of its kind to our best knowledge. PPR10K contains 1, 681 groups and 11, 161 high-quality raw portrait photos in total. High-resolution segmentation masks of human regions are provided. Each raw photo is retouched by three experts, while they elaborately adjust each group of photos to have consistent tones. We define a set of objective measures to evaluate the performance of PPR and propose strategies to learn PPR models with good HRP and GLC performance. The constructed PPR10K dataset provides a good benchmark for studying automatic PPR methods, and experiments demonstrate that the proposed learning strategies are effective to improve the retouching performance. Datasets and codes are available: https://github.com/csjliang/PPR10K.

For agents

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

get_harvested_code_for_paper("2105.09180")
get_code_for_paper("2105.09180")
have("2105.09180")

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

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

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

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

Connect an agent — have() is free.