SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.07259 · 2022

Self-Supervised Learning of Image Scale and Orientation

arXiv · PDF · Open in the Atlas

Code that ran

16 of 17 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 16 have no contract verdict; 0 failures of our instrument; 1 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/2206.07259.json · badge: /api/ran/2206.07259.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
bluedream1121/self-sca-ori canonical (classifier label)
classifier basis not recorded on the link
16 ran · 1 no recorded run
FunctionStatusWhere it lives
affine_matrix_decompose Ran
ran on a synthesized input
bluedream1121/self-sca-ori/datasets/hpatchespose_dataset_generation/generate_dataset.py
code served (permissive licence) · get_code("04e24de9f3e14521")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import math

# Examine the function to understand what it expects
# The function takes parameter 'h' and performs operations on it
# It accesses h[2][2], h[0][0], h[0][1], h[1][0], h[1][1]
# This suggests h is a 3x3 matrix (affine transformation matrix)

# Create a valid 3x3 affine transformation matrix
# We'll create a simple one that represents a combination of rotation, scaling, and shear
h = np.array([
    [2.0, 0.5, 10.0],
    [0.2, 1.5, 20.0],
    [0.0, 0.0, 1.0]
], dtype=np.float64)

ARGS = {
    'h': h
}
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, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
batchify_images Ran
ran on a synthesized input
bluedream1121/self-sca-ori/datasets/patchpose_dataset_generation/filter.py
code served (permissive licence) · get_code("3e2206d0d3490b04")
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 DataLoader. 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 numpy as np
from PIL import Image
import io

torch.manual_seed(0)

# Create small dummy images in memory
def create_dummy_image():
    """Create a small PIL Image without file I/O"""
    img_array = np.random.randint(0, 256, (4, 3, 3), dtype=np.uint8)
    img = Image.fromarray(img_array[0])
    return img

# Create temporary image files by converting PIL images to bytes
# and back, simulating image paths with actual image data
dummy_images = []
for i in range(2):
    img = create_dummy_image()
    # Store PIL images directly - we'll patch Image.open to return them
    dummy_images.append(img)

# Patch Image.open to return our dummy images without file I/O
original_open = Image.open
image_store = {i: dummy_images[i] for i in range(len(dummy_images))}

def mock_image_open(path):
    if path in image_store:
        return image_store[path]
    return original_open(path)

Image.open = mock_image_open

# Create paths that reference our stored images
img_paths = list(range(len(dummy_images)))

ARGS = {
    "img_paths": img_paths,
    "per_image": 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
degree_to_radian Ran
ran on a synthesized input
bluedream1121/self-sca-ori/utils/utils.py
code served (permissive licence) · get_code("4e885f332bb1786d")
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 numpy as np

def degree_to_radian(degree):
    return degree * np.pi / 180.0

ARGS = {
    "degree": 45.0
}
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 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
filter_image Ran
ran on a synthesized input
bluedream1121/self-sca-ori/datasets/patchpose_dataset_generation/data_generation.py
code served (permissive licence) · get_code("9960f5c0820bca9c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import cv2
import numpy as np
import tempfile
import os

# Create a temporary image file for testing
temp_dir = tempfile.mkdtemp()
img_array = np.random.randint(0, 255, (500, 600, 3), dtype=np.uint8)
img_path = os.path.join(temp_dir, "test_image.jpg")
cv2.imwrite(img_path, img_array)

ARGS = {
    "img_path": img_path,
    "patch_size": 32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_angle Ran
ran on a synthesized input
bluedream1121/self-sca-ori/datasets/patchpose.py
code served (permissive licence) · get_code("8504995598d37825")
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 torch

torch.manual_seed(0)

# The function expects im_name to be a string that contains 'angle' 
# followed by at least 3 characters
im_name = "image_angle_45_photo.jpg"

ARGS = {
    'im_name': im_name
}
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 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
get_scale Ran
ran on a synthesized input
bluedream1121/self-sca-ori/datasets/patchpose.py
code served (permissive licence) · get_code("5d0b0e6cdf6bc083")
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 torch

def get_scale(im_name):
    scale = im_name.split('scale')[1][:6]
    return scale

ARGS = {
    'im_name': 'image_scale123456_data.jpg'
}
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 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
js_divergence Ran
ran on a synthesized input
bluedream1121/self-sca-ori/model/loss.py
code served (permissive licence) · get_code("03e760ff39505b2f")
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, 4) 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 torch.nn as nn

torch.manual_seed(0)

# The function js_divergence takes two probability distributions (tensors)
# and computes the Jensen-Shannon divergence between them.
# Both p_gt and q_model_output should be probability distributions (tensors).

# Create two small probability distribution tensors
# Using shape (2, 4) - batch size 2, probability dimension 4
p_gt = torch.tensor([
    [0.25, 0.25, 0.25, 0.25],
    [0.1, 0.2, 0.3, 0.4]
], dtype=torch.float32)

q_model_output = torch.tensor([
    [0.2, 0.3, 0.25, 0.25],
    [0.15, 0.25, 0.25, 0.35]
], dtype=torch.float32)

ARGS = {
    "p_gt": p_gt,
    "q_model_output": q_model_output
}
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, 4) — shape (2, 4) 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
kl_div_temperature Ran
ran on a synthesized input
bluedream1121/self-sca-ori/model/loss.py
code served (permissive licence) · get_code("ac2636c1a3754c87")
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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for pred_p and pred_q
# The function expects 2D tensors (batch_size, num_classes)
# Using batch_size=2, num_classes=4 for distinct dimensions
pred_p = torch.randn(2, 4)
pred_q = torch.randn(2, 4)

# Temperature parameter - a positive scalar
T = 2.0

ARGS = {
    "pred_p": pred_p,
    "pred_q": pred_q,
    "T": T,
}
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
kl_divergence Ran
ran on a synthesized input
bluedream1121/self-sca-ori/model/loss.py
code served (permissive licence) · get_code("faec82d84dd41fae")
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, 4) 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)

