SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.17823 · ECCV · 2024

Efficient Image Pre-Training with Siamese Cropped Masked Autoencoders

Bernard Ghanem, Silvio Giancola, Alexandre Eymaël, Renaud Vandeghen, Anthony Cioppa, Marc Van Droogenbroeck

arXiv · PDF · Open in the Atlas

Code that ran

3 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 4 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/2403.17823.json · badge: /api/ran/2403.17823.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
alexandre-eymael/cropmae canonical (classifier label)
classifier basis: census
3 ran · 4 no recorded run
FunctionStatusWhere it lives
create_blank_image Ran
ran; our contract draft was wrong, not the code
alexandre-eymael/cropmae/misc/util.py
code served (permissive licence) · get_code("fd90af86a74696fc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family int, shape (2, 4, 3) as a later run recorded it. 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, 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 creates a blank image tensor with specified dimensions
# dims should be a tuple or list specifying the shape
# device is a string specifying the device (default 'cuda')

ARGS = {
    'dims': (2, 4, 3),
    'device': 'cpu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family int, shape (2, 4, 3) — shape (2, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
evaluate_on_davis Ran
ran; our contract draft was wrong, not the code
alexandre-eymael/cropmae/downstreams/propagation/start.py
code served (permissive licence) · get_code("ec8de49a4b0b9deb")
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 dict. 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
from argparse import Namespace
import tempfile
import os
import csv

torch.manual_seed(0)

# Create temporary directories for the mock pipeline
temp_dir = tempfile.mkdtemp()
results_dir = os.path.join(temp_dir, 'results')
os.makedirs(results_dir, exist_ok=True)

# Create a mock results CSV file that will be read by evaluation_davis
results_csv = os.path.join(results_dir, 'results.csv')
with open(results_csv, 'w', newline='') as f:
    writer = csv.writer(f)
    writer.writerow(['J&F-Mean', 'J-Mean', 'J-Recall', 'J-Decay', 'F-Mean', 'F-Recall', 'F-Decay'])
    writer.writerow(['0.506', '0.478', '0.540', '0.220', '0.533', '0.619', '0.270'])

# Create mock filelist
filelist_path = os.path.join(temp_dir, 'filelist.txt')
with open(filelist_path, 'w') as f:
    f.write('video1.mp4\n')
    f.write('video2.mp4\n')

# Mock the imported functions that are called but not defined
def label_propagation(args):
    return None

def convert_davis(args):
    return None

def evaluation_davis(args):
    return results_csv

# Inject mocks into the module
import sys
current_module = sys.modules[__name__]
current_module.label_propagation = label_propagation
current_module.convert_davis = convert_davis
current_module.evaluation_davis = evaluation_davis

# Construct arguments for evaluate_on_davis
label_prop_args = {
    'model_type': 'vits16',
    'resume': '',
    'save_path': results_dir,
    'temperature': 0.7,
    'topk': 7,
    'radius': 20,
    'video_len': 20,
    'filelist': filelist_path,
    'crop_size': [480, 880]
}

conversion_davis_args = {
    'out_folder': os.path.join(temp_dir, 'out'),
    'in_folder': os.path.join(temp_dir, 'in'),
    'dataset': 'davis',
    'set': 'val'
}

evaluation_davis_args = {
    'davis_path': os.path.join(temp_dir, 'davis'),
    'set': 'val',
    'task': 'unsupervised',
    'results_path': results_dir
}

ARGS = {
    'label_prop_args': label_prop_args,
    'conversion_davis_args': conversion_davis_args,
    'evaluation_davis_args': evaluation_davis_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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
run_one_image_mae Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
alexandre-eymael/cropmae/misc/util.py
code served (permissive licence) · get_code("5ab50bab8a11be05")
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
import torch.nn as nn
from torchvision.utils import make_grid

torch.manual_seed(0)

# Create a minimal MAE model that satisfies the function's requirements
class MinimalMAE(nn.Module):
    def __init__(self):
        super().__init__()
        self.patch_embed = nn.Module()
        self.patch_embed.patch_size = (4, 4)  # patch_size[0] = 4
    
    def unpatchify(self, x):
        # x shape: (N, num_patches, patch_size[0]^2 * 3)
        # Should return (N, C, H, W)
        N = x.shape[0]
        # Reshape to (N, H_patches, W_patches, patch_size[0], patch_size[0], 3)
        # Then rearrange to (N, 3, H, W)
        patch_size = self.patch_embed.patch_size[0]
        num_patches = x.shape[1]
        
        # Assuming square patches: num_patches = (H/patch_size) * (W/patch_size)
        patches_per_side = int(num_patches ** 0.5)
        patch_dim = patch_size * patch_size * 3
        
        # x: (N, num_patches, patch_dim)
        x = x.reshape(N, patches_per_side, patches_per_side, patch_size, patch_size, 3)
        # Rearrange to (N, 3, patches_per_side*patch_size, patches_per_side*patch_size)
        x = x.permute(0, 5, 1, 3, 2, 4)  # (N, 3, patches_per_side, patch_size, patches_per_side, patch_size)
        x = x.reshape(N, 3, patches_per_side * patch_size, patches_per_side * patch_size)
        return x

# Create model
model = MinimalMAE()

# Create test tensors
# img: (batch, C, H, W) - normalized to [-1, 1] or [0, 1]
# For ImageNet, values are typically in [0, 1] before denormalization
img = torch.randn(2, 3, 16, 16) * 0.5 + 0.5  # Keep in reasonable range

# pred: (batch, num_patches, patch_dim) where patch_dim = patch_size^2 * 3 = 16 * 3 = 48
# num_patches should match the image patches: (16/4) * (16/4) = 16
num_patches = 16
patch_dim = 4 * 4 * 3
pred = torch.randn(2, num_patches, patch_dim) * 0.5 + 0.5

# mask: (batch, num_patches)
mask = torch.randint(0, 2, (2, num_patches)).float()

ARGS = {
    'model': model,
    'img': img,
    'pred': pred,
    'mask': mask,
}
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 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
evaluate_on_jhmdb Not yet run
unverified (harvested, no recorded run)
alexandre-eymael/cropmae/downstreams/propagation/start.py
code served (permissive licence) · get_code("3a14f8ea402d70f1")
How it ran

no invocation recorded.

evaluate_on_vip Not yet run
unverified (harvested, no recorded run)
alexandre-eymael/cropmae/downstreams/propagation/start.py
code served (permissive licence) · get_code("1feb343d9d220faa")
How it ran

no invocation recorded.

main Not yet run
unverified (harvested, no recorded run)
alexandre-eymael/cropmae/downstreams/propagation/davis_evaluation/evaluation_method.py
code served (permissive licence) · get_code("718a42749c76f61d")
How it ran

no invocation recorded.

parse_img Not yet run
unverified (harvested, no recorded run)
alexandre-eymael/cropmae/misc/util.py
code served (permissive licence) · get_code("ce9e09b03e8c96de")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 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.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

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

Abstract

Self-supervised pre-training of image encoders is omnipresent in the literature, particularly following the introduction of Masked autoencoders (MAE). Current efforts attempt to learn object-centric representations from motion in videos. In particular, SiamMAE recently introduced a Siamese network, training a shared-weight encoder from two frames of a video with a high asymmetric masking ratio (95%). In this work, we propose CropMAE, an alternative approach to the Siamese pre-training introduced by SiamMAE. Our method specifically differs by exclusively considering pairs of cropped images sourced from the same image but cropped differently, deviating from the conventional pairs of frames extracted from a video. CropMAE therefore alleviates the need for video datasets, while maintaining competitive performances and drastically reducing pre-training and learning time. Furthermore, we demonstrate that CropMAE learns similar object-centric representations without explicit motion, showing that current self-supervised learning methods do not learn such representations from explicit object motion, but rather thanks to the implicit image transformations that occur between the two views. Finally, CropMAE achieves the highest masking ratio to date (98.5%), enabling the reconstruction of images using only two visible patches. Our code is available at https://github.com/alexandreeymael/CropMAE.

For agents

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

get_harvested_code_for_paper("2403.17823")
get_code_for_paper("2403.17823")
have("2403.17823")

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

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

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

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

Connect an agent — have() is free.