SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1901.10137 · 2019

Attention-based Context Aggregation Network for Monocular Depth Estimation

arXiv · PDF · Open in the Atlas

Code that ran

6 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 6 have no contract verdict; 0 failures of our instrument; 6 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/1901.10137.json · badge: /api/ran/1901.10137.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
miraiaroha/ACAN canonical (classifier label)
classifier basis: census
6 ran · 6 no recorded run
FunctionStatusWhere it lives
NormalDist Ran
ran on a synthesized input
miraiaroha/ACAN/code/models/losses.py
code served (permissive licence) · get_code("f1f5ec5fdff029e7")
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
from math import pi, sqrt

torch.manual_seed(0)

# x: a tensor input for the normal distribution calculation
# sigma: a scalar or tensor for the standard deviation parameter

x = torch.randn(2, 4)  # Small tensor with batch size 2, dimension 4
sigma = torch.tensor(1.0)  # Standard deviation parameter

ARGS = {
    "x": x,
    "sigma": sigma
}
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 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
create_optimizer Ran
ran on a synthesized input
miraiaroha/ACAN/code/creator/optimizer.py
code served (permissive licence) · get_code("d07cbe27712d5d01")
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 Adam. 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 torch.optim as optim

torch.manual_seed(0)

# Create a minimal nn.Module for optim_params
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

model = SimpleModel()
optim_params = model.parameters()

# Create args object with all required attributes
class Args:
    def __init__(self):
        self.optimizer = 'adam'
        self.lr = 0.001
        self.momentum = 0.9
        self.weight_decay = 1e-5
        self.beta1 = 0.9
        self.beta2 = 0.999
        self.final_lr = 0.1
        self.gamma = 1e-3

args = Args()

ARGS = {
    'args': args,
    'optim_params': optim_params
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
adabound, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Adam — a Adam output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Adam 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
create_params Ran
ran on a synthesized input
miraiaroha/ACAN/code/creator/params.py
code served (permissive licence) · get_code("419d8a3c9480d263")
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 1, 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

torch.manual_seed(0)

class SimpleResNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 4)
        self.layer2 = nn.Linear(4, 4)
        self.layer3 = nn.Linear(4, 4)
        self.layer4 = nn.Linear(4, 4)
        self.layer5 = nn.Linear(4, 4)
        self.layer6 = nn.Linear(4, 4)
        self.layer7 = nn.Linear(4, 4)
        self.layer8 = nn.Linear(4, 4)
        self.head_weight = nn.Linear(4, 3)
        self.head_bias = nn.Linear(4, 3)

class Args:
    def __init__(self, encoder, optimizer, lr, final_lr):
        self.encoder = encoder
        self.optimizer = optimizer
        self.lr = lr
        self.final_lr = final_lr

net = SimpleResNet()
args = Args(encoder='resnet50', optimizer='adabound', lr=0.01, final_lr=0.001)

ARGS = {
    'args': args,
    'net': net
}
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 list, ndim 1, 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
discrete2continuous Ran
ran on a synthesized input
miraiaroha/ACAN/code/models/model.py
code served (permissive licence) · get_code("808145c33a4f073c")
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)

# Create a small discrete depth tensor (batch_size=2, depth_dim=4)
depth = torch.randn(2, 4)

# Set reasonable depth range parameters
d_min = 0.1
d_max = 100.0

# Number of discrete levels
n_c = 5

ARGS = {
    "depth": depth,
    "d_min": d_min,
    "d_max": d_max,
    "n_c": n_c
}
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
get_params Ran
ran on a synthesized input
miraiaroha/ACAN/code/creator/params.py
code served (permissive licence) · get_code("8049f1ba083fcffa")
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. 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)

class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
        self.conv = nn.Conv1d(4, 5, 3)
    
    def forward(self, x):
        return self.linear(x)

class AnotherModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear_layer = nn.Linear(3, 2)
        self.batch_norm = nn.BatchNorm1d(2)
    
    def forward(self, x):
        return self.batch_norm(self.linear_layer(x))

