SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.05377 · 2022

Fast building segmentation from satellite imagery and few local labels

arXiv · PDF · Open in the Atlas

Code that ran

11 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 11 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2206.05377.json · badge: /api/ran/2206.05377.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
fuzailpalnak/building-footprint-segmentation community (classifier label)
classifier basis not recorded on the link
11 ran · 2 no recorded run
FunctionStatusWhere it lives
adjust_model Ran
ran on a synthesized input
fuzailpalnak/building-footprint-segmentation/building_footprint_segmentation/utils/py_network.py
code served (permissive licence) · get_code("1667f7b68e3738e3")
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 OrderedDict. 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 collections import OrderedDict

torch.manual_seed(0)

# Create a state dict that mimics what a DataParallel model would produce
# DataParallel prefixes keys with "module."
state_dict = OrderedDict({
    'module.layer1.weight': torch.randn(4, 3),
    'module.layer1.bias': torch.randn(4),
    'module.layer2.weight': torch.randn(5, 4),
    'layer3.weight': torch.randn(2, 5),  # non-DataParallel key for variety
    'layer3.bias': torch.randn(2),
})

ARGS = {
    'state': state_dict
}
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 OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
binary_label Ran
ran on a synthesized input
fuzailpalnak/building-footprint-segmentation/building_footprint_segmentation/helpers/normalizer.py
code served (permissive licence) · get_code("2c18f3606c5f7bc9")
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 3, dtype family float, shape (4, 3, 1) 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
import cv2

# Create a small RGB image (height=4, width=3, channels=3)
# Using small integer values that will be normalized by divide_by_255
mask = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

