SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.15444 · CVPR · 2023

Quantum Multi-Model Fitting

Elisa Ricci, Fondazione Kessler, Luca Magri, Matteo Farina, Willi Menapace, Vladislav Golyanik, Federica Arrigoni

arXiv · PDF · Open in the Atlas

Code that ran

7 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 7 have no contract verdict; 0 failures of our instrument; 0 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/2303.15444.json · badge: /api/ran/2303.15444.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
FarinaMatteo/qmmf canonical (classifier label)
classifier basis not recorded on the link
7 ran · 0 no recorded run
FunctionStatusWhere it lives
dict_to_sample Ran
ran on a synthesized input
FarinaMatteo/qmmf/utils/misc.py
code served (permissive licence) · get_code("43624c38bc2d13c3")
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

def dict_to_sample(input_dict):
    sorted_dict = dict(sorted(input_dict.items(), key=lambda x: int(x[0])))
    return np.array([v for v in sorted_dict.values()])

ARGS = {
    "input_dict": {
        "0": 1.5,
        "1": 2.3,
        "2": 3.7,
        "10": 4.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 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
get_localized_prob Ran
ran on a synthesized input
FarinaMatteo/qmmf/utils/utils_sampling.py
code served (permissive licence) · get_code("66a81a62ae99009b")
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

# Analyze the function:
# - pts: used with np.sum(np.square(pts - pt), axis=1)
#   needs to be a 2D array where we subtract pt from each row
# - pt: used in (pts - pt) and needs to be broadcastable
#   should be 1D array matching the feature dimension
# - ni: used as scalar multiplier ni * np.median(...)

# Create small test data
pts = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=np.float32)

pt = np.array([0.5, 1.5, 2.5, 3.5], dtype=np.float32)

ni = 0.5

ARGS = {
    "pts": pts,
    "pt": pt,
    "ni": ni
}
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 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
get_preference_matrix_fm Ran
ran on a synthesized input
FarinaMatteo/qmmf/utils/data_generator.py
code served (permissive licence) · get_code("8b99a4c3e54c6e68")
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; 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 sample match points with homogeneous coordinates
# x1 and x2 should have shape (N, 3) where N is number of matches
# The third coordinate should be 1 (homogeneous coordinate)

n_matches = 12

# Create random point coordinates in normalized image space
# Using small values to keep them realistic
x1_coords = np.random.rand(n_matches, 2) * 100  # Image coordinates
x1 = np.hstack([x1_coords, np.ones((n_matches, 1))])  # Add homogeneous coordinate

x2_coords = np.random.rand(n_matches, 2) * 100  # Image coordinates  
x2 = np.hstack([x2_coords, np.ones((n_matches, 1))])  # Add homogeneous coordinate

# Ensure the homogeneous coordinates are exactly 1.0
x1[:, 2] = 1.0
x2[:, 2] = 1.0

ARGS = {
    "x1": x1,
    "x2": x2,
    "num_of_samplings": None,
    "threshold": 0.02,
    "sigma": 6
}

# Need to provide the localized_sampling function that's called in get_preference_matrix_fm
def localized_sampling(x1, x2, k=8):
    """Minimal implementation of localized_sampling for the function to work."""
    n_points = x1.shape[0]
    # Return k random indices
    return np.random.choice(n_points, size=min(k, n_points), replace=False)

# Inject the function into the module namespace so it can be called
import sys
current_module = sys.modules[__name__]
current_module.localized_sampling = localized_sampling
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 ndarray, ndim 2, dtype family float — no output shape is stated: observe_signature.py could not observe it (fixture:KeyError)
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
is_symmetric Ran
ran on a synthesized input
FarinaMatteo/qmmf/utils/misc.py
code served (permissive licence) · get_code("8cbb67b691de96c5")
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 bool, 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

# Test case 1: symmetric matrix
symmetric_matrix = np.array([
    [1.0, 2.0, 3.0],
    [2.0, 4.0, 5.0],
    [3.0, 5.0, 6.0]
])

# Test case 2: non-symmetric matrix
non_symmetric_matrix = np.array([
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0],
    [7.0, 8.0, 9.0]
])

