SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.01164 · CVPR · 2022

Aug-NeRF: Training Stronger Neural Radiance Fields with Triple-Level Physically-Grounded Augmentations

Tianlong Chen, Zhangyang Wang, Peihao Wang, Zhiwen Fan

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 3 failures of our instrument; 2 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/2207.01164.json · badge: /api/ran/2207.01164.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
VITA-Group/Aug-NeRF community
Papers with Code archive
8 ran · 2 no recorded run
FunctionStatusWhere it lives
ImportanceSampler Ran
ran on a synthesized input · constructed an object; no result was computed
VITA-Group/Aug-NeRF/models/adv_nerf_net.py
code served (permissive licence) · get_code("6e88c8a00f9b86c9")
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 an instance of its own class, ImportanceSampler: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'N_importance': 8,
    'perturb': 0.0,
    'lindisp': False,
    'pytest': False,
}
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 ImportanceSampler — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ImportanceSampler 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
MLP Ran
ran on a synthesized input · constructed an object; no result was computed
VITA-Group/Aug-NeRF/models/adv_nerf_net.py
code served (permissive licence) · get_code("6a1b5152a780114b")
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 an instance of its own class, MLP: the run constructed the object and did not call it, so no result was computed. 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 numpy as np

torch.manual_seed(0)

# Create a minimal forward pass test
batch_size = 2
input_ch = 3
input_ch_views = 3
output_ch = 4

# Create input tensor: concatenation of input_pts and input_views
input_pts = torch.randn(batch_size, input_ch)
input_views = torch.randn(batch_size, input_ch_views)
x = torch.cat([input_pts, input_views], dim=-1)

# Create optional adversarial feature (same shape as MLP hidden dimension W)
W = 256
adv_feat = torch.randn(batch_size, W)

ARGS = {
    "D": 8,
    "W": 256,
    "input_ch": 3,
    "input_ch_views": 3,
    "output_ch": 4,
    "skips": [4],
    "use_viewdirs": True,
}
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 MLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLP 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
NeRFMLP Ran
ran on a synthesized input · constructed an object; no result was computed
VITA-Group/Aug-NeRF/models/adv_nerf_net.py
code served (permissive licence) · get_code("f9e11e2b33a68d23")
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 an instance of its own class, NeRFMLP: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "input_dim": 3,
    "output_dim": 4,
    "net_depth": 8,
    "net_width": 256,
    "skips": [4],
    "viewdirs": True,
    "use_embed": True,
    "multires": 10,
    "multires_views": 4,
    "conv_embed": False,
    "netchunk": 1024 * 64,
}
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 NeRFMLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a NeRFMLP 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
StratifiedSampler Ran
ran on a synthesized input · constructed an object; no result was computed
VITA-Group/Aug-NeRF/models/adv_nerf_net.py
code served (permissive licence) · get_code("0e11ee03e026d68c")
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 an instance of its own class, StratifiedSampler: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn as nn

torch.manual_seed(0)

class StratifiedSampler(nn.Module):

    def __init__(self, N_samples, perturb=0.0, lindisp=False, pytest=False):
        """ Init layered sampling
        init_planes: [N_planes, 4], Ax + By + Cz = D
        trainable: Whether planes can be trained by optimizer
        """
        super(StratifiedSampler, self).__init__()
        self.N_samples = N_samples
        self.perturb = perturb
        self.lindisp = lindisp
        self.pytest = pytest

    def forward(self, rays_o, rays_d, bounds, **render_kwargs):
        """ Generate sample points
        Args:
        rays_o: [N_rays, 3] origin points of rays
        rays_d: [N_rays, 3] directions of rays
        
        bounds: [N_rays, 2] near far boundary
        
        render_kwargs: other render parameters

        Return:
        pts: [N_rays, N_samples, 3] Point samples on every ray
        z_vals: [N_rays, N_samples] The z-values of rays
        """
        perturb = render_kwargs.get('perturb', self.perturb)
        N_samples = render_kwargs.get('N_samples', self.N_samples)
        N_rays = rays_o.shape[0]
        near, far = (bounds[..., 0, None], bounds[..., 1, None])
        t_vals = torch.linspace(0.0, 1.0, steps=N_samples, device=rays_o.device)
        if not self.lindisp:
            z_vals = near * (1.0 - t_vals) + far * t_vals
        else:
            z_vals = 1.0 / (1.0 / near * (1.0 - t_vals) + 1.0 / far * t_vals)
        z_vals = z_vals.expand([N_rays, N_samples])
        if perturb > 0.0:
            mids = 0.5 * (z_vals[..., 1:] + z_vals[..., :-1])
            upper = torch.cat([mids, z_vals[..., -1:]], -1)
            lower = torch.cat([z_vals[..., :1], mids], -1)
            t_rand = torch.rand(z_vals.shape, device=z_vals.device)
            if self.pytest:
                np.random.seed(0)
                t_rand = np.random.rand(*list(z_vals.shape))
                t_rand = torch.Tensor(t_rand)
            z_vals = lower + (upper - lower) * t_rand
        adv_zs = render_kwargs.get('adv_zs', None)
        if adv_zs is not None:
            z_vals = z_vals + adv_zs
        pts = rays_o[..., None, :] + rays_d[..., None, :] * z_vals[..., :, None]
        adv_pts = render_kwargs.get('adv_pts', None)
        if adv_pts is not None:
            pts = pts + adv_pts
        return (pts, z_vals, {})


