SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1910.13136 · 2019

An α-Matte Boundary Defocus Model Based Cascaded Network for Multi-focus Image Fusion

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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, 1 violated it and 8 have no contract verdict; 0 failures of our instrument; 3 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/1910.13136.json · badge: /api/ran/1910.13136.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
xytmhy/MMF-Net-Multi-Focus-Image-Fusion canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
xytmhy/MMF-Net-alpha-Matte-Boundary-Defocus-Model-Fusion community (classifier label)
classifier basis not recorded on the link
8 ran · 3 no recorded run
FunctionStatusWhere it lives
EPE Ran
ran on a synthesized input
xytmhy/MMF-Net-alpha-Matte-Boundary-Defocus-Model-Fusion/multiscaleloss.py
code served (permissive licence) · get_code("c4e8c04d1cd3f12c")
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

torch.manual_seed(0)

# The function EPE computes End-Point Error between output and target tensors.
# It expects:
# - output: a tensor that will be subtracted from target
# - target: a tensor that will be subtracted from output
# - mean: a boolean flag for whether to return mean or sum/batch_size

# Both output and target should have shape (batch_size, ...) where the norm is computed
# along dimension 1 (the feature dimension).

batch_size = 2
feature_dim = 4

# Create small tensors with distinct dimensions
output = torch.randn(batch_size, feature_dim)
target = torch.randn(batch_size, feature_dim)

ARGS = {
    "output": output,
    "target": target,
    "mean": True
}
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
ResBlock Ran
ran on a synthesized input
xytmhy/MMF-Net-alpha-Matte-Boundary-Defocus-Model-Fusion/models/util.py
code served (permissive licence) · get_code("cc5bae312cc0118b")
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 Sequential. 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

torch.manual_seed(0)

