SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.08690 · ICCV · 2023

BANSAC: A dynamic BAyesian Network for adaptive SAmple Consensus

Pedro Miraldo, Valter Piedade

arXiv · PDF · Open in the Atlas

Code that ran

9 of 23 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; 1 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 6 failures of our instrument; 14 no recorded run), measured 2026-11-22; 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/2309.08690.json · badge: /api/ran/2309.08690.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
merlresearch/bansac canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
ducha-aiki/ransac-tutorial-2020-data canonical (classifier label)
classifier basis: census
2 ran · 12 no recorded run
FunctionStatusWhere it lives
calc_mAA_pose Ran
ran, honoured the contract we drafted
merlresearch/bansac/evaluation_homography_script.py
pointer only (licence: AGPL-3.0) · get_code("89311fed6a0bb7e7")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, merlresearch/bansac, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

filter_outlier_estimates Ran
ran; our contract draft was wrong, not the code
merlresearch/bansac/extra_functions.py
pointer only (licence: AGPL-3.0) · get_code("7034acf17d21781e")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, merlresearch/bansac, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

filter_outlier_estimates_h Ran
ran; our contract draft was wrong, not the code
merlresearch/bansac/extra_functions.py
pointer only (licence: AGPL-3.0) · get_code("2d73cf40d9b8491c")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, merlresearch/bansac, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_single_result_nmnet Ran
ran; our contract draft was wrong, not the code
ducha-aiki/ransac-tutorial-2020-data/create_E_submission.py
code served (permissive licence) · get_code("5e94c57a3b57b0a8")
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 3, 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 torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def predict_E(self, m, K1, K2):
        # m is expected to be a tensor or batch
        # K1 and K2 are parameters
        # Return E (energy) and mask
        batch_size = m.shape[0] if hasattr(m, 'shape') else 2
        E = torch.randn(batch_size, 3)
        mask = torch.ones(batch_size, 3, dtype=torch.bool)
        return E, mask

model = SimpleModel()

ms = [torch.randn(2, 4), torch.randn(2, 4)]

m = torch.randn(2, 4)

method = "default_method"

params = {"param1": 1.0, "param2": 2.0}

K1 = 5

K2 = 10

ARGS = {
    "model": model,
    "ms": ms,
    "m": m,
    "method": method,
    "params": params,
    "K1": K1,
    "K2": K2,
}
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, ndim 3, 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
is_problem_essential Ran
ran, violated the contract we drafted
merlresearch/bansac/evaluation_relative_pose_script.py
pointer only (licence: AGPL-3.0) · get_code("16ca441629f05f9e")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, merlresearch/bansac, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

is_problem_fundamental Ran
ran, violated the contract we drafted
merlresearch/bansac/evaluation_relative_pose_script.py
pointer only (licence: AGPL-3.0) · get_code("e2a9531039b8f647")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, merlresearch/bansac, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_h5 Ran
ran; our contract draft was wrong, not the code
merlresearch/bansac/utils.py
pointer only (licence: AGPL-3.0) · get_code("c7761fbbd6deedc9")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, merlresearch/bansac, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

norm_test_data Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ducha-aiki/ransac-tutorial-2020-data/create_F_submission.py
code served (permissive licence) · get_code("94e9a3bb3e200ed8")
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 numpy as np

# Construct valid arguments for norm_test_data
# The function expects:
# - xs_initial: array of shape (N, 4) containing keypoints [x1, y1, x2, y2]
# - w1, h1: width and height of first image
# - w2, h2: width and height of second image

# Create a small batch of keypoints
xs_initial = np.array([
    [100.0, 150.0, 200.0, 250.0],
    [50.0, 75.0, 120.0, 180.0]
], dtype=np.float32)

# Image dimensions (distinct sizes to avoid ambiguity)
w1 = 640
h1 = 480
w2 = 320
h2 = 240

ARGS = {
    'xs_initial': xs_initial,
    'w1': w1,
    'h1': h1,
    'w2': w2,
    'h2': h2
}
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 — 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
normalize_keypoints Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
merlresearch/bansac/utils.py
pointer only (licence: AGPL-3.0) · get_code("488d979debc09ee1")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, merlresearch/bansac, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_F_submission_cv2 Not yet run
unverified (harvested, no recorded run)
ducha-aiki/ransac-tutorial-2020-data/create_opencv_F_submission_example.py
code served (permissive licence) · get_code("3352be6badc979dc")
How it ran

no invocation recorded.

