SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · Wilson_SAFE_Sensitivity-Aware_Features_for_Out-of-Distribution_Object_Detection_ICCV_2023_paper · ICCV · 2023

SAFE: Sensitivity-Aware Features for Out-of-Distribution Object Detection

Feras Dayoub, Niko Sünderhauf, Tobias Fischer, Dimity Miller, Samuel Wilson

Open in the Atlas

Code that ran

16 of 18 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; 1 honoured the contract we drafted, 0 violated it and 10 have no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-24; 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/Wilson_SAFE_Sensitivity-Aware_Features_for_Out-of-Distribution_Object_Detection_ICCV_2023_paper.json · badge: /api/ran/Wilson_SAFE_Sensitivity-Aware_Features_for_Out-of-Distribution_Object_Detection_ICCV_2023_paper.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
SamWilso/SAFE_Official canonical (classifier label)
classifier basis: census
16 ran · 2 no recorded run
FunctionStatusWhere it lives
add_safe_args Ran
ran; our contract draft was wrong, not the code
SamWilso/SAFE_Official/SAFE_interface.py
code served (permissive licence) · get_code("6857473bc2149cf5")
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 ArgumentParser. 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 argparse

torch.manual_seed(0)

ARGS = {
    'arg_parser': argparse.ArgumentParser()
}
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 ArgumentParser — a ArgumentParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArgumentParser 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
build_and_load_metaclassifier Ran
ran on a synthesized input
SamWilso/SAFE_Official/SAFE/shared/metaclassifier.py
code served (permissive licence) · get_code("ef9e8ddb4a650a98")
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. 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 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 h5py
import tempfile
import os

torch.manual_seed(0)

# Create a temporary HDF5 file with mean data
temp_dir = tempfile.mkdtemp()
data_fname = os.path.join(temp_dir, "data.h5")

# Create a small HDF5 file with means
with h5py.File(data_fname, 'w') as f:
    means = torch.randn(4).numpy()
    f.create_dataset('mean', data=means)

# Create a temporary model file
modelpath = os.path.join(temp_dir, "model.pth")

