-
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.
Upload measured datasets to Hugging Face (#114)
* Fixes to run classify script. * Fixes to dataset reconstruction. * Add script for uploading measured dataset. * Add extra files. * Better configs. * Update documentation. * Rotate if necessary. * Add badge to notebooks. * Add hugging face badge. * Improve dataset script to use data from Hugging Face. * Add todo. * Update CHANGELOG.
- Loading branch information
Showing
14 changed files
with
369 additions
and
105 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# python scripts/recon/dataset.py -cn recon_celeba_digicam | ||
defaults: | ||
- recon_dataset | ||
- _self_ | ||
|
||
torch: True | ||
torch_device: 'cuda:0' | ||
|
||
repo_id: "bezzam/DigiCam-CelebA-10K" | ||
split: "test" # "train", "test", "all" | ||
psf_fn: "psf_measured.png" # in repo root | ||
n_files: 25 # null for all files | ||
|
||
preprocess: | ||
flip_ud: True | ||
flip_lr: True | ||
downsample: 6 | ||
|
||
# to have different data shape than PSF | ||
data_dim: null | ||
# data_dim: [48, 64] # down 64 | ||
# data_dim: [506, 676] # down 6 | ||
|
||
algo: admm # "admm", "apgd", "null" to just copy over (resized) raw data | ||
admm: | ||
n_iter: 10 | ||
|
||
# extraction region of interest | ||
# roi: null # top, left, bottom, right | ||
# roi: [10, 300, 560, 705] # down 4 | ||
roi: [10, 190, 377, 490] # down 6 | ||
# roi: [5, 150, 280, 352] # down 8 |
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,20 @@ | ||
# python scripts/data/upload_dataset_huggingface.py | ||
hydra: | ||
job: | ||
chdir: True # change to output folder | ||
|
||
repo_id: null | ||
hf_token: null | ||
n_files: null | ||
test_size: 0.15 | ||
|
||
lensless: | ||
dir: null | ||
ext: null | ||
|
||
lensed: | ||
dir: null | ||
ext: null | ||
|
||
# additional files to upload to root folder | ||
files: 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,23 @@ | ||
# python scripts/data/upload_dataset_huggingface.py -cn upload_digicam_10k | ||
defaults: | ||
- upload_dataset_huggingface | ||
- _self_ | ||
|
||
repo_id: "bezzam/DigiCam-CelebA-10K" | ||
test_size: 0.15 | ||
|
||
lensless: | ||
dir: "/scratch/bezzam/celeba_adafruit_random_2mm_20230720_10K" | ||
ext: ".png" | ||
|
||
lensed: | ||
dir: "/scratch/bezzam/celeba/img_align_celeba" | ||
ext: ".jpg" | ||
celeba_attr: "/scratch/bezzam/celeba/list_attr_celeba.txt" | ||
|
||
files: | ||
psf_measured: "/home/bezzam/LenslessPiCam/data/psf/adafruit_random_2mm_20231907.png" | ||
psf_simulated: "/home/bezzam/LenslessPiCam/data/psf/adafruit_random_pattern_20230719_SIM_psf.png" | ||
mask_pattern: "/home/bezzam/LenslessPiCam/data/psf/adafruit_random_pattern_20230719.npy" | ||
mug_in_the_wild_12cm: "/home/bezzam/LenslessPiCam/data/raw_data/adafruit_mug_12cm_july21.png" | ||
psf_12cm: "/home/bezzam/LenslessPiCam/data/psf/adafruit_psf_2mm_12p5cm_july21.png" |
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,21 @@ | ||
# python scripts/data/upload_dataset_huggingface.py -cn upload_digicam_26k | ||
defaults: | ||
- upload_dataset_huggingface | ||
- _self_ | ||
|
||
repo_id: "bezzam/DigiCam-CelebA-26K" | ||
test_size: 0.15 | ||
|
||
lensless: | ||
dir: "/scratch/bezzam/celeba/celeba_adafruit_random_30cm_2mm_20231004_26K" | ||
ext: ".png" | ||
|
||
lensed: | ||
dir: "/scratch/bezzam/celeba/img_align_celeba" | ||
ext: ".jpg" | ||
celeba_attr: "/scratch/bezzam/celeba/list_attr_celeba.txt" | ||
|
||
files: | ||
psf_measured: "/home/bezzam/LenslessPiCam/rpi_hq_adafruit_psf_2mm/raw_data_rgb.png" | ||
psf_simulated: "/home/bezzam/LenslessPiCam/outputs/2024-02-21/10-07-17/adafruit_random_pattern_20231004_174047_SIM_psf.png" | ||
mask_pattern: "/home/bezzam/LenslessPiCam/adafruit_random_pattern_20231004_174047.npy" |
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.