SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.04714 · 2021

Sample and Computation Redistribution for Efficient Face Detection

arXiv · PDF · Open in the Atlas

Code that ran

7 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 4 have no contract verdict; 1 failure 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/2105.04714.json · badge: /api/ran/2105.04714.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
aralhekimoglu/face community (classifier label)
classifier basis not recorded on the link
7 ran · 0 no recorded run
FunctionStatusWhere it lives
calculate_accuracy Ran
ran, honoured the contract we drafted
aralhekimoglu/face/recognition/oneflow_face/validation_util.py
pointer only (licence: MIT); the stored copy get_code serves, from zrui94/insight_mx, is pointer only (licence: NONE) · get_code("f975336b5d5f1a80")
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 zrui94/insight_mx, 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.

calculate_roc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aralhekimoglu/face/recognition/oneflow_face/validation_util.py
pointer only (licence: MIT); the stored copy get_code serves, from linghu8812/pytorch_insightface, is pointer only (licence: NONE) · get_code("5f529c4af000c070")
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 linghu8812/pytorch_insightface, 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.

distance Ran
ran on a synthesized input
aralhekimoglu/face/recognition/oneflow_face/validation_util.py
code served (permissive licence) · get_code("7522ada649e29d57")
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 (2,) 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 math

# Create small embedding matrices for testing
np.random.seed(0)

# embeddings1: shape (2, 4) - 2 samples, 4 dimensions
embeddings1 = np.random.randn(2, 4).astype(np.float32)

# embeddings2: shape (2, 4) - must match embeddings1 for subtraction
embeddings2 = np.random.randn(2, 4).astype(np.float32)

# distance_metric: 0 for squared euclidean, 1 for angular distance
distance_metric = 0

ARGS = {
    "embeddings1": embeddings1,
    "embeddings2": embeddings2,
    "distance_metric": distance_metric
}
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 ndarray, ndim 1, dtype family float, shape (2,) — shape (2,) 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
flip_data Ran
ran on a synthesized input
aralhekimoglu/face/recognition/oneflow_face/insightface_val.py
code served (permissive licence) · get_code("5b7430811591e445")
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 4, dtype family float, shape (2, 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

# The function flip_data takes images as input
# It flips along axis=2 and converts to float32
# We need to create a numpy array with at least 3 dimensions

# Create a small image array: batch_size=2, height=4, width=3, channels=3
# Using distinct sizes for clarity
images = np.random.randint(0, 256, size=(2, 4, 3, 3), dtype=np.uint8)

ARGS = {
    "images": images
}
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 ndarray, ndim 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 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
square_crop Ran
ran on a synthesized input
aralhekimoglu/face/python-package/insightface/utils/face_align.py
code served (permissive licence) · get_code("b453cc5fbf797449")
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 cv2
import numpy as np

# Create a small test image with distinct dimensions (height=4, width=3)
test_image = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

# Define S parameter - target square size
S = 32

ARGS = {
    "im": test_image,
    "S": S
}
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 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
str2bool Ran
ran, violated the contract we drafted
aralhekimoglu/face/recognition/oneflow_face/insightface_train.py
code served (permissive licence) · get_code("a957019ca36a6747")
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) and returned bool, 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 argparse

def str2bool(v):
    if v.lower() in ('yes', 'true', 't', 'y', '1'):
        return True
    elif v.lower() in ('no', 'false', 'f', 'n', '0'):
        return False
    else:
        raise argparse.ArgumentTypeError('Unsupported value encountered.')

# The function str2bool takes a single parameter 'v' which should be a string
# It converts string representations of boolean values to actual booleans

ARGS = {
    'v': 'true'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
str2list Ran
ran on a synthesized input
aralhekimoglu/face/recognition/oneflow_face/insightface_train.py
code served (permissive licence) · get_code("326b29422fdffda6")
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 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

torch.manual_seed(0)

def str2list(x):
    x = [float(y) if type(eval(y)) == float else int(y) for y in x.split(',')]
    return x

# The function takes a string 'x' that contains comma-separated values
# It splits by comma, evaluates each element, checks if it's a float or int,
# and converts accordingly
# Example valid inputs: "1,2,3" or "1.5,2.0,3" or "1,2.5,3"

ARGS = {
    "x": "1,2.5,3,4.0"
}
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 list, ndim 1, dtype family float — 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

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, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 3 later) and 1 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
str2bool 18 other papers
7 dated earlier, 11 later
1905.00641 (2019-05)
RetinaFace: Single-stage Dense Face Localisation in the Wild
1908.01491 (2019-08)
Pixel2Mesh++: Multi-View 3D Mesh Generation via Deformation
1909.13589 (2019-09)
Domain Adaptation for Semantic Segmentation with Maximum Squares Loss
and 15 more not named here
calculate_accuracy 12 other papers
9 dated earlier, 3 later
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
1607.08221 (2016-07)
MS-Celeb-1M: A Dataset and Benchmark for Large-Scale Face Recognition
1703.07737 (2017-03)
In Defense of the Triplet Loss for Person Re-Identification
and 9 more not named here
calculate_roc 5 other papers
4 dated earlier, 1 later
1607.08221 (2016-07)
MS-Celeb-1M: A Dataset and Benchmark for Large-Scale Face Recognition
1710.08092 (2017-10)
VGGFace2: A dataset for recognising faces across pose and age
1801.07698 (2018-01)
ArcFace: Additive Angular Margin Loss for Deep Face Recognition
and 2 more not named here
distance 1 other paper
1 dated earlier
1503.03832 (2015-03)
FaceNet: A Unified Embedding for Face Recognition and Clustering
flip_data 1 other paper
1 dated earlier
1905.00641 (2019-05)
RetinaFace: Single-stage Dense Face Localisation in the Wild
str2list 1 other paper
1 dated earlier
1905.00641 (2019-05)
RetinaFace: Single-stage Dense Face Localisation in the Wild

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

Although tremendous strides have been made in uncontrolled face detection, efficient face detection with a low computation cost as well as high precision remains an open challenge. In this paper, we point out that training data sampling and computation distribution strategies are the keys to efficient and accurate face detection. Motivated by these observations, we introduce two simple but effective methods (1) Sample Redistribution (SR), which augments training samples for the most needed stages, based on the statistics of benchmark datasets; and (2) Computation Redistribution (CR), which reallocates the computation between the backbone, neck and head of the model, based on a meticulously defined search methodology. Extensive experiments conducted on WIDER FACE demonstrate the state-of-the-art efficiency-accuracy trade-off for the proposed \scrfd family across a wide range of compute regimes. In particular, \scrfdf{34} outperforms the best competitor, TinaFace, by $3.86\%$ (AP at hard set) while being more than \emph{3$\times$ faster} on GPUs with VGA-resolution images. We also release our code to facilitate future research.

For agents

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

get_harvested_code_for_paper("2105.04714")
get_code_for_paper("2105.04714")
have("2105.04714")

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

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

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

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

Connect an agent — have() is free.