# Build a small MLP to save
input_size = 4
mlp = nn.Sequential(
    nn.Linear(input_size, input_size // 2),
    nn.Linear(input_size // 2, input_size // 4),
    nn.Dropout(),
    nn.Linear(input_size // 4, 1),
    nn.Sigmoid()
)

# Initialize weights
def weight_init(m):
    if isinstance(m, nn.Linear):
        nn.init.xavier_uniform_(m.weight)
        m.bias.data.fill_(0.01)

mlp.apply(weight_init)

# Save the model state dict
torch.save(mlp.state_dict(), modelpath)

ARGS = {
    "modelpath": modelpath,
    "data_fname": data_fname
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
h5py, torch — 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
build_metaclassifier Ran
ran on a synthesized input
SamWilso/SAFE_Official/SAFE/shared/metaclassifier.py
code served (permissive licence) · get_code("6d157404c09ef011")
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. 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 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)

# Define ARGS dict with all parameters for build_metaclassifier
ARGS = {
    'input_size': 16,
    'config': {
        'lr': 0.01
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — 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
channel_shift Ran
ran on a synthesized input
SamWilso/SAFE_Official/SAFE/DETR.py
code served (permissive licence) · get_code("fcec40493911ff1d")
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 (3, 4, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function channel_shift takes an image tensor and reorders channels [2, 1, 0]
# It expects a tensor of shape [C, H, W] where C is channels
# We'll create a small 3-channel image tensor with distinct dimensions

img = torch.randn(3, 4, 5)  # 3 channels, 4 height, 5 width

ARGS = {
    "img": img
}
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 (3, 4, 5) — shape (3, 4, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
collate_features Ran
ran on a synthesized input
SamWilso/SAFE_Official/SAFE/shared/datasets.py
code served (permissive licence) · get_code("3a6a044a25aa20fe")
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 numpy as np

torch.manual_seed(0)

# Create sample data batches
# Each batch item is a tuple of (features_array, labels_array)
batch1_x = np.random.randn(2, 4).astype(np.float32)
batch1_y = np.random.randn(2, 3).astype(np.float32)

batch2_x = np.random.randn(2, 4).astype(np.float32)
batch2_y = np.random.randn(2, 3).astype(np.float32)

batch3_x = np.random.randn(2, 4).astype(np.float32)
batch3_y = np.random.randn(2, 3).astype(np.float32)

data = [
    (batch1_x, batch1_y),
    (batch2_x, batch2_y),
    (batch3_x, batch3_y),
]

ARGS = {
    "data": data
}
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 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
crop Ran
ran on a synthesized input
SamWilso/SAFE_Official/SAFE/transforms_detr.py
code served (permissive licence) · get_code("be749223efcc5d15")
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 for cropping
# F.crop expects a PIL Image
image = Image.new('RGB', (10, 8), color='red')

# Create target dict with boxes and masks
target = {
    'labels': torch.tensor([0, 1]),
    'area': torch.tensor([20.0, 30.0]),
    'iscrowd': torch.tensor([0, 0]),
    'patches': torch.tensor([1, 2]),
    'boxes': torch.tensor([
        [1.0, 1.0, 5.0, 4.0],
        [3.0, 2.0, 7.0, 6.0]
    ]),
    'masks': torch.randint(0, 2, (2, 8, 10), dtype=torch.uint8)
}

# Define region as (i, j, h, w) where:
# i = top coordinate
# j = left coordinate
# h = height of crop
# w = width of crop
region = (1, 2, 5, 6)

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
extract_pass Ran
ran on a synthesized input
SamWilso/SAFE_Official/SAFE/extract.py
code served (permissive licence) · get_code("fdf9623529fcecd9")
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 list, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Stand-in class for h5py dataset file
class StandInH5Dataset:
    def __init__(self):
        self.data = {}
    
    def create_dataset(self, name, data):
        self.data[name] = data

# Stand-in predictor (minimal nn.Module)
class StandInPredictor(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 8)
    
    def forward(self, x):
        return self.linear(x)

# Stand-in postprocessors
class StandInPostprocessor:
    def __call__(self, x):
        return x

# Stand-in model_utils with required methods
class StandInModelUtils:
    def preprocess(self, image):
        # Returns preprocessed image tensor
        return image * 0.5
    
    def forward(self, predictor, input_img, postprocessors):
        # Returns (_, boxes, _)
        # boxes should be a list of tensors representing ROIs
        batch_boxes = [torch.tensor([[10, 20, 30, 40], [50, 60, 70, 80]], dtype=torch.float32)]
        return None, batch_boxes, None

# Stand-in tracker with required methods
class StandInTracker(nn.Module):
    def __init__(self):
        super().__init__()
        self.feature_buffer = []
    
    def roi_features(self, rois, height):
        # Returns feature tensor for given ROIs
        # rois is a list of tensors, height is an int
        # Return features of shape (num_rois, feature_dim)
        return torch.randn(2, 256, dtype=torch.float32)
    
    def flush_features(self):
        self.feature_buffer = []

# Construct input_im - list with dict containing 'height' and 'image'
input_im = [
    {
        'height': 480,
        'image': torch.randn(3, 480, 640)  # 3 channels, height, width
    }
]

predictor = StandInPredictor()
postprocessors = [StandInPostprocessor()]
model_utils = StandInModelUtils()
tracker = StandInTracker()
dset_file = StandInH5Dataset()
index = 0
kept_rois = None

ARGS = {
    'input_im': input_im,
    'predictor': predictor,
    'postprocessors': postprocessors,
    'model_utils': model_utils,
    'tracker': tracker,
    'dset_file': dset_file,
    'index': index,
    'kept_rois': kept_rois
}
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 list, ndim 3, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
fpr_and_fdr_at_recall Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
SamWilso/SAFE_Official/SAFE/shared/metric_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from HaoyueBaiZJU/aha, is pointer only (licence: NONE) · get_code("1134ab62338793e2")
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 HaoyueBaiZJU/aha, 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.

get_measures Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
SamWilso/SAFE_Official/SAFE/shared/metric_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from HaoyueBaiZJU/aha, is pointer only (licence: NONE) · get_code("9b1abfca5a67be06")
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 HaoyueBaiZJU/aha, 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.

mapper_func Ran
ran on a synthesized input
SamWilso/SAFE_Official/SAFE/DETR.py
code served (permissive licence) · get_code("66ad9a8a2d47842b")
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 numpy as np
from PIL import Image
import io
import tempfile
import os

torch.manual_seed(0)

# Create a minimal valid image file for testing
def create_test_image():
    """Create a small test image and return its path"""
    img = Image.new('RGB', (8, 8), color='red')
    fd, path = tempfile.mkstemp(suffix='.png')
    img.save(path)
    os.close(fd)
    return path

# Create a test image file
test_image_path = create_test_image()

# Create input_dict with required 'file_name' key
input_dict = {
    'file_name': test_image_path,
    'other_data': 'some_value'
}

# Create a mock transform function that takes img and None
# and returns (transformed_img, something_else)
def mock_transform(img, _):
    # Convert PIL image to tensor
    img_array = np.array(img, dtype=np.float32) / 255.0
    img_tensor = torch.from_numpy(img_array)
    return img_tensor, None

ARGS = {
    'input_dict': input_dict,
    'transform': mock_transform
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, 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
modify_voc_dict Ran
ran on a synthesized input
SamWilso/SAFE_Official/SAFE/RCNN.py
code served (permissive licence) · get_code("70dfef09d0a2149d")
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)

# The function modify_voc_dict takes a single parameter 'a' and returns it unchanged.
# Based on the function body, 'a' should be a dictionary.
# We'll create a valid vocabulary dictionary as a stand-in.

voc_dict = {
    'word1': 0,
    'word2': 1,
    'word3': 2,
    'word4': 3,
    '<pad>': 4,
    '<unk>': 5,
}

ARGS = {
    'a': voc_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 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
permute_to_N_HWA_K Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
SamWilso/SAFE_Official/inference/retinanet_predictor.py
code served (permissive licence) · get_code("573ab018aa3f2e6f")
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) and returned Tensor, ndim 3, dtype family float, shape (2, 90, 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 torch

torch.manual_seed(0)

# The function expects:
# - tensor: a 4D tensor of shape (N, (Ai x K), H, W)
# - K: an integer representing the last dimension size

# Let's construct a valid tensor:
# N=2 (batch size)
# Ai=3 (number of anchors)
# K=4 (feature dimension)
# H=5 (height)
# W=6 (width)
# So the tensor shape should be (2, 3*4, 5, 6) = (2, 12, 5, 6)

N = 2
Ai = 3
K = 4
H = 5
W = 6

tensor = torch.randn(N, Ai * K, H, W)

ARGS = {
    "tensor": tensor,
    "K": K,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 90, 4) — shape (2, 90, 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
preprocess Ran
ran on a synthesized input
SamWilso/SAFE_Official/SAFE/DETR.py
code served (permissive licence) · get_code("7df4906c56ddded7")
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 4, dtype family float, shape (2, 3, 4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torchvision.transforms.functional as F

torch.manual_seed(0)

# Create a small image tensor with shape (batch=2, channels=3, height=4, width=4)
# Values in range [0, 255] to simulate raw image data
img = torch.randint(0, 256, (2, 3, 4, 4), dtype=torch.uint8)

ARGS = {
    "img": img
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
preprocess Ran
ran on a synthesized input
SamWilso/SAFE_Official/SAFE/RCNN.py
code served (permissive licence) · get_code("eafc3299bcc2632d")
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. 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)

# The function preprocess(a) simply returns its argument unchanged
# So we need to provide a valid value for parameter 'a'
# Since the function body just returns a, any value works
# Let's use a small tensor as a representative example

a = torch.randn(2, 4)

ARGS = {
    'a': a
}
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, 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
set_model_defaults Ran
ran; our contract draft was wrong, not the code
SamWilso/SAFE_Official/core/detr_args.py
code served (permissive licence) · get_code("2b0907d9ff39c93b")
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 SimpleArgs. 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

class SimpleArgs:
    def __init__(self, model=None, lr=None, lr_backbone=None, epochs=None, 
                 lr_drop=None, dim_feedforward=None, num_queries=None, 
                 set_cost_class=None, cls_loss_coef=None):
        self.model = model
        self.lr = lr
        self.lr_backbone = lr_backbone
        self.epochs = epochs
        self.lr_drop = lr_drop
        self.dim_feedforward = dim_feedforward
        self.num_queries = num_queries
        self.set_cost_class = set_cost_class
        self.cls_loss_coef = cls_loss_coef

# Create args object with model set to 'detr' and some None values
args = SimpleArgs(
    model='detr',
    lr=None,
    lr_backbone=None,
    epochs=None,
    lr_drop=None,
    dim_feedforward=None,
    num_queries=None,
    set_cost_class=None,
    cls_loss_coef=None
)

ARGS = {'args': args}
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 SimpleArgs — a SimpleArgs output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleArgs 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
stable_cumsum Ran
ran, honoured the contract we drafted
SamWilso/SAFE_Official/SAFE/shared/metric_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from fanghenshaometeor/ood-kernel-pca-ext, is pointer only (licence: NONE) · get_code("d4acb3120a027622")
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 fanghenshaometeor/ood-kernel-pca-ext, 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.

fgsm Not yet run
unverified (harvested, no recorded run)
SamWilso/SAFE_Official/SAFE/transforms_detr.py
code served (permissive licence) · get_code("b1bd6764c6d2103a")
How it ran

no invocation recorded.

resize Not yet run
unverified (harvested, no recorded run)
SamWilso/SAFE_Official/SAFE/transforms_detr.py
code served (permissive licence) · get_code("ffd4848fba38460a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 6 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 5 later) and 12 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
stable_cumsum 29 other papers
10 dated earlier, 12 later, 7 same year, order not determinable · 1 only as an assembly brick
1911.11132 (2019-11)
Scaling Out-of-Distribution Detection for Real-World Settings
2003.08440 (2020-03)
Synthesize then Compare: Detecting Failures and Anomalies for Semantic Segmentation
2104.08812 (2021-04)
Contrastive Out-of-Distribution Detection for Pretrained Transformers
and 26 more not named here
get_measures 5 other papers
1 dated earlier, 3 later, 1 same year, order not determinable
2202.01197 (2022-02)
VOS: Learning What You Don't Know by Virtual Outlier Synthesis
2302.07106 (2023-02)
Normalizing Flow based Feature Synthesis for Outlier-Aware Object Detection
2405.18635 (2024-05)
When and How Does In-Distribution Label Help Out-of-Distribution Detection?
and 2 more not named here
permute_to_N_HWA_K 5 other papers
1 dated earlier, 1 later, 3 same year, order not determinable
2206.11134 (2022-06)
Open Vocabulary Object Detection with Proposal Mining and Prediction Equalization
2302.07106 (2023-02)
Normalizing Flow based Feature Synthesis for Outlier-Aware Object Detection
2303.06500 (2023-03)
Diffusion-Based Hierarchical Multi-Label Object Detection to Analyze Panoramic Dental X-rays
and 2 more not named here
fpr_and_fdr_at_recall 4 other papers
1 dated earlier, 3 later
2202.01197 (2022-02)
VOS: Learning What You Don't Know by Virtual Outlier Synthesis
2405.18635 (2024-05)
When and How Does In-Distribution Label Help Out-of-Distribution Detection?
2409.17504 (2024-09)
HaloScope: Harnessing Unlabeled LLM Generations for Hallucination Detection
and 1 more not named here
add_safe_args 1 other paper
1 dated earlier
2208.13930 (2022-08)
SAFE: Sensitivity-Aware Features for Out-of-Distribution Object Detection
set_model_defaults 1 other paper
1 later
2409.05162 (2024-09)
Can OOD Object Detectors Learn from Foundation Models?

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-24.

Repositories linked to this paper

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

Abstract

We address the problem of out-of-distribution (OOD) detection for the task of object detection. We show that residual convolutional layers with batch normalisation produce Sensitivity-Aware FEatures (SAFE) that are consistently powerful for distinguishing in-distribution from outof-distribution detections. We extract SAFE vectors for every detected object, and train a multilayer perceptron on the surrogate task of distinguishing adversarially perturbed from clean in-distribution examples. This circumvents the need for realistic OOD training data, computationally expensive generative models, or retraining of the base object detector. SAFE outperforms the state-of-the-art OOD object detectors on multiple benchmarks by large margins, e.g. reducing the FPR95 by an absolute 30.6% from 48.3% to 17.7% on the OpenImages dataset.

For agents

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

get_harvested_code_for_paper("Wilson_SAFE_Sensitivity-Aware_Features_for_Out-of-Distribution_Object_Detection_ICCV_2023_paper")
get_code_for_paper("Wilson_SAFE_Sensitivity-Aware_Features_for_Out-of-Distribution_Object_Detection_ICCV_2023_paper")
have("Wilson_SAFE_Sensitivity-Aware_Features_for_Out-of-Distribution_Object_Detection_ICCV_2023_paper")

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

curl https://syntology.ai/api/ran/Wilson_SAFE_Sensitivity-Aware_Features_for_Out-of-Distribution_Object_Detection_ICCV_2023_paper.json

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

[![Syntology run record](https://syntology.ai/api/ran/Wilson_SAFE_Sensitivity-Aware_Features_for_Out-of-Distribution_Object_Detection_ICCV_2023_paper.svg)](https://syntology.ai/paper/Wilson_SAFE_Sensitivity-Aware_Features_for_Out-of-Distribution_Object_Detection_ICCV_2023_paper)

Connect an agent — have() is free.