SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2003.10071 · 2020

ASLFeat: Learning Local Features of Accurate Shape and Localization

arXiv · PDF · Open in the Atlas

Code that ran

6 of 16 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 6 have no contract verdict; 0 failures of our instrument; 10 no recorded run), measured 2026-11-21; 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/2003.10071.json · badge: /api/ran/2003.10071.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
lzx551402/ASLFeat canonical (classifier label)
classifier basis: census
2 ran · 1 no recorded run
YanLiqi/HAF community (classifier label)
classifier basis not recorded on the link
2 ran · 5 no recorded run
goodproj13/DenserNet community (classifier label)
classifier basis not recorded on the link
2 ran · 4 no recorded run
FunctionStatusWhere it lives
get_pairwise_distance Ran
ran on a synthesized input
goodproj13/DenserNet/DN/evaluators.py
code served (permissive licence) · get_code("d7e25625fc8bf01b")
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 torch.distributed as dist

torch.manual_seed(0)

# Mock metric class with transform method
class MockMetric:
    def transform(self, x):
        # Simple passthrough transformation
        return x

# Test Case 1: With query and gallery (most common path)
# Create feature dictionary
features_dict = {
    'feat_0': torch.randn(4),
    'feat_1': torch.randn(4),
    'feat_2': torch.randn(4),
    'feat_3': torch.randn(4),
}

# Query: list of tuples (feature_key, additional_info_1, additional_info_2, additional_info_3)
query = [
    ('feat_0', 1, 2, 3),
    ('feat_1', 4, 5, 6),
]

# Gallery: list of tuples with same structure
gallery = [
    ('feat_2', 7, 8, 9),
    ('feat_3', 10, 11, 12),
]

# Metric (optional)
metric = MockMetric()

# Mock dist.get_rank() to return 0
original_get_rank = dist.get_rank
dist.get_rank = lambda: 0