N_rays = 2
N_samples = 4

rays_o = torch.randn(N_rays, 3)
rays_d = torch.randn(N_rays, 3)
bounds = torch.tensor([[0.5, 5.0], [1.0, 6.0]], dtype=torch.float32)

ARGS = {
    'N_samples': N_samples,
    'perturb': 0.0,
    'lindisp': False,
    'pytest': False,
}
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 StratifiedSampler — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a StratifiedSampler 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
VolumetricRenderer Ran
ran on a synthesized input · constructed an object; no result was computed
VITA-Group/Aug-NeRF/models/adv_nerf_net.py
code served (permissive licence) · get_code("e4bffe713f7ef8b6")
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 an instance of its own class, VolumetricRenderer: the run constructed the object and did not call it, so no result was computed. 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.nn.functional as F

torch.manual_seed(0)

class VolumetricRenderer(nn.Module):

    def __init__(self, act_fn=F.relu, white_bkgd=False, raw_noise_std=0.0):
        """
        Nerf MLP backbone
        """
        super(VolumetricRenderer, self).__init__()
        self.raw_noise_std = raw_noise_std
        self.white_bkgd = white_bkgd
        self.act_fn = act_fn
        return

    def forward(self, raw, z_vals, rays_d, **kwargs):
        """Transforms model's predictions to semantically meaningful values.
        Args:
            raw: [num_rays, num_samples, C]. Prediction from model.
            z_vals: [num_rays, num_samples]. Point intervals sampled along the ray.
            rays_d: [num_rays, 3]. Ray directions.
        Returns:
            rgb_map: [num_rays, 3]. Estimated RGB color of a ray.
            disp_map: [num_rays]. Disparity map. Inverse of depth map.
            acc_map: [num_rays]. Sum of weights along each ray.
            weights: [num_rays, num_samples]. Weights assigned to each sampled color.
            depth_map: [num_rays]. Estimated distance to object.
        """
        dists = z_vals[..., 1:] - z_vals[..., :-1]
        dists = torch.cat([dists, 10000000000.0 * torch.ones_like(dists[..., :1])], -1)
        dists = dists * torch.linalg.norm(rays_d[..., None, :], ord=2, dim=-1)
        rgb = torch.sigmoid(raw[..., :-1])
        noise = 0.0
        raw_noise_std = kwargs.get('raw_noise_std', self.raw_noise_std)
        if raw_noise_std > 0.0:
            noise = torch.randn(raw[..., -1].shape, device=raw.device) * raw_noise_std
        adv_raw = kwargs.get('adv_raw', None)
        if adv_raw is not None:
            raw = raw + adv_raw
        alpha = raw[..., -1] + noise
        alpha = 1.0 - torch.exp(-self.act_fn(alpha) * dists)
        Ts = torch.cat([torch.ones_like(alpha[..., :1]), 1.0 - alpha + 1e-10], -1)
        Ts = torch.cumprod(Ts, -1)[..., :-1]
        weights = alpha * Ts
        rgb_map = torch.sum(weights[..., None] * rgb, -2)
        depth_map = torch.sum(weights * z_vals, -1, keepdim=True)
        acc_map = torch.sum(weights, -1, keepdim=True)
        depth_map[acc_map <= 1e-10] = 10000000000.0
        disp_map = 1.0 / torch.max(torch.full_like(depth_map, 1e-10), depth_map / acc_map)
        white_bkgd = kwargs.get('white_bkgd', self.white_bkgd)
        if white_bkgd:
            rgb_map = rgb_map + (1.0 - acc_map)
        return dict(rgb=rgb_map, disp=disp_map, acc=acc_map, weights=weights, depth=depth_map)

# Create small tensors for testing
num_rays = 2
num_samples = 4
channels = 3

