SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.06090 · 2024

What Matters When Repurposing Diffusion Models for General Dense Perception Tasks?

arXiv · PDF · Open in the Atlas

Code that ran

8 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 0 have no contract verdict; 8 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2403.06090.json · badge: /api/ran/2403.06090.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
aim-uofa/genpercept canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
HWC3 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aim-uofa/genpercept/GenPercept_v1/hubconf.py
code served (permissive licence) · get_code("f9ec7d70add02b6f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family int, shape (4, 5, 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

# Test case 1: 3-channel RGB image (most common case)
x_rgb = np.random.randint(0, 256, size=(4, 5, 3), dtype=np.uint8)

# Test case 2: 1-channel grayscale image
x_gray = np.random.randint(0, 256, size=(4, 5, 1), dtype=np.uint8)

# Test case 3: 4-channel RGBA image
x_rgba = np.random.randint(0, 256, size=(4, 5, 4), dtype=np.uint8)

# Test case 4: 2D image (will be expanded to 3D with 1 channel)
x_2d = np.random.randint(0, 256, size=(4, 5), dtype=np.uint8)

# Use the RGB case as the primary test
ARGS = {
    "x": x_rgb
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (4, 5, 3) — shape (4, 5, 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
align_scale_median_torch_batch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aim-uofa/genpercept/genpercept/losses/geometry_losses.py
code served (permissive licence) · get_code("4c9c43aab3fc0cd6")
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, 1, 1) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors with distinct dimensions
# B=2 (batch), H=4 (height), W=3 (width)
pred = torch.randn(2, 4, 3)
target = torch.randn(2, 4, 3) + 1.0  # Ensure some positive values
mask = torch.ones(2, 4, 3, dtype=torch.bool)

# Make sure target has some positive values for the mask operation
target = torch.abs(target) + 0.1

ARGS = {
    'pred': pred,
    'target': target,
    'mask': mask,
}
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, 1, 1) — shape (2, 1, 1) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_scale_and_shift Ran
ran; our contract draft was wrong, not the code
aim-uofa/genpercept/genpercept/losses/geometry_losses.py
code served (permissive licence) · get_code("42fe451082384fe7")
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, ndim 2, 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

torch.manual_seed(0)

# Create small tensors with distinct dimensions
batch_size = 2
height = 4
width = 3

# prediction: shape (batch_size, height, width)
prediction = torch.randn(batch_size, height, width, dtype=torch.float32)

# target: shape (batch_size, height, width)
target = torch.randn(batch_size, height, width, dtype=torch.float32)

# mask: shape (batch_size, height, width), binary values
mask = torch.randint(0, 2, (batch_size, height, width), dtype=torch.float32)

ARGS = {
    "prediction": prediction,
    "target": target,
    "mask": mask,
}
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, ndim 2, dtype family float — a tuple 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
gradient_log_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aim-uofa/genpercept/genpercept/losses/gradient_loss.py
code served (permissive licence) · get_code("64a28c95ec2c4293")
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)

# Build tensors for gradient_log_loss
# Shape: (batch=2, channels=3, height=4, width=5)
batch_size = 2
channels = 3
height = 4
width = 5

log_prediction_d = torch.randn(batch_size, channels, height, width)
log_gt = torch.randn(batch_size, channels, height, width)
mask = torch.randint(0, 2, (batch_size, channels, height, width)).float()

ARGS = {
    "log_prediction_d": log_prediction_d,
    "log_gt": log_gt,
    "mask": mask,
}
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
gradient_loss Ran
ran; our contract draft was wrong, not the code
aim-uofa/genpercept/genpercept/losses/gradient_loss.py
code served (permissive licence) · get_code("fe38b7f1ddcaf1f2")
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 small tensors with distinct dimensions
batch_size = 2
height = 4
width = 3
channels = 1

# prediction: [batch, channels, height, width]
prediction = torch.randn(batch_size, channels, height, width)

# target: [batch, channels, height, width]
target = torch.randn(batch_size, channels, height, width)

# mask: [batch, channels, height, width] with binary values
mask = torch.randint(0, 2, (batch_size, channels, height, width)).float()

# reduction function (using the provided one)
def reduction_batch_based(image_loss, M):
    divisor = torch.sum(M)
    if divisor == 0:
        return 0
    else:
        return torch.sum(image_loss) / divisor

ARGS = {
    "prediction": prediction,
    "target": target,
    "mask": mask,
    "reduction": reduction_batch_based,
}
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
match_scale_and_shift Ran
ran; our contract draft was wrong, not the code
aim-uofa/genpercept/genpercept/losses/geometry_losses.py
code served (permissive licence) · get_code("2be26841f6fe76f2")
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, 1, 4, 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

