SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2501.02464 · CVPR · 2025

Depth Any Camera: Zero-Shot Metric Depth Estimation from Any Camera

Liu Ren, Xinyu Huang, Yuliang Guo, Sparsh Garg, S Mahdi, H Miangoleh

arXiv · PDF · Open in the Atlas

Code that ran

3 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 0 failures of our instrument; 9 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2501.02464.json · badge: /api/ran/2501.02464.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
yuliangguo/depth_any_camera marked official in Papers with Code
Papers with Code archive
3 ran · 9 no recorded run
FunctionStatusWhere it lives
AttentionLayer Ran
ran on a synthesized input
yuliangguo/depth_any_camera/dac/models/idisc.py
code served (permissive licence) · get_code("1470abcb2036f263")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float, shape (2, 6, 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
import torch.nn as nn
from einops import rearrange

INIT_ARGS = {
    'sink_dim': 4,
    'hidden_dim': 8,
    'source_dim': 3,
    'output_dim': 5,
    'num_heads': 2,
    'dropout': 0.1,
    'pre_norm': True,
    'norm_layer': nn.LayerNorm,
    'sink_competition': False,
    'qkv_bias': True,
    'eps': 1e-6,
    'out_attn': False,
}

ARGS = {
    'sink': torch.randn(2, 6, 4),
    'source': torch.randn(2, 7, 3),
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
einops, 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, 6, 5) — shape (2, 6, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
MSDeformAttnTransformerEncoder Ran
ran on a synthesized input
yuliangguo/depth_any_camera/dac/models/idisc.py
code served (permissive licence) · get_code("b10f25b29473c32d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float, shape (2, 12, 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 torch.nn as nn
from copy import deepcopy

# Create a minimal encoder layer that the transformer expects
class MinimalEncoderLayer(nn.Module):
    def __init__(self, d_model=4):
        super().__init__()
        self.d_model = d_model
        self.linear = nn.Linear(d_model, d_model)
    
    def forward(self, src, pos, reference_points, spatial_shapes, level_start_index, padding_mask):
        # Minimal forward pass that accepts all expected arguments
        return self.linear(src)

# Create encoder layer instance
encoder_layer = MinimalEncoderLayer(d_model=4)

INIT_ARGS = {
    'encoder_layer': encoder_layer,
    'num_layers': 2,
}

# For forward pass arguments
# batch_size=2, sequence_length=12 (4*3 from two levels: 2*2=4 and 2*3=6, total 10, but we'll use 12)
# d_model=4
# spatial_shapes: 2 levels with shapes (2, 2) and (2, 3)
# valid_ratios: (batch_size, num_levels, 2) for (x, y) ratios

ARGS = {
    'src': torch.randn(2, 12, 4),  # (batch_size=2, seq_len=12, d_model=4)
    'spatial_shapes': torch.tensor([[2, 2], [2, 3]], dtype=torch.long),  # 2 levels
    'level_start_index': torch.tensor([0, 4], dtype=torch.long),  # cumulative start indices
    'valid_ratios': torch.ones(2, 2, 2, dtype=torch.float32),  # (batch=2, num_levels=2, xy=2)
    'pos': torch.randn(2, 12, 4),  # positional embeddings
    'padding_mask': None,
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 12, 4) — shape (2, 12, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
PositionEmbeddingSine Ran
ran on a synthesized input
yuliangguo/depth_any_camera/dac/models/idisc.py
code served (permissive licence) · get_code("e19a81e9ad95806e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, dtype family float, shape (2, 8, 5, 6) 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
import math

from typing import Any, Dict, Optional, Tuple

class PositionEmbeddingSine(nn.Module):

    def __init__(self, num_pos_feats=64, temperature=10000, normalize=False, scale=None):
        super().__init__()
        self.num_pos_feats = num_pos_feats
        self.temperature = temperature
        self.normalize = normalize
        if scale is not None and normalize is False:
            raise ValueError('normalize should be True if scale is passed')
        if scale is None:
            scale = 2 * math.pi
        self.scale = scale

    def forward(self, x: torch.Tensor, mask: Optional[torch.Tensor]=None) -> torch.Tensor:
        if mask is None:
            mask = torch.zeros((x.size(0), x.size(2), x.size(3)), device=x.device, dtype=torch.bool)
        not_mask = ~mask
        y_embed = not_mask.cumsum(1, dtype=torch.float32)
        x_embed = not_mask.cumsum(2, dtype=torch.float32)
        if self.normalize:
            eps = 1e-06
            y_embed = y_embed / (y_embed[:, -1:, :] + eps) * self.scale
            x_embed = x_embed / (x_embed[:, :, -1:] + eps) * self.scale
        dim_t = torch.arange(self.num_pos_feats, dtype=torch.float32, device=x.device)
        dim_t = self.temperature ** (2 * torch.div(dim_t, 2, rounding_mode='floor') / self.num_pos_feats)
        pos_x = x_embed[:, :, :, None] / dim_t
        pos_y = y_embed[:, :, :, None] / dim_t
        pos_x = torch.stack((pos_x[:, :, :, 0::2].sin(), pos_x[:, :, :, 1::2].cos()), dim=4).flatten(3)
        pos_y = torch.stack((pos_y[:, :, :, 0::2].sin(), pos_y[:, :, :, 1::2].cos()), dim=4).flatten(3)
        pos = torch.cat((pos_y, pos_x), dim=3).permute(0, 3, 1, 2)
        return pos

    def __repr__(self, _repr_indent=4):
        head = 'Positional encoding ' + self.__class__.__name__
        body = ['num_pos_feats: {}'.format(self.num_pos_feats), 'temperature: {}'.format(self.temperature), 'normalize: {}'.format(self.normalize), 'scale: {}'.format(self.scale)]
        lines = [head] + [' ' * _repr_indent + line for line in body]
        return '\n'.join(lines)


INIT_ARGS = {
    'num_pos_feats': 4,
    'temperature': 10000,
    'normalize': False,
    'scale': None,
}

ARGS = {
    'x': torch.randn(2, 3, 5, 6),
    'mask': None,
}

if __name__ == '__main__':
    model = PositionEmbeddingSine(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output dtype: {output.dtype}")
    print(model)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 8, 5, 6) — shape (2, 8, 5, 6) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
AFP Not yet run
unverified (harvested, no recorded run)
yuliangguo/depth_any_camera/dac/models/idisc.py
code served (permissive licence) · get_code("fbd83b183d872629")
How it ran

no invocation recorded.

BasePixelDecoder Not yet run
unverified (harvested, no recorded run)
yuliangguo/depth_any_camera/dac/models/idisc.py
code served (permissive licence) · get_code("83928384896c9544")
How it ran

no invocation recorded.

IDisc Not yet run
unverified (harvested, no recorded run)
yuliangguo/depth_any_camera/dac/models/idisc.py
code served (permissive licence) · get_code("71a5ed81089d02cc")
How it ran

no invocation recorded.

ISD Not yet run
unverified (harvested, no recorded run)
yuliangguo/depth_any_camera/dac/models/idisc.py
code served (permissive licence) · get_code("72980093ba1c4588")
How it ran

no invocation recorded.

ISDHead Not yet run
unverified (harvested, no recorded run)
yuliangguo/depth_any_camera/dac/models/idisc.py
code served (permissive licence) · get_code("bb968b2914b536b2")
How it ran

no invocation recorded.

MSDeformAttn Not yet run
unverified (harvested, no recorded run)
yuliangguo/depth_any_camera/dac/models/idisc.py
code served (permissive licence) · get_code("51b14f91451eddd0")
How it ran

no invocation recorded.

MSDeformAttnPixelDecoder Not yet run
unverified (harvested, no recorded run)
yuliangguo/depth_any_camera/dac/models/idisc.py
code served (permissive licence) · get_code("690f567da9f88ad1")
How it ran

no invocation recorded.

MSDeformAttnTransformerEncoderLayer Not yet run
unverified (harvested, no recorded run)
yuliangguo/depth_any_camera/dac/models/idisc.py
code served (permissive licence) · get_code("c54c2ee409c8abce")
How it ran

no invocation recorded.

MSDeformAttnTransformerEncoderOnly Not yet run
unverified (harvested, no recorded run)
yuliangguo/depth_any_camera/dac/models/idisc.py
code served (permissive licence) · get_code("6fa4fc65b2050313")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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
MSDeformAttn
brick of this paper's assembly: helper
6 other papers
5 dated earlier, 1 same year, order not determinable
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
2209.02242 (2022-09)
PTSEFormer: Progressive Temporal-Spatial Enhanced TransFormer Towards Video Object Detection
and 3 more not named here
ISDHead
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2304.06334 (2023-04)
iDisc: Internal Discretization for Monocular Depth Estimation
PositionEmbeddingSine
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2304.06334 (2023-04)
iDisc: Internal Discretization for Monocular Depth Estimation

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

While recent depth foundation models exhibit strong zero-shot generalization, achieving accurate metric depth across diverse camera types-particularly those with large fields of view (FoV) such as fisheye and 360-degree cameras-remains a significant challenge. This paper presents Depth Any Camera (DAC), a powerful zero-shot metric depth estimation framework that extends a perspectivetrained model to effectively handle cameras with varying FoVs. The framework is designed to ensure that all existing 3D data can be leveraged, regardless of the specific camera types used in new applications. Remarkably, DAC is trained exclusively on perspective images but generalizes seamlessly to fisheye and 360-degree cameras without the need for specialized training data. DAC employs Equi-Rectangular Projection (ERP) as a unified image representation, enabling consistent processing of images with diverse FoVs. Its core components include pitch-aware Image-to-ERP conversion with efficient online augmentation to simulate distorted ERP patches from undistorted inputs, FoV alignment operations to enable effective training across a wide range of FoVs, and multi-resolution data augmentation to further address resolution disparities between training and testing. DAC achieves state-of-the-art zeroshot metric depth estimation, improving 1 accuracy by up to 50% on multiple fisheye and 360-degree datasets compared to prior metric depth foundation models, demonstrating robust generalization across camera types.

For agents

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

get_harvested_code_for_paper("2501.02464")
get_code_for_paper("2501.02464")
have("2501.02464")

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

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

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

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

Connect an agent — have() is free.