SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.07703 · 2020

Unsupervised Intra-domain Adaptation for Semantic Segmentation through Self-Supervision

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 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 3 have no contract verdict; 2 failures of our instrument; 3 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/2004.07703.json · badge: /api/ran/2004.07703.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
feipan664/IntraDA canonical (classifier label)
classifier basis: census
3 ran · 2 no recorded run
feipanir/intrada community (classifier label)
classifier basis: plan_row
2 ran · 1 no recorded run
FunctionStatusWhere it lives
colorize Ran
ran on a synthesized input
feipan664/IntraDA/entropy_rank/entropy.py
code served (permissive licence) · get_code("fd2101a3c93f7216")
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 Image. 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 PIL import Image

palette = [128, 64, 128, 244, 35, 232, 70, 70, 70, 102, 102, 156, 190, 153, 153, 153, 153, 153, 250, 170, 30, 220, 220, 0, 107, 142, 35, 152, 251, 152, 70, 130, 180, 220, 20, 60, 255, 0, 0, 0, 0, 142, 0, 0, 70, 0, 60, 100, 0, 80, 100, 0, 0, 230, 119, 11, 32]

def colorize(mask):
    new_mask = Image.fromarray(mask.astype(np.uint8)).convert('P')
    new_mask.putpalette(palette)
    return new_mask