torch.manual_seed(0)

# Create small test tensors
# The function expects tensors with shape either (B, H, W) or (B, C, H, W)
# Let's create 4D tensors (B, C, H, W) where B=2, C=1, H=4, W=3

batch_size = 2
channels = 1
height = 4
width = 3

# Create prediction tensor (B, C, H, W)
prediction = torch.randn(batch_size, channels, height, width)

# Create target tensor (B, C, H, W) with some positive values
# The function checks (target > 0) so we need positive values
target = torch.abs(torch.randn(batch_size, channels, height, width)) + 0.5

ARGS = {
    "prediction": prediction,
    "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 4, dtype family float, shape (2, 1, 4, 3) — shape (2, 1, 4, 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
reduction_batch_based Ran
ran; our contract draft was wrong, not the code
aim-uofa/genpercept/genpercept/losses/gradient_loss.py
pointer only (licence: BSD-2-Clause); the stored copy get_code serves, from ethanygao/Aux-NAS, is pointer only (licence: NONE) · get_code("e8996630fe3501e1")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-2-Clause), but get_code serves the stored copy, first harvested from ethanygao/Aux-NAS, 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.

resize_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aim-uofa/genpercept/GenPercept_v1/hubconf.py
pointer only (licence: BSD-2-Clause); the stored copy get_code serves, from DeepakSridhar/fgdm, is pointer only (licence: NOASSERTION) · get_code("50fd68f6989503c6")
How it ran

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

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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 3 later) and 5 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
HWC3 18 other papers
8 dated earlier, 3 the same month, 6 later, 1 same year, order not determinable
2305.10973 (2023-05)
Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold
2305.16322 (2023-05)
Uni-ControlNet: All-in-One Control to Text-to-Image Diffusion Models
2305.17098 (2023-05)
ControlVideo: Conditional Control for One-shot Text-driven Video Editing and Beyond
and 15 more not named here
resize_image 13 other papers
6 dated earlier, 3 the same month, 3 later, 1 same year, order not determinable
2305.16322 (2023-05)
Uni-ControlNet: All-in-One Control to Text-to-Image Diffusion Models
2305.17098 (2023-05)
ControlVideo: Conditional Control for One-shot Text-driven Video Editing and Beyond
2308.09592 (2023-08)
StableVideo: Text-driven Consistency-aware Diffusion Video Editing
and 10 more not named here
reduction_batch_based 5 other papers
4 dated earlier, 1 later
2109.10563 (2021-09)
Improving 360 Monocular Depth Estimation via Non-local Dense Prediction Transformer and Joint Supervised and Self-supervised Learning
2206.00665 (2022-06)
MonoSDF: Exploring Monocular Geometric Cues for Neural Implicit Surface Reconstruction
2306.05720 (2023-06)
Beyond Surface Statistics: Scene Representations in a Latent Diffusion Model
and 2 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

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

Abstract

Extensive pre-training with large data is indispensable for downstream geometry and semantic visual perception tasks. Thanks to large-scale text-to-image (T2I) pretraining, recent works show promising results by simply fine-tuning T2I diffusion models for dense perception tasks. However, several crucial design decisions in this process still lack comprehensive justification, encompassing the necessity of the multi-step stochastic diffusion mechanism, training strategy, inference ensemble strategy, and fine-tuning data quality. In this work, we conduct a thorough investigation into critical factors that affect transfer efficiency and performance when using diffusion priors. Our key findings are: 1) High-quality fine-tuning data is paramount for both semantic and geometry perception tasks. 2) The stochastic nature of diffusion models has a slightly negative impact on deterministic visual perception tasks. 3) Apart from fine-tuning the diffusion model with only latent space supervision, task-specific image-level supervision is beneficial to enhance fine-grained details. These observations culminate in the development of GenPercept, an effective deterministic one-step fine-tuning paradigm tailed for dense visual perception tasks. Different from the previous multi-step methods, our paradigm has a much faster inference speed, and can be seamlessly integrated with customized perception decoders and loss functions for image-level supervision, which is critical to improving the fine-grained details of predictions. Comprehensive experiments on diverse dense visual perceptual tasks, including monocular depth estimation, surface normal estimation, image segmentation, and matting, are performed to demonstrate the remarkable adaptability and effectiveness of our proposed method.

For agents

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

get_harvested_code_for_paper("2403.06090")
get_code_for_paper("2403.06090")
have("2403.06090")

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

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

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

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

Connect an agent — have() is free.