# Test case 3: non-square matrix
non_square_matrix = np.array([
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0]
])

# Use the symmetric matrix as the main test case
A = symmetric_matrix
tolerance = np.finfo(float).eps

ARGS = {
    "A": A,
    "tolerance": tolerance
}
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 bool, 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
is_upper_triangular Ran
ran on a synthesized input
FarinaMatteo/qmmf/utils/misc.py
code served (permissive licence) · get_code("88a07b8a3cda07b3")
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 bool, 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

torch.manual_seed(0)

# Create a small upper triangular matrix for testing
A = torch.tensor([
    [1.0, 2.0, 3.0, 4.0],
    [0.0, 5.0, 6.0, 7.0],
    [0.0, 0.0, 8.0, 9.0],
    [0.0, 0.0, 0.0, 10.0]
])

ARGS = {
    "A": A
}
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 bool, 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
localized_sampling Ran
ran on a synthesized input
FarinaMatteo/qmmf/utils/utils_sampling.py
code served (permissive licence) · get_code("d7d21a3c9b7e0a5b")
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 (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

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

# Create small point clouds for source and destination
# src_pts and dst_pts should be 2D arrays of shape (num_points, num_dimensions)
src_pts = np.array([
    [0.0, 0.0, 0.0, 0.0],
    [1.0, 1.0, 1.0, 1.0],
    [2.0, 2.0, 2.0, 2.0],
    [3.0, 3.0, 3.0, 3.0],
], dtype=np.float64)

dst_pts = np.array([
    [0.1, 0.1, 0.1, 0.1],
    [1.1, 1.1, 1.1, 1.1],
    [2.1, 2.1, 2.1, 2.1],
    [3.1, 3.1, 3.1, 3.1],
], dtype=np.float64)

# k is the number of samples to select (must be <= num_points)
k = 2

# ni is a parameter controlling the localization (default 1/3)
ni = 1 / 3

ARGS = {
    "src_pts": src_pts,
    "dst_pts": dst_pts,
    "k": k,
    "ni": ni,
}
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 (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
vis_matches Ran
ran on a synthesized input
FarinaMatteo/qmmf/utils/visualization.py
code served (permissive licence) · get_code("ec5b05046dcd9b68")
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 3, dtype family int, shape (100, 160, 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
import cv2

# Create small synthetic images (grayscale and color versions possible)
img1_color = np.random.randint(0, 256, (100, 80, 3), dtype=np.uint8)
img2_color = np.random.randint(0, 256, (100, 80, 3), dtype=np.uint8)

# Create point correspondences (X1 and X2 with at least 2 columns for [:2] slicing)
num_points = 10
X1 = np.random.rand(num_points, 4).astype(np.float32) * np.array([80, 100, 1, 1])
X2 = np.random.rand(num_points, 4).astype(np.float32) * np.array([80, 100, 1, 1])

# Create labels: mix of model indices (1, 2, 3), outliers (0), and unmatched (-1)
label = np.array([1, 1, 2, 2, 3, 0, -1, 1, 2, 0], dtype=np.int32)

ARGS = {
    "img1": img1_color,
    "img2": img2_color,
    "X1": X1,
    "X2": X2,
    "label": label,
    "draw_matches": False,
    "stack_models": False,
}
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 ndarray, ndim 3, dtype family int, shape (100, 160, 3) — shape (100, 160, 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

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

Geometric model fitting is a challenging but fundamental computer vision problem. Recently, quantum optimization has been shown to enhance robust fitting for the case of a single model, while leaving the question of multi-model fitting open. In response to this challenge, this paper shows that the latter case can significantly benefit from quantum hardware and proposes the first quantum approach to multimodel fitting (MMF). We formulate MMF as a problem that can be efficiently sampled by modern adiabatic quantum computers without the relaxation of the objective function. We also propose an iterative and decomposed version of our method, which supports real-world-sized problems. The experimental evaluation demonstrates promising results on a variety of datasets. The source code is available at: https://github.com/FarinaMatteo/qmmf.

For agents

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

get_harvested_code_for_paper("2303.15444")
get_code_for_paper("2303.15444")
have("2303.15444")

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

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

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

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

Connect an agent — have() is free.