create_cv2_submission Not yet run
unverified (harvested, no recorded run)
ducha-aiki/ransac-tutorial-2020-data/create_opencv_homography_submission_example.py
code served (permissive licence) · get_code("e072c080564ed733")
How it ran

no invocation recorded.

eval_single_result Not yet run
unverified (harvested, no recorded run)
ducha-aiki/ransac-tutorial-2020-data/eval_H_submission.py
code served (permissive licence) · get_code("b292ac3a2d5644f7")
How it ran

no invocation recorded.

evaluate_results Not yet run
unverified (harvested, no recorded run)
ducha-aiki/ransac-tutorial-2020-data/create_opencv_F_submission_example.py
code served (permissive licence) · get_code("c471f67bff60d8ba")
How it ran

no invocation recorded.

evaluate_results Not yet run
unverified (harvested, no recorded run)
ducha-aiki/ransac-tutorial-2020-data/create_opencv_homography_submission_example.py
code served (permissive licence) · get_code("6a8ff33c334e3d91")
How it ran

no invocation recorded.

evaluate_results Not yet run
unverified (harvested, no recorded run)
ducha-aiki/ransac-tutorial-2020-data/eval_E_submission.py
code served (permissive licence) · get_code("d60972f016f28b3c")
How it ran

no invocation recorded.

evaluate_results Not yet run
unverified (harvested, no recorded run)
ducha-aiki/ransac-tutorial-2020-data/eval_F_submission.py
code served (permissive licence) · get_code("529157dfe8856630")
How it ran

no invocation recorded.

evaluate_results Not yet run
unverified (harvested, no recorded run)
ducha-aiki/ransac-tutorial-2020-data/eval_H_submission.py
code served (permissive licence) · get_code("5c4b84f16433a7d0")
How it ran

no invocation recorded.

get_E_from_F Not yet run
unverified (harvested, no recorded run)
merlresearch/bansac/utils.py
pointer only (licence: AGPL-3.0) · get_code("fae4ae4068906ca6")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, merlresearch/bansac, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_single_result Not yet run
unverified (harvested, no recorded run)
ducha-aiki/ransac-tutorial-2020-data/create_E_submission.py
code served (permissive licence) · get_code("378300939a1cd4ea")
How it ran

no invocation recorded.

get_single_result_filtered Not yet run
unverified (harvested, no recorded run)
ducha-aiki/ransac-tutorial-2020-data/create_E_submission.py
code served (permissive licence) · get_code("9f34abc565b4b791")
How it ran

no invocation recorded.

get_time_avg_eval Not yet run
unverified (harvested, no recorded run)
merlresearch/bansac/evaluation_homography_script.py
pointer only (licence: AGPL-3.0) · get_code("1144116559fc1644")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, merlresearch/bansac, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

grid_search_hypers_opencv Not yet run
unverified (harvested, no recorded run)
ducha-aiki/ransac-tutorial-2020-data/create_opencv_F_submission_example.py
code served (permissive licence) · get_code("940ad3906b738f2d")
How it ran

no invocation recorded.

grid_search_hypers_opencv Not yet run
unverified (harvested, no recorded run)
ducha-aiki/ransac-tutorial-2020-data/create_opencv_homography_submission_example.py
code served (permissive licence) · get_code("deff7e2a474adf99")
How it ran

no invocation recorded.

Also present in other papers' code

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

RANSAC-based algorithms are the standard techniques for robust estimation in computer vision. These algorithms are iterative and computationally expensive; they alternate between random sampling of data, computing hypotheses, and running inlier counting. Many authors tried different approaches to improve efficiency. One of the major improvements is having a guided sampling, letting the RANSAC cycle stop sooner. This paper presents a new adaptive sampling process for RANSAC. Previous methods either assume no prior information about the inlier/outlier classification of data points or use some previously computed scores in the sampling. In this paper, we derive a dynamic Bayesian network that updates individual data points' inlier scores while iterating RANSAC. At each iteration, we apply weighted sampling using the updated scores. Our method works with or without prior data point scorings. In addition, we use the updated inlier/outlier scoring for deriving a new stopping criterion for the RANSAC loop. We test our method in multiple real-world datasets for several applications and obtain state-of-the-art results. Our method outperforms the baselines in accuracy while needing less computational time. The code is available at https://github.com/merlresearch/bansac.

For agents

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

get_harvested_code_for_paper("2309.08690")
get_code_for_paper("2309.08690")
have("2309.08690")

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

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

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

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

Connect an agent — have() is free.