ARGS = {
    "in_channels": 3,
    "out_channels": 16,
    "kernel_size": 3,
    "bias": True,
    "batchNorm": False,
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
conv Ran
ran on a synthesized input
xytmhy/MMF-Net-alpha-Matte-Boundary-Defocus-Model-Fusion/models/util.py
code served (permissive licence) · get_code("a04ba2a10f4c13ea")
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 Conv2d. 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

torch.manual_seed(0)

ARGS = {
    "in_channels": 3,
    "out_channels": 64,
    "kernel_size": 3,
    "stride": 1,
    "bias": True,
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
default_loader Ran
ran on a synthesized input
xytmhy/MMF-Net-alpha-Matte-Boundary-Defocus-Model-Fusion/datasets/listdataset.py
code served (permissive licence) · get_code("b2a303cfd1a18502")
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 os
import tempfile
import numpy as np
from imageio import imwrite

# Create a temporary directory to serve as root
temp_dir = tempfile.mkdtemp()

# Create some dummy image files
img1_array = np.random.randint(0, 256, (32, 32, 3), dtype=np.uint8)
img2_array = np.random.randint(0, 256, (32, 32, 3), dtype=np.uint8)
map_array = np.random.randint(0, 256, (32, 32), dtype=np.uint8)

img1_path = os.path.join(temp_dir, "img1.png")
img2_path = os.path.join(temp_dir, "img2.png")
map_path = os.path.join(temp_dir, "map.png")

imwrite(img1_path, img1_array)
imwrite(img2_path, img2_array)
imwrite(map_path, map_array)

# Define relative paths from root
path_imgs = ["img1.png", "img2.png"]
path_map = "map.png"

ARGS = {
    "root": temp_dir,
    "path_imgs": path_imgs,
    "path_map": path_map
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
imageio, 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
make_dataset Ran
ran on a synthesized input
xytmhy/MMF-Net-alpha-Matte-Boundary-Defocus-Model-Fusion/datasets/data_Fusion.py
code served (permissive licence) · get_code("aba4cad8af92fb3b")
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 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 os.path
import glob
import tempfile
from pathlib import Path

# Create a temporary directory structure for the dataset
temp_dir = tempfile.mkdtemp()

# Create the required subdirectories
os.makedirs(os.path.join(temp_dir, 'InputL', 'scene1'), exist_ok=True)
os.makedirs(os.path.join(temp_dir, 'InputR', 'scene1'), exist_ok=True)
os.makedirs(os.path.join(temp_dir, 'FusionGT', 'scene1'), exist_ok=True)
os.makedirs(os.path.join(temp_dir, 'FusionMapT', 'scene1'), exist_ok=True)

# Create dummy image files
Path(os.path.join(temp_dir, 'InputL', 'scene1', 'prefix_L.png')).touch()
Path(os.path.join(temp_dir, 'InputR', 'scene1', 'prefix_R.png')).touch()
Path(os.path.join(temp_dir, 'FusionGT', 'scene1', 'prefix_FR.png')).touch()
Path(os.path.join(temp_dir, 'FusionMapT', 'scene1', 'prefix_0.png')).touch()

# Define a placeholder split2list function that the make_dataset function calls
def split2list(images, split, default_split=0.9):
    """Placeholder function for split2list"""
    return images

# Make split2list available in the module scope
import sys
current_module = sys.modules[__name__]
setattr(current_module, 'split2list', split2list)

ARGS = {
    'dataset_dir': temp_dir,
    'split': 'train'
}
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 list, ndim 1, dtype family float — 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
predict_flow Ran
ran on a synthesized input
xytmhy/MMF-Net-alpha-Matte-Boundary-Defocus-Model-Fusion/models/util.py
code served (permissive licence) · get_code("e8536209d2f05601")
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 Conv2d. 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

torch.manual_seed(0)

ARGS = {
    "in_planes": 64
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
realEPE Ran
ran on a synthesized input
xytmhy/MMF-Net-alpha-Matte-Boundary-Defocus-Model-Fusion/multiscaleloss.py
code served (permissive licence) · get_code("7f5e9ceae937ea27")
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

torch.manual_seed(0)

# Create small distinct tensors for output and target
# Both should be 2D tensors: (batch_size, feature_dim)
batch_size = 2
feature_dim = 4

output = torch.randn(batch_size, feature_dim)
target = torch.randn(batch_size, feature_dim)

ARGS = {
    "output": output,
    "target": target,
}
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
split2list Ran
ran on a synthesized input
xytmhy/MMF-Net-alpha-Matte-Boundary-Defocus-Model-Fusion/datasets/util.py
code served (permissive licence) · get_code("bc0dde7cfdd4d7b9")
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

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

# Create sample images - can be any objects, the function just iterates over them
images = ['image_1.jpg', 'image_2.jpg', 'image_3.jpg', 'image_4.jpg', 'image_5.jpg']

# Define different split arguments to test different code paths
# Option 1: float split (0.7 means 70% for training)
split_float = 0.7

# Option 2: string split (file path) - we'll use a float for simplicity since no file I/O
# For this we'd need a file, so we'll test with float instead
split_value = split_float

# Option 3: default split (neither string nor float, uses default_split parameter)
default_split_value = 0.8

# Create ARGS dictionary with all parameters
ARGS = {
    'images': images,
    'split': split_float,
    'default_split': 0.9
}
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
tensor2rgb Ran
ran, violated the contract we drafted
xytmhy/MMF-Net-Multi-Focus-Image-Fusion/run_inference.py
code served (permissive licence) · get_code("1f35c95cc56413cd")
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) and returned ndarray, ndim 4, dtype family float, shape (2, 4, 3, 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 torch
import numpy as np

torch.manual_seed(0)

# Create a small tensor with shape (2, 4, 3, 3)
# The function calls .detach().cpu().numpy() on it
img_tensor = torch.randn(2, 4, 3, 3)

ARGS = {
    "img_tensor": img_tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 3, 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
CBAfusionnet Not yet run
unverified (harvested, no recorded run)
xytmhy/MMF-Net-alpha-Matte-Boundary-Defocus-Model-Fusion/models/CBAfusion3.py
code served (permissive licence) · get_code("88715f2d2d347598")
How it ran

no invocation recorded.

CBAfusionnet_bn Not yet run
unverified (harvested, no recorded run)
xytmhy/MMF-Net-alpha-Matte-Boundary-Defocus-Model-Fusion/models/CBAfusion3.py
code served (permissive licence) · get_code("591536509b4c2063")
How it ran

no invocation recorded.

mapEPE Not yet run
unverified (harvested, no recorded run)
xytmhy/MMF-Net-alpha-Matte-Boundary-Defocus-Model-Fusion/multiscaleloss.py
code served (permissive licence) · get_code("d6fe55241488d2f7")
How it ran

no invocation recorded.

Also present in other papers' code

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

Capturing an all-in-focus image with a single camera is difficult since the depth of field of the camera is usually limited. An alternative method to obtain the all-in-focus image is to fuse several images focusing at different depths. However, existing multi-focus image fusion methods cannot obtain clear results for areas near the focused/defocused boundary (FDB). In this paper, a novel α-matte boundary defocus model is proposed to generate realistic training data with the defocus spread effect precisely modeled, especially for areas near the FDB. Based on this α-matte defocus model and the generated data, a cascaded boundary aware convolutional network termed MMF-Net is proposed and trained, aiming to achieve clearer fusion results around the FDB. More specifically, the MMF-Net consists of two cascaded sub-nets for initial fusion and boundary fusion, respectively; these two sub-nets are designed to first obtain a guidance map of FDB and then refine the fusion near the FDB. Experiments demonstrate that with the help of the new α-matte boundary defocus model, the proposed MMF-Net outperforms the state-of-the-art methods both qualitatively and quantitatively.

For agents

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

get_harvested_code_for_paper("1910.13136")
get_code_for_paper("1910.13136")
have("1910.13136")

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

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

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

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

Connect an agent — have() is free.