SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.12076 · 2022

Phrase-Based Affordance Detection via Cyclic Bilateral Interaction

arXiv · PDF · Open in the Atlas

Code that ran

3 of 9 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; 0 failures of our instrument; 6 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/2202.12076.json · badge: /api/ran/2202.12076.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
lulsheng/cbce-net canonical (classifier label)
classifier basis not recorded on the link
3 ran · 6 no recorded run
FunctionStatusWhere it lives
decode_labels Ran
ran on a synthesized input
lulsheng/cbce-net/tensorflow_deeplab_resnet/deeplab_resnet/utils.py
code served (permissive licence) · get_code("21db0323afb99a3e")
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 int, shape (2, 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 batch of segmentation masks
# Shape: (n, h, w, c) where n=batch_size, h=height, w=width, c=channels
# The mask contains class indices (0 to num_classes-1)
batch_size = 2
height = 4
width = 3
channels = 1

# Create mask with class indices (values should be < num_classes)
mask = np.array([
    [[[0], [1], [2]],
     [[3], [4], [5]],
     [[6], [7], [8]],
     [[9], [10], [11]]],
    
    [[[1], [2], [3]],
     [[4], [5], [6]],
     [[7], [8], [9]],
     [[10], [11], [12]]]
], dtype=np.uint8)

# Verify shape
assert mask.shape == (batch_size, height, width, channels)

ARGS = {
    'mask': mask,
    'num_images': 2,
    'num_classes': 21
}
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 ndarray, ndim 4, dtype family int, shape (2, 4, 3, 3) — shape (2, 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
l2_regularization_loss Ran
ran on a synthesized input
lulsheng/cbce-net/util/loss.py
code served (permissive licence) · get_code("64e03b60c7102569")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create small TensorFlow variables with distinct shapes
var1 = tf.Variable(np.random.randn(2, 3).astype(np.float32))
var2 = tf.Variable(np.random.randn(4, 5).astype(np.float32))
var3 = tf.Variable(np.random.randn(2).astype(np.float32))

variables = [var1, var2, var3]
weight_decay = 0.01

ARGS = {
    "variables": variables,
    "weight_decay": weight_decay
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
weighed_logistic_loss Ran
ran on a synthesized input
lulsheng/cbce-net/util/loss.py
code served (permissive licence) · get_code("9c14d97dc852ea26")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)

# Create small test tensors
batch_size = 2
height = 4
width = 3
channels = 2

# scores: logits tensor, shape should be compatible with sigmoid_cross_entropy_with_logits
# The function reduces over dims [1, 2, 3], so we need at least 4 dimensions
scores = tf.constant(np.random.randn(batch_size, height, width, channels).astype(np.float32))

# labels: binary labels, same shape as scores
labels = tf.constant(np.random.randint(0, 2, size=(batch_size, height, width, channels)).astype(np.float32))

# pos_loss_mult: positive class loss multiplier
pos_loss_mult = 1.0

# neg_loss_mult: negative class loss multiplier
neg_loss_mult = 1.0

ARGS = {
    "scores": scores,
    "labels": labels,
    "pos_loss_mult": pos_loss_mult,
    "neg_loss_mult": neg_loss_mult,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
image_mirroring Not yet run
unverified (harvested, no recorded run)
lulsheng/cbce-net/tensorflow_deeplab_resnet/deeplab_resnet/image_reader.py
code served (permissive licence) · get_code("724b9ce12b144f3a")
How it ran

no invocation recorded.

image_scaling Not yet run
unverified (harvested, no recorded run)
lulsheng/cbce-net/tensorflow_deeplab_resnet/deeplab_resnet/image_reader.py
code served (permissive licence) · get_code("e837d02919bde0e3")
How it ran

no invocation recorded.

inv_preprocess Not yet run
unverified (harvested, no recorded run)
lulsheng/cbce-net/tensorflow_deeplab_resnet/deeplab_resnet/utils.py
code served (permissive licence) · get_code("1a81c38dad61e4cb")
How it ran

no invocation recorded.

logistic_loss_cond Not yet run
unverified (harvested, no recorded run)
lulsheng/cbce-net/util/loss.py
code served (permissive licence) · get_code("40605e728317c5b0")
How it ran

no invocation recorded.

prepare_label Not yet run
unverified (harvested, no recorded run)
lulsheng/cbce-net/tensorflow_deeplab_resnet/deeplab_resnet/utils.py
code served (permissive licence) · get_code("20aef7e14887f20e")
How it ran

no invocation recorded.

random_crop_and_pad_image_and_labels Not yet run
unverified (harvested, no recorded run)
lulsheng/cbce-net/tensorflow_deeplab_resnet/deeplab_resnet/image_reader.py
code served (permissive licence) · get_code("5df9171f430c9524")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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
l2_regularization_loss 2 other papers
2 dated earlier
2010.00514 (2020-10)
Referring Image Segmentation via Cross-Modal Progressive Comprehension
2010.00515 (2020-10)
Linguistic Structure Guided Context Modeling for Referring Image Segmentation
logistic_loss_cond 2 other papers
2 dated earlier
2010.00514 (2020-10)
Referring Image Segmentation via Cross-Modal Progressive Comprehension
2010.00515 (2020-10)
Linguistic Structure Guided Context Modeling for Referring Image Segmentation
weighed_logistic_loss 2 other papers
2 dated earlier
2010.00514 (2020-10)
Referring Image Segmentation via Cross-Modal Progressive Comprehension
2010.00515 (2020-10)
Linguistic Structure Guided Context Modeling for Referring Image Segmentation

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

Affordance detection, which refers to perceiving objects with potential action possibilities in images, is a challenging task since the possible affordance depends on the person's purpose in real-world application scenarios. The existing works mainly extract the inherent human-object dependencies from image/video to accommodate affordance properties that change dynamically. In this paper, we explore to perceive affordance from a vision-language perspective and consider the challenging phrase-based affordance detection problem,i.e., given a set of phrases describing the action purposes, all the object regions in a scene with the same affordance should be detected. To this end, we propose a cyclic bilateral consistency enhancement network (CBCE-Net) to align language and vision features progressively. Specifically, the presented CBCE-Net consists of a mutual guided vision-language module that updates the common features of vision and language in a progressive manner, and a cyclic interaction module (CIM) that facilitates the perception of possible interaction with objects in a cyclic manner. In addition, we extend the public Purpose-driven Affordance Dataset (PAD) by annotating affordance categories with short phrases. The contrastive experimental results demonstrate the superiority of our method over nine typical methods from four relevant fields in terms of both objective metrics and visual quality. The related code and dataset will be released at \url{https://github.com/lulsheng/CBCE-Net}.

For agents

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

get_harvested_code_for_paper("2202.12076")
get_code_for_paper("2202.12076")
have("2202.12076")

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

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

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

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

Connect an agent — have() is free.