SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1503.03832 · CVPR · 2015

FaceNet: A Unified Embedding for Face Recognition and Clustering

Florian Schroff, Dmitry Kalenichenko, James Philbin

arXiv · PDF · Open in the Atlas

Code that ran

99 of 154 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (19 of them constructed an object rather than computing a result; 11 honoured the contract we drafted, 11 violated it and 59 have no contract verdict; 18 failures of our instrument; 55 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/1503.03832.json · badge: /api/ran/1503.03832.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
davidsandberg/facenet community (classifier label)
classifier basis not recorded on the link
10 ran · 6 no recorded run
altndrr/persona community (classifier label)
classifier basis not recorded on the link
9 ran · 3 no recorded run
Unturned3/mtcnn community
not in the paper's declared repositories
7 ran · 2 no recorded run
kuaikuaikim/DFace community
not in the paper's declared repositories
7 ran · 1 no recorded run
eewindfly/facenet community (classifier label)
classifier basis not recorded on the link
6 ran · 8 no recorded run
saiamrit/Facenet-pytorch community (classifier label)
classifier basis not recorded on the link
6 ran · 4 no recorded run
QuocThangNguyen/deep-metric-learning-tsinghua-dogs community
not in the paper's declared repositories
6 ran · 0 no recorded run
sebastiaopamplona/msc-thesis-deepfsim community
not in the paper's declared repositories
3 ran · 2 no recorded run
M155K4R4/facenet community (classifier label)
classifier basis not recorded on the link
3 ran · 1 no recorded run
douglas125/SpeechIdentity community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
Ashish013/FaceNet_TF-2.0 community
Papers with Code archive
3 ran · 0 no recorded run
EvgenyDyshlyuk/Deep_Learning_Face_Detection_Embeddings_Clustering community
Papers with Code archive
3 ran · 0 no recorded run
BradNeuberg/personal-photos-model community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
dude123studios/SmarterRingV2 community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
humbleOldSage/Triplet-Loss-for-Personal-dataset community
not in the paper's declared repositories
2 ran · 2 no recorded run
LKLQQ/FaceNet community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
bergerda1/PiFaceRecognition community
not in the paper's declared repositories
1 ran · 1 no recorded run
shi510/ffem community
not in the paper's declared repositories
1 ran · 0 no recorded run
18alantom/smel_project community
Papers with Code archive
1 ran · 0 no recorded run
TowardHumanizedInteraction/TripletFace community
not in the paper's declared repositories
1 ran · 0 no recorded run
kooBH/facenet_verification community
not in the paper's declared repositories
1 ran · 0 no recorded run
notecola/facenet-light community
not in the paper's declared repositories
1 ran · 0 no recorded run
khrlimam/facenet community
not in the paper's declared repositories
1 ran · 0 no recorded run
BZstat/Attendance-AI community
Papers with Code archive
1 ran · 0 no recorded run
reneang17/authorencoder community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
AngularMarginLayer Ran
ran on a synthesized input · constructed an object; no result was computed
shi510/ffem/train/layers/angular_margin_layer.py
code served (permissive licence) · get_code("7724117072ade7e1")
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 an instance of its own class, AngularMarginLayer: the run constructed the object and did not call it, so no result was computed. 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 math
import tensorflow as tf

class AngularMarginLayer(tf.keras.layers.Layer):

    def __init__(self, n_classes, margin=0.5, scale=30):
        super(AngularMarginLayer, self).__init__()
        self.n_classes = n_classes
        self.scale = scale
        self.margin = margin
        self.initializer = tf.keras.initializers.HeNormal()
        self.cos_m = tf.constant(math.cos(margin))
        self.sin_m = tf.constant(math.sin(margin))
        self.th = tf.constant(math.cos(math.pi - margin))
        self.mm = tf.constant(self.sin_m * margin)

    def build(self, input_shape):
        """
        input_shape = [shape of y_pred, shape of y_true] : list
        """
        self.center = tf.Variable(name='center', initial_value=self.initializer((input_shape[0][-1], self.n_classes)), trainable=True)
        if tf.keras.mixed_precision.global_policy().name == 'mixed_float16':
            self.center = tf.cast(self.center, dtype=tf.float16)
            self.cos_m = tf.cast(self.cos_m, dtype=tf.float16)
            self.sin_m = tf.cast(self.sin_m, dtype=tf.float16)
            self.th = tf.cast(self.th, dtype=tf.float16)
            self.mm = tf.cast(self.mm, dtype=tf.float16)

    def call(self, inputs):
        """
        inputs = [y_pred, y_true] : list
        y_pred = (batch_size, embedding dim) : shape
        y_true = (batch_size, classes) : shape
        """
        y_pred, y_true = inputs
        normed_embds = tf.nn.l2_normalize(y_pred, axis=1)
        normed_w = tf.nn.l2_normalize(self.center, axis=0)
        cos_t = tf.matmul(normed_embds, normed_w)
        sin_t = tf.sqrt(1.0 - cos_t ** 2)
        cos_mt = cos_t * self.cos_m - sin_t * self.sin_m
        cos_mt = tf.where(cos_t > self.th, cos_mt, cos_t - self.mm)
        logits = tf.where(y_true == 1.0, cos_mt, cos_t)
        logits = logits * self.scale
        return logits

    def get_config(self):
        return {'n_classes': self.n_classes, 'margin': self.margin, 'scale': self.scale}


n_classes = 3
margin = 0.5
scale = 30

batch_size = 2
embedding_dim = 4

y_pred = tf.constant([[0.1, 0.2, 0.3, 0.4], [0.5, 0.6, 0.7, 0.8]], dtype=tf.float32)
y_true = tf.constant([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]], dtype=tf.float32)

layer = AngularMarginLayer(n_classes=n_classes, margin=margin, scale=scale)
layer.build([[batch_size, embedding_dim], [batch_size, n_classes]])

