SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.00673 · CVPR · 2023

Bidirectional Copy-Paste for Semi-Supervised Medical Image Segmentation

Yan Wang, Wei Shen, Qingli Li, Yunhao Bai, Duowen Chen

arXiv · PDF · Open in the Atlas

Code that ran

17 of 19 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 12 have no contract verdict; 3 failures of our instrument; 2 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/2305.00673.json · badge: /api/ran/2305.00673.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
deepmed-lab-ecnu/bcp canonical (classifier label)
classifier basis: census
11 ran · 1 no recorded run
DeepMed-Lab-ECNU/BCP community
Papers with Code archive
3 ran · 1 no recorded run
HiLab-git/SSL4MIS marked official in Papers with Code
Papers with Code archive
3 ran · 0 no recorded run
FunctionStatusWhere it lives
LargestCC_pancreas Ran
ran on a synthesized input
deepmed-lab-ecnu/bcp/code/LA_BCP_train.py
code served (permissive licence) · get_code("50a034d1b41e897e")
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 3, dtype family float, shape (2, 4, 3) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# The function expects a tensor with shape (N, ...) where N is batch size
# It calls .detach().cpu().numpy() on each element and uses label() from skimage
# The tensor should contain probability-like values (0-1 range works well)

# Create a small batch of segmentation masks
# Shape: (batch_size=2, height=4, width=3)
segmentation = torch.rand(2, 4, 3)

