SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.03465 · NeurIPS · 2022

MEDIAR: Harmony of Data-Centric and Model-Centric for Multi-Modality Microscopy

Gihun Lee, Sangmook Kim, Joonkee Kim

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 10 have no contract verdict; 0 failures of our instrument; 1 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/2212.03465.json · badge: /api/ran/2212.03465.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
Lee-Gihun/MEDIAR canonical (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
joonkeekim/mediar-napari port (classifier label)
classifier basis: classifier_2025
4 ran · 1 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input · constructed an object; no result was computed
joonkeekim/mediar-napari/segmentation_models_pytorch/encoders/mix_transformer.py
code served (permissive licence) · get_code("9730b11fb54530b9")
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, Attention: 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
from timm.models.layers import DropPath, to_2tuple, trunc_normal_

torch.manual_seed(0)

ARGS = {
    'dim': 8,
    'num_heads': 2,
    'qkv_bias': False,
    'qk_scale': None,
    'attn_drop': 0.1,
    'proj_drop': 0.1,
    'sr_ratio': 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Attention — 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 Attention 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
Block Ran
ran on a synthesized input · constructed an object; no result was computed
joonkeekim/mediar-napari/segmentation_models_pytorch/encoders/mix_transformer.py
code served (permissive licence) · get_code("1e9303448e742eb5")
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, Block: 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
from timm.models.layers import DropPath, to_2tuple, trunc_normal_

torch.manual_seed(0)

ARGS = {
    'dim': 64,
    'num_heads': 8,
    'mlp_ratio': 4.0,
    'qkv_bias': False,
    'qk_scale': None,
    'drop': 0.0,
    'attn_drop': 0.0,
    'drop_path': 0.0,
    'act_layer': nn.GELU,
    'norm_layer': nn.LayerNorm,
    'sr_ratio': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Block — 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 Block 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
Mlp Ran
ran on a synthesized input · constructed an object; no result was computed
joonkeekim/mediar-napari/segmentation_models_pytorch/encoders/mix_transformer.py
code served (permissive licence) · get_code("c68e980b6461aa93")
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, Mlp: 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
from timm.models.layers import trunc_normal_

torch.manual_seed(0)

ARGS = {
    'in_features': 64,
    'hidden_features': 128,
    'out_features': 64,
    'act_layer': nn.GELU,
    'drop': 0.1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Mlp — 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 Mlp 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
OverlapPatchEmbed Ran
ran on a synthesized input · constructed an object; no result was computed
joonkeekim/mediar-napari/segmentation_models_pytorch/encoders/mix_transformer.py
code served (permissive licence) · get_code("1f67498010b83b8d")
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, OverlapPatchEmbed: 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 math
from timm.models.layers import DropPath, to_2tuple, trunc_normal_

torch.manual_seed(0)

# OverlapPatchEmbed is a nn.Module that takes only constructor parameters
# It doesn't use any other objects in __init__, so we just need valid scalar/int arguments

ARGS = {
    'img_size': 224,
    'patch_size': 7,
    'stride': 4,
    'in_chans': 3,
    'embed_dim': 768,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OverlapPatchEmbed — 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 OverlapPatchEmbed 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
diameters Ran
ran on a synthesized input
Lee-Gihun/MEDIAR/core/MEDIAR/utils.py
code served (permissive licence) · get_code("03b49f2a90f1e5c8")
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

# The function takes 'masks' as input
# It converts masks to int32, gets unique values and their counts
# It performs calculations on counts
# So we need a numpy array with some integer values representing masks

# Create a simple mask array with different regions
# Include 0 (background) and some positive integers (foreground regions)
masks = np.array([
    [0, 0, 1, 1],
    [0, 2, 2, 1],
    [2, 2, 3, 3],
    [3, 3, 3, 0]
], dtype=np.int32)

ARGS = {
    "masks": masks
}
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
hflip Ran
ran on a synthesized input
Lee-Gihun/MEDIAR/core/MEDIAR/Predictor.py
code served (permissive licence) · get_code("0be735e8029276a4")
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 4, dtype family float, shape (2, 3, 4, 5) 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 hflip takes a batch of images and flips them horizontally
# by calling x.flip(3), where 3 is the dimension index for width in a typical
# image tensor of shape (batch, channels, height, width)

# Create a small batch of images: shape (batch=2, channels=3, height=4, width=5)
x = torch.randn(2, 3, 4, 5)

ARGS = {
    "x": x
}
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 4, dtype family float, shape (2, 3, 4, 5) — shape (2, 3, 4, 5) 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
official_paths_labeled Ran
ran on a synthesized input
Lee-Gihun/MEDIAR/generate_mapping.py
code served (permissive licence) · get_code("d194ea1c4dc024d3")
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 dict. 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 shutil

# Create a temporary directory structure that mimics the expected layout
temp_dir = tempfile.mkdtemp()

# Create the necessary directory structure
official_dir = os.path.join(temp_dir, 'MEDIAR/Official/Training')
images_dir = os.path.join(official_dir, 'images')
labels_dir = os.path.join(official_dir, 'labels')

os.makedirs(images_dir, exist_ok=True)
os.makedirs(labels_dir, exist_ok=True)

# Create dummy image and label files
for i in range(3):
    image_file = os.path.join(images_dir, f'sample_{i}.png')
    label_file = os.path.join(labels_dir, f'sample_{i}_label.txt')
    
    # Create dummy files
    with open(image_file, 'w') as f:
        f.write('dummy image')
    
    with open(label_file, 'w') as f:
        f.write('dummy label')

# Define ARGS with the root path
ARGS = {
    'root': os.path.join(temp_dir, 'MEDIAR')
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
official_paths_tuning Ran
ran on a synthesized input
Lee-Gihun/MEDIAR/generate_mapping.py
code served (permissive licence) · get_code("4b48e861395da2fa")
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 dict. 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 shutil

# Create a temporary directory structure that mimics the expected layout
temp_root = tempfile.mkdtemp()
official_tuning_dir = os.path.join(temp_root, 'Official', 'Tuning', 'images')
os.makedirs(official_tuning_dir, exist_ok=True)

# Create some dummy image files
for i in range(3):
    img_file = os.path.join(official_tuning_dir, f'image_{i}.jpg')
    with open(img_file, 'w') as f:
        f.write('dummy image data')

# The root should be structured as: root/MEDIAR/Official/Tuning/images/
# But the function splits on 'MEDIAR/', so we need to create that structure
mediar_root = os.path.join(temp_root, 'MEDIAR')
os.makedirs(mediar_root, exist_ok=True)

# Move the Official directory into MEDIAR
official_src = os.path.join(temp_root, 'Official')
official_dst = os.path.join(mediar_root, 'Official')
if os.path.exists(official_src):
    shutil.move(official_src, official_dst)

ARGS = {
    'root': mediar_root
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
public_paths_labeled Ran
ran on a synthesized input
Lee-Gihun/MEDIAR/generate_mapping.py
code served (permissive licence) · get_code("fced8c3f275dbb4e")
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 dict. 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 shutil

# Create a temporary directory structure that mimics the expected layout
temp_root = tempfile.mkdtemp()
public_dir = os.path.join(temp_root, 'Public')
images_dir = os.path.join(public_dir, 'images')
labels_dir = os.path.join(public_dir, 'labels')

os.makedirs(images_dir, exist_ok=True)
os.makedirs(labels_dir, exist_ok=True)

# Create dummy image and label files
for i in range(2):
    image_file = os.path.join(images_dir, f'sample_{i}.jpg')
    label_file = os.path.join(labels_dir, f'sample_{i}_label.txt')
    
    # Create empty files
    open(image_file, 'w').close()
    open(label_file, 'w').close()

# Construct the root path to pass to the function
# The function expects to split by 'MEDIAR/' so we need to ensure that in the path
root_path = os.path.join(temp_root, 'MEDIAR')
os.makedirs(root_path, exist_ok=True)

# Move public directory into root_path
public_in_root = os.path.join(root_path, 'Public')
shutil.move(public_dir, public_in_root)

ARGS = {
    'root': root_path
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
vflip Ran
ran on a synthesized input
Lee-Gihun/MEDIAR/core/MEDIAR/Predictor.py
code served (permissive licence) · get_code("0289a3245e05c0b5")
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 4, dtype family float, shape (2, 3, 4, 5) 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 vflip takes a batch of images and flips them vertically
# by calling x.flip(2), which means it flips along dimension 2
# x should be a tensor with at least 3 dimensions
# Typical image batch shape: (batch, channels, height, width)

x = torch.randn(2, 3, 4, 5)  # batch=2, channels=3, height=4, width=5

ARGS = {
    "x": x
}
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 4, dtype family float, shape (2, 3, 4, 5) — shape (2, 3, 4, 5) 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
MixVisionTransformer Not yet run
unverified (harvested, no recorded run)
joonkeekim/mediar-napari/segmentation_models_pytorch/encoders/mix_transformer.py
code served (permissive licence) · get_code("e9bd080c24d1374e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 4 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 2 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.

FunctionAlso present inEarliest-datedOthers named
Mlp
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
2205.05277 (2022-05)
AggPose: Deep Aggregation Vision Transformer for Infant Pose Estimation
2309.13700 (2023-09)
Video Adverse-Weather-Component Suppression Network via Weather Messenger and Adversarial Backpropagation
OverlapPatchEmbed
brick of this paper's assembly: model
2 other papers
2 later
2303.10883 (2023-03)
Explicit Visual Prompting for Low-Level Structure Segmentations
2309.13700 (2023-09)
Video Adverse-Weather-Component Suppression Network via Weather Messenger and Adversarial Backpropagation
Attention
brick of this paper's assembly: model
1 other paper
1 dated earlier
2205.05277 (2022-05)
AggPose: Deep Aggregation Vision Transformer for Infant Pose Estimation
Block
brick of this paper's assembly: model
1 other paper
1 dated earlier
2205.05277 (2022-05)
AggPose: Deep Aggregation Vision Transformer for Infant Pose Estimation

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

Cell segmentation is a fundamental task for computational biology analysis. Identifying the cell instances is often the first step in various downstream biomedical studies. However, many cell segmentation algorithms, including the recently emerging deep learning-based methods, still show limited generality under the multimodality environment. Weakly Supervised Cell Segmentation in Multi-modality High-Resolution Microscopy Images 1 was hosted at NeurIPS 2022 to tackle this problem. We propose MEDIAR, a holistic pipeline for cell instance segmentation under multi-modality in this challenge. MEDIAR harmonizes data-centric and model-centric approaches as the learning and inference strategies, achieving a 0.9067 F1-score at the validation phase while satisfying the time budget. To facilitate subsequent research, we provide the source code and trained model as open-source: https://github.com/Lee-Gihun/MEDIAR.

For agents

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

get_harvested_code_for_paper("2212.03465")
get_code_for_paper("2212.03465")
have("2212.03465")

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

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

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

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

Connect an agent — have() is free.