ARGS = {
    'n_classes': n_classes,
    'margin': margin,
    'scale': scale
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AngularMarginLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a AngularMarginLayer 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
BaseSpeechEmbeddingModel Ran
ran on a synthesized input
douglas125/SpeechIdentity/train_speech_id_model.py
code served (permissive licence) · get_code("0a66a28df2ce144c")
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 Functional. 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 tensorflow as tf
from tensorflow.keras import layers as L

# Set random seed for reproducibility
tf.random.set_seed(0)

# Define ARGS dictionary with all parameters for BaseSpeechEmbeddingModel
ARGS = {
    'inputLength': 16000,
    'rnn_func': L.LSTM,
    'rnn_units': 128,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional 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
BasicConv2d Ran
ran on a synthesized input · constructed an object; no result was computed
Unturned3/mtcnn/models/inception_resnet_v1.py
code served (permissive licence) · get_code("0bab917a250c249f")
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 an instance of its own class, BasicConv2d: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    'in_planes': 3,
    'out_planes': 64,
    'kernel_size': 3,
    'stride': 1,
    'padding': 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 BasicConv2d — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BasicConv2d 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
BasicConv2d Ran
ran on a synthesized input · constructed an object; no result was computed
kuaikuaikim/DFace/dface/core/resnet_inception_v2.py
code served (permissive licence) · get_code("5482c7a79d0aefc8")
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 an instance of its own class, BasicConv2d: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    'in_planes': 3,
    'out_planes': 64,
    'kernel_size': 3,
    'stride': 1,
    'padding': 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 BasicConv2d — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BasicConv2d 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
Block17 Ran
ran on a synthesized input · constructed an object; no result was computed
Unturned3/mtcnn/models/inception_resnet_v1.py
code served (permissive licence) · get_code("7e19060bb9958d17")
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 an instance of its own class, Block17: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn

torch.manual_seed(0)

# The Block17 forward method expects:
# - x: input tensor with shape (batch, 896, height, width)
# The module uses self.branch0, self.branch1, self.conv2d, and self.relu
# which are already defined in __init__

# Create input tensor: batch=2, channels=896, height=4, width=3
x = torch.randn(2, 896, 4, 3)

ARGS = {
    "scale": 1.0
}
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 Block17 — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Block17 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
Block17 Ran
ran on a synthesized input · constructed an object; no result was computed
kuaikuaikim/DFace/dface/core/resnet_inception_v2.py
code served (permissive licence) · get_code("40fffa8c1530da9c")
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 an instance of its own class, Block17: the run constructed the object and did not call it, so no result was computed. 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)

class BasicConv2d(nn.Module):

    def __init__(self, in_planes, out_planes, kernel_size, stride, padding=0):
        super(BasicConv2d, self).__init__()
        self.conv = nn.Conv2d(in_planes, out_planes, kernel_size=kernel_size, stride=stride, padding=padding, bias=False)
        self.bn = nn.BatchNorm2d(out_planes, eps=0.001, momentum=0, affine=True)
        self.relu = nn.ReLU(inplace=False)

    def forward(self, x):
        x = self.conv(x)
        x = self.bn(x)
        x = self.relu(x)
        return x

class Block17(nn.Module):

    def __init__(self, scale=1.0):
        super(Block17, self).__init__()
        self.scale = scale
        self.branch0 = BasicConv2d(1088, 192, kernel_size=1, stride=1)
        self.branch1 = nn.Sequential(BasicConv2d(1088, 128, kernel_size=1, stride=1), BasicConv2d(128, 160, kernel_size=(1, 7), stride=1, padding=(0, 3)), BasicConv2d(160, 192, kernel_size=(7, 1), stride=1, padding=(3, 0)))
        self.conv2d = nn.Conv2d(384, 1088, kernel_size=1, stride=1)
        self.relu = nn.ReLU(inplace=False)

    def forward(self, x):
        x0 = self.branch0(x)
        x1 = self.branch1(x)
        out = torch.cat((x0, x1), 1)
        out = self.conv2d(out)
        out = out * self.scale + x
        out = self.relu(out)
        return out

# Create input tensor with shape (batch=2, channels=1088, height=4, width=3)
x = torch.randn(2, 1088, 4, 3)

# Define ARGS dictionary with scale parameter
ARGS = {
    "scale": 1.0
}

# Create the model and test it
model = Block17(**ARGS)
output = model(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 Block17 — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Block17 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
Block35 Ran
ran on a synthesized input
Unturned3/mtcnn/models/inception_resnet_v1.py
code served (permissive licence) · get_code("40e47dd85fa18386")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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
from torch import nn

INIT_ARGS = {
    "scale": 1.0,
}

# Create input tensor with shape (batch=2, channels=256, height=4, width=3)
input_tensor = torch.randn(2, 256, 4, 3)

ARGS = {
    "x": input_tensor,
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Block35 Ran
ran on a synthesized input · constructed an object; no result was computed
kuaikuaikim/DFace/dface/core/resnet_inception_v2.py
code served (permissive licence) · get_code("02e7a38703c89506")
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 an instance of its own class, Block35: the run constructed the object and did not call it, so no result was computed. 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)

# Block35 takes only one parameter: scale
ARGS = {
    "scale": 1.0
}
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 Block35 — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Block35 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
Block8 Ran
ran on a synthesized input · constructed an object; no result was computed
Unturned3/mtcnn/models/inception_resnet_v1.py
code served (permissive licence) · get_code("c593a9f14b4a7466")
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 an instance of its own class, Block8: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn

torch.manual_seed(0)

# Block8 takes two parameters: scale (float) and noReLU (bool)
# The forward method expects input x with shape (batch, 1792, height, width)
# Let's create a minimal valid input tensor

ARGS = {
    "scale": 1.0,
    "noReLU": 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 Block8 — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Block8 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
Block8 Ran
ran on a synthesized input · constructed an object; no result was computed
kuaikuaikim/DFace/dface/core/resnet_inception_v2.py
code served (permissive licence) · get_code("4f1bf083181c6a5e")
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 an instance of its own class, Block8: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    "scale": 1.0,
    "noReLU": 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 Block8 — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Block8 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
DistLoss Ran
ran on a synthesized input · constructed an object; no result was computed
18alantom/smel_project/identify/models/model_trainers.py
pointer only (licence: GPL-3.0) · get_code("b8740977fcc7fd00")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, 18alantom/smel_project, is not in the permissive set Syntology serves inline. 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.

Encoder Ran
ran on a synthesized input
TowardHumanizedInteraction/TripletFace/tripletface/core/model.py
pointer only (licence: NONE) · get_code("73f93e4c7e4a14d5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, TowardHumanizedInteraction/TripletFace 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.

FGT Ran
ran on a synthesized input · constructed an object; no result was computed
kooBH/facenet_verification/FacenetGapTrainer.py
pointer only (licence: NONE) · get_code("b037011762fb8d35")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kooBH/facenet_verification 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.

FaceNetModel Ran
ran on a synthesized input · constructed an object; no result was computed
notecola/facenet-light/models.py
pointer only (licence: NONE) · get_code("d0053e86f99ee6de")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, notecola/facenet-light 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.

FaceNetModel Ran
ran on a synthesized input · constructed an object; no result was computed
khrlimam/facenet/models.py
code served (permissive licence) · get_code("e5a04c74a4566504")
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 an instance of its own class, FaceNetModel: the run constructed the object and did not call it, so no result was computed. 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
from torchvision.models import resnet50

torch.manual_seed(0)

class Flatten(nn.Module):
    def forward(self, x):
        return x.view(x.size(0), -1)

class FaceNetModel(nn.Module):
    def __init__(self, pretrained=False):
        super(FaceNetModel, self).__init__()
        self.model = resnet50(pretrained)
        embedding_size = 128
        num_classes = 500
        self.cnn = nn.Sequential(self.model.conv1, self.model.bn1, self.model.relu, self.model.maxpool, self.model.layer1, self.model.layer2, self.model.layer3, self.model.layer4)
        self.model.fc = nn.Sequential(Flatten(), nn.Linear(100352, embedding_size))
        self.model.classifier = nn.Linear(embedding_size, num_classes)

    def l2_norm(self, input):
        input_size = input.size()
        buffer = torch.pow(input, 2)
        normp = torch.sum(buffer, 1).add_(1e-10)
        norm = torch.sqrt(normp)
        _output = torch.div(input, norm.view(-1, 1).expand_as(input))
        output = _output.view(input_size)
        return output

    def freeze_all(self):
        for param in self.model.parameters():
            param.requires_grad = False

    def unfreeze_all(self):
        for param in self.model.parameters():
            param.requires_grad = True

    def freeze_fc(self):
        for param in self.model.fc.parameters():
            param.requires_grad = False

    def unfreeze_fc(self):
        for param in self.model.fc.parameters():
            param.requires_grad = True

    def freeze_only(self, freeze):
        for name, child in self.model.named_children():
            if name in freeze:
                for param in child.parameters():
                    param.requires_grad = False
            else:
                for param in child.parameters():
                    param.requires_grad = True

    def unfreeze_only(self, unfreeze):
        for name, child in self.model.named_children():
            if name in unfreeze:
                for param in child.parameters():
                    param.requires_grad = True
            else:
                for param in child.parameters():
                    param.requires_grad = False

    def forward(self, x):
        x = self.cnn(x)
        x = self.model.fc(x)
        features = self.l2_norm(x)
        alpha = 10
        features = features * alpha
        return features

    def forward_classifier(self, x):
        features = self.forward(x)
        res = self.model.classifier(features)
        return res

ARGS = {
    "pretrained": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type FaceNetModel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FaceNetModel 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
InceptionResnetV1 Ran
ran on a synthesized input
BZstat/Attendance-AI/models/inception_resnet_v1.py
code served (permissive licence) · get_code("c93fb05a472b0514")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, 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 torch.nn as nn

# The class definition requires InceptionResnetV1, but it's not provided in the snippet.
# Based on the helper classes (Block17, Block35, Block8, Mixed_6a, Mixed_7a), 
# we can infer this is an Inception-ResNet-v1 architecture.
# Since the full class isn't shown, I'll create a minimal version that uses the provided blocks.

class InceptionResnetV1(nn.Module):
    def __init__(self, classify=False, num_classes=None, dropout_prob=0.6):
        super().__init__()
        self.classify = classify
        self.num_classes = num_classes
        
        # Initial conv layers
        self.conv2d_1a = BasicConv2d(3, 32, kernel_size=3, stride=2)
        self.conv2d_2a = BasicConv2d(32, 32, kernel_size=3, stride=1)
        self.conv2d_2b = BasicConv2d(32, 64, kernel_size=3, stride=1, padding=1)
        self.maxpool_3a = nn.MaxPool2d(3, stride=2)
        self.conv2d_3b = BasicConv2d(64, 80, kernel_size=1, stride=1)
        self.conv2d_4a = BasicConv2d(80, 192, kernel_size=3, stride=1)
        self.conv2d_4b = BasicConv2d(192, 256, kernel_size=3, stride=2)
        
        # Inception-ResNet blocks
        self.repeat_1 = nn.Sequential(
            Block35(scale=0.17),
            Block35(scale=0.17)
        )
        
        self.mixed_6a = Mixed_6a()
        
        self.repeat_2 = nn.Sequential(
            Block17(scale=0.10),
            Block17(scale=0.10)
        )
        
        self.mixed_7a = Mixed_7a()
        
        self.repeat_3 = nn.Sequential(
            Block8(scale=0.20),
            Block8(scale=0.20, noReLU=True)
        )
        
        self.block8 = Block8(noReLU=True)
        self.avgpool_1a = nn.AdaptiveAvgPool2d(1)
        self.dropout = nn.Dropout(dropout_prob) if dropout_prob > 0 else None
        self.last_linear = nn.Linear(1792, 512, bias=False)
        self.last_bn = nn.BatchNorm1d(512, eps=0.001, momentum=0.1, affine=True)
        
        if self.classify and self.num_classes is not None:
            self.logits = nn.Linear(512, self.num_classes)
    
    def forward(self, x):
        x = self.conv2d_1a(x)
        x = self.conv2d_2a(x)
        x = self.conv2d_2b(x)
        x = self.maxpool_3a(x)
        x = self.conv2d_3b(x)
        x = self.conv2d_4a(x)
        x = self.conv2d_4b(x)
        
        x = self.repeat_1(x)
        x = self.mixed_6a(x)
        x = self.repeat_2(x)
        x = self.mixed_7a(x)
        x = self.repeat_3(x)
        x = self.block8(x)
        
        x = self.avgpool_1a(x)
        x = x.view(x.shape[0], -1)
        x = self.dropout(x) if self.dropout is not None else x
        x = self.last_linear(x)
        x = self.last_bn(x)
        
        if self.classify:
            x = self.logits(x)
        
        return x


INIT_ARGS = {
    'classify': True,
    'num_classes': 10,
    'dropout_prob': 0.5
}

# Input tensor: batch_size=2, channels=3, height=160, width=160
# (Inception models typically expect larger inputs, using 160x160 as a reasonable size)
ARGS = {
    'x': torch.randn(2, 3, 160, 160)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
requests, 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Mixed_5b Ran
ran on a synthesized input
kuaikuaikim/DFace/dface/core/resnet_inception_v2.py
code served (permissive licence) · get_code("09e312bb783a9608")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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 torch.nn as nn

class BasicConv2d(nn.Module):

    def __init__(self, in_planes, out_planes, kernel_size, stride, padding=0):
        super(BasicConv2d, self).__init__()
        self.conv = nn.Conv2d(in_planes, out_planes, kernel_size=kernel_size, stride=stride, padding=padding, bias=False)
        self.bn = nn.BatchNorm2d(out_planes, eps=0.001, momentum=0, affine=True)
        self.relu = nn.ReLU(inplace=False)

    def forward(self, x):
        x = self.conv(x)
        x = self.bn(x)
        x = self.relu(x)
        return x

class Mixed_5b(nn.Module):

    def __init__(self):
        super(Mixed_5b, self).__init__()
        self.branch0 = BasicConv2d(192, 96, kernel_size=1, stride=1)
        self.branch1 = nn.Sequential(BasicConv2d(192, 48, kernel_size=1, stride=1), BasicConv2d(48, 64, kernel_size=5, stride=1, padding=2))
        self.branch2 = nn.Sequential(BasicConv2d(192, 64, kernel_size=1, stride=1), BasicConv2d(64, 96, kernel_size=3, stride=1, padding=1), BasicConv2d(96, 96, kernel_size=3, stride=1, padding=1))
        self.branch3 = nn.Sequential(nn.AvgPool2d(3, stride=1, padding=1, count_include_pad=False), BasicConv2d(192, 64, kernel_size=1, stride=1))

    def forward(self, x):
        x0 = self.branch0(x)
        x1 = self.branch1(x)
        x2 = self.branch2(x)
        x3 = self.branch3(x)
        out = torch.cat((x0, x1, x2, x3), 1)
        return out

INIT_ARGS = {}

ARGS = {
    'x': torch.randn(2, 192, 7, 5)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Mixed_6a Ran
ran on a synthesized input · constructed an object; no result was computed
Unturned3/mtcnn/models/inception_resnet_v1.py
code served (permissive licence) · get_code("4cf5d4d98d8b0029")
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 an instance of its own class, Mixed_6a: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn

torch.manual_seed(0)

class BasicConv2d(nn.Module):
    def __init__(self, in_planes, out_planes, kernel_size, stride, padding=0):
        super().__init__()
        self.conv = nn.Conv2d(in_planes, out_planes, kernel_size=kernel_size, stride=stride, padding=padding, bias=False)
        self.bn = nn.BatchNorm2d(out_planes, eps=0.001, momentum=0.1, affine=True)
        self.relu = nn.ReLU(inplace=False)

    def forward(self, x):
        x = self.conv(x)
        x = self.bn(x)
        x = self.relu(x)
        return x

class Mixed_6a(nn.Module):
    def __init__(self):
        super().__init__()
        self.branch0 = BasicConv2d(256, 384, kernel_size=3, stride=2)
        self.branch1 = nn.Sequential(BasicConv2d(256, 192, kernel_size=1, stride=1), BasicConv2d(192, 192, kernel_size=3, stride=1, padding=1), BasicConv2d(192, 256, kernel_size=3, stride=2))
        self.branch2 = nn.MaxPool2d(3, stride=2)

    def forward(self, x):
        x0 = self.branch0(x)
        x1 = self.branch1(x)
        x2 = self.branch2(x)
        out = torch.cat((x0, x1, x2), 1)
        return out

# Create input tensor: batch_size=2, channels=256, height=4, width=3
x = torch.randn(2, 256, 4, 3)

ARGS = {
}
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 Mixed_6a — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Mixed_6a 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
Mixed_6a Ran
ran on a synthesized input
kuaikuaikim/DFace/dface/core/resnet_inception_v2.py
code served (permissive licence) · get_code("051761546a81da65")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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 torch.nn as nn

class BasicConv2d(nn.Module):

    def __init__(self, in_planes, out_planes, kernel_size, stride, padding=0):
        super(BasicConv2d, self).__init__()
        self.conv = nn.Conv2d(in_planes, out_planes, kernel_size=kernel_size, stride=stride, padding=padding, bias=False)
        self.bn = nn.BatchNorm2d(out_planes, eps=0.001, momentum=0, affine=True)
        self.relu = nn.ReLU(inplace=False)

    def forward(self, x):
        x = self.conv(x)
        x = self.bn(x)
        x = self.relu(x)
        return x

class Mixed_6a(nn.Module):

    def __init__(self):
        super(Mixed_6a, self).__init__()
        self.branch0 = BasicConv2d(320, 384, kernel_size=3, stride=2)
        self.branch1 = nn.Sequential(BasicConv2d(320, 256, kernel_size=1, stride=1), BasicConv2d(256, 256, kernel_size=3, stride=1, padding=1), BasicConv2d(256, 384, kernel_size=3, stride=2))
        self.branch2 = nn.MaxPool2d(3, stride=2)

    def forward(self, x):
        x0 = self.branch0(x)
        x1 = self.branch1(x)
        x2 = self.branch2(x)
        out = torch.cat((x0, x1, x2), 1)
        return out

INIT_ARGS = {}

ARGS = {
    'x': torch.randn(2, 320, 17, 17)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Mixed_7a Ran
ran on a synthesized input · constructed an object; no result was computed
Unturned3/mtcnn/models/inception_resnet_v1.py
code served (permissive licence) · get_code("e8f35f8b82919dcc")
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 an instance of its own class, Mixed_7a: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn

torch.manual_seed(0)

class BasicConv2d(nn.Module):

    def __init__(self, in_planes, out_planes, kernel_size, stride, padding=0):
        super().__init__()
        self.conv = nn.Conv2d(in_planes, out_planes, kernel_size=kernel_size, stride=stride, padding=padding, bias=False)
        self.bn = nn.BatchNorm2d(out_planes, eps=0.001, momentum=0.1, affine=True)
        self.relu = nn.ReLU(inplace=False)

    def forward(self, x):
        x = self.conv(x)
        x = self.bn(x)
        x = self.relu(x)
        return x

class Mixed_7a(nn.Module):

    def __init__(self):
        super().__init__()
        self.branch0 = nn.Sequential(BasicConv2d(896, 256, kernel_size=1, stride=1), BasicConv2d(256, 384, kernel_size=3, stride=2))
        self.branch1 = nn.Sequential(BasicConv2d(896, 256, kernel_size=1, stride=1), BasicConv2d(256, 256, kernel_size=3, stride=2))
        self.branch2 = nn.Sequential(BasicConv2d(896, 256, kernel_size=1, stride=1), BasicConv2d(256, 256, kernel_size=3, stride=1, padding=1), BasicConv2d(256, 256, kernel_size=3, stride=2))
        self.branch3 = nn.MaxPool2d(3, stride=2)

    def forward(self, x):
        x0 = self.branch0(x)
        x1 = self.branch1(x)
        x2 = self.branch2(x)
        x3 = self.branch3(x)
        out = torch.cat((x0, x1, x2, x3), 1)
        return out

# Create input tensor: batch_size=2, channels=896, height=4, width=3
input_tensor = torch.randn(2, 896, 4, 3)

ARGS = {}
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 Mixed_7a — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Mixed_7a 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
Mixed_7a Ran
ran on a synthesized input
kuaikuaikim/DFace/dface/core/resnet_inception_v2.py
code served (permissive licence) · get_code("3d32a41443e1f768")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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 torch.nn as nn

class BasicConv2d(nn.Module):

    def __init__(self, in_planes, out_planes, kernel_size, stride, padding=0):
        super(BasicConv2d, self).__init__()
        self.conv = nn.Conv2d(in_planes, out_planes, kernel_size=kernel_size, stride=stride, padding=padding, bias=False)
        self.bn = nn.BatchNorm2d(out_planes, eps=0.001, momentum=0, affine=True)
        self.relu = nn.ReLU(inplace=False)

    def forward(self, x):
        x = self.conv(x)
        x = self.bn(x)
        x = self.relu(x)
        return x

class Mixed_7a(nn.Module):

    def __init__(self):
        super(Mixed_7a, self).__init__()
        self.branch0 = nn.Sequential(BasicConv2d(1088, 256, kernel_size=1, stride=1), BasicConv2d(256, 384, kernel_size=3, stride=2))
        self.branch1 = nn.Sequential(BasicConv2d(1088, 256, kernel_size=1, stride=1), BasicConv2d(256, 288, kernel_size=3, stride=2))
        self.branch2 = nn.Sequential(BasicConv2d(1088, 256, kernel_size=1, stride=1), BasicConv2d(256, 288, kernel_size=3, stride=1, padding=1), BasicConv2d(288, 320, kernel_size=3, stride=2))
        self.branch3 = nn.MaxPool2d(3, stride=2)

    def forward(self, x):
        x0 = self.branch0(x)
        x1 = self.branch1(x)
        x2 = self.branch2(x)
        x3 = self.branch3(x)
        out = torch.cat((x0, x1, x2, x3), 1)
        return out

INIT_ARGS = {}

ARGS = {
    'x': torch.randn(2, 1088, 17, 17)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
OnlineTripletLoss Ran
ran on a synthesized input · constructed an object; no result was computed
reneang17/authorencoder/src/siamese_triplet/losses.py
code served (permissive licence) · get_code("98cd277ddcd452ca")
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 an instance of its own class, OnlineTripletLoss: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

class DummyTripletSelector:
    """Minimal triplet selector that generates valid triplet indices"""
    def get_triplets(self, embeddings, labels):
        """
        Returns tensor of shape (num_triplets, 3) with indices [anchor, positive, negative]
        """
        batch_size = embeddings.shape[0]
        # Generate a few valid triplets
        triplets = torch.tensor([
            [0, 1, 2],
            [1, 0, 3],
        ], dtype=torch.long)
        return triplets

# Create small test data
batch_size = 4
embedding_dim = 5
embeddings = torch.randn(batch_size, embedding_dim)
labels = torch.tensor([0, 0, 1, 1])

# Create instances
margin = 0.5
triplet_selector = DummyTripletSelector()

ARGS = {
    "margin": margin,
    "triplet_selector": triplet_selector,
}
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 OnlineTripletLoss — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a OnlineTripletLoss 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
OnlineTripletLoss Ran
ran on a synthesized input · constructed an object; no result was computed
adambielski/siamese-triplet/losses.py
code served (permissive licence) · get_code("182e0543c92398a4")
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 an instance of its own class, OnlineTripletLoss: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

class TripletSelector:
    """Stand-in triplet selector that returns valid triplet indices."""
    
    def get_triplets(self, embeddings, target):
        """
        Returns tensor of shape (num_triplets, 3) with indices [anchor, positive, negative]
        """
        batch_size = embeddings.size(0)
        # Create simple triplets: (0,1,2), (1,0,3), etc.
        triplets = torch.tensor([
            [0, 1, 2],
            [1, 0, 3],
            [2, 3, 0],
        ], dtype=torch.long)
        return triplets

# Create embeddings: batch_size=4, embedding_dim=8
embeddings = torch.randn(4, 8)

# Create target labels for the batch
target = torch.tensor([0, 0, 1, 1], dtype=torch.long)

# Create triplet selector
triplet_selector = TripletSelector()

# Create margin parameter
margin = 1.0

ARGS = {
    "margin": margin,
    "triplet_selector": triplet_selector
}
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 OnlineTripletLoss — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a OnlineTripletLoss 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
Online_Mining Ran
ran on a synthesized input
Ashish013/FaceNet_TF-2.0/src/online_triplet_loss.py
code served (permissive licence) · get_code("b3f77014fc35ba91")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned EagerTensor, ndim 0, 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 tensorflow as tf
import numpy as np

def negative_anchor_mask(y_inputs):
    """
    Returns a mask of valid negative anchor pairs i.e, True if anchor != negative and labels(anchor) != labels(negative) else False
    """
    negative_anchor_mask = tf.logical_not(tf.equal(tf.expand_dims(y_inputs, 0), tf.expand_dims(y_inputs, 1)))
    return negative_anchor_mask

def positive_anchor_mask(y_inputs):
    """
    Returns a mask of positive anchor pairs i.e, True if anchor != positive and labels(anchor) == labels(positive) else False
    """
    equals_positive = tf.equal(tf.expand_dims(y_inputs, 0), tf.expand_dims(y_inputs, 1))
    indices_not_equals = tf.logical_not(tf.cast(tf.eye(tf.shape(y_inputs)[0]), tf.bool))
    anchor_positive_mask = tf.logical_and(equals_positive, indices_not_equals)
    return anchor_positive_mask

class Online_Mining(tf.keras.layers.Layer):

    def __init__(self, margin=0.6):
        super(Online_Mining, self).__init__()
        self.margin = margin

    def call(self, total_input):
        self.inputs, y_inputs = total_input
        self.y_inputs = tf.reshape(y_inputs, [y_inputs.shape[0]])
        dot_product = tf.matmul(self.inputs, tf.transpose(self.inputs))
        square_norm = tf.linalg.diag_part(dot_product)
        distances = tf.expand_dims(square_norm, 0) - 2.0 * dot_product + tf.expand_dims(square_norm, 1)
        pairwise_dist = tf.maximum(distances, 0.0)
        mask_anchor_positive = tf.cast(positive_anchor_mask(self.y_inputs), tf.float32)
        anchor_positive_dist = tf.multiply(pairwise_dist, mask_anchor_positive)
        hardest_positive_dist = tf.reduce_max(anchor_positive_dist, axis=1, keepdims=True)
        mask_anchor_negative = tf.cast(negative_anchor_mask(self.y_inputs), tf.float32)
        anchor_negative_dist_max = tf.reduce_max(pairwise_dist, axis=1, keepdims=True)
        anchor_negative_dist = pairwise_dist + tf.multiply(anchor_negative_dist_max, 1.0 - mask_anchor_negative)
        hardest_negative_dist = tf.reduce_min(anchor_negative_dist, axis=1, keepdims=True)
        loss = tf.maximum(hardest_positive_dist - hardest_negative_dist + self.margin, 0.0)
        loss = tf.reduce_mean(loss)
        return loss

INIT_ARGS = {
    'margin': 0.6
}

embeddings = tf.constant(np.random.randn(2, 4).astype(np.float32))
labels = tf.constant([0, 1], dtype=tf.int32)

ARGS = {
    'total_input': (embeddings, labels)
}

layer = Online_Mining(**INIT_ARGS)
result = layer(**ARGS)
print(f"Loss output: {result}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 0, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Triplet Ran
ran on a synthesized input · constructed an object; no result was computed
code-kage/facenet_mini/facenet_mini/net.py
pointer only (licence: NONE) · get_code("840e9d70e1cc26aa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, code-kage/facenet_mini 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.

TripletLoss Ran
ran on a synthesized input · constructed an object; no result was computed
tamerthamoqa/facenet-pytorch-glint360k/losses/triplet_loss.py
code served (permissive licence) · get_code("670ffaa5bf0a16fe")
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 an instance of its own class, TripletLoss: the run constructed the object and did not call it, so no result was computed. 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
from torch.autograd import Function
from torch.nn.modules.distance import PairwiseDistance

torch.manual_seed(0)

# Create small tensors for anchor, positive, and negative
# Using batch size 2, embedding dimension 4
anchor = torch.randn(2, 4)
positive = torch.randn(2, 4)
negative = torch.randn(2, 4)

# Define margin parameter
margin = 1.0

ARGS = {
    'margin': margin,
}
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 TripletLoss — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TripletLoss 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
TripletMarginLoss Ran
ran on a synthesized input · constructed an object; no result was computed
QuocThangNguyen/deep-metric-learning-tsinghua-dogs/src/losses/triplet_margin_loss.py
pointer only (licence: NONE) · get_code("2d61f7462fd37651")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, QuocThangNguyen/deep-metric-learning-tsinghua-dogs 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.

_batch_hard_triplets_loss Ran
ran; our contract draft was wrong, not the code
QuocThangNguyen/deep-metric-learning-tsinghua-dogs/src/losses/triplet_margin_loss.py
pointer only (licence: NONE) · get_code("4b46ed5be2560fbd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, QuocThangNguyen/deep-metric-learning-tsinghua-dogs 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.

_batch_hardest_triplets_loss Ran
ran; our contract draft was wrong, not the code
QuocThangNguyen/deep-metric-learning-tsinghua-dogs/src/losses/triplet_margin_loss.py
pointer only (licence: NONE) · get_code("6c7347802e28737d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, QuocThangNguyen/deep-metric-learning-tsinghua-dogs 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.

_generate_layer_name Ran
ran; our contract draft was wrong, not the code
sebastiaopamplona/msc-thesis-deepfsim/utils/models/facenet.py
pointer only (licence: NONE) · get_code("5379cd2f8b5b328b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sebastiaopamplona/msc-thesis-deepfsim 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.

_get_anchor_negative_mask Ran
ran; our contract draft was wrong, not the code
QuocThangNguyen/deep-metric-learning-tsinghua-dogs/src/losses/triplet_margin_loss.py
pointer only (licence: NONE) · get_code("d6a0aba791e7197d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, QuocThangNguyen/deep-metric-learning-tsinghua-dogs 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.

_get_anchor_negative_triplet_mask Ran
ran, violated the contract we drafted
humbleOldSage/Triplet-Loss-for-Personal-dataset/model/triplet_loss.py
pointer only (licence: NONE) · get_code("b7b5c3f2849256e2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, humbleOldSage/Triplet-Loss-for-Personal-dataset 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.

_get_anchor_positive_mask Ran
ran; our contract draft was wrong, not the code
QuocThangNguyen/deep-metric-learning-tsinghua-dogs/src/losses/triplet_margin_loss.py
pointer only (licence: NONE) · get_code("357782972c4e4fd3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, QuocThangNguyen/deep-metric-learning-tsinghua-dogs 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.

_get_anchor_positive_triplet_mask Ran
ran, violated the contract we drafted
humbleOldSage/Triplet-Loss-for-Personal-dataset/model/triplet_loss.py
pointer only (licence: NONE) · get_code("0c06a70ec38f0276")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, humbleOldSage/Triplet-Loss-for-Personal-dataset 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.

_get_triplet_masks Ran
ran; our contract draft was wrong, not the code
QuocThangNguyen/deep-metric-learning-tsinghua-dogs/src/losses/triplet_margin_loss.py
pointer only (licence: NONE) · get_code("cad395d0f0392be7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, QuocThangNguyen/deep-metric-learning-tsinghua-dogs 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.

_triplet_loss Ran
ran, violated the contract we drafted
ArturPrzybysz/MNIST-siamese/src/siamese_model.py
pointer only (licence: NONE) · get_code("b26df70cb51686e3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ArturPrzybysz/MNIST-siamese 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.

_triplet_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ArturPrzybysz/siamese-CNN-cat-vs-dogs/src/siamese_model.py
pointer only (licence: NONE) · get_code("2b6e763932a22263")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ArturPrzybysz/siamese-CNN-cat-vs-dogs 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.

accuracy Ran
ran; our contract draft was wrong, not the code
saiamrit/Facenet-pytorch/models/utils/training.py
code served (permissive licence) · get_code("0cb3cf5e7b2e81ef")
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 tensors for the accuracy function
# logits: shape (batch_size, num_classes) - raw model outputs
# y: shape (batch_size,) - ground truth labels

batch_size = 2
num_classes = 4

logits = torch.randn(batch_size, num_classes)
y = torch.randint(0, num_classes, (batch_size,))

ARGS = {
    "logits": logits,
    "y": y
}
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
add_extension Ran
ran on a synthesized input
davidsandberg/facenet/src/lfw.py
code served (permissive licence) · get_code("344eae2e1ca14eab")
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 str. 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 os
import tempfile
from pathlib import Path

# Create a temporary directory with test image files
temp_dir = tempfile.mkdtemp()

# Create a .jpg file
jpg_path = os.path.join(temp_dir, "test_image.jpg")
with open(jpg_path, 'w') as f:
    f.write("fake jpg content")

# Create a .png file
png_path = os.path.join(temp_dir, "test_image2.png")
with open(png_path, 'w') as f:
    f.write("fake png content")

# Test path without extension that has a .jpg file
test_path_jpg = os.path.join(temp_dir, "test_image")

ARGS = {
    "path": test_path_jpg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
bbreg Ran
ran; our contract draft was wrong, not the code
saiamrit/Facenet-pytorch/models/utils/detect_face.py
code served (permissive licence) · get_code("affb8cd2d0d2a245")
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, 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)

# boundingbox: tensor of shape (batch, 5+) where columns 0-3 are bbox coordinates
# The function accesses columns 0, 1, 2, 3 and modifies them
boundingbox = torch.tensor([
    [10.0, 20.0, 50.0, 80.0, 1.0],
    [15.0, 25.0, 60.0, 90.0, 1.0]
], dtype=torch.float32)

# reg: tensor of regression offsets
# If reg.shape[1] == 1, it gets reshaped to (reg.shape[2], reg.shape[3])
# Otherwise it's used as-is with shape (batch, 4)
# We'll provide the case where shape[1] != 1, so it's (batch, 4)
reg = torch.tensor([
    [0.1, 0.2, 0.05, 0.15],
    [0.08, 0.12, 0.03, 0.1]
], dtype=torch.float32)

ARGS = {
    "boundingbox": boundingbox,
    "reg": reg
}
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, 5) — shape (2, 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
calculate_accuracy Ran
ran, honoured the contract we drafted
LKLQQ/FaceNet/src/eval_metrics.py
pointer only (licence: Apache-2.0); 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 (Apache-2.0), 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_accuracy Ran
ran on a synthesized input
altndrr/persona/src/utils/lfw.py
code served (permissive licence) · get_code("cafb190ef0100713")
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

# Construct arguments for calculate_accuracy
threshold = 0.5

# Create distance array - pairwise distances between embeddings
# np.less will compare these to threshold
dist = np.array([0.2, 0.7, 0.3, 0.9, 0.1, 0.8])

# Create actual_issame boolean array - ground truth labels
# True if pair is same person, False if different
actual_issame = np.array([True, False, True, False, True, False])

ARGS = {
    "threshold": threshold,
    "dist": dist,
    "actual_issame": actual_issame,
}
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
calculate_roc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LKLQQ/FaceNet/src/eval_metrics.py
code served (permissive licence) · get_code("ecb40e2478acb33f")
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 2, 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 numpy as np
from sklearn.model_selection import KFold

np.random.seed(0)

# Create sample data for the function
nrof_pairs = 20
nrof_thresholds = 5

# distances: array of distances between pairs
distances = np.random.rand(nrof_pairs).astype(np.float32)

# labels: binary array indicating if pairs are same (1) or different (0)
labels = np.random.randint(0, 2, nrof_pairs).astype(bool)

# thresholds: array of threshold values to test
thresholds = np.linspace(0.0, 1.0, nrof_thresholds)

# nrof_folds: number of folds for cross-validation
nrof_folds = 5

ARGS = {
    'thresholds': thresholds,
    'distances': distances,
    'labels': labels,
    'nrof_folds': nrof_folds
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
calculate_roc Ran
ran on a synthesized input
altndrr/persona/src/utils/lfw.py
code served (permissive licence) · get_code("198671905cf83bac")
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
import math
from sklearn.model_selection import KFold

# Set random seed for reproducibility
np.random.seed(0)

# Create small embeddings with distinct dimensions
# embeddings1 and embeddings2 should have shape (n_pairs, embedding_dim)
n_pairs = 10
embedding_dim = 4

embeddings1 = np.random.randn(n_pairs, embedding_dim).astype(np.float32)
embeddings2 = np.random.randn(n_pairs, embedding_dim).astype(np.float32)

# Create thresholds for ROC calculation
thresholds = np.linspace(0.0, 1.0, 5)

# Create actual_issame labels (boolean array indicating if pairs are the same person)
actual_issame = np.random.rand(n_pairs) > 0.5

# Number of folds for cross-validation
nrof_folds = 2

# Distance metric (0 for Euclidean, 1 for cosine)
distance_metric = 0

# Whether to subtract mean
subtract_mean = False

ARGS = {
    "thresholds": thresholds,
    "embeddings1": embeddings1,
    "embeddings2": embeddings2,
    "actual_issame": actual_issame,
    "nrof_folds": nrof_folds,
    "distance_metric": distance_metric,
    "subtract_mean": subtract_mean,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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
collate_pil Ran
ran; our contract draft was wrong, not the code
saiamrit/Facenet-pytorch/models/utils/training.py
code served (permissive licence) · get_code("10d0e8e67afff5b2")
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 torch
from PIL import Image
import io

torch.manual_seed(0)

# Create small PIL images as stand-ins for image data
def create_pil_image(size=(4, 3)):
    """Create a small PIL image"""
    img = Image.new('RGB', size, color=(73, 109, 137))
    return img

# Create sample data: list of (image, label) tuples
# The function expects an iterable of tuples where each tuple is (xx, yy)
sample_data = [
    (create_pil_image((4, 3)), 0),
    (create_pil_image((4, 3)), 1),
]

ARGS = {
    'x': sample_data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch — 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
collate_pil Ran
ran; our contract draft was wrong, not the code
altndrr/persona/src/utils/data.py
code served (permissive licence) · get_code("ac9c43a1519f689f")
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.

from PIL import Image
import torch

torch.manual_seed(0)

# Create small PIL images
img1 = Image.new('RGB', (4, 3), color='red')
img2 = Image.new('RGB', (4, 3), color='blue')

# Create labels
label1 = 0
label2 = 1

# Create a list of (image, label) tuples
x = [(img1, label1), (img2, label2)]

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch — 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
collate_triplet Ran
ran on a synthesized input
altndrr/persona/src/utils/data.py
code served (permissive licence) · get_code("40b236d03e48b89e")
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 torch
from typing import List, Tuple

torch.manual_seed(0)

# Create sample data matching the function signature
# batch: List[Tuple[List[Tensor], List[str]]]

# Each item in batch is a tuple of (List[Tensor], List[str])
# - List[Tensor]: a list of image tensors
# - List[str]: a list of class labels

sample_item_1 = (
    [torch.randn(4, 3), torch.randn(4, 3)],  # List of 2 tensors with shape (4, 3)
    ["class_a", "class_b"]  # List of 2 class strings
)

sample_item_2 = (
    [torch.randn(4, 3), torch.randn(4, 3)],  # List of 2 tensors with shape (4, 3)
    ["class_c", "class_d"]  # List of 2 class strings
)

batch = [sample_item_1, sample_item_2]

ARGS = {
    "batch": batch
}
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 — 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
contrastive_loss Ran
ran, violated the contract we drafted
fpleoni/its_all_in_the_family/source/facenet_take_2.py
pointer only (licence: NONE) · get_code("a29f1f1ec7d76f42")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, fpleoni/its_all_in_the_family 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.

conv2d_bn Ran
ran; our contract draft was wrong, not the code
sebastiaopamplona/msc-thesis-deepfsim/utils/models/facenet.py
pointer only (licence: NONE) · get_code("6c4df2f8f7ef8073")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sebastiaopamplona/msc-thesis-deepfsim 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.

conv_1x1_bn Ran
ran; our contract draft was wrong, not the code
altndrr/persona/src/models/mobilenet.py
pointer only (licence: MIT); the stored copy get_code serves, from chris-boson/fashion_mnist, is pointer only (licence: NONE) · get_code("db82a4013a44fb42")
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 chris-boson/fashion_mnist, 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.

conv_bn Ran
ran; our contract draft was wrong, not the code
altndrr/persona/src/models/mobilenet.py
pointer only (licence: MIT); the stored copy get_code serves, from chris-boson/fashion_mnist, is pointer only (licence: NONE) · get_code("84a4cf301e929085")
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 chris-boson/fashion_mnist, 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.

convert_classes_to_indexes Ran
ran on a synthesized input
altndrr/persona/src/utils/data.py
code served (permissive licence) · get_code("da754305b9332bd9")
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 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 torch

torch.manual_seed(0)

# The function takes:
# - labels: list of labels to convert
# - classes: list of all classes in the dataset
# 
# The function checks if all labels are in classes, and if so,
# converts them to their indexes in the classes list.

# Simple test case: labels are strings that exist in classes
labels = ["cat", "dog", "cat"]
classes = ["cat", "dog", "bird"]

ARGS = {
    "labels": labels,
    "classes": classes,
}
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 list, ndim 1, 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
distance Ran
ran on a synthesized input
altndrr/persona/src/utils/lfw.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
extract_data Ran
ran on a synthesized input
davidsandberg/facenet/tmp/mnist_center_loss.py
code served (permissive licence) · get_code("f239ee916030025a")
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, 28, 28, 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 gzip
import numpy as np
import io
import struct

IMAGE_SIZE = 28
NUM_CHANNELS = 1
PIXEL_DEPTH = 255

# Create a minimal gzip file containing synthetic image data
def create_fake_mnist_gz(num_images):
    """Create a fake gzipped MNIST-like file for testing."""
    # MNIST format: 16-byte header + image data
    header = struct.pack('>4I', 2051, num_images, IMAGE_SIZE, IMAGE_SIZE)
    
    # Generate random pixel data
    num_pixels = num_images * IMAGE_SIZE * IMAGE_SIZE * NUM_CHANNELS
    pixel_data = np.random.randint(0, 256, num_pixels, dtype=np.uint8).tobytes()
    
    # Combine header and pixel data
    full_data = header + pixel_data
    
    # Compress with gzip
    buf = io.BytesIO()
    with gzip.GzipFile(fileobj=buf, mode='wb') as gz:
        gz.write(full_data)
    
    # Return the gzipped bytes as a file-like object
    buf.seek(0)
    return buf

# Create a temporary gzip file path using BytesIO (no actual file I/O)
fake_gz_buffer = create_fake_mnist_gz(num_images=2)

# We need to monkey-patch gzip.open to return our buffer for this test
import gzip as gzip_module
_original_open = gzip_module.open

def mock_gzip_open(filename, *args, **kwargs):
    """Mock gzip.open to return our test buffer."""
    fake_gz_buffer.seek(0)
    return fake_gz_buffer

gzip_module.open = mock_gzip_open

ARGS = {
    'filename': 'dummy_mnist.gz',
    'num_images': 2
}
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, 28, 28, 1) — shape (2, 28, 28, 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
extract_labels Ran
ran on a synthesized input
davidsandberg/facenet/tmp/mnist_center_loss.py
code served (permissive licence) · get_code("1aa4a5e8c6ad354a")
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 int, shape (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 gzip
import numpy as np
import io

# Create a minimal gzip file containing label data
label_data = np.array([0, 1, 2, 3, 4], dtype=np.uint8)
buffer = io.BytesIO()
with gzip.GzipFile(fileobj=buffer, mode='wb') as gz:
    # Write 8-byte header (magic number + version)
    gz.write(b'\x00' * 8)
    # Write label data
    gz.write(label_data.tobytes())
buffer.seek(0)

# Save to a temporary file path (in memory via BytesIO workaround)
# For actual execution, we'll create a real temp file
import tempfile
import os

temp_dir = tempfile.gettempdir()
temp_file = os.path.join(temp_dir, 'test_labels.gz')

with gzip.open(temp_file, 'wb') as f:
    f.write(b'\x00' * 8)
    f.write(label_data.tobytes())

ARGS = {
    'filename': temp_file,
    'num_images': 5
}
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 int, shape (5,) — shape (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
eye_aspect_ratio Ran
ran on a synthesized input
M155K4R4/facenet/rec-feat.py
code served (permissive licence) · get_code("137ba90472b0d77a")
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 float, 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
import numpy as np
from scipy.spatial import distance

# The function eye_aspect_ratio expects 'eye' to be an array-like object
# with at least 6 elements (indices 0-5), where each element is a coordinate pair
# that can be passed to distance.euclidean

# Create a simple eye landmark array with 6 points, each as a 2D coordinate
eye = np.array([
    [0.0, 0.0],      # eye[0]
    [1.0, 2.0],      # eye[1]
    [2.0, 1.5],      # eye[2]
    [3.0, 0.1],      # eye[3]
    [2.5, 0.5],      # eye[4]
    [1.5, 1.0],      # eye[5]
])

ARGS = {
    "eye": eye
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
find_threshold Ran
ran on a synthesized input
davidsandberg/facenet/src/train_softmax.py
code served (permissive licence) · get_code("9a184a5877b32a7f")
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 float64, ndim 0, 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 numpy as np

# Create a sample distribution of values
np.random.seed(0)
var = np.random.normal(loc=50, scale=15, size=1000).astype(np.float32)

# Percentile value (0-100)
percentile = 75

ARGS = {
    "var": var,
    "percentile": percentile
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
fixed_image_standardization Ran
ran, violated the contract we drafted
saiamrit/Facenet-pytorch/models/mtcnn.py
code served (permissive licence) · get_code("f3274d8580b03de4")
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 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 torch

torch.manual_seed(0)

# The function takes an image_tensor and performs standardization
# image_tensor should be a torch.Tensor with numeric values
# The function subtracts 127.5 and divides by 128.0

image_tensor = torch.randint(0, 256, (2, 4, 3, 3), dtype=torch.float32)

ARGS = {
    "image_tensor": image_tensor
}
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 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
get_facenet_embedding Ran
ran, honoured the contract we drafted
EvgenyDyshlyuk/Deep_Learning_Face_Detection_Embeddings_Clustering/utils.py
pointer only (licence: NONE) · get_code("3d8cf0af3e77f06f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EvgenyDyshlyuk/Deep_Learning_Face_Detection_Embeddings_Clustering 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.

get_image_paths_and_labels Ran
ran on a synthesized input
davidsandberg/facenet/src/facenet.py
code served (permissive licence) · get_code("6a74ab1f515ebce3")
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 2, 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

class DatasetItem:
    def __init__(self, image_paths):
        self.image_paths = image_paths

class MockDataset:
    def __init__(self, items):
        self.items = items
    
    def __len__(self):
        return len(self.items)
    
    def __getitem__(self, idx):
        return self.items[idx]

dataset = MockDataset([
    DatasetItem(["path/to/image1.jpg", "path/to/image2.jpg"]),
    DatasetItem(["path/to/image3.jpg"]),
    DatasetItem(["path/to/image4.jpg", "path/to/image5.jpg", "path/to/image6.jpg"])
])

ARGS = {
    "dataset": dataset
}
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 2, 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

Showing the first 60. An agent gets every one from get_harvested_code_for_paper("1503.03832").

Also present in other papers' code

Of 154 samples lifted from this paper's linked repositories, 154 carry a function identity and 0 do not. Of the 144 distinct functions with an identity, 23 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 23 later) and 121 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
get_confirm_token 38 other papers
1 dated earlier, 37 later
1409.8230 (2014-09)
RENOIR - A Dataset for Real Low-Light Image Noise Reduction
1506.03134 (2015-06)
Pointer Networks
1607.06520 (2016-07)
Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddings
and 35 more not named here
calculate_accuracy 12 other papers
12 later
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
1705.02304 (2017-05)
Deep Speaker: an End-to-End Neural Speaker Embedding System
and 9 more not named here
make_divisible 12 other papers
12 later · 1 only as an assembly brick
1801.04381 (2018-01)
MobileNetV2: Inverted Residuals and Linear Bottlenecks
1811.08383 (2018-11)
TSM: Temporal Shift Module for Efficient Video Understanding
1812.00332 (2018-12)
ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware
and 9 more not named here
conv_1x1_bn 4 other papers
4 later
1812.00332 (2018-12)
ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware
1905.02244 (2019-05)
Searching for MobileNetV3
2001.00705 (2020-01)
Fractional Skipping: Towards Finer-Grained Dynamic CNN Inference
and 1 more not named here
conv_bn 4 other papers
4 later
1905.02244 (2019-05)
Searching for MobileNetV3
2001.00705 (2020-01)
Fractional Skipping: Towards Finer-Grained Dynamic CNN Inference
2009.09960 (2020-09)
Towards Fast, Accurate and Stable 3D Dense Face Alignment
and 1 more not named here
to_rgb 3 other papers
3 later
1801.07698 (2018-01)
ArcFace: Additive Angular Margin Loss for Deep Face Recognition
1903.08527 (2019-03)
Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set
2003.06814 (2020-03)
Towards Face Encryption by Generating Adversarial Identity Masks
fixed_image_standardization 2 other papers
2 later
1905.00641 (2019-05)
RetinaFace: Single-stage Dense Face Localisation in the Wild
2608.09633 (2026-08)
LoRA-based Adaptation Alone Is Not Enough: Understanding the Limits of Foundation Models for Face Presentation Attack Detection
prewhiten 2 other papers
2 later
1903.08527 (2019-03)
Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set
2608.09633 (2026-08)
LoRA-based Adaptation Alone Is Not Enough: Understanding the Limits of Foundation Models for Face Presentation Attack Detection
triplet_loss
brick of this paper's assembly: entry
2 other papers
2 later
1807.06708 (2018-07)
A Modulation Module for Multi-task Learning with Applications in Image Retrieval
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
InceptionResNetV1
brick of this paper's assembly: entry
1 other paper
1 later
1611.02200 (2016-11)
Unsupervised Cross-Domain Image Generation
accuracy 1 other paper
1 later
2608.09633 (2026-08)
LoRA-based Adaptation Alone Is Not Enough: Understanding the Limits of Foundation Models for Face Presentation Attack Detection
bbreg 1 other paper
1 later
2608.09633 (2026-08)
LoRA-based Adaptation Alone Is Not Enough: Understanding the Limits of Foundation Models for Face Presentation Attack Detection
calculate_roc 1 other paper
1 later
1703.07737 (2017-03)
In Defense of the Triplet Loss for Person Re-Identification
center_loss 1 other paper
1 later
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
collate_pil 1 other paper
1 later
2608.09633 (2026-08)
LoRA-based Adaptation Alone Is Not Enough: Understanding the Limits of Foundation Models for Face Presentation Attack Detection
conv2d_bn
brick of this paper's assembly: model
1 other paper
1 later
1611.02200 (2016-11)
Unsupervised Cross-Domain Image Generation
distance 1 other paper
1 later
2105.04714 (2021-05)
Sample and Computation Redistribution for Efficient Face Detection
fixed_batch_process 1 other paper
1 later
2608.09633 (2026-08)
LoRA-based Adaptation Alone Is Not Enough: Understanding the Limits of Foundation Models for Face Presentation Attack Detection
get_image_paths_and_labels 1 other paper
1 later
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
get_layer_indices 1 other paper
1 later
2608.09633 (2026-08)
LoRA-based Adaptation Alone Is Not Enough: Understanding the Limits of Foundation Models for Face Presentation Attack Detection

Shown: the 20 functions present in the most other papers. 3 more shared functions are not listed 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

More are linked than shown here.

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

Abstract

Despite significant recent advances in the field of face recognition [10,14,15,17], implementing face verification and recognition efficiently at scale presents serious challenges to current approaches. In this paper we present a system, called FaceNet, that directly learns a mapping from face images to a compact Euclidean space where distances directly correspond to a measure of face similarity. Once this space has been produced, tasks such as face recognition, verification and clustering can be easily implemented using standard techniques with FaceNet embeddings as feature vectors. Our method uses a deep convolutional network trained to directly optimize the embedding itself, rather than an intermediate bottleneck layer as in previous deep learning approaches. To train, we use triplets of roughly aligned matching / non-matching face patches generated using a novel online triplet mining method. The benefit of our approach is much greater representational efficiency: we achieve state-of-the-art face recognition performance using only 128-bytes per face. On the widely used Labeled Faces in the Wild (LFW) dataset, our system achieves a new record accuracy of 99.63%. On YouTube Faces DB it achieves 95.12%. Our system cuts the error rate in comparison to the best published result [15] by 30% on both datasets. We also introduce the concept of harmonic embeddings, and a harmonic triplet loss, which describe different versions of face embeddings (produced by different networks) that are compatible to each other and allow for direct comparison between each other.

For agents

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

get_harvested_code_for_paper("1503.03832")
get_code_for_paper("1503.03832")
have("1503.03832")

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

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

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

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

Connect an agent — have() is free.