# p and q are probability distributions (tensors)
# The function computes KL divergence element-wise
# Both should be probability tensors with values in [0, 1]

p = torch.tensor([[0.1, 0.2, 0.3, 0.4],
                   [0.25, 0.25, 0.25, 0.25]], dtype=torch.float32)

q = torch.tensor([[0.15, 0.25, 0.35, 0.25],
                   [0.2, 0.3, 0.2, 0.3]], dtype=torch.float32)

ARGS = {
    "p": p,
    "q": q
}
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, 4) — shape (2, 4) 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
normalize_gray_image Ran
ran on a synthesized input
bluedream1121/self-sca-ori/utils/utils.py
code served (permissive licence) · get_code("2e68501b20fdd75c")
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, 3, 32, 32) 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 torch.nn.functional as F

torch.manual_seed(0)

# The function takes a single parameter: image
# It expects a tensor with shape (B, C, H, W)
# B = batch size, C = channels, H = height, W = width

# Create a small test image tensor
# Using distinct sizes: batch=2, channels=3, height=4, width=5
image = torch.randn(2, 3, 4, 5)

ARGS = {
    "image": image
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, wandb — 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, 3, 32, 32) — shape (2, 3, 32, 32) 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
parse_txt Ran
ran on a synthesized input
bluedream1121/self-sca-ori/datasets/patchpose_dataset_generation/filter.py
code served (permissive licence) · get_code("b79a091074490ca4")
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 os
import tempfile

# Create a temporary directory and file for testing
temp_dir = tempfile.mkdtemp()
dataset_path = temp_dir

# Create a temporary text file with content
# Format: each line should have space-separated values where the second value is a relative path
temp_file = os.path.join(temp_dir, "test.txt")
with open(temp_file, 'w') as f:
    f.write("label1 image1.jpg\n")
    f.write("label2 subdir/image2.jpg\n")
    f.write("label3 image3.jpg\n")

