SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.02072 · CVPR · 2024

EGTR: Extracting Graph from Transformer for Scene Graph Generation

Seunghyun Park, Jinbae Im, Jeongyeon Nam, Nokyung Park, Hyungmin Lee

arXiv · PDF · Open in the Atlas

Code that ran

16 of 17 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, 2 violated it and 0 have no contract verdict; 12 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2404.02072.json · badge: /api/ran/2404.02072.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
naver-ai/egtr canonical (classifier label)
classifier basis: census
16 ran · 1 no recorded run
FunctionStatusWhere it lives
argsort_desc Ran
ran, honoured the contract we drafted
naver-ai/egtr/lib/pytorch_misc.py
code served (permissive licence) · get_code("7d4002289969a288")
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 (12, 2) 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 numpy array with distinct dimensions for testing
# Using shape (3, 4) to have distinct dimensions
scores = np.array([
    [9.2, 3.1, 7.5, 1.2],
    [4.8, 6.3, 2.1, 8.9],
    [5.4, 1.7, 9.1, 3.6]
], dtype=np.float32)

ARGS = {
    "scores": scores
}
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 (12, 2) — shape (12, 2) 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
bbox_iou Ran
ran, violated the contract we drafted
naver-ai/egtr/lib/evaluation/ap_eval_rel.py
code served (permissive licence) · get_code("8b29521250c9137c")
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, 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 torch
import numpy as np

torch.manual_seed(0)

# Create two sets of bounding boxes in (xmin, ymin, xmax, ymax) format
# box1: N=2 boxes
box1 = np.array([
    [10, 20, 50, 60],
    [30, 40, 80, 90]
], dtype=np.float32)

# box2: M=3 boxes
box2 = np.array([
    [15, 25, 55, 65],
    [35, 45, 85, 95],
    [5, 10, 40, 50]
], dtype=np.float32)

