SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.15440 · 2020

FlatNet: Towards Photorealistic Scene Reconstruction from Lensless Measurements

arXiv · PDF · Open in the Atlas

Code that ran

7 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 5 have no contract verdict; 2 failures of our instrument; 1 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2010.15440.json · badge: /api/ran/2010.15440.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
siddiquesalman/flatnet canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
swish Ran
ran; our contract draft was wrong, not the code
siddiquesalman/flatnet/models.py
code served (permissive licence) · get_code("0f786c407fb1ee4c")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) 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. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T22:33:52Z). 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 swish takes a single parameter 'x' which is used with:
# - torch.sigmoid(x) - requires a tensor
# - x * ... - requires a tensor that supports multiplication
# So x should be a tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
siddiquesalman/flatnet/models.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from xiamenwcy/pictorial_net, is pointer only (licence: NONE) · get_code("18fbe72ffac82ee3")
How it ran

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

demosaic_raw Ran
ran on a synthesized input
siddiquesalman/flatnet/dataloader.py
code served (permissive licence) · get_code("cfca12b302e6acd4")
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 (4, 500, 620) 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
import torch
import skimage

torch.manual_seed(0)

# The function expects a torch tensor with shape (batch, height, width)
# After processing, it expects to call .numpy() on it
# The function expects the raw image to be 1024x1280 (since it downsamples by 2x2)
# to end up with 512x640 before cropping

meas = torch.randint(0, 65535, (1, 1024, 1280), dtype=torch.int32).float()

ARGS = {
    "meas": meas
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage, 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 (4, 500, 620) — shape (4, 500, 620) 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
dilconv3x3 Ran
ran on a synthesized input
siddiquesalman/flatnet/models.py
code served (permissive licence) · get_code("092bdc7ef99f8af5")
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 Conv2d. 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)

