Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lcav trainable amplitude mask #106

Closed
wants to merge 59 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
72d0f58
add psf.tiff file
aelalamy42 Nov 17, 2023
96e91b4
Merge branch 'LCAV:main' into main
aelalamy42 Nov 18, 2023
f639321
Merge branch 'main' of github.com:aelalamy42/LenslessPiCam_ML4Science…
aelalamy42 Nov 20, 2023
e68531c
First test for using torch
Ghita2002 Nov 21, 2023
521bba1
Merge branch 'main' of https://github.com/aelalamy42/LenslessPiCam_ML…
Ghita2002 Nov 21, 2023
e0d76bd
Merge branch 'main' of https://github.com/aelalamy42/LenslessPiCam_ML…
Nov 21, 2023
c2646a5
create_mask into torch
Ghita2002 Nov 21, 2023
331e327
phase_retrieval in torch
aelalamy42 Nov 21, 2023
c229522
Merge branch 'Work_Ghita' of https://github.com/aelalamy42/LenslessPi…
Ghita2002 Nov 21, 2023
5e12425
added the height varying mask
Seif-Wessam Nov 23, 2023
356d6ba
MultiLensArray initialization
Ghita2002 Nov 25, 2023
388daf1
Merge branch 'Work_Ghita' of https://github.com/aelalamy42/LenslessPi…
Ghita2002 Nov 25, 2023
515fd11
Adding comments to mask.py
Ghita2002 Nov 25, 2023
0f2d9d1
first half of the MLA
aelalamy42 Nov 25, 2023
eeb9399
implement overlapping check
aelalamy42 Nov 25, 2023
9ce0426
Multilens kind of done and tested
aelalamy42 Nov 26, 2023
b8151a9
Merge pull request #1 from aelalamy42/Work_Ahmed
aelalamy42 Nov 27, 2023
12c63f2
height varying tested
aelalamy42 Nov 27, 2023
7b2a1a4
Update mask.py
aelalamy42 Nov 27, 2023
1dc82fc
Multilens patched
aelalamy42 Nov 27, 2023
2d4d5fc
Merge pull request #2 from aelalamy42/aelalamy42-patch-1
aelalamy42 Nov 27, 2023
7b85737
Merge branch 'main' into travail_seif
aelalamy42 Nov 27, 2023
160c802
Merge pull request #3 from aelalamy42/travail_seif
aelalamy42 Nov 27, 2023
0951bd9
added the torch implementation (as a 2nd option) to the HeightVarying…
Seif-Wessam Nov 27, 2023
228ca0d
set is_torch to TRUE for the height_varying mask
Seif-Wessam Nov 28, 2023
af1818c
added the test for the torch case in test_masks.py
Seif-Wessam Nov 28, 2023
d882653
Merge branch 'main' into Work_Ghita
Ghita2002 Nov 29, 2023
2bd322c
from numpy to torch
Ghita2002 Nov 29, 2023
51e6966
edits to the pytorch implementation
Seif-Wessam Nov 30, 2023
9254864
added the device to HeightVarying
Seif-Wessam Nov 30, 2023
2a92bbb
added the device
Seif-Wessam Nov 30, 2023
7209fee
fix phase of multilens
aelalamy42 Nov 30, 2023
613dc07
added is_Torch to the constructor and to compute_psf
Seif-Wessam Nov 30, 2023
af26708
changed the compute_psf function to include is_torch
Seif-Wessam Nov 30, 2023
def924c
some tests
Ghita2002 Nov 30, 2023
d2684bc
fixed the heightVarying with torch
Seif-Wessam Nov 30, 2023
26acdd1
changed the testing code to have is_Torch=True
Seif-Wessam Nov 30, 2023
de51f5c
corrected the code for testing the torch part of HeightVaryingMask
Seif-Wessam Dec 1, 2023
8c4b49b
improvement to the test.
Seif-Wessam Dec 2, 2023
2cfaa7f
fix phase of multilens
aelalamy42 Dec 4, 2023
fffdc77
merge main
aelalamy42 Dec 4, 2023
394201b
torch implementation of height varying
aelalamy42 Dec 4, 2023
b5aa4c0
Merge pull request #4 from aelalamy42/travail_seif
aelalamy42 Dec 4, 2023
e0dfb26
merge main
aelalamy42 Dec 4, 2023
0796d58
merge main
aelalamy42 Dec 4, 2023
e174292
merge main
aelalamy42 Dec 4, 2023
9282404
not working for now
aelalamy42 Dec 4, 2023
6ee4be4
add comments
aelalamy42 Dec 4, 2023
3780cd1
finish the torch implementation of MLA
aelalamy42 Dec 5, 2023
5717b7c
Merge branch 'main' of github.com:aelalamy42/LenslessPiCam_ML4Science…
aelalamy42 Dec 5, 2023
f2c3c29
Start interface for trainable coded aperture.
ebezzam Dec 6, 2023
cd76a3c
Update trainable mask interface.
ebezzam Dec 6, 2023
21f0d08
beginning of multilens in trainable
aelalamy42 Dec 6, 2023
bc15721
Merge pull request #5 from aelalamy42/Work_Ghita
aelalamy42 Dec 6, 2023
73bb229
Improve trainable mask API.
ebezzam Dec 6, 2023
5e1f8cc
Fix MURA.
ebezzam Dec 6, 2023
2ceca9d
merge main
aelalamy42 Dec 7, 2023
ee71705
Merge branch 'main' of github.com:aelalamy42/LenslessPiCam_ML4Science…
aelalamy42 Dec 7, 2023
922c866
matching names
aelalamy42 Dec 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions configs/train_coded_aperture.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# python scripts/recon/train_unrolled.py -cn train_coded_aperture
defaults:
- train_unrolledADMM
- _self_

# Train Dataset
files:
dataset: mnist # Simulated : "mnist", "fashion_mnist", "cifar10", "CelebA". Measure :"DiffuserCam"
celeba_root: /scratch/bezzam
downsample: 16 # TODO use simulation instead?

#Trainable Mask
trainable_mask:
mask_type: TrainableCodedAperture
optimizer: Adam
mask_lr: 1e-3
L1_strength: False
binary: False
initial_value:
method: MLS
n_bits: 8 # (2**n_bits-1, 2**n_bits-1)
# method: MURA
# n_bits: 25 # (4*nbits*1, 4*nbits*1)

simulation:
grayscale: False
flip: False
scene2mask: 40e-2
mask2sensor: 2e-3
sensor: "rpi_hq"
downsample: 16
object_height: 0.30

training:
crop_preloss: False # crop region for computing loss
batch_size: 4
epoch: 25
eval_batch_size: 16
save_every: 1
1 change: 1 addition & 0 deletions configs/train_unrolledADMM.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ trainable_mask:
initial_value: psf
grayscale: False
mask_lr: 1e-3
optimizer: Adam
L1_strength: 1.0 #False or float

target: "object_plane" # "original" or "object_plane" or "label"
Expand Down
Binary file added data/psf.tiff
Binary file not shown.
Loading
Loading