-
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' into global-shutter
- Loading branch information
Showing
39 changed files
with
2,392 additions
and
646 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,43 @@ | ||
# python scripts/recon/admm.py -cn diffusercam_mirflickr_single_admm | ||
defaults: | ||
- defaults_recon | ||
- _self_ | ||
|
||
|
||
display: | ||
gamma: null | ||
|
||
input: | ||
# File path for recorded PSF | ||
psf: data/DiffuserCam_Test/psf.tiff | ||
# File path for raw data | ||
data: data/DiffuserCam_Test/diffuser/im5.npy | ||
dtype: float32 | ||
original: data/DiffuserCam_Test/lensed/im5.npy | ||
|
||
torch: True | ||
torch_device: 'cuda:0' | ||
|
||
preprocess: | ||
downsample: 8 # factor for PSF, which is 4x resolution of image | ||
normalize: False | ||
|
||
admm: | ||
# Number of iterations | ||
n_iter: 20 | ||
# Hyperparameters | ||
mu1: 1e-6 | ||
mu2: 1e-5 | ||
mu3: 4e-5 | ||
tau: 0.0001 | ||
#Loading unrolled model | ||
unrolled: True | ||
# checkpoint_fp: pretrained_models/Pre_Unrolled_Post-DiffuserCam/model_weights.pt | ||
checkpoint_fp: outputs/2023-09-11/22-06-49/recon.pt # pre unet and post drunet | ||
pre_process_model: | ||
network : UnetRes # UnetRes or DruNet or null | ||
depth : 2 # depth of each up/downsampling layer. Ignore if network is DruNet | ||
post_process_model: | ||
network : DruNet # UnetRes or DruNet or null | ||
depth : 2 # depth of each up/downsampling layer. Ignore if network is DruNet | ||
|
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,18 @@ | ||
# python scripts/recon/train_unrolled.py -cn fine-tune_PSF | ||
defaults: | ||
- train_unrolledADMM | ||
- _self_ | ||
|
||
#Trainable Mask | ||
trainable_mask: | ||
mask_type: TrainablePSF #Null or "TrainablePSF" | ||
initial_value: psf | ||
mask_lr: 1e-3 | ||
L1_strength: 1.0 #False or float | ||
|
||
#Training | ||
training: | ||
save_every: 5 | ||
|
||
display: | ||
gamma: 2.2 |
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,24 @@ | ||
# python scripts/recon/train_unrolled.py -cn train_pre-post-processing | ||
defaults: | ||
- train_unrolledADMM | ||
- _self_ | ||
|
||
display: | ||
disp: 400 | ||
|
||
reconstruction: | ||
method: unrolled_admm | ||
|
||
pre_process: | ||
network: UnetRes | ||
depth: 2 | ||
post_process: | ||
network: DruNet | ||
depth: 4 | ||
|
||
training: | ||
epoch: 50 | ||
slow_start: 0.01 | ||
|
||
loss: l2 | ||
lpips: 1.0 |
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,18 @@ | ||
# python scripts/recon/train_unrolled.py -cn train_psf_from_scratch | ||
defaults: | ||
- train_unrolledADMM | ||
- _self_ | ||
|
||
# Train Dataset | ||
files: | ||
dataset: mnist # Simulated : "mnist", "fashion_mnist", "cifar10", "CelebA". Measure :"DiffuserCam" | ||
celeba_root: /scratch/bezzam | ||
downsample: 8 | ||
|
||
#Trainable Mask | ||
trainable_mask: | ||
mask_type: TrainablePSF #Null or "TrainablePSF" | ||
initial_value: "random" | ||
|
||
simulation: | ||
grayscale: False |
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
Oops, something went wrong.