# Define arguments
ARGS = {
    "path": temp_file,
    "dataset_path": dataset_path
}
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 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
radian_to_degree Ran
ran on a synthesized input
bluedream1121/self-sca-ori/utils/utils.py
code served (permissive licence) · get_code("0f4a86b47a992c7c")
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 (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function radian_to_degree takes a radian value and converts it to degrees
# It uses numpy's pi constant and performs simple arithmetic operations

# Create a small test value - a numpy array with a few radian values
radian_input = np.array([0.0, np.pi/2, np.pi, 2*np.pi])

ARGS = {
    "radian": radian_input
}
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 (4,) — shape (4,) 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
train_orientation Ran
ran on a synthesized input
bluedream1121/self-sca-ori/utils/train_utils.py
code served (permissive licence) · get_code("f9190e825e369214")
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
import math

torch.manual_seed(0)

# res_ori: tensor used in shift_vector_by_gt_float, argmax, and division
# Should be 2D (batch_size, num_orientations)
res_ori = torch.randn(2, 4)

# gt: tensor of shift values (floats) and used for shape[0] and comparison
# Should be 1D (batch_size,) with float values for shifting
gt = torch.tensor([0.5, 1.3])

# normalizer: callable that takes a tensor and returns a tensor
# Used as normalizer(tensor / temperature)
class Normalizer(nn.Module):
    def forward(self, x):
        return torch.nn.functional.normalize(x, p=2, dim=1)

normalizer = Normalizer()

# res_ori_aug: tensor similar to res_ori, used in argmax and criterion
res_ori_aug = torch.randn(2, 4)

# criterion: callable that takes two tensors and returns a loss tensor
# Should accept two tensors of same shape and return element-wise or batch losses
class SimpleCriterion(nn.Module):
    def forward(self, x, y):
        return torch.sum((x - y) ** 2, dim=1, keepdim=True)

criterion = SimpleCriterion()

# temperature: scalar float for division
temperature = 0.1

ARGS = {
    "res_ori": res_ori,
    "gt": gt,
    "normalizer": normalizer,
    "res_ori_aug": res_ori_aug,
    "criterion": criterion,
    "temperature": temperature,
}
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
train_scale Ran
ran on a synthesized input
bluedream1121/self-sca-ori/utils/train_utils.py
code served (permissive licence) · get_code("f2f3a5e3671d8d0d")
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. 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
import math

torch.manual_seed(0)

# Build a normalizer that implements __call__ and works with division
class Normalizer(nn.Module):
    def __init__(self):
        super().__init__()
    
    def forward(self, x):
        # Simple L2 normalization
        return x / (torch.norm(x, dim=1, keepdim=True) + 1e-8)

# Build a criterion that takes two inputs and returns per-sample loss
class SimpleCriterion(nn.Module):
    def __init__(self):
        super().__init__()
    
    def forward(self, x, y):
        # Return per-sample loss (batch_size,)
        return torch.sum((x - y) ** 2, dim=1)

# Create batch size 2, vector dimension 4
batch_size = 2
vec_dim = 4

# res_sca: shape (2, 4) - logits or scores
res_sca = torch.randn(batch_size, vec_dim)

# gt: shape (2,) - ground truth shifts as floats
gt = torch.tensor([0.5, -1.3])

# normalizer: callable that normalizes input
normalizer = Normalizer()

# res_sca_aug: shape (2, 4) - augmented version of res_sca
res_sca_aug = torch.randn(batch_size, vec_dim)

# criterion: callable that takes two tensors and returns loss
criterion = SimpleCriterion()

# temperature: scalar float for temperature scaling
temperature = 0.5

ARGS = {
    'res_sca': res_sca,
    'gt': gt,
    'normalizer': normalizer,
    'res_sca_aug': res_sca_aug,
    'criterion': criterion,
    'temperature': temperature
}
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
warpPerspectivePoint Ran
ran on a synthesized input
bluedream1121/self-sca-ori/datasets/hpatchespose_dataset_generation/generate_dataset.py
code served (permissive licence) · get_code("fb88dd9920bc567c")
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

# src_point should be a 2D point (x, y) as a numpy array
src_point = np.array([10.0, 20.0])

# H should be a 3x3 homography matrix
H = np.array([
    [1.5, 0.1, 5.0],
    [0.2, 1.3, 10.0],
    [0.001, 0.002, 1.0]
], dtype=np.float64)

ARGS = {
    "src_point": src_point,
    "H": H
}
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
warpPerspectivePoints Ran
ran on a synthesized input
bluedream1121/self-sca-ori/datasets/hpatchespose_dataset_generation/generate_dataset.py
code served (permissive licence) · get_code("d9804a709b95d01e")
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 2, dtype family float, shape (2, 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

# Construct valid arguments for warpPerspectivePoints
# The function expects:
# - src_points: array of shape (N, 2) containing 2D source points
# - H: a 3x3 homography matrix

# Create source points: N points with 2D coordinates
src_points = np.array([
    [10.0, 20.0],
    [30.0, 40.0]
], dtype=np.float32)

# Create a 3x3 homography matrix
H = np.array([
    [1.2, 0.1, 5.0],
    [0.05, 1.1, 10.0],
    [0.001, 0.002, 1.0]
], dtype=np.float32)

ARGS = {
    "src_points": src_points,
    "H": H
}
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 2, dtype family float, shape (2, 2) — shape (2, 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
train Not yet run
unverified (harvested, no recorded run)
bluedream1121/self-sca-ori/utils/train_utils.py
code served (permissive licence) · get_code("b2c877f2f6fc170a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 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 17 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

We study the problem of learning to assign a characteristic pose, i.e., scale and orientation, for an image region of interest. Despite its apparent simplicity, the problem is non-trivial; it is hard to obtain a large-scale set of image regions with explicit pose annotations that a model directly learns from. To tackle the issue, we propose a self-supervised learning framework with a histogram alignment technique. It generates pairs of image patches by random rescaling/rotating and then train an estimator to predict their scale/orientation values so that their relative difference is consistent with the rescaling/rotating used. The estimator learns to predict a non-parametric histogram distribution of scale/orientation without any supervision. Experiments show that it significantly outperforms previous methods in scale/orientation estimation and also improves image matching and 6 DoF camera pose estimation by incorporating our patch poses into a matching process.

For agents

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

get_harvested_code_for_paper("2206.07259")
get_code_for_paper("2206.07259")
have("2206.07259")

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

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

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

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

Connect an agent — have() is free.