SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2007.04269 · 2020

SegFix: Model-Agnostic Boundary Refinement for Segmentation

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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; 2 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 2 failures of our instrument; 0 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/2007.04269.json · badge: /api/ran/2007.04269.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
PkuRainBow/OCNet canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
conv3x3 Ran
ran; our contract draft was wrong, not the code
PkuRainBow/OCNet/utils/resnet_block.py
pointer only (licence: MIT); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from lixiaotong97/DSU, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_palette Ran
ran, honoured the contract we drafted
PkuRainBow/OCNet/generate_submit.py
code served (permissive licence) · get_code("26664d79586aad5a")
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 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 torch
import numpy as np

def get_palette(num_cls):
    """ Returns the color map for visualizing the segmentation mask.
    Args:
        num_cls: Number of classes
    Returns:
        The color map
    """
    n = num_cls
    palette = [0] * (n * 3)
    for j in range(0, n):
        lab = j
        palette[j * 3 + 0] = 0
        palette[j * 3 + 1] = 0
        palette[j * 3 + 2] = 0
        i = 0
        while lab:
            palette[j * 3 + 0] |= (lab >> 0 & 1) << 7 - i
            palette[j * 3 + 1] |= (lab >> 1 & 1) << 7 - i
            palette[j * 3 + 2] |= (lab >> 2 & 1) << 7 - i
            i += 1
            lab >>= 3
    return palette

ARGS = {
    "num_cls": 5
}
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 list, ndim 1, dtype family int — 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
outS Ran
ran, honoured the contract we drafted
PkuRainBow/OCNet/utils/resnet_block.py
pointer only (licence: MIT); the stored copy get_code serves, from stu92054/Domain-adaptation-on-segmentation, is pointer only (licence: NONE) · get_code("27504cbeb5811ea6")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from stu92054/Domain-adaptation-on-segmentation, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pad_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
PkuRainBow/OCNet/generate_submit.py
code served (permissive licence) · get_code("6ec02fe7ffee8530")
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 ndarray, ndim 4, dtype family float, shape (2, 3, 6, 8) 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 numpy as np

# Create a small test image with shape (batch, channels, height, width)
# Using distinct dimensions: batch=2, channels=3, height=4, width=5
img = np.random.rand(2, 3, 4, 5).astype(np.float32)

# Target size is (height, width) - we'll pad to larger dimensions
target_size = (6, 8)

ARGS = {
    "img": img,
    "target_size": target_size,
}
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 ndarray, ndim 4, dtype family float, shape (2, 3, 6, 8) — shape (2, 3, 6, 8) 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
predict_sliding Ran
ran on a synthesized input
PkuRainBow/OCNet/generate_submit.py
code served (permissive licence) · get_code("6920be1fc388fa06")
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 ndarray, ndim 4, dtype family float, shape (2, 64, 96, 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 numpy as np
from math import ceil

torch.manual_seed(0)

# Create a minimal network that matches how predict_sliding uses it
class MinimalSegmentationNet(nn.Module):
    def __init__(self, num_classes=5):
        super(MinimalSegmentationNet, self).__init__()
        self.conv1 = nn.Conv2d(3, 16, kernel_size=3, padding=1)
        self.conv2 = nn.Conv2d(16, num_classes, kernel_size=1)
    
    def forward(self, x):
        x = self.conv1(x)
        x = self.conv2(x)
        return x

# Create network instance
net = MinimalSegmentationNet(num_classes=5)
net.eval()

# Create a small test image: (batch=2, channels=3, height=64, width=96)
# Using distinct dimensions so they can be probed
image = np.random.rand(2, 3, 64, 96).astype(np.float32)

# Tile size for sliding window prediction
tile_size = (32, 48)

# Number of classes
classes = 5

# Method parameter - testing with a simple method name
method = "standard"

# Scale parameter
scale = 1

ARGS = {
    "net": net,
    "image": image,
    "tile_size": tile_size,
    "classes": classes,
    "method": method,
    "scale": scale
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, scipy, 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, 64, 96, 5) — shape (2, 64, 96, 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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 4 the same month, 3 later) and 1 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
conv3x3 686 other papers
238 dated earlier, 16 the same month, 431 later, 1 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
outS 11 other papers
7 dated earlier, 1 the same month, 3 later
1612.02646 (2016-12)
Learning Video Object Segmentation from Static Images
1802.10349 (2018-02)
Learning to Adapt Structured Output Space for Semantic Segmentation
1809.09478 (2018-09)
Taking A Closer Look at Domain Shift: Category-level Adversaries for Semantics Consistent Domain Adaptation
and 8 more not named here
get_palette 8 other papers
6 dated earlier, 1 the same month, 1 later
1703.07511 (2017-03)
Deep Photo Style Transfer
1811.11721 (2018-11)
CCNet: Criss-Cross Attention for Semantic Segmentation
1903.04197 (2019-03)
Structured Knowledge Distillation for Dense Prediction
and 5 more not named here
pad_image 4 other papers
3 dated earlier, 1 the same month
1811.11721 (2018-11)
CCNet: Criss-Cross Attention for Semantic Segmentation
1903.04197 (2019-03)
Structured Knowledge Distillation for Dense Prediction
2003.00872 (2020-03)
AlignSeg: Feature-Aligned Segmentation Networks
and 1 more not named here

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

We present a model-agnostic post-processing scheme to improve the boundary quality for the segmentation result that is generated by any existing segmentation model. Motivated by the empirical observation that the label predictions of interior pixels are more reliable, we propose to replace the originally unreliable predictions of boundary pixels by the predictions of interior pixels. Our approach processes only the input image through two steps: (i) localize the boundary pixels and (ii) identify the corresponding interior pixel for each boundary pixel. We build the correspondence by learning a direction away from the boundary pixel to an interior pixel. Our method requires no prior information of the segmentation models and achieves nearly real-time speed. We empirically verify that our SegFix consistently reduces the boundary errors for segmentation results generated from various state-of-the-art models on Cityscapes, ADE20K and GTA5. Code is available at: https://github.com/openseg-group/openseg.pytorch.

For agents

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

get_harvested_code_for_paper("2007.04269")
get_code_for_paper("2007.04269")
have("2007.04269")

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

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

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

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

Connect an agent — have() is free.