SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2107.07695 · 2021

Self-supervised Representation Learning Framework for Remote Physiological Measurement Using Spatiotemporal Augmentation Loss

arXiv · PDF · Open in the Atlas

Code that ran

3 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 2 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2107.07695.json · badge: /api/ran/2107.07695.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
Dylan-H-Wang/SLF-RPM canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
FunctionStatusWhere it lives
align_face Ran
ran on a synthesized input
Dylan-H-Wang/SLF-RPM/utils/utils.py
code served (permissive licence) · get_code("98c067d9bcd56ac1")
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 5, dtype family int, shape (2, 7, 64, 64, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

class MockFaceAlignment:
    """Mock face alignment detector that returns landmarks."""
    def get_landmarks(self, frame):
        # Return 68 landmarks (standard dlib format) for a face
        # Each landmark is (y, x) coordinate
        h, w = frame.shape[:2]
        # Create a simple face-like landmark pattern
        landmarks = np.array([
            [h//4, w//6], [h//4, w//5], [h//4, w//4], [h//4, w//3], [h//4, 2*w//5],  # 0-4: jaw left
            [h//4, 3*w//5], [h//4, 4*w//5], [h//4, 5*w//6],  # 5-7: more jaw
            [h//3, 5*w//6], [h//3, 4*w//5], [h//3, 3*w//5], [h//3, 2*w//5],  # 8-11: jaw right
            [h//3, w//3], [h//3, w//4], [h//3, w//5], [h//3, w//6],  # 12-15: more jaw
            [h//5, w//8], [h//5, w//7], [h//5, w//6], [h//5, w//5], [h//5, 2*w//5],  # 16-20: forehead
            [h//5, 3*w//5], [h//5, 4*w//5], [h//5, 5*w//6], [h//5, 6*w//7], [h//5, 7*w//8],  # 21-25: more forehead
            [h//5, 7*w//8],  # 26
            [h//6, w//3], [h//6, w//3], [h//6, w//3], [h//6, w//3],  # 27-30: nose
            [h//6, w//3], [h//3, w//6],  # 31: nose bottom, left cheek
            [h//7, 2*w//5], [h//7, 3*w//5],  # 33-34: left eye
            [h//7, 2*w//5], [h//7, 3*w//5],  # 35-36: left eye
            [h//8, 2*w//5], [h//8, 2.2*w//5], [h//8, 2.4*w//5],  # 37-39: left eye
            [h//7, 2.2*w//5], [h//7, 2.4*w//5], [h//7, 2.6*w//5],  # 40-42: left eye
            [h//8, 3*w//5], [h//8, 3.2*w//5], [h//8, 3.4*w//5],  # 43-45: right eye
            [h//7, 3.2*w//5], [h//7, 3.4*w//5], [h//7, 3.6*w//5],  # 46-48: right eye
            [h//3, w//2], [h//3, w//2], [h//3, w//2],  # 48-50: mouth
            [h//3, w//2], [h//3, w//2], [h//3, w//2],  # 51-53: mouth
            [h//3, w//3], [h//3, w//2], [h//3, 2*w//3],  # 54-56: mouth outer
            [h//3, 2*w//3], [h//3, w//2], [h//3, w//3],  # 57-59: mouth outer
            [h//3, w//2], [h//3, w//2], [h//3, w//2], [h//3, w//2], [h//3, w//2], [h//3, w//2], [h//3, w//2], [h//3, w//2],  # 60-67: mouth/chin
        ], dtype=np.float32)
        # Ensure we have exactly 68 landmarks
        while landmarks.shape[0] < 68:
            landmarks = np.vstack([landmarks, landmarks[-1:]])
        return [landmarks[:68]]

# Create small test frames
frames = np.random.randint(0, 256, size=(2, 96, 96, 3), dtype=np.uint8)

# Create mock face alignment detector
fa = MockFaceAlignment()

ARGS = {
    "frames": frames,
    "fa": fa,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, scipy, skimage — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 5, dtype family int, shape (2, 7, 64, 64, 3) — shape (2, 7, 64, 64, 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
conv1x1x1 Ran
ran; our contract draft was wrong, not the code
Dylan-H-Wang/SLF-RPM/models/resnet3d.py
code served (permissive licence) · get_code("213ccc8fb87ee8d9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Conv3d. 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)

# The function conv1x1x1 takes in_planes, out_planes, and stride parameters
# in_planes: number of input channels
# out_planes: number of output channels
# stride: stride for the convolution (default=1)

in_planes = 3
out_planes = 5
stride = 2

ARGS = {
    'in_planes': in_planes,
    'out_planes': out_planes,
    'stride': stride
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv3d — a Conv3d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv3d 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
conv3x3x3 Ran
ran; our contract draft was wrong, not the code
Dylan-H-Wang/SLF-RPM/models/resnet3d.py
code served (permissive licence) · get_code("c3b215555357b9d1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Conv3d. 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)

# The function conv3x3x3 creates a 3D convolution layer
# Parameters:
# - in_planes: number of input channels
# - out_planes: number of output channels  
# - stride: stride for the convolution (default=1)

# We need to provide distinct values for in_planes and out_planes
in_planes = 3
out_planes = 5
stride = 2

ARGS = {
    'in_planes': in_planes,
    'out_planes': out_planes,
    'stride': stride
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv3d — a Conv3d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv3d 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
extract_hr_from_ecg Not yet run
unverified (harvested, no recorded run)
Dylan-H-Wang/SLF-RPM/utils/utils.py
code served (permissive licence) · get_code("88714ddc04f23d3b")
How it ran

no invocation recorded.

extract_video_frame Not yet run
unverified (harvested, no recorded run)
Dylan-H-Wang/SLF-RPM/utils/utils.py
code served (permissive licence) · get_code("37c1f493166d33e0")
How it ran

no invocation recorded.

generate_model Not yet run
unverified (harvested, no recorded run)
Dylan-H-Wang/SLF-RPM/models/resnet3d.py
code served (permissive licence) · get_code("4ef93b145bd228db")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 later) and 3 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
conv3x3x3 19 other papers
11 dated earlier, 8 later
1711.08580 (2017-11)
3D Anisotropic Hybrid Network: Transferring Convolutional Features from 2D Images to 3D Anisotropic Volumes
1711.09577 (2017-11)
Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?
1908.01373 (2019-08)
Unsupervised Microvascular Image Segmentation Using an Active Contours Mimicking Neural Network
and 16 more not named here
conv1x1x1 6 other papers
3 dated earlier, 3 later · 1 only as an assembly brick
1711.09577 (2017-11)
Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?
2003.10432 (2020-03)
Atlas: End-to-End 3D Scene Reconstruction from Posed Images
2004.04968 (2020-04)
Would Mega-scale Datasets Further Enhance Spatiotemporal 3D CNNs?
and 3 more not named here
generate_model 3 other papers
2 dated earlier, 1 later
1711.09577 (2017-11)
Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?
2004.04968 (2020-04)
Would Mega-scale Datasets Further Enhance Spatiotemporal 3D CNNs?
2108.02183 (2021-08)
Enhancing Self-supervised Video Representation Learning via Multi-level Feature Optimization

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-23.

Repositories linked to this paper

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

Abstract

Recent advances in supervised deep learning methods are enabling remote measurements of photoplethysmography-based physiological signals using facial videos. The performance of these supervised methods, however, are dependent on the availability of large labelled data. Contrastive learning as a self-supervised method has recently achieved state-of-the-art performances in learning representative data features by maximising mutual information between different augmented views. However, existing data augmentation techniques for contrastive learning are not designed to learn physiological signals from videos and often fail when there are complicated noise and subtle and periodic colour or shape variations between video frames. To address these problems, we present a novel self-supervised spatiotemporal learning framework for remote physiological signal representation learning, where there is a lack of labelled training data. Firstly, we propose a landmark-based spatial augmentation that splits the face into several informative parts based on the Shafer dichromatic reflection model to characterise subtle skin colour fluctuations. We also formulate a sparsity-based temporal augmentation exploiting Nyquist-Shannon sampling theorem to effectively capture periodic temporal changes by modelling physiological signal features. Furthermore, we introduce a constrained spatiotemporal loss which generates pseudo-labels for augmented video clips. It is used to regulate the training process and handle complicated noise. We evaluated our framework on 3 public datasets and demonstrated superior performances than other self-supervised methods and achieved competitive accuracy compared to the state-of-the-art supervised methods.

For agents

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

get_harvested_code_for_paper("2107.07695")
get_code_for_paper("2107.07695")
have("2107.07695")

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

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

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

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

Connect an agent — have() is free.