ARGS = {
    "in_channels": 3,
    "out_channels": 16,
    "stride": 1,
    "dilation": 2,
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
get_paths Ran
ran on a synthesized input
siddiquesalman/flatnet/dataloader.py
code served (permissive licence) · get_code("bbf2af5cbb114ceb")
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 tempfile
import os

# Create a temporary file with sample path data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write('path1/to/file1.txt\n')
temp_file.write('path2/to/file2.txt\n')
temp_file.write('path3/to/file3.txt\n')
temp_file.close()

ARGS = {
    'fname': temp_file.name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
train_discriminator_epoch Ran
ran on a synthesized input
siddiquesalman/flatnet/fns_all.py
code served (permissive licence) · get_code("85d17c4f26c7e361")
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
import torch.optim as optim

torch.manual_seed(0)

# Define a simple generator
class SimpleGenerator(nn.Module):
    def __init__(self):
        super(SimpleGenerator, self).__init__()
        self.fc = nn.Linear(4, 3)
    
    def forward(self, x):
        # Returns (high_res_fake, _)
        output = self.fc(x)
        return output, None

# Define a simple discriminator
class SimpleDiscriminator(nn.Module):
    def __init__(self):
        super(SimpleDiscriminator, self).__init__()
        self.fc = nn.Linear(3, 1)
    
    def forward(self, x):
        return self.fc(x)
    
    def train(self, mode=True):
        super().train(mode)
        return self

# Create instances
gen = SimpleGenerator()
dis = SimpleDiscriminator()

# Create optimizer
optim_dis = optim.Adam(dis.parameters(), lr=0.0002)

# Create loss criterion
criterion = nn.BCEWithLogitsLoss()

# Create a simple train loader (list of (X_train, Y_train) tuples)
train_loader = [
    (torch.randn(2, 4), torch.randn(2, 3)),
    (torch.randn(2, 4), torch.randn(2, 3))
]

# Parameters
epochs = 1
disc_err = []
device = 'cpu'

ARGS = {
    'gen': gen,
    'dis': dis,
    'optim_dis': optim_dis,
    'criterion': criterion,
    'train_loader': train_loader,
    'epochs': epochs,
    'disc_err': disc_err,
    'device': device
}
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
validate Ran
ran on a synthesized input
siddiquesalman/flatnet/fns_all.py
code served (permissive licence) · get_code("b3cfd3681d483110")
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 torch.nn as nn
from torch.autograd import Variable

torch.manual_seed(0)

# Generator model
class Generator(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 4)
    
    def forward(self, x):
        out = self.fc(x)
        return out, None

# Discriminator model
class Discriminator(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 1)
    
    def forward(self, x):
        return self.fc(x)

# VGG model with relu2_2 and relu4_3 attributes
class VGGStandIn(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 4)
    
    def forward(self, x):
        # Return an object with relu2_2 and relu4_3 attributes
        out = self.fc(x)
        result = type('obj', (object,), {'relu2_2': out, 'relu4_3': out})()
        return result

# Create instances
gen = Generator()
dis = Discriminator()
vgg = VGGStandIn()

# Weights
wts = [1.0, 0.5, 0.3]

# Validation loader - list of (X, Y) tuples with batch size 2
val_loader = [
    (torch.randn(2, 4), torch.randn(2, 4)),
    (torch.randn(2, 4), torch.randn(2, 4)),
    (torch.randn(2, 4), torch.randn(2, 4)),
    (torch.randn(2, 4), torch.randn(2, 4)),
    (torch.randn(2, 4), torch.randn(2, 4)),
    (torch.randn(2, 4), torch.randn(2, 4)),
]

# Loss criteria
gen_criterion = nn.MSELoss()
dis_criterion = nn.BCEWithLogitsLoss()

# Device
device = torch.device('cpu')

ARGS = {
    'gen': gen,
    'dis': dis,
    'vgg': vgg,
    'wts': wts,
    'val_loader': val_loader,
    'gen_criterion': gen_criterion,
    'dis_criterion': dis_criterion,
    'device': device
}
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
train_full_epoch Not yet run
unverified (harvested, no recorded run)
siddiquesalman/flatnet/fns_all.py
code served (permissive licence) · get_code("a3ee7418e1672b76")
How it ran

no invocation 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, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 2 later) and 6 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
swish 206 other papers
47 dated earlier, 5 the same month, 153 later, 1 same year, order not determinable · 44 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1805.12114 (2018-05)
Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models
1809.01357 (2018-09)
Zero Shot Learning for Code Education: Rubric Sampling with Deep Learning Inference
and 203 more not named here
conv3x3 15 other papers
5 dated earlier, 1 the same month, 9 later
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1805.04635 (2018-05)
Direction-aware Spatial Context Features for Shadow Detection and Removal
1807.01697 (2018-07)
Benchmarking Neural Network Robustness to Common Corruptions and Surface Variations
and 12 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-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

Lensless imaging has emerged as a potential solution towards realizing ultra-miniature cameras by eschewing the bulky lens in a traditional camera. Without a focusing lens, the lensless cameras rely on computational algorithms to recover the scenes from multiplexed measurements. However, the current iterative-optimization-based reconstruction algorithms produce noisier and perceptually poorer images. In this work, we propose a non-iterative deep learning based reconstruction approach that results in orders of magnitude improvement in image quality for lensless reconstructions. Our approach, called $\textit{FlatNet}$, lays down a framework for reconstructing high-quality photorealistic images from mask-based lensless cameras, where the camera's forward model formulation is known. FlatNet consists of two stages: (1) an inversion stage that maps the measurement into a space of intermediate reconstruction by learning parameters within the forward model formulation, and (2) a perceptual enhancement stage that improves the perceptual quality of this intermediate reconstruction. These stages are trained together in an end-to-end manner. We show high-quality reconstructions by performing extensive experiments on real and challenging scenes using two different types of lensless prototypes: one which uses a separable forward model and another, which uses a more general non-separable cropped-convolution model. Our end-to-end approach is fast, produces photorealistic reconstructions, and is easy to adopt for other mask-based lensless cameras.

For agents

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

get_harvested_code_for_paper("2010.15440")
get_code_for_paper("2010.15440")
have("2010.15440")

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

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

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

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

Connect an agent — have() is free.