SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.02464 · 2023

SAM-Assisted Remote Sensing Imagery Semantic Segmentation with Object and Boundary Constraints

arXiv · PDF · Open in the Atlas

Code that ran

8 of 13 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, 0 violated it and 8 have no contract verdict; 0 failures of our instrument; 5 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/2312.02464.json · badge: /api/ran/2312.02464.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
ctrlovefly/df4lcz community (classifier label)
classifier basis not recorded on the link
8 ran · 5 no recorded run
FunctionStatusWhere it lives
cohen_kappa Ran
ran on a synthesized input
ctrlovefly/df4lcz/fusion.py
code served (permissive licence) · get_code("3401d0b189909f84")
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 float64, ndim 0, 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 numpy as np
from sklearn.metrics import confusion_matrix as sklearn_confusion_matrix

# Create a simple confusion matrix for a 3-class classification problem
# The function uses: .sum(), .shape[0], indexing [i, i], [:, i], [i, :]
confusion_mat = np.array([
    [50, 5, 2],
    [3, 48, 4],
    [2, 6, 45]
], dtype=np.int64)

ARGS = {
    "confusion_matrix": confusion_mat
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
convert_to_binary_adjacency Ran
ran on a synthesized input
ctrlovefly/df4lcz/data_loader_single.py
code served (permissive licence) · get_code("4dd45258f3b7cd08")
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 2, dtype family int, shape (4, 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 numpy as np

# Create a small adjacency matrix with values > and <= threshold
adjacency_matrix = np.array([
    [0.0, 0.5, 0.2, 0.8],
    [0.5, 0.0, 0.9, 0.3],
    [0.2, 0.9, 0.0, 0.6],
    [0.8, 0.3, 0.6, 0.0]
])

threshold = 0.5

ARGS = {
    "adjacency_matrix": adjacency_matrix,
    "threshold": threshold
}
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 2, dtype family int, shape (4, 4) — shape (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_model Ran
ran on a synthesized input
ctrlovefly/df4lcz/call_model.py
code served (permissive licence) · get_code("a950387c2c634731")
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 MockModel. 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)

# Create a minimal mock model class that has a build method
class MockModel(nn.Module):
    def __init__(self, input_shape, channels=None):
        super().__init__()
        self.input_shape = input_shape
        self.channels = channels
        self.linear = nn.Linear(10, 10)
    
    def build(self, input_shape):
        pass
    
    def forward(self, x):
        return x

# Create a minimal GNN model
class MockGNNNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(10, 10)
    
    def forward(self, x):
        return x

# Mock the model module imports by patching
class MockModelModule:
    @staticmethod
    def MSMLA50(input_shape, channels):
        return MockModel(input_shape, channels)
    
    @staticmethod
    def custom_resnet(input_shape):
        return MockModel(input_shape)
    
    @staticmethod
    def resnet11(input_shape):
        return MockModel(input_shape)
    
    @staticmethod
    def densenet(input_shape):
        return MockModel(input_shape)
    
    @staticmethod
    def resnet11_3D(input_shape):
        return MockModel(input_shape)
    
    @staticmethod
    def gnn_Net():
        return MockGNNNet()

# Monkey-patch the model module
import sys
sys.modules['model'] = MockModelModule()

# Define test arguments
ARGS = {
    'model': 'MSMLA50',
    'input_shape': (2, 4, 5, 3),
    'd': 64
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
model, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockModel — a MockModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockModel 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
overall_accuracy_last_classes Ran
ran on a synthesized input
ctrlovefly/df4lcz/fusion.py
code served (permissive licence) · get_code("3e9fda97b5d4ccf3")
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 float64, ndim 0, 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 numpy as np
from sklearn.metrics import confusion_matrix as sklearn_confusion_matrix

# Create a small confusion matrix for testing
# Let's create a 10x10 confusion matrix (so we can test with num_classes=7)
# This represents predictions and ground truth for 10 classes
np.random.seed(0)

# Create a simple confusion matrix
# Total classes = 10, we'll focus on last 7 classes (indices 3-9)
cm = np.array([
    [50, 2, 1, 0, 0, 0, 0, 0, 0, 0],
    [1, 48, 2, 0, 0, 0, 0, 0, 0, 0],
    [0, 1, 45, 3, 0, 0, 0, 0, 0, 0],
    [0, 0, 2, 40, 5, 0, 0, 0, 0, 0],
    [0, 0, 0, 3, 35, 4, 0, 0, 0, 0],
    [0, 0, 0, 0, 2, 42, 3, 0, 0, 0],
    [0, 0, 0, 0, 0, 1, 38, 4, 0, 0],
    [0, 0, 0, 0, 0, 0, 2, 41, 3, 0],
    [0, 0, 0, 0, 0, 0, 0, 3, 39, 5],
    [0, 0, 0, 0, 0, 0, 0, 0, 2, 43],
], dtype=np.int64)

ARGS = {
    "confusion_matrix": cm,
    "num_classes": 7
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
overall_accuracy_top_classes Ran
ran on a synthesized input
ctrlovefly/df4lcz/fusion.py
code served (permissive licence) · get_code("1b2799c803962944")
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 float64, ndim 0, 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 numpy as np
from sklearn.metrics import confusion_matrix

# Create a small confusion matrix for testing
# This represents predictions vs ground truth for a 10-class classification problem
# Shape: (10, 10) where rows are true labels and columns are predicted labels
cm = np.array([
    [8, 1, 0, 0, 0, 0, 0, 0, 0, 1],
    [1, 7, 1, 0, 0, 0, 0, 0, 0, 1],
    [0, 1, 8, 0, 0, 0, 0, 1, 0, 0],
    [0, 0, 0, 9, 0, 0, 0, 0, 0, 1],
    [0, 0, 0, 0, 7, 1, 0, 0, 1, 1],
    [0, 0, 0, 0, 1, 8, 0, 0, 0, 1],
    [0, 0, 0, 0, 0, 0, 9, 0, 0, 1],
    [0, 0, 1, 0, 0, 0, 0, 8, 0, 1],
    [0, 0, 0, 0, 1, 0, 0, 0, 8, 1],
    [1, 1, 0, 1, 1, 1, 1, 1, 1, 2]
], dtype=np.int64)

ARGS = {
    "confusion_matrix": cm,
    "num_classes": 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
step_decay_schedule Ran
ran on a synthesized input
ctrlovefly/df4lcz/lr.py
code served (permissive licence) · get_code("5f189803b90f4a97")
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 LearningRateScheduler. 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
from keras.callbacks import LearningRateScheduler

ARGS = {
    "initial_lr": 0.001,
    "decay_factor": 0.1,
    "step_size": 50
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
keras, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LearningRateScheduler — a LearningRateScheduler output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LearningRateScheduler 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
to_one_hot Ran
ran on a synthesized input
ctrlovefly/df4lcz/data_loader_single.py
code served (permissive licence) · get_code("6736ce9253a49a0d")
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 1, dtype family float, shape (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 numpy as np

# The function to_one_hot takes:
# 1. label: an integer (used as index label - 1)
# 2. num_classes: an integer (size of the output array)

# Create valid arguments
label = 2  # A valid label (will be used as index label-1 = 1)
num_classes = 5  # Number of classes

ARGS = {
    "label": label,
    "num_classes": num_classes
}
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 1, dtype family float, shape (5,) — shape (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
xywh_to_center Ran
ran on a synthesized input
ctrlovefly/df4lcz/testmask.py
code served (permissive licence) · get_code("aa78d3677c5d9a1d")
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 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 torch

torch.manual_seed(0)

# The function expects xywh to be unpackable into 4 values: x, y, w, h
# These should be numeric values (int or float)
# The function performs arithmetic: (x + 0.5 * w) / 320 and (y + 0.5 * h) / 320

xywh = (10, 20, 32, 64)

ARGS = {
    "xywh": xywh
}
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, ndim 1, dtype family float — 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
convolutional_block Not yet run
unverified (harvested, no recorded run)
ctrlovefly/df4lcz/utils.py
code served (permissive licence) · get_code("7a157ccf306a9b96")
How it ran

no invocation recorded.

dense_block Not yet run
unverified (harvested, no recorded run)
ctrlovefly/df4lcz/model.py
code served (permissive licence) · get_code("f0506533eea30438")
How it ran

no invocation recorded.

identity_block Not yet run
unverified (harvested, no recorded run)
ctrlovefly/df4lcz/utils.py
code served (permissive licence) · get_code("2ce069bd528094fd")
How it ran

no invocation recorded.

se_block Not yet run
unverified (harvested, no recorded run)
ctrlovefly/df4lcz/utils.py
code served (permissive licence) · get_code("d7a2e386f04634f5")
How it ran

no invocation recorded.

transition_block Not yet run
unverified (harvested, no recorded run)
ctrlovefly/df4lcz/model.py
code served (permissive licence) · get_code("bca427442a2f9bbe")
How it ran

no invocation recorded.

Also present in other papers' code

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

Semantic segmentation of remote sensing imagery plays a pivotal role in extracting precise information for diverse down-stream applications. Recent development of the Segment Anything Model (SAM), an advanced general-purpose segmentation model, has revolutionized this field, presenting new avenues for accurate and efficient segmentation. However, SAM is limited to generating segmentation results without class information. Consequently, the utilization of such a powerful general vision model for semantic segmentation in remote sensing images has become a focal point of research. In this paper, we present a streamlined framework aimed at leveraging the raw output of SAM by exploiting two novel concepts called SAM-Generated Object (SGO) and SAM-Generated Boundary (SGB). More specifically, we propose a novel object loss and further introduce a boundary loss as augmentative components to aid in model optimization in a general semantic segmentation framework. Taking into account the content characteristics of SGO, we introduce the concept of object consistency to leverage segmented regions lacking semantic information. By imposing constraints on the consistency of predicted values within objects, the object loss aims to enhance semantic segmentation performance. Furthermore, the boundary loss capitalizes on the distinctive features of SGB by directing the model's attention to the boundary information of the object. Experimental results on two well-known datasets, namely ISPRS Vaihingen and LoveDA Urban, demonstrate the effectiveness of our proposed method. The source code for this work will be accessible at https://github.com/sstary/SSRS.

For agents

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

get_harvested_code_for_paper("2312.02464")
get_code_for_paper("2312.02464")
have("2312.02464")

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

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

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

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

Connect an agent — have() is free.