ARGS = {
    "box1": box1,
    "box2": box2
}
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 2, dtype family float, shape (2, 3) — shape (2, 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
box_area Ran
ran; our contract draft was wrong, not the code
naver-ai/egtr/model/util.py
code served (permissive licence) · get_code("d642ed19bfc91106")
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 1, dtype family float, shape (2,) 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 a tensor of bounding boxes in (x1, y1, x2, y2) format
# Shape: [N, 4] where N=2 (batch size)
boxes = torch.tensor([
    [0.0, 0.0, 10.0, 5.0],   # box 1: width=10, height=5, area=50
    [2.0, 3.0, 8.0, 9.0]      # box 2: width=6, height=6, area=36
], dtype=torch.float32)

ARGS = {
    "boxes": boxes
}
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 1, dtype family float, shape (2,) — shape (2,) 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
build_position_encoding Ran
ran; our contract draft was wrong, not the code
naver-ai/egtr/model/deformable_detr.py
code served (permissive licence) · get_code("72ceaeb9390c2de9")
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 DeformableDetrSinePositionEmbedding. 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 math

torch.manual_seed(0)

class Config:
    def __init__(self, d_model=128, position_embedding_type='sine'):
        self.d_model = d_model
        self.position_embedding_type = position_embedding_type

ARGS = {
    'config': Config(d_model=128, position_embedding_type='sine')
}
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 DeformableDetrSinePositionEmbedding — a DeformableDetrSinePositionEmbedding output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DeformableDetrSinePositionEmbedding 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
collate_fn Ran
ran; our contract draft was wrong, not the code
naver-ai/egtr/train_egtr.py
code served (permissive licence) · get_code("cdb6e23f77eb4b45")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal feature_extractor that implements the required method
class MinimalFeatureExtractor:
    def pad_and_create_pixel_mask(self, pixel_values, return_tensors=None):
        # Pad all images to the same size and create pixel mask
        # Assume pixel_values is a list of tensors
        max_height = max(pv.shape[1] for pv in pixel_values)
        max_width = max(pv.shape[2] for pv in pixel_values)
        
        padded_values = []
        pixel_masks = []
        
        for pv in pixel_values:
            _, h, w = pv.shape
            # Pad to max size
            padded = torch.zeros(3, max_height, max_width)
            padded[:, :h, :w] = pv
            padded_values.append(padded)
            
            # Create mask (1 where original image, 0 where padded)
            mask = torch.zeros(max_height, max_width)
            mask[:h, :w] = 1
            pixel_masks.append(mask)
        
        if return_tensors == 'pt':
            pixel_values_tensor = torch.stack(padded_values)
            pixel_mask_tensor = torch.stack(pixel_masks)
            return {
                'pixel_values': pixel_values_tensor,
                'pixel_mask': pixel_mask_tensor
            }
        
        return {
            'pixel_values': padded_values,
            'pixel_mask': pixel_masks
        }

# Create sample batch data
# Each item in batch is a tuple of (image_tensor, label)
batch = [
    (torch.randn(3, 4, 4), 0),  # image of shape (3, 4, 4), label 0
    (torch.randn(3, 5, 5), 1),  # image of shape (3, 5, 5), label 1
]

feature_extractor = MinimalFeatureExtractor()

ARGS = {
    'batch': batch,
    'feature_extractor': feature_extractor
}
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 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
convert_to_xywh Ran
ran, honoured the contract we drafted
naver-ai/egtr/lib/evaluation/coco_eval.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from yuhangzang/contextdet, is pointer only (licence: NOASSERTION) · get_code("f31a58bf6457ced5")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from yuhangzang/contextdet, 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. A run is recorded.

crop Ran
ran; our contract draft was wrong, not the code
naver-ai/egtr/model/transform.py
code served (permissive licence) · get_code("2c3f120011363d96")
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. 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 torchvision.transforms.functional as F
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Create a small PIL image (4x3 to distinguish dimensions)
image = Image.new('RGB', (4, 3), color='red')

# Create target dict with boxes and masks
target = {
    'class_labels': torch.tensor([0, 1]),
    'area': torch.tensor([12.0, 8.0]),
    'iscrowd': torch.tensor([0, 0]),
    'boxes': torch.tensor([
        [0.0, 0.0, 2.0, 2.0],
        [1.0, 1.0, 3.0, 3.0]
    ], dtype=torch.float32),
    'masks': torch.ones((2, 3, 4), dtype=torch.uint8)
}

# Region: (i, j, h, w) = (top, left, height, width)
# Using distinct values: i=1, j=1, h=2, w=2
region = (1, 1, 2, 2)

ARGS = {
    'image': image,
    'target': target,
    'region': region
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
dice_loss Ran
ran; our contract draft was wrong, not the code
naver-ai/egtr/model/util.py
code served (permissive licence) · get_code("ca18559102973d9c")
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

torch.manual_seed(0)

# Create input tensor: batch_size=2, spatial dims flattened to 4
inputs = torch.randn(2, 4, requires_grad=True)

# Create target tensor: same shape as inputs, with binary values
targets = torch.randint(0, 2, (2, 4), dtype=torch.float32)

# Number of boxes
num_boxes = 2

ARGS = {
    "inputs": inputs,
    "targets": targets,
    "num_boxes": num_boxes,
}
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
evaluate Ran
ran; our contract draft was wrong, not the code
naver-ai/egtr/lib/evaluation/coco_eval.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from yuhangzang/contextdet, is pointer only (licence: NOASSERTION) · get_code("fe0ddcc2d420c9a0")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from yuhangzang/contextdet, 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. A run is recorded.

get_ap Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
naver-ai/egtr/lib/evaluation/ap_eval_rel.py
code served (permissive licence) · get_code("68d0b7c3f3d24968")
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

# Construct small but valid precision and recall arrays
# These should be monotonically increasing and in range [0, 1]
rec = np.array([0.1, 0.3, 0.5, 0.7, 0.9])
prec = np.array([0.95, 0.85, 0.75, 0.65, 0.55])

ARGS = {
    "rec": rec,
    "prec": prec,
}
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 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
hflip Ran
ran; our contract draft was wrong, not the code
naver-ai/egtr/model/transform.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from kellyiss/situformer, is pointer only (licence: NONE) · get_code("9be9e658b5bd688a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from kellyiss/situformer, 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.

intersect_2d Ran
ran, violated the contract we drafted
naver-ai/egtr/lib/pytorch_misc.py
code served (permissive licence) · get_code("6727d2d8f1d79998")
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 float, shape (2, 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

# Construct two 2D numpy arrays with matching number of columns
x1 = np.array([
    [1, 2, 3, 4],
    [5, 6, 7, 8],
], dtype=np.int32)

x2 = np.array([
    [1, 2, 3, 4],
    [9, 10, 11, 12],
    [5, 6, 7, 8],
], dtype=np.int32)

ARGS = {
    'x1': x1,
    'x2': x2,
}
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 float, shape (2, 3) — shape (2, 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
inverse_sigmoid Ran
ran; our contract draft was wrong, not the code
naver-ai/egtr/model/deformable_detr.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from woodfrog/poly-diffuse, is pointer only (licence: GPL-3.0) · get_code("83c03ceb1307c6c4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from woodfrog/poly-diffuse, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

ms_deform_attn_core_pytorch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
naver-ai/egtr/model/deformable_detr.py
code served (permissive licence) · get_code("c53ec291fabfc643")
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 3, dtype family float, shape (2, 5, 12) 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

torch.manual_seed(0)

# Dimensions:
# N_ = batch size (2)
# S_ = total spatial positions (12)
# M_ = number of heads (3)
# D_ = feature dimension (4)
# Lq_ = query length (5)
# L_ = number of levels (2)
# P_ = number of sampling points (6)

N_ = 2
S_ = 12
M_ = 3
D_ = 4
Lq_ = 5
L_ = 2
P_ = 6

# value: [N_, S_, M_, D_]
value = torch.randn(N_, S_, M_, D_)

# value_spatial_shapes: list of (H_, W_) tuples for each level
# We need H_*W_ to sum to S_
# Level 0: 3x2=6, Level 1: 2x3=6, total=12
value_spatial_shapes = [(3, 2), (2, 3)]

# sampling_locations: [N_, Lq_, M_, L_, P_, 2]
# The last dimension is (x, y) coordinates
sampling_locations = torch.rand(N_, Lq_, M_, L_, P_, 2) * 0.5 + 0.25

# attention_weights: [N_, Lq_, M_, L_, P_]
attention_weights = torch.rand(N_, Lq_, M_, L_, P_)

ARGS = {
    "value": value,
    "value_spatial_shapes": value_spatial_shapes,
    "sampling_locations": sampling_locations,
    "attention_weights": attention_weights,
}
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 3, dtype family float, shape (2, 5, 12) — shape (2, 5, 12) 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
prepare_mAP_dets Ran
ran; our contract draft was wrong, not the code
naver-ai/egtr/lib/evaluation/ap_eval_rel.py
code served (permissive licence) · get_code("407320cfdd98192d")
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. 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

# Create minimal topk_dets with required structure
# Each detection dict needs specific keys for the function to work

topk_dets = [
    {
        'image': 'img_001',
        'det_boxes_s_top': np.array([[10, 20, 30, 40], [50, 60, 70, 80]], dtype=np.float32),
        'det_boxes_o_top': np.array([[15, 25, 35, 45], [55, 65, 75, 85]], dtype=np.float32),
        'det_labels_s_top': np.array([0, 1], dtype=np.int32),
        'det_labels_o_top': np.array([2, 1], dtype=np.int32),
        'det_labels_p_top': np.array([0, 1], dtype=np.int32),
        'det_scores_top': np.array([0.9, 0.8], dtype=np.float32),
        'gt_boxes_sbj': np.array([[12, 22, 32, 42]], dtype=np.float32),
        'gt_boxes_obj': np.array([[17, 27, 37, 47]], dtype=np.float32),
        'gt_labels_sbj': np.array([0], dtype=np.int32),
        'gt_labels_obj': np.array([2], dtype=np.int32),
        'gt_labels_prd': np.array([0], dtype=np.int32),
    },
    {
        'image': 'img_002',
        'det_boxes_s_top': np.array([[11, 21, 31, 41], [51, 61, 71, 81]], dtype=np.float32),
        'det_boxes_o_top': np.array([[16, 26, 36, 46], [56, 66, 76, 86]], dtype=np.float32),
        'det_labels_s_top': np.array([1, 0], dtype=np.int32),
        'det_labels_o_top': np.array([1, 2], dtype=np.int32),
        'det_labels_p_top': np.array([1, 0], dtype=np.int32),
        'det_scores_top': np.array([0.85, 0.75], dtype=np.float32),
        'gt_boxes_sbj': np.array([[13, 23, 33, 43], [52, 62, 72, 82]], dtype=np.float32),
        'gt_boxes_obj': np.array([[18, 28, 38, 48], [57, 67, 77, 87]], dtype=np.float32),
        'gt_labels_sbj': np.array([1, 0], dtype=np.int32),
        'gt_labels_obj': np.array([1, 2], dtype=np.int32),
        'gt_labels_prd': np.array([1, 0], dtype=np.int32),
    }
]

cls_num = 2

ARGS = {
    'topk_dets': topk_dets,
    'cls_num': cls_num,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
sigmoid_focal_loss Ran
ran; our contract draft was wrong, not the code
naver-ai/egtr/model/util.py
code served (permissive licence) · get_code("728119ce133dfec1")
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 as nn

torch.manual_seed(0)

# Create small tensors for inputs and targets
# inputs: predictions (logits) - shape (batch=2, num_predictions=4)
inputs = torch.randn(2, 4, requires_grad=True)

# targets: binary labels with same shape as inputs
targets = torch.randint(0, 2, (2, 4)).float()

# num_boxes: number of boxes for normalization
num_boxes = 2

# alpha: weighting factor for positive/negative balance
alpha = 0.25

# gamma: exponent for modulating factor
gamma = 2.0

ARGS = {
    'inputs': inputs,
    'targets': targets,
    'num_boxes': num_boxes,
    'alpha': alpha,
    'gamma': gamma
}
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
eval_rel_results Not yet run
unverified (harvested, no recorded run)
naver-ai/egtr/lib/evaluation/oi_eval.py
code served (permissive licence) · get_code("e38b3656e1c52b5c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 14 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 1 the same month, 13 later) and 3 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
inverse_sigmoid 51 other papers
42 dated earlier, 8 later, 1 same year, order not determinable · 23 only as an assembly brick
2005.12872 (2020-05)
End-to-End Object Detection with Transformers
2010.04159 (2020-10)
Deformable DETR: Deformable Transformers for End-to-End Object Detection
2103.11161 (2021-03)
MonteFloor: Extending MCTS for Reconstructing Accurate Large-Scale Floor Plans
and 48 more not named here
dice_loss 40 other papers
31 dated earlier, 1 the same month, 8 later · 1 only as an assembly brick
2005.12872 (2020-05)
End-to-End Object Detection with Transformers
2010.04159 (2020-10)
Deformable DETR: Deformable Transformers for End-to-End Object Detection
2103.12115 (2021-03)
End-to-End Trainable Multi-Instance Pose Estimation with Transformers
and 37 more not named here
convert_to_xywh 24 other papers
20 dated earlier, 3 later, 1 same year, order not determinable
1512.02325 (2015-12)
SSD: Single Shot MultiBox Detector
2010.04159 (2020-10)
Deformable DETR: Deformable Transformers for End-to-End Object Detection
2103.11731 (2021-03)
Meta-DETR: Image-Level Few-Shot Object Detection with Inter-Class Correlation Exploitation
and 21 more not named here
evaluate 23 other papers
19 dated earlier, 3 later, 1 same year, order not determinable
1512.02325 (2015-12)
SSD: Single Shot MultiBox Detector
2010.04159 (2020-10)
Deformable DETR: Deformable Transformers for End-to-End Object Detection
2103.11731 (2021-03)
Meta-DETR: Image-Level Few-Shot Object Detection with Inter-Class Correlation Exploitation
and 20 more not named here
hflip 10 other papers
7 dated earlier, 3 later
2106.00666 (2021-06)
You Only Look at One Sequence: Rethinking Transformer in Vision through Object Detection
2112.05375 (2021-12)
Rethinking the Two-Stage Framework for Grounded Situation Recognition
2112.08647 (2021-12)
QAHOI: Query-Based Anchors for Human-Object Interaction Detection
and 7 more not named here
ms_deform_attn_core_pytorch 6 other papers
3 dated earlier, 2 later, 1 same year, order not determinable · 1 only as an assembly brick
2107.14467 (2021-07)
DPT: Deformable Patch-based Transformer for Visual Recognition
2111.14330 (2021-11)
Sparse DETR: Efficient End-to-End Object Detection with Learnable Sparsity
2203.01305 (2022-03)
DN-DETR: Accelerate DETR Training by Introducing Query DeNoising
and 3 more not named here
argsort_desc 5 other papers
3 dated earlier, 2 later
1903.02728 (2019-03)
Graphical Contrastive Losses for Scene Graph Parsing
2004.00436 (2020-04)
Exploring Long Tail Visual Relationship Recognition with Large Vocabulary
2403.17709 (2024-03)
Groupwise Query Specialization and Quality-Aware Multi-Assignment for Transformer-based Visual Relationship Detection
and 2 more not named here
intersect_2d 5 other papers
3 dated earlier, 2 later
2004.00436 (2020-04)
Exploring Long Tail Visual Relationship Recognition with Large Vocabulary
2103.16083 (2021-03)
Fully Convolutional Scene Graph Generation
2403.17709 (2024-03)
Groupwise Query Specialization and Quality-Aware Multi-Assignment for Transformer-based Visual Relationship Detection
and 2 more not named here
sigmoid_focal_loss 2 other papers
1 dated earlier, 1 later
2403.05297 (2024-03)
PEEB: Part-based Image Classifiers with an Explainable and Editable Language Bottleneck
2507.19993 (2025-07)
FROSS: Faster-than-Real-Time Online 3D Semantic Scene Graph Generation from RGB-D Images
box_area 1 other paper
1 later
2507.19993 (2025-07)
FROSS: Faster-than-Real-Time Online 3D Semantic Scene Graph Generation from RGB-D Images
build_position_encoding 1 other paper
1 later
2507.19993 (2025-07)
FROSS: Faster-than-Real-Time Online 3D Semantic Scene Graph Generation from RGB-D Images
collate_fn 1 other paper
1 later
2507.19993 (2025-07)
FROSS: Faster-than-Real-Time Online 3D Semantic Scene Graph Generation from RGB-D Images
crop 1 other paper
1 later
2507.19993 (2025-07)
FROSS: Faster-than-Real-Time Online 3D Semantic Scene Graph Generation from RGB-D Images
get_ap 1 other paper
1 dated earlier
2003.12962 (2020-03)
GPS-Net: Graph Property Sensing Network for Scene Graph Generation

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

Scene Graph Generation (SGG) is a challenging task of detecting objects and predicting relationships between objects. After DETR was developed, one-stage SGG models based on a one-stage object detector have been actively studied. However, complex modeling is used to predict the relationship between objects, and the inherent relationship between object queries learned in the multi-head self-attention of the object detector has been neglected. We propose a lightweight one-stage SGG model that extracts the relation graph from the various relationships learned in the multi-head self-attention layers of the DETR decoder. By fully utilizing the self-attention by-products, the relation graph can be extracted effectively with a shallow relation extraction head. Considering the dependency of the relation extraction task on the object detection task, we propose a novel relation smoothing technique that adjusts the relation label adaptively according to the quality of the detected objects. By the relation smoothing, the model is trained according to the continuous curriculum that focuses on object detection task at the beginning of training and performs multi-task learning as the object detection performance gradually improves. Furthermore, we propose a connectivity prediction task that predicts whether a relation exists between object pairs as an auxiliary task of the relation extraction. We demonstrate the effectiveness and efficiency of our method for the Visual Genome and Open Image V6 datasets. Our code is publicly available at https://github.com/naver-ai/egtr.

For agents

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

get_harvested_code_for_paper("2404.02072")
get_code_for_paper("2404.02072")
have("2404.02072")

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

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

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

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

Connect an agent — have() is free.