ARGS = {
    "mask": mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (4, 3, 1) — shape (4, 3, 1) 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
divide_by_255 Ran
ran on a synthesized input
fuzailpalnak/building-footprint-segmentation/building_footprint_segmentation/helpers/normalizer.py
code served (permissive licence) · get_code("13f664b61131099a")
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 3, dtype family float, shape (2, 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 numpy as np

# Create a small test image as a numpy array
# Image with values in the range [0, 255]
img = np.array([
    [[255, 128, 64, 32],
     [200, 150, 100, 50]],
    [[10, 20, 30, 40],
     [255, 0, 128, 64]]
], dtype=np.uint8)

ARGS = {
    "img": img
}
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 3, dtype family float, shape (2, 2, 4) — shape (2, 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
false_positive Ran
ran on a synthesized input
fuzailpalnak/building-footprint-segmentation/building_footprint_segmentation/helpers/metrics.py
code served (permissive licence) · get_code("a77454730f3b825b")
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)

# Create small prediction and ground_truth tensors
# Shape: [batch_size, channels, img_rows, img_cols]
batch_size = 2
channels = 3
img_rows = 4
img_cols = 5

# Create prediction tensor with binary-like values (0 or 1)
prediction = torch.randint(0, 2, (batch_size, channels, img_rows, img_cols), dtype=torch.float32)

# Create ground_truth tensor with binary-like values (0 or 1)
ground_truth = torch.randint(0, 2, (batch_size, channels, img_rows, img_cols), dtype=torch.float32)

ARGS = {
    "prediction": prediction,
    "ground_truth": ground_truth,
}
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
get_scheduler Ran
ran on a synthesized input
fuzailpalnak/building-footprint-segmentation/building_footprint_segmentation/helpers/schedular.py
code served (permissive licence) · get_code("5a57f2000e834661")
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 StepLR. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import torch.optim as optim
import torch.optim.lr_scheduler as lr_scheduler

torch.manual_seed(0)

# Create a minimal model
model = nn.Linear(4, 3)

# Create an optimizer (required by most schedulers)
optimizer = optim.SGD(model.parameters(), lr=0.1)

# Test with a standard PyTorch scheduler
ARGS = {
    "scheduler": "StepLR",
    "optimizer": optimizer,
    "step_size": 10
}
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 StepLR — a StepLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a StepLR 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
gpu_variable Ran
ran on a synthesized input
fuzailpalnak/building-footprint-segmentation/building_footprint_segmentation/utils/py_network.py
code served (permissive licence) · get_code("633741a1d7c602a2")
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. 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

torch.manual_seed(0)

# Test with various input types that the function handles
tensor_input = torch.randn(2, 4)
list_input = [torch.randn(2, 4), torch.randn(3, 5)]
tuple_input = (torch.randn(2, 4), torch.randn(3, 5))
dict_input = {
    'a': torch.randn(2, 4),
    'b': torch.randn(3, 5),
    'nested': {
        'c': torch.randn(2, 3)
    }
}

ARGS = {
    'input_variable': tensor_input
}
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
load_callback Ran
ran on a synthesized input
fuzailpalnak/building-footprint-segmentation/building_footprint_segmentation/helpers/callbacks.py
code served (permissive licence) · get_code("5930f073140c6a19")
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 Callback. 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 datetime
import os
import tempfile

class Callback(object):

    def __init__(self, log_dir):
        self.log_dir = os.path.join(log_dir, datetime.datetime.now().strftime('%Y%m%d-%H%M%S'))

    def on_epoch_begin(self, epoch, logs=None):
        pass

    def on_epoch_end(self, epoch, logs=None):
        pass

    def on_batch_begin(self, batch, logs=None):
        pass

    def on_batch_end(self, batch, logs=None):
        pass

    def on_begin(self, logs=None):
        pass

    def on_end(self, logs=None):
        pass

    def interruption(self, logs=None):
        pass

    def update_params(self, params):
        pass


def load_callback(log_dir: str, callback: str) -> Callback:
    """
    :param log_dir:
    :param callback:
    :return:
    """
    return eval(callback)(log_dir)


temp_dir = tempfile.mkdtemp()

ARGS = {
    'log_dir': temp_dir,
    'callback': 'Callback'
}
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 Callback — a Callback output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Callback 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
min_max_image_net Ran
ran on a synthesized input
fuzailpalnak/building-footprint-segmentation/building_footprint_segmentation/helpers/normalizer.py
code served (permissive licence) · get_code("142809a361bfc90e")
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 3, dtype family float, shape (4, 3, 3) 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 (height, width, channels)
# Using distinct dimensions: 4x3x2 (height x width x channels)
img = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

ARGS = {
    "img": img
}
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 3, dtype family float, shape (4, 3, 3) — shape (4, 3, 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
read_trainer_config Ran
ran on a synthesized input
fuzailpalnak/building-footprint-segmentation/building_footprint_segmentation/segmentation.py
code served (permissive licence) · get_code("fa6b24f3b5e4cd41")
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 tempfile
import yaml
import os

# Create a temporary YAML config file with all required keys
temp_dir = tempfile.mkdtemp()
config_path = os.path.join(temp_dir, "trainer_config.yaml")

config_content = {
    'Segmentation': {'type': 'semantic'},
    'Model': {'name': 'unet', 'channels': 3},
    'Criterion': {'type': 'cross_entropy'},
    'Loader': {'batch_size': 32, 'shuffle': True},
    'Metrics': {'metrics': ['iou', 'dice']},
    'Optimizer': {'type': 'adam', 'lr': 0.001},
    'Callbacks': {'early_stopping': True}
}

with open(config_path, 'w') as f:
    yaml.dump(config_content, f)

ARGS = {
    'config_path': config_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — 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
true_negative Ran
ran on a synthesized input
fuzailpalnak/building-footprint-segmentation/building_footprint_segmentation/helpers/metrics.py
code served (permissive licence) · get_code("9cf1ce667dd29947")
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
from torch import Tensor

torch.manual_seed(0)

# Create tiny tensors for batch_size=2, channels=1, img_rows=4, img_cols=3
batch_size = 2
channels = 1
img_rows = 4
img_cols = 3

# Create prediction tensor with values between 0 and 1
prediction = torch.rand(batch_size, channels, img_rows, img_cols)

# Create ground_truth tensor with values between 0 and 1
ground_truth = torch.rand(batch_size, channels, img_rows, img_cols)

ARGS = {
    "prediction": prediction,
    "ground_truth": ground_truth,
}
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
true_positive Ran
ran on a synthesized input
fuzailpalnak/building-footprint-segmentation/building_footprint_segmentation/helpers/metrics.py
code served (permissive licence) · get_code("eb0c8bd151c3d784")
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
from torch import Tensor

torch.manual_seed(0)

# Create small tensors for prediction and ground_truth
# Shape: [batch_size=2, channels=3, img_rows=4, img_cols=5]
batch_size = 2
channels = 3
img_rows = 4
img_cols = 5

# prediction: binary values (0 or 1)
prediction = torch.randint(0, 2, (batch_size, channels, img_rows, img_cols), dtype=torch.float32)

# ground_truth: binary values (0 or 1)
ground_truth = torch.randint(0, 2, (batch_size, channels, img_rows, img_cols), dtype=torch.float32)

ARGS = {
    "prediction": prediction,
    "ground_truth": ground_truth,
}
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
load_parallel_model Not yet run
unverified (harvested, no recorded run)
fuzailpalnak/building-footprint-segmentation/building_footprint_segmentation/utils/py_network.py
code served (permissive licence) · get_code("94fb27332722fd69")
How it ran

no invocation recorded.

str_to_class Not yet run
unverified (harvested, no recorded run)
fuzailpalnak/building-footprint-segmentation/building_footprint_segmentation/helpers/schedular.py
code served (permissive licence) · get_code("fa11de4317211633")
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-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Innovations in computer vision algorithms for satellite image analysis can enable us to explore global challenges such as urbanization and land use change at the planetary level. However, domain shift problems are a common occurrence when trying to replicate models that drive these analyses to new areas, particularly in the developing world. If a model is trained with imagery and labels from one location, then it usually will not generalize well to new locations where the content of the imagery and data distributions are different. In this work, we consider the setting in which we have a single large satellite imagery scene over which we want to solve an applied problem -- building footprint segmentation. Here, we do not necessarily need to worry about creating a model that generalizes past the borders of our scene but can instead train a local model. We show that surprisingly few labels are needed to solve the building segmentation problem with very high-resolution (0.5m/px) satellite imagery with this setting in mind. Our best model trained with just 527 sparse polygon annotations (an equivalent of 1500 x 1500 densely labeled pixels) has a recall of 0.87 over held out footprints and a R2 of 0.93 on the task of counting the number of buildings in 200 x 200-meter windows. We apply our models over high-resolution imagery in Amman, Jordan in a case study on urban change detection.

For agents

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

get_harvested_code_for_paper("2206.05377")
get_code_for_paper("2206.05377")
have("2206.05377")

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

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

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

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

Connect an agent — have() is free.