# Create a small mask array with uint8 values (0-255)
mask = np.array([[0, 1, 2, 3],
                 [4, 5, 6, 7],
                 [8, 9, 10, 11],
                 [12, 13, 14, 15]], 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
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 2 and dtype family int 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
cross_entropy_2d Ran
ran on a synthesized input
feipan664/IntraDA/ADVENT/advent/utils/loss.py
code served (permissive licence) · get_code("0e9a4da6df589c1b")
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 0, dtype family float, 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
import torch.nn.functional as F
from torch.autograd import Variable

torch.manual_seed(0)

# Create predict tensor: (n, c, h, w) = (2, 4, 3, 5)
# n=2 (batch size), c=4 (classes), h=3 (height), w=5 (width)
predict = torch.randn(2, 4, 3, 5, requires_grad=True)

# Create target tensor: (n, h, w) = (2, 3, 5)
# Values should be valid class indices (0-3) or 255 (ignore) or -1 (ignore)
target = torch.tensor([
    [[0, 1, 2, 3, 0],
     [1, 2, 3, 0, 1],
     [2, 3, 0, 1, 2]],
    [[3, 0, 1, 2, 3],
     [0, 1, 2, 3, 0],
     [1, 2, 3, 0, 1]]
], dtype=torch.long)

# Ensure target doesn't require gradients
assert not target.requires_grad

ARGS = {
    'predict': predict,
    'target': target
}
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 0, dtype family float, 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
entropy_loss Ran
ran; our contract draft was wrong, not the code
feipanir/intrada/ADVENT/advent/utils/loss.py
code served (permissive licence) · get_code("360b5a2923d789bd")
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 0, dtype family float, 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
import numpy as np

torch.manual_seed(0)

# Create a probabilistic prediction tensor
# Shape: batch_size=2, channels=4, height=3, width=5
# Values should be probabilities (sum to 1 across channels for each spatial location)
batch_size = 2
channels = 4
height = 3
width = 5

# Create a random tensor and normalize it to be a valid probability distribution
v = torch.rand(batch_size, channels, height, width)
# Normalize along the channel dimension so probabilities sum to 1
v = v / (v.sum(dim=1, keepdim=True) + 1e-30)

ARGS = {
    "v": v
}
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 Tensor, ndim 0, dtype family float, 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
find_rare_class Ran
ran on a synthesized input
feipan664/IntraDA/entropy_rank/entropy.py
code served (permissive licence) · get_code("25997aa7ef845f38")
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 set. 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

torch.manual_seed(0)

# The function expects a PyTorch tensor with shape [batch, channels, height, width]
# After indexing [0], it becomes [channels, height, width]
# After transpose(1, 2, 0), it becomes [height, width, channels]
# Then argmax on axis=2, reshape to 512*1024
# So we need channels dimension to have the class logits
# Let's create a tensor with batch=1, channels=19 (typical segmentation), height=512, width=1024

output_pt_tensor = torch.randn(1, 19, 512, 1024)

ARGS = {
    "output_pt_tensor": output_pt_tensor
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
get_fc_discriminator Ran
ran; our contract draft was wrong, not the code
feipanir/intrada/ADVENT/advent/model/discriminator.py
pointer only (licence: MIT); the stored copy get_code serves, from AI-Chen/ColorMapGAN, is pointer only (licence: NONE) · get_code("4cdbe58fbb463198")
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 AI-Chen/ColorMapGAN, 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.

cluster_subdomain Not yet run
unverified (harvested, no recorded run)
feipan664/IntraDA/entropy_rank/entropy.py
code served (permissive licence) · get_code("99126596f4eeddef")
How it ran

no invocation recorded.

get_deeplab_v2 Not yet run
unverified (harvested, no recorded run)
feipanir/intrada/ADVENT/advent/model/deeplabv2.py
pointer only (licence: MIT); the stored copy get_code serves, from valeoai/ADVENT, is pointer only (licence: NOASSERTION) · get_code("91291dfac136d4a8")
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 valeoai/ADVENT, and GitHub could not classify the licence of that repository (NOASSERTION). 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. No invocation recorded.

to_numpy Not yet run
unverified (harvested, no recorded run)
feipan664/IntraDA/intrada/train_UDA.py
code served (permissive licence) · get_code("043a52d8f9ff0f65")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 4 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 4 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
entropy_loss 2 other papers
2 later
2207.10667 (2022-07)
Online Domain Adaptation for Semantic Segmentation in Ever-Changing Conditions
2404.04531 (2024-04)
Decomposition-based Unsupervised Domain Adaptation for Remote Sensing Image Semantic Segmentation
get_deeplab_v2 2 other papers
2 dated earlier
1811.12833 (2018-11)
ADVENT: Adversarial Entropy Minimization for Domain Adaptation in Semantic Segmentation
1907.12859 (2019-07)
ColorMapGAN: Unsupervised Domain Adaptation for Semantic Segmentation Using Color Mapping Generative Adversarial Networks
to_numpy 2 other papers
2 later
2106.02874 (2021-06)
RDA: Robust Domain Adaptation via Fourier Adversarial Attacking
2107.11004 (2021-07)
Domain Adaptive Video Segmentation via Temporal Consistency Regularization
get_fc_discriminator 1 other paper
1 dated earlier
1907.12859 (2019-07)
ColorMapGAN: Unsupervised Domain Adaptation for Semantic Segmentation Using Color Mapping Generative Adversarial Networks

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

Convolutional neural network-based approaches have achieved remarkable progress in semantic segmentation. However, these approaches heavily rely on annotated data which are labor intensive. To cope with this limitation, automatically annotated data generated from graphic engines are used to train segmentation models. However, the models trained from synthetic data are difficult to transfer to real images. To tackle this issue, previous works have considered directly adapting models from the source data to the unlabeled target data (to reduce the inter-domain gap). Nonetheless, these techniques do not consider the large distribution gap among the target data itself (intra-domain gap). In this work, we propose a two-step self-supervised domain adaptation approach to minimize the inter-domain and intra-domain gap together. First, we conduct the inter-domain adaptation of the model; from this adaptation, we separate the target domain into an easy and hard split using an entropy-based ranking function. Finally, to decrease the intra-domain gap, we propose to employ a self-supervised adaptation technique from the easy to the hard split. Experimental results on numerous benchmark datasets highlight the effectiveness of our method against existing state-of-the-art approaches. The source code is available at https://github.com/feipan664/IntraDA.git.

For agents

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

get_harvested_code_for_paper("2004.07703")
get_code_for_paper("2004.07703")
have("2004.07703")

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

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

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

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

Connect an agent — have() is free.