raw = torch.randn(num_rays, num_samples, channels + 1)
z_vals = torch.linspace(0.1, 10.0, num_samples).unsqueeze(0).expand(num_rays, -1)
rays_d = torch.randn(num_rays, 3)

ARGS = {
    'act_fn': F.relu,
    'white_bkgd': False,
    'raw_noise_std': 0.0,
}
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 VolumetricRenderer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a VolumetricRenderer 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
img2mse Ran
ran; our contract draft was wrong, not the code
VITA-Group/Aug-NeRF/models/adv_nerf_net.py
code served (permissive licence) · get_code("6e584dced1493176")
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 two small tensors for x and y
# The function computes MSE by taking mean over the last dimension
# So we need tensors with at least 1 dimension
x = torch.randn(2, 4)  # batch size 2, feature dim 4
y = torch.randn(2, 4)  # same shape as x

# Test all three reduction modes
ARGS = {
    'x': x,
    'y': y,
    'reduction': 'mean'
}
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
mse2psnr Ran
ran; our contract draft was wrong, not the code
VITA-Group/Aug-NeRF/models/adv_nerf_net.py
code served (permissive licence) · get_code("c334ef7959ccd528")
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)

# The function mse2psnr takes a single parameter x
# which can be either a float or a tensor
# It performs logarithmic operations on x

# Test with a tensor (the more general case)
x_tensor = torch.tensor([0.001, 0.005], dtype=torch.float32)

ARGS = {
    "x": x_tensor
}
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
transform_rays Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
VITA-Group/Aug-NeRF/models/adv_nerf_net.py
code served (permissive licence) · get_code("b7bd14e91d2770c0")
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 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

torch.manual_seed(0)

# rays_o: ray origins, shape (batch_size, 3)
rays_o = torch.randn(2, 3)

# rays_d: ray directions, shape (batch_size, 3)
rays_d = torch.randn(2, 3)

# cam_id: index to select from rotation and offset, should be an integer
cam_id = 0

# rotation: dict mapping cam_id to euler angles, shape (batch_size, 3)
rotation = {
    0: torch.randn(2, 3),
    1: torch.randn(2, 3)
}

# offset: dict mapping cam_id to translation vectors, shape (batch_size, 3)
offset = {
    0: torch.randn(2, 3),
    1: torch.randn(2, 3)
}

ARGS = {
    "rays_o": rays_o,
    "rays_d": rays_d,
    "cam_id": cam_id,
    "rotation": rotation,
    "offset": offset
}
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 3, 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
AdvNeRFNet Not yet run
unverified (harvested, no recorded run)
VITA-Group/Aug-NeRF/models/adv_nerf_net.py
code served (permissive licence) · get_code("a39905d90943cc1a")
How it ran

no invocation recorded.

NeRFNet Not yet run
unverified (harvested, no recorded run)
VITA-Group/Aug-NeRF/models/adv_nerf_net.py
code served (permissive licence) · get_code("e7e315f58d47324d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 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
transform_rays
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2003.08934 (2020-03)
NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis

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

Neural Radiance Field (NeRF) regresses a neural parameterized scene by differentially rendering multi-view images with ground-truth supervision. However, when interpolating novel views, NeRF often yields inconsistent and visually non-smooth geometric results, which we consider as a generalization gap between seen and unseen views. Recent advances in convolutional neural networks have demonstrated the promise of advanced robust data augmentations, either random or learned, in enhancing both in-distribution and out-of-distribution generalization. Inspired by that, we propose Augmented NeRF (Aug-NeRF), which for the first time brings the power of robust data augmentations into regularizing the NeRF training. Particularly, our proposal learns to seamlessly blend worst-case perturbations into three distinct levels of the NeRF pipeline with physical grounds, including (1) the input coordinates, to simulate imprecise camera parameters at image capture; (2) intermediate features, to smoothen the intrinsic feature manifold; and (3) pre-rendering output, to account for the potential degradation factors in the multi-view image supervision. Extensive results demonstrate that Aug-NeRF effectively boosts NeRF performance in both novel view synthesis (up to 1.5dB PSNR gain) and underlying geometry reconstruction. Furthermore, thanks to the implicit smooth prior injected by the triple-level augmentations, Aug-NeRF can even recover scenes from heavily corrupted images, a highly challenging setting untackled before. Our codes are available in https://github.com/VITA-Group/Aug-NeRF.

For agents

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

get_harvested_code_for_paper("2207.01164")
get_code_for_paper("2207.01164")
have("2207.01164")

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

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

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

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

Connect an agent — have() is free.