ARGS = {
    'features': features_dict,
    'query': query,
    'gallery': gallery,
    'metric': metric,
}
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
interpolate Ran
ran on a synthesized input
lzx551402/ASLFeat/models/cnn_wrapper/aslfeat.py
code served (permissive licence) · get_code("82dfc189380fb5bd")
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 EagerTensor, ndim 3, dtype family float, shape (2, 5, 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 tensorflow as tf

# Seed for reproducibility
tf.random.set_seed(0)

# Create small test tensors
batch_size = 2
height = 4
width = 3
num_points = 5
channels = 2

# pos: shape (batch_size, num_points, 2) - contains (i, j) coordinates
# Coordinates should be within valid range [0, height) and [0, width)
pos = tf.constant([
    [[0.5, 0.5], [1.2, 1.3], [2.1, 0.8], [3.0, 2.5], [1.5, 1.5]],
    [[0.3, 1.1], [2.5, 2.0], [1.8, 0.5], [0.7, 2.2], [3.2, 1.9]]
], dtype=tf.float32)

# inputs: shape (batch_size, height, width, channels) - 2D spatial data with channels
inputs = tf.random.normal([batch_size, height, width, channels], dtype=tf.float32)

ARGS = {
    "pos": pos,
    "inputs": inputs,
    "batched": True,
    "nd": True
}
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 EagerTensor, ndim 3, dtype family float, shape (2, 5, 2) — shape (2, 5, 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
load_imgs Ran
ran on a synthesized input
lzx551402/ASLFeat/image_matching.py
code served (permissive licence) · get_code("8fe7b3b94d2d69d2")
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 temporary image files for testing
temp_dir = tempfile.mkdtemp()

# Create a simple test image (BGR format, as cv2.imread returns BGR)
img_data = np.random.randint(0, 256, (10, 15, 3), dtype=np.uint8)
img_path_1 = os.path.join(temp_dir, "test_img_1.png")
cv2.imwrite(img_path_1, img_data)

# Create another test image with different dimensions
img_data_2 = np.random.randint(0, 256, (12, 18, 3), dtype=np.uint8)
img_path_2 = os.path.join(temp_dir, "test_img_2.png")
cv2.imwrite(img_path_2, img_data_2)

ARGS = {
    "img_paths": [img_path_1, img_path_2],
    "max_dim": 64
}
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
re_ranking Ran
ran on a synthesized input
YanLiqi/HAF/haf/utils/rerank.py
code served (permissive licence) · get_code("a8f824c0c17375f8")
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, 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

# Create small distance matrices for testing
# q_g_dist: query-to-gallery distance matrix (num_queries x num_gallery)
num_queries = 2
num_gallery = 3

q_g_dist = np.random.rand(num_queries, num_gallery).astype(np.float32)

# q_q_dist: query-to-query distance matrix (num_queries x num_queries)
q_q_dist = np.random.rand(num_queries, num_queries).astype(np.float32)

# g_g_dist: gallery-to-gallery distance matrix (num_gallery x num_gallery)
g_g_dist = np.random.rand(num_gallery, num_gallery).astype(np.float32)

ARGS = {
    'q_g_dist': q_g_dist,
    'q_q_dist': q_q_dist,
    'g_g_dist': g_g_dist,
    'k1': 20,
    'k2': 6,
    'lambda_value': 0.3
}
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, 3) — shape (2, 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
simple_group_split Ran
ran on a synthesized input
YanLiqi/HAF/haf/utils/dist_utils.py
code served (permissive licence) · get_code("f4c65c4339ed7ceb")
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 MagicMock. 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 torch
import torch.distributed as dist
from unittest.mock import MagicMock, patch

torch.manual_seed(0)

# Mock torch.distributed.new_group to avoid actual distributed setup
original_new_group = dist.new_group

def mock_new_group(ranks):
    """Mock that returns a group object without requiring actual distributed initialization"""
    mock_group = MagicMock()
    mock_group.ranks = ranks
    return mock_group

# Patch dist.new_group for this setup
dist.new_group = mock_new_group

ARGS = {
    "world_size": 8,
    "rank": 2,
    "num_groups": 4
}
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 MagicMock — a MagicMock output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MagicMock output the recorded ndim 1 and dtype family None 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
spatial_nms Ran
ran on a synthesized input
goodproj13/DenserNet/DN/evaluators.py
code served (permissive licence) · get_code("247a6c84cda8cf07")
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
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - pred: indexed with [:topN] and then indexed by elements from pred_select
#   appears to be a list or array-like of indices
# - db_ids: indexed by elements from pred, should be a list/array mapping indices to IDs
# - topN: an integer used for slicing

# pred should be indices (0, 1, 2, ...)
# db_ids should map those indices to some ID values
# The function filters predictions to top N, then removes duplicates based on db_ids

pred = [0, 1, 2, 3, 4]  # indices of predictions, ranked by some score
db_ids = [10, 20, 10, 30, 20]  # database IDs corresponding to each prediction index
topN = 3  # take top 3 predictions

ARGS = {
    "pred": pred,
    "db_ids": db_ids,
    "topN": topN
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family 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
batch_gd Not yet run
unverified (harvested, no recorded run)
goodproj13/DenserNet/Feature_branch.py
code served (permissive licence) · get_code("358ad44f91386dcc")
How it ran

no invocation recorded.

dict_update Not yet run
unverified (harvested, no recorded run)
lzx551402/ASLFeat/models/base_model.py
code served (permissive licence) · get_code("a6ca6088ad6fd123")
How it ran

no invocation recorded.

extract_cnn_feature Not yet run
unverified (harvested, no recorded run)
YanLiqi/HAF/haf/evaluators.py
code served (permissive licence) · get_code("3be405dcdbc9cbf3")
How it ran

no invocation recorded.

extract_features Not yet run
unverified (harvested, no recorded run)
YanLiqi/HAF/haf/evaluators.py
code served (permissive licence) · get_code("cff5e5721c260016")
How it ran

no invocation recorded.

feature_extraction Not yet run
unverified (harvested, no recorded run)
goodproj13/DenserNet/DN/evaluators.py
code served (permissive licence) · get_code("30ff7d86a16ec5a8")
How it ran

no invocation recorded.

get_dbStruct Not yet run
unverified (harvested, no recorded run)
goodproj13/DenserNet/DN/datasets/pitts.py
code served (permissive licence) · get_code("652d7c5f5b80490e")
How it ran

no invocation recorded.

get_dbStruct Not yet run
unverified (harvested, no recorded run)
goodproj13/DenserNet/DN/datasets/tokyo.py
code served (permissive licence) · get_code("38fa36efe8ffa615")
How it ran

no invocation recorded.

pairwise_distance Not yet run
unverified (harvested, no recorded run)
YanLiqi/HAF/haf/evaluators.py
code served (permissive licence) · get_code("317b792ea6d8b64d")
How it ran

no invocation recorded.

parse_dbStruct Not yet run
unverified (harvested, no recorded run)
YanLiqi/HAF/haf/datasets/pitts.py
code served (permissive licence) · get_code("b2e3b38428408a01")
How it ran

no invocation recorded.

parse_dbStruct Not yet run
unverified (harvested, no recorded run)
YanLiqi/HAF/haf/datasets/tokyo.py
code served (permissive licence) · get_code("84b7415514e92005")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 5 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 5 later) and 11 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
extract_cnn_feature 1 other paper
1 later
2006.03926 (2020-06)
Self-supervising Fine-grained Region Similarities for Large-scale Image Localization
pairwise_distance 1 other paper
1 later
2006.03926 (2020-06)
Self-supervising Fine-grained Region Similarities for Large-scale Image Localization
parse_dbStruct 1 other paper
1 later
2006.03926 (2020-06)
Self-supervising Fine-grained Region Similarities for Large-scale Image Localization
parse_dbStruct 1 other paper
1 later
2006.03926 (2020-06)
Self-supervising Fine-grained Region Similarities for Large-scale Image Localization
simple_group_split 1 other paper
1 later
2006.03926 (2020-06)
Self-supervising Fine-grained Region Similarities for Large-scale Image Localization

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

Repositories linked to this paper

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

Abstract

This work focuses on mitigating two limitations in the joint learning of local feature detectors and descriptors. First, the ability to estimate the local shape (scale, orientation, etc.) of feature points is often neglected during dense feature extraction, while the shape-awareness is crucial to acquire stronger geometric invariance. Second, the localization accuracy of detected keypoints is not sufficient to reliably recover camera geometry, which has become the bottleneck in tasks such as 3D reconstruction. In this paper, we present ASLFeat, with three light-weight yet effective modifications to mitigate above issues. First, we resort to deformable convolutional networks to densely estimate and apply local transformation. Second, we take advantage of the inherent feature hierarchy to restore spatial resolution and low-level details for accurate keypoint localization. Finally, we use a peakiness measurement to relate feature responses and derive more indicative detection scores. The effect of each modification is thoroughly studied, and the evaluation is extensively conducted across a variety of practical scenarios. State-of-the-art results are reported that demonstrate the superiority of our methods.

For agents

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

get_harvested_code_for_paper("2003.10071")
get_code_for_paper("2003.10071")
have("2003.10071")

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

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

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

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

Connect an agent — have() is free.