ARGS = {
    "segmentation": segmentation
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
WeakStrongAugment Ran
ran on a synthesized input · constructed an object; no result was computed
HiLab-git/SSL4MIS/code/dataloaders/dataset.py
code served (permissive licence) · get_code("6684d7714ad58e8b")
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, WeakStrongAugment: 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 numpy as np
from scipy.ndimage.interpolation import zoom
from torchvision import transforms

torch.manual_seed(0)
np.random.seed(0)

# Create a small sample dictionary with image and label
# Images are 2D arrays (height x width)
image_data = np.random.randint(0, 256, size=(8, 6), dtype=np.uint8)
label_data = np.random.randint(0, 2, size=(8, 6), dtype=np.uint8)

sample = {
    'image': image_data,
    'label': label_data
}

# Define ARGS for WeakStrongAugment
ARGS = {
    'output_size': (4, 3)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type WeakStrongAugment — 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 WeakStrongAugment 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
color_jitter Ran
ran, honoured the contract we drafted
HiLab-git/SSL4MIS/code/dataloaders/dataset.py
code served (permissive licence) · get_code("d54bd9f61fb16ee3")
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 3, dtype family float, shape (3, 3, 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 torch
from torchvision import transforms
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Create a small test image as a PIL Image (3 channels, small dimensions)
# The function accepts either PIL images or tensors
pil_image = Image.new('RGB', (4, 3), color=(128, 64, 200))

ARGS = {
    "image": pil_image
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (3, 3, 4) — shape (3, 3, 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
concate_mask Ran
ran on a synthesized input
deepmed-lab-ecnu/bcp/code/utils/BCP_utils.py
code served (permissive licence) · get_code("f1f6cbaf5ba771ec")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np

torch.manual_seed(0)

# The function expects a 5D tensor with shape (batch_size, channel, img_x, img_y, img_z)
# Using distinct sizes: batch=2, channel=3, img_x=4, img_y=5, img_z=6
img = torch.ones(2, 3, 4, 5, 6)

ARGS = {
    'img': img
}
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 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
context_mask Ran
ran on a synthesized input
deepmed-lab-ecnu/bcp/code/utils/BCP_utils.py
code served (permissive licence) · get_code("c5f63f170e272caa")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np

torch.manual_seed(0)
np.random.seed(0)

# Create a small 5D tensor with shape (batch, channel, x, y, z)
# Using distinct sizes: batch=2, channel=3, x=112, y=112, z=80
# to match the function's hardcoded bounds
img = torch.ones(2, 3, 112, 112, 80)

# mask_ratio should be a float between 0 and 1
mask_ratio = 0.25

ARGS = {
    "img": img,
    "mask_ratio": mask_ratio
}
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 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
get_ACDC_2DLargestCC Ran
ran on a synthesized input
deepmed-lab-ecnu/bcp/code/ACDC_BCP_train.py
code served (permissive licence) · get_code("451e37bdd602a2e2")
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 3, dtype family float, shape (2, 4, 3) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 segmentation tensor
# Shape: (batch_size=2, height=4, width=3)
# Values should be integers representing class labels (0, 1, 2, 3)
segmentation = torch.randint(0, 4, (2, 4, 3))

ARGS = {
    "segmentation": segmentation
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
get_ACDC_LargestCC Ran
ran on a synthesized input
deepmed-lab-ecnu/bcp/code/ACDC_BCP_train.py
code served (permissive licence) · get_code("3acc895b1dba4189")
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 3, dtype family int, shape (2, 4, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 segmentation tensor
# The function expects values in range [1, 2, 3] for the three classes
# Shape: (2, 4, 4) - batch of 2, spatial dimensions 4x4
segmentation = torch.zeros((2, 4, 4), dtype=torch.float32)

# Assign class labels 1, 2, 3 to different regions
segmentation[0, 0:2, 0:2] = 1
segmentation[0, 2:4, 0:2] = 2
segmentation[0, 0:2, 2:4] = 3
segmentation[1, 1:3, 1:3] = 1
segmentation[1, 0:2, 3:4] = 2
segmentation[1, 3:4, 0:3] = 3

ARGS = {
    "segmentation": segmentation
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family int, shape (2, 4, 4) — shape (2, 4, 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_ACDC_masks Ran
ran on a synthesized input
deepmed-lab-ecnu/bcp/code/ACDC_BCP_train.py
code served (permissive licence) · get_code("6bd5afe45408a227")
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 3, dtype family int, shape (2, 3, 5) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn
import torch.nn.functional as F
import numpy as np

torch.manual_seed(0)

# Create a small output tensor for get_ACDC_masks
# output should be logits with shape (batch, num_classes, height, width)
# For ACDC, we have 4 classes (background + 3 cardiac classes)
batch_size = 2
num_classes = 4
height = 3
width = 5

output = torch.randn(batch_size, num_classes, height, width)

ARGS = {
    "output": output,
    "nms": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family int, shape (2, 3, 5) — shape (2, 3, 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
get_ACDC_masks Ran
ran on a synthesized input
deepmed-lab-ecnu/bcp/code/KDE_demo.py
code served (permissive licence) · get_code("1279c0b7c31f46f0")
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 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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# The function expects a tensor with shape (batch_size, num_classes)
# It applies softmax along dim=1, then takes argmax
# So we need a 2D tensor with logits

output = torch.randn(2, 4)  # batch_size=2, num_classes=4

ARGS = {
    "output": output
}
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 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
get_cut_mask Ran
ran on a synthesized input
deepmed-lab-ecnu/bcp/code/LA_BCP_train.py
code served (permissive licence) · get_code("b36289c49f14d7c5")
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 3, dtype family int, shape (2, 4, 3) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Create a small output tensor that will be passed to get_cut_mask
# The function expects: out with shape (batch, channels, height, width)
# It applies softmax on dimension 1, so we need at least 2 channels
# Then it extracts masks[:, 1, :, :], so channel index 1 must exist
batch_size = 2
channels = 2
height = 4
width = 3

out = torch.randn(batch_size, channels, height, width)

ARGS = {
    "out": out,
    "thres": 0.5,
    "nms": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family int, shape (2, 4, 3) — shape (2, 4, 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
get_probability Ran
ran; our contract draft was wrong, not the code
DeepMed-Lab-ECNU/BCP/code/utils/BCP_utils.py
code served (permissive licence) · get_code("49da02d1d655ed9e")
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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# Test case 1: Multi-channel logits (C > 1) - 4D tensor
logits_multichannel_4d = torch.randn(2, 4, 3, 5)

# Test case 2: Single-channel logits (C = 1) - 4D tensor
logits_singlechannel_4d = torch.randn(2, 1, 3, 5)

# Test case 3: Multi-channel logits (C > 1) - 5D tensor
logits_multichannel_5d = torch.randn(2, 4, 3, 5, 6)

# Test case 4: Single-channel logits (C = 1) - 5D tensor
logits_singlechannel_5d = torch.randn(2, 1, 3, 5, 6)

# Use the multi-channel 4D case as the primary test
ARGS = {
    "logits": logits_multichannel_4d
}
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 — 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
get_probability Ran
ran on a synthesized input
deepmed-lab-ecnu/bcp/code/pancreas/losses.py
code served (permissive licence) · get_code("d07df0bf1e2ed610")
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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# Test case 1: Multi-channel logits (C > 1) - will use softmax
logits_multi = torch.randn(2, 4, 8, 8)

# Test case 2: Single-channel logits (C = 1) - will use sigmoid
logits_single = torch.randn(2, 1, 8, 8)

# Use the multi-channel case as primary test
ARGS = {
    "logits": logits_multi
}
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 — 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
mask_DiceLoss Ran
ran on a synthesized input · constructed an object; no result was computed
DeepMed-Lab-ECNU/BCP/code/utils/BCP_utils.py
code served (permissive licence) · get_code("11437f8ee9b097b7")
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, mask_DiceLoss: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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

torch.manual_seed(0)

# Create a mask_DiceLoss instance
nclass = 3
class_weights = None
smooth = 1e-05

loss_fn = nn.Module()  # placeholder, we'll instantiate the real one below

# Create sample logits tensor [N, C, H, W]
N = 2
C = 3
H = 4
W = 4
logits = torch.randn(N, C, H, W)

# Create sample target tensor [N, 1, H, W] with class indices
target = torch.randint(0, nclass, (N, 1, H, W))

# Create optional mask tensor [N, 1, H, W]
mask = torch.ones(N, 1, H, W)

ARGS = {
    "nclass": nclass,
    "class_weights": class_weights,
    "smooth": smooth,
}
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 mask_DiceLoss — 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 mask_DiceLoss 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
patients_to_slices Ran
ran on a synthesized input
deepmed-lab-ecnu/bcp/code/KDE_demo.py
code served (permissive licence) · get_code("b4b3d82f0caa5a95")
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 int, ndim 0, dtype family int, 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 checks if 'ACDC' or 'Prostate' is in the dataset string
# and uses patiens_num to look up a value in the corresponding ref_dict
# We'll test with 'ACDC' dataset and a valid patient number

ARGS = {
    'dataset': 'ACDC',
    'patiens_num': 1
}
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 int, ndim 0, dtype family int, 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
random_rot_flip Ran
ran, honoured the contract we drafted
HiLab-git/SSL4MIS/code/dataloaders/dataset.py
code served (permissive licence) · get_code("b747cc536cbf2109")
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 int; 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 small numpy arrays for image and label
image = np.random.randint(0, 256, size=(4, 3), dtype=np.uint8)
label = np.random.randint(0, 10, size=(4, 3), dtype=np.uint8)

ARGS = {
    "image": image,
    "label": label
}
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 3, dtype family int — 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
softmax_mse_loss Ran
ran; our contract draft was wrong, not the code
deepmed-lab-ecnu/bcp/code/pancreas/losses.py
code served (permissive licence) · get_code("6768062cc3a09e6f")
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 2, dtype family float, shape (2, 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 torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for input_logits and target_logits
# The function expects them to have the same size
# It uses dim=1 for softmax, so we need at least 2 dimensions
# Batch size: 2, Number of classes: 4
batch_size = 2
num_classes = 4

input_logits = torch.randn(batch_size, num_classes)
target_logits = torch.randn(batch_size, num_classes)

ARGS = {
    "input_logits": input_logits,
    "target_logits": target_logits,
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
to_one_hot Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DeepMed-Lab-ECNU/BCP/code/utils/BCP_utils.py
code served (permissive licence) · get_code("ae8cca7f206aff6e")
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, 5, 3, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 a tensor of shape (batch=2, channels=1, height=3, width=4)
# with class indices in range [0, nClasses)
tensor = torch.randint(0, 5, size=(2, 1, 3, 4))

# Number of classes
nClasses = 5

ARGS = {
    'tensor': tensor,
    'nClasses': nClasses,
}
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, 5, 3, 4) — shape (2, 5, 3, 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
mix_loss Not yet run
unverified (harvested, no recorded run)
DeepMed-Lab-ECNU/BCP/code/utils/BCP_utils.py
code served (permissive licence) · get_code("ed4f9ecd63e9fe9f")
How it ran

no invocation recorded.

random_mask Not yet run
unverified (harvested, no recorded run)
deepmed-lab-ecnu/bcp/code/utils/BCP_utils.py
code served (permissive licence) · get_code("ce1c2f509485040b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 1 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 17 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
softmax_mse_loss 1 other paper
1 same year, order not determinable
Chen_MagicNet_Semi-Supervised_Multi-Organ_Segmentation_via_Magic-Cube_Partition_and_Recovery_CVPR_2023_paper (2023 (year only))
MagicNet: Semi-Supervised Multi-Organ Segmentation via Magic-Cube Partition and Recovery

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

In semi-supervised medical image segmentation, there exist empirical mismatch problems between labeled and unlabeled data distribution. The knowledge learned from the labeled data may be largely discarded if treating labeled and unlabeled data separately or in an inconsistent manner. We propose a straightforward method for alleviating the problemcopy-pasting labeled and unlabeled data bidirectionally, in a simple Mean Teacher architecture. The method encourages unlabeled data to learn comprehensive common semantics from the labeled data in both inward and outward directions. More importantly, the consistent learning procedure for labeled and unlabeled data can largely reduce the empirical distribution gap. In detail, we copypaste a random crop from a labeled image (foreground) onto an unlabeled image (background) and an unlabeled image (foreground) onto a labeled image (background), respectively. The two mixed images are fed into a Student network and supervised by the mixed supervisory signals of pseudo-labels and ground-truth. We reveal that the simple mechanism of copy-pasting bidirectionally between labeled and unlabeled data is good enough and the experiments show solid gains (e.g., over 21% Dice improvement on ACDC dataset with 5% labeled data) compared with other state-of-the-arts on various semi-supervised medical image segmentation datasets. Code is avaiable at https: //github.com/DeepMed-Lab-ECNU/BCP.

For agents

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

get_harvested_code_for_paper("2305.00673")
get_code_for_paper("2305.00673")
have("2305.00673")

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

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

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

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

Connect an agent — have() is free.