mod = [SimpleModule(), AnotherModule()]

ARGS = {
    'mod': mod,
    'Type': 'linear'
}
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 list — a list 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
img_loader Ran
ran on a synthesized input
miraiaroha/ACAN/code/dataloaders/dataloader.py
code served (permissive licence) · get_code("b66f1ba79bd18978")
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 (10, 10, 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
from PIL import Image
import tempfile
import os

# Create a temporary directory for test images
temp_dir = tempfile.mkdtemp()

# Create a test RGB image
rgb_image = Image.new('RGB', (10, 10), color=(100, 150, 200))
rgb_path = os.path.join(temp_dir, 'test_rgb.png')
rgb_image.save(rgb_path)

# Create a test grayscale image
gray_image = Image.new('L', (10, 10), color=128)
gray_path = os.path.join(temp_dir, 'test_gray.png')
gray_image.save(gray_path)

ARGS = {
    'path': rgb_path,
    'is_rgb': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (10, 10, 3) — shape (10, 10, 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
continuous2discrete Not yet run
unverified (harvested, no recorded run)
miraiaroha/ACAN/code/models/model.py
code served (permissive licence) · get_code("c80c792bc496ed80")
How it ran

no invocation recorded.

create_datasets Not yet run
unverified (harvested, no recorded run)
miraiaroha/ACAN/code/dataloaders/get_datasets.py
code served (permissive licence) · get_code("6c3dd8fb65a40c15")
How it ran

no invocation recorded.

create_lossfunc Not yet run
unverified (harvested, no recorded run)
miraiaroha/ACAN/code/models/get_lossfunc.py
code served (permissive licence) · get_code("1b4a913088f7e432")
How it ran

no invocation recorded.

create_network Not yet run
unverified (harvested, no recorded run)
miraiaroha/ACAN/code/models/get_network.py
code served (permissive licence) · get_code("7f991c24c3f646bc")
How it ran

no invocation recorded.

create_scheduler Not yet run
unverified (harvested, no recorded run)
miraiaroha/ACAN/code/creator/scheduler.py
code served (permissive licence) · get_code("c60cc48bb993e02b")
How it ran

no invocation recorded.

make_decoder Not yet run
unverified (harvested, no recorded run)
miraiaroha/ACAN/code/models/model.py
code served (permissive licence) · get_code("07440157233b90f7")
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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 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.

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

Depth estimation is a traditional computer vision task, which plays a crucial role in understanding 3D scene geometry. Recently, deep-convolutional-neural-networks based methods have achieved promising results in the monocular depth estimation field. Specifically, the framework that combines the multi-scale features extracted by the dilated convolution based block (atrous spatial pyramid pooling, ASPP) has gained the significant improvement in the dense labeling task. However, the discretized and predefined dilation rates cannot capture the continuous context information that differs in diverse scenes and easily introduce the grid artifacts in depth estimation. In this paper, we propose an attention-based context aggregation network (ACAN) to tackle these difficulties. Based on the self-attention model, ACAN adaptively learns the task-specific similarities between pixels to model the context information. First, we recast the monocular depth estimation as a dense labeling multi-class classification problem. Then we propose a soft ordinal inference to transform the predicted probabilities to continuous depth values, which can reduce the discretization error (about 1% decrease in RMSE). Second, the proposed ACAN aggregates both the image-level and pixel-level context information for depth estimation, where the former expresses the statistical characteristic of the whole image and the latter extracts the long-range spatial dependencies for each pixel. Third, for further reducing the inconsistency between the RGB image and depth map, we construct an attention loss to minimize their information entropy. We evaluate on public monocular depth-estimation benchmark datasets (including NYU Depth V2, KITTI). The experiments demonstrate the superiority of our proposed ACAN and achieve the competitive results with the state of the arts.

For agents

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

get_harvested_code_for_paper("1901.10137")
get_code_for_paper("1901.10137")
have("1901.10137")

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

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

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

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

Connect an agent — have() is free.