-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:LCAV/LenslessPiCam into main
- Loading branch information
Showing
23 changed files
with
1,597 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
defaults: | ||
- mask_sim_single | ||
- _self_ | ||
|
||
seed: 0 | ||
save: True | ||
|
||
files: | ||
dataset: data/celeba_mini | ||
image_ext: jpg | ||
n_files: 10 # null to use all | ||
|
||
simulation: | ||
object_height: [0.25, 0.3] # range for random height, or scalar | ||
random_shift: False | ||
grayscale: False | ||
|
||
# torch for reconstruction | ||
torch: False | ||
torch_device: 'cuda:0' | ||
|
||
recon: | ||
|
||
algo: "tikhonov" # "tikhonov" or "admm" or None to skip | ||
|
||
tikhonov: | ||
reg: 3e-4 | ||
|
||
admm: | ||
# Recommend to not display, ok for small number of files, otherwise many windows will pop up! | ||
disp_iter: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
hydra: | ||
job: | ||
chdir: True # change to output folder | ||
|
||
|
||
files: | ||
original: data/celeba_mini/000019.jpg | ||
#original: data/original/mnist_3.png | ||
|
||
save: True | ||
|
||
simulation: | ||
object_height: 0.3 | ||
# these distance parameters are typically fixed for a given PSF | ||
scene2mask: 40e-2 | ||
mask2sensor: 4e-3 | ||
# see waveprop.devices | ||
sensor: "rpi_hq" | ||
snr_db: 20 | ||
# Downsampling for PSF | ||
downsample: 8 | ||
|
||
# max val in simulated measured (quantized 8 bits) | ||
max_val: 230 | ||
|
||
image_format: rgb # rgb, grayscale, bayer_rggb, bayer_bggr, bayer_grbg, bayer_gbrg | ||
|
||
flatcam: False # only supported if mask.type is "MURA" or "MLS" | ||
|
||
|
||
mask: | ||
type: "MLS" # "MURA", "MLS", "FZA", "PhaseContour" | ||
|
||
# Coded Aperture (MURA or MLS) | ||
#flatcam_method: 'MLS' | ||
n_bits: 8 # e.g. 8 for MLS, 99 for MURA | ||
|
||
# Phase Contour | ||
noise_period: [16, 16] | ||
refractive_index: 1.2 | ||
phase_mask_iter: 10 | ||
|
||
# Fresnel Zone Aperture | ||
radius: 0.32e-3 | ||
|
||
|
||
recon: | ||
|
||
algo: "admm" # tikhonov or admm | ||
|
||
tikhonov: | ||
reg: 3e-4 | ||
|
||
admm: | ||
n_iter: 20 | ||
disp_iter: 2 | ||
# Hyperparameters | ||
mu1: 1e-6 | ||
mu2: 1e-5 | ||
mu3: 4e-5 | ||
tau: 0.0001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ Contents | |
measurement | ||
reconstruction | ||
evaluation | ||
mask | ||
sensor | ||
utilities | ||
demo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.. automodule:: lensless.hardware.mask | ||
|
||
|
||
Abstract Mask Class | ||
~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. autoclass:: lensless.hardware.mask.Mask | ||
:members: | ||
:special-members: __init__ | ||
|
||
|
||
Coded Aperture (FlatCam) | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. autoclass:: lensless.hardware.mask.CodedAperture | ||
:members: | ||
:special-members: __init__ | ||
|
||
|
||
Phase Contour (PhlatCam) | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. autoclass:: lensless.hardware.mask.PhaseContour | ||
:members: | ||
:special-members: __init__ | ||
|
||
|
||
Fresnel Zone Aperture | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. autoclass:: lensless.hardware.mask.FresnelZoneAperture | ||
:members: | ||
:special-members: __init__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.