SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.08403 · ECCV · 2022

MPIB: An MPI-Based Bokeh Rendering Framework for Realistic Partial Occlusion Effects

Hao Lu, Zhiguo Cao, Jianming Zhang, Xianrui Luo, Juewen Peng, Ke 1⋆

arXiv · PDF · Open in the Atlas

Code that ran

4 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 4 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/2207.08403.json · badge: /api/ran/2207.08403.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
juewenpeng/mpib marked official in Papers with Code
Papers with Code archive
4 ran · 4 no recorded run
FunctionStatusWhere it lives
GaussianBlur Ran
ran on a synthesized input · constructed an object; no result was computed
juewenpeng/mpib/models/mpinet.py
code served (permissive licence) · get_code("02a04639517bf1bb")
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 an instance of its own class, GaussianBlur: the run constructed the object and did not call it, so no result was computed. 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)

# GaussianBlur.__init__ takes kernel_size and optional sigma
# GaussianBlur.forward takes x (a tensor with shape [batch, channels, height, width])

# Build a small test input tensor: batch=2, channels=4, height=8, width=8
x = torch.randn(2, 4, 8, 8)

# kernel_size must be a positive integer (used for kernel dimensions and padding calculation)
kernel_size = 5

# sigma is optional - can be None or a float
sigma = None

ARGS = {
    "kernel_size": kernel_size,
    "sigma": sigma,
}
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 GaussianBlur — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GaussianBlur 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
ResnetEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
juewenpeng/mpib/models/mpinet.py
code served (permissive licence) · get_code("598e9cc677736627")
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 an instance of its own class, ResnetEncoder: the run constructed the object and did not call it, so no result was computed. 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 numpy as np
import torch.distributed as dist

torch.manual_seed(0)

# Mock dist.get_rank() to avoid distributed training issues
if not hasattr(dist, '_rank'):
    dist._rank = 0

original_get_rank = dist.get_rank
def mock_get_rank():
    return 0

dist.get_rank = mock_get_rank

# Mock model_zoo.load_url to avoid network calls
import torch.utils.model_zoo as model_zoo
original_load_url = model_zoo.load_url

def mock_load_url(url):
    # Return a minimal state dict for resnet18
    state_dict = {}
    state_dict['conv1.weight'] = torch.randn(64, 3, 7, 7)
    state_dict['bn1.weight'] = torch.ones(64)
    state_dict['bn1.bias'] = torch.zeros(64)
    state_dict['bn1.running_mean'] = torch.zeros(64)
    state_dict['bn1.running_var'] = torch.ones(64)
    return state_dict

model_zoo.load_url = mock_load_url

# Now define the ARGS dict for ResnetEncoder
ARGS = {
    'num_layers': 18,
    'pretrained': False,
    'num_input_images': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResnetEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ResnetEncoder 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
ShufflenetEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
juewenpeng/mpib/models/mpinet.py
code served (permissive licence) · get_code("70ea3343c3afa8c6")
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 an instance of its own class, ShufflenetEncoder: the run constructed the object and did not call it, so no result was computed. 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 numpy as np
import torchvision.models as models

torch.manual_seed(0)

ARGS = {
    "num_layers": 0.5,
    "pretrained": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ShufflenetEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ShufflenetEncoder 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
resnet_multiimage_input Ran
ran; our contract draft was wrong, not the code
juewenpeng/mpib/models/mpinet.py
code served (permissive licence) · get_code("38f2c96c97e8abc0")
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 ResNetMultiImageInput. 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
import torchvision.models as models

torch.manual_seed(0)

# Mock dist.get_rank() to return 0 so pretrained loading is attempted
class MockDist:
    @staticmethod
    def get_rank():
        return 0

# Patch dist.get_rank
dist.get_rank = MockDist.get_rank

# Mock model_zoo.load_url to avoid network calls
original_load_url = torch.utils.model_zoo.load_url

def mock_load_url(url):
    # Return a minimal state dict with conv1.weight for resnet18
    state_dict = {}
    # Create a dummy conv1.weight tensor (3 input channels, 64 output channels, 7x7 kernel)
    state_dict['conv1.weight'] = torch.randn(64, 3, 7, 7)
    state_dict['bn1.weight'] = torch.ones(64)
    state_dict['bn1.bias'] = torch.zeros(64)
    state_dict['bn1.running_mean'] = torch.zeros(64)
    state_dict['bn1.running_var'] = torch.ones(64)
    state_dict['bn1.num_batches_tracked'] = torch.tensor(0)
    return state_dict

torch.utils.model_zoo.load_url = mock_load_url

ARGS = {
    'num_layers': 18,
    'pretrained': False,
    'num_input_images': 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNetMultiImageInput — a ResNetMultiImageInput output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNetMultiImageInput 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
DepthDecoder Not yet run
unverified (harvested, no recorded run)
juewenpeng/mpib/models/mpinet.py
code served (permissive licence) · get_code("55b414dd2659cc78")
How it ran

no invocation recorded.

MPINet Not yet run
unverified (harvested, no recorded run)
juewenpeng/mpib/models/mpinet.py
code served (permissive licence) · get_code("667705e247735e92")
How it ran

no invocation recorded.

ResNetMultiImageInput Not yet run
unverified (harvested, no recorded run)
juewenpeng/mpib/models/mpinet.py
code served (permissive licence) · get_code("7f35743bca114068")
How it ran

no invocation recorded.

replace Not yet run
unverified (harvested, no recorded run)
juewenpeng/mpib/models/mpinet.py
code served (permissive licence) · get_code("9aa84e13a17e80a4")
How it ran

no invocation recorded.

Also present in other papers' code

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

Partial occlusion effects are a phenomenon that blurry objects near a camera are semi-transparent, resulting in partial appearance of occluded background. However, it is challenging for existing bokeh rendering methods to simulate realistic partial occlusion effects due to the missing information of the occluded area in an all-in-focus image. Inspired by the learnable 3D scene representation, Multiplane Image (MPI), we attempt to address the partial occlusion by introducing a novel MPI-based high-resolution bokeh rendering framework, termed MPIB. To this end, we first present an analysis on how to apply the MPI representation to bokeh rendering. Based on this analysis, we propose an MPI representation module combined with a background inpainting module to implement high-resolution scene representation. This representation can then be reused to render various bokeh effects according to the controlling parameters. To train and test our model, we also design a ray-tracing-based bokeh generator for data generation. Extensive experiments on synthesized and real-world images validate the effectiveness and flexibility of this framework.

For agents

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

get_harvested_code_for_paper("2207.08403")
get_code_for_paper("2207.08403")
have("2207.08403")

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

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

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

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

Connect an agent — have() is free.