All Projects → Abdullah-Abuolaim → recurrent-defocus-deblurring-synth-dual-pixel

Abdullah-Abuolaim / recurrent-defocus-deblurring-synth-dual-pixel

Licence: Apache-2.0 License
Reference github repository for the paper "Learning to Reduce Defocus Blur by Realistically Modeling Dual-Pixel Data". We propose a procedure to generate realistic DP data synthetically. Our synthesis approach mimics the optical image formation found on DP sensors and can be applied to virtual scenes rendered with standard computer software. Lev…

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to recurrent-defocus-deblurring-synth-dual-pixel

multi-task-defocus-deblurring-dual-pixel-nimat
Reference github repository for the paper "Improving Single-Image Defocus Deblurring: How Dual-Pixel Images Help Through Multi-Task Learning". We propose a single-image deblurring network that incorporates the two sub-aperture views into a multitask framework. Specifically, we show that jointly learning to predict the two DP views from a single …
Stars: ✭ 29 (-3.33%)
Mutual labels:  deeplearning, datasets, computational-photography, autofocus, synthetic-data, depth-of-field, synthetic-dataset-generation, defocus-blur, defocus-deblurring, dual-pixel
Exposure correction
Reference code for the paper "Learning Multi-Scale Photo Exposure Correction", CVPR 2021.
Stars: ✭ 98 (+226.67%)
Mutual labels:  dataset, deeplearning, datasets
Awesome Segmentation Saliency Dataset
A collection of some datasets for segmentation / saliency detection. Welcome to PR...😄
Stars: ✭ 315 (+950%)
Mutual labels:  dataset, deeplearning, datasets
Retriever
Quickly download, clean up, and install public datasets into a database management system
Stars: ✭ 241 (+703.33%)
Mutual labels:  dataset, datasets
Awesome Json Datasets
A curated list of awesome JSON datasets that don't require authentication.
Stars: ✭ 2,421 (+7970%)
Mutual labels:  dataset, datasets
Automated Resume Screening System
Automated Resume Screening System using Machine Learning (With Dataset)
Stars: ✭ 224 (+646.67%)
Mutual labels:  dataset, datasets
Deepecg
ECG classification programs based on ML/DL methods
Stars: ✭ 124 (+313.33%)
Mutual labels:  recurrent-neural-networks, dataset
Datasets
TFDS is a collection of datasets ready to use with TensorFlow, Jax, ...
Stars: ✭ 3,094 (+10213.33%)
Mutual labels:  dataset, datasets
Hdltex
HDLTex: Hierarchical Deep Learning for Text Classification
Stars: ✭ 191 (+536.67%)
Mutual labels:  recurrent-neural-networks, dataset
Clustering-Datasets
This repository contains the collection of UCI (real-life) datasets and Synthetic (artificial) datasets (with cluster labels and MATLAB files) ready to use with clustering algorithms.
Stars: ✭ 189 (+530%)
Mutual labels:  datasets, synthetic-data
Three-Filters-to-Normal
Three-Filters-to-Normal: An Accurate and Ultrafast Surface Normal Estimator (RAL+ICRA'21)
Stars: ✭ 41 (+36.67%)
Mutual labels:  datasets, synthetic-data
Motion Sense
MotionSense Dataset for Human Activity and Attribute Recognition ( time-series data generated by smartphone's sensors: accelerometer and gyroscope)
Stars: ✭ 159 (+430%)
Mutual labels:  dataset, deeplearning
Aesthetics
Image Aesthetics Toolkit - includes Fisher Vector implementation, AVA (Image Aesthetic Visual Analysis) dataset and fast multi-threaded downloader
Stars: ✭ 113 (+276.67%)
Mutual labels:  dataset, datasets
Datasets
source{d} datasets ("big code") for source code analysis and machine learning on source code
Stars: ✭ 231 (+670%)
Mutual labels:  dataset, datasets
Wb srgb
White balance camera-rendered sRGB images (CVPR 2019) [Matlab & Python]
Stars: ✭ 101 (+236.67%)
Mutual labels:  dataset, datasets
Mad Twinnet
The code for the MaD TwinNet. Demo page:
Stars: ✭ 99 (+230%)
Mutual labels:  recurrent-neural-networks, deeplearning
augraphy
Augmentation pipeline for rendering synthetic paper printing, faxing, scanning and copy machine processes
Stars: ✭ 49 (+63.33%)
Mutual labels:  synthetic-data, synthetic-dataset-generation
Openml R
R package to interface with OpenML
Stars: ✭ 81 (+170%)
Mutual labels:  dataset, datasets
Persian Swear Words
دیتاست کلمات نامناسب و بد فارسی برای فیلتر کردن متن ها
Stars: ✭ 95 (+216.67%)
Mutual labels:  dataset, datasets
mtss-gan
MTSS-GAN: Multivariate Time Series Simulation with Generative Adversarial Networks (by @firmai)
Stars: ✭ 77 (+156.67%)
Mutual labels:  synthetic-data, synthetic-dataset-generation

Learning to Reduce Defocus Blur by Realistically Modeling Dual-Pixel Data

Abdullah Abuolaim1     Mauricio Delbracio2     Damien Kelly2     Michael S. Brown1     Peyman Milanfar2
1York University         2Google Research

RDPD summary

teaser figure

Reference github repository for the paper Learning to Reduce Defocus Blur by Realistically Modeling Dual-Pixel Data. Abuolaim et al., proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) 2021 (YouTube presentation). If you use our dataset or code, please cite our paper:

@article{abuolaim2021learning,
  title={Learning to Reduce Defocus Blur by Realistically Modeling Dual-Pixel Data},
  author={Abuolaim, Abdullah and Delbracio, Mauricio and Kelly, Damien and Brown, Michael S and Milanfar, Peyman},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
  year={2021}
}

Synthetic Dataset

Prerequisites

  • The code tested with:

    • Python 3.8.3
    • Numpy 1.19.1
    • Scipy 1.5.2
    • Wand 0.6.3
    • Imageio 2.9.0
    • OpenCV 4.4.0

    Despite not tested, the code may work with library versions other than the specified

Installation

  • Clone with HTTPS this project to your local machine
git clone https://github.com/Abdullah-Abuolaim/recurrent-defocus-deblurring-synth-dual-pixel.git
cd ./recurrent-defocus-deblurring-synth-dual-pixel/synthetic_dp_defocus_blur_code/

Synthetic dual-pixel (DP) views based on defocus blur

  • Download SYNTHIA-SF dataset or visit SYNTHIA downloads

    • SYNTHIA-SF dataset contains six image sequences: SEQ1-SEQ6
    • Traning: SEQ1, SEQ2, SEQ4, SEQ5, SEQ6
    • Testing: SEQ3
  • Run the code in synthetic_dp_defocus_blur_code directory to start generating data as follows:

     python synthetic_dp_defocus_blur.py --data_dir ./SYNTHIA-SF/ --radial_dis True
    • --data_dir: path to the downloaded SYNTHIA-SF directory
    • --radial_dis: to apply radial distortion on the generated DP views
  • Running above will create the generated dataset dd_dp_dataset_synth_vid in synthetic_dp_defocus_blur_code

    • Generate synthetic image sequence for each camera set (i.e., the five camera sets defined in the main paper)
    • There will be 30 image sequences generated in total (5 camera sets x 6 image sequences)
  • The generated dataset is organized based on the following directory structure synthetic dataset structure

    • $dir_name$_c: directory of the final output combined images
    • $dir_name$_l: directory of the corresponding DP left view images
    • $dir_name$_r: directory of the corresponding DP right view images
    • source: images exhibiting defocus blur
    • target: the corresponding all-in-focus images
    • seq_n: image sequence number

RDPD Codes and Models

Prerequisites

  • The code tested with:

    • Python 3.8.3
    • TensorFlow 2.2.0
    • Keras 2.4.3
    • Numpy 1.19.1
    • Scipy 1.5.2
    • Scikit-image 0.16.2
    • Scikit-learn 0.23.2
    • OpenCV 4.4.0

    Despite not tested, the code may work with library versions other than the specified

Installation

  • Clone with HTTPS this project to your local machine
git clone https://github.com/Abdullah-Abuolaim/recurrent-defocus-deblurring-synth-dual-pixel.git
cd ./recurrent-defocus-deblurring-synth-dual-pixel/rdpd_code/

Testing

  • All the trained models used in the main paper and supplemental material can be downloaded link

  • Place the downloaded .hdf5 model inside ModelCheckpoints for testing

  • Download DP defocus deblurring dataset [1] link, or visit project GitHub link

  • After downloading and generating datasets, place them in the same directory e.g., dd_dp_datasets

  • Run main.py in rdpd_code directory as follows:

     python main.py --op_phase test --test_model RDPD+ --data_dir ./dd_dp_datasets/
    • --op_phase: operation phase training or testing
    • --test_model: test model name
    • --data_dir: path to the directory that has both datasets i.e., dd_dp_dataset_canon and dd_dp_dataset_synth_vid
  • The results of the tested models will be saved in results directory that will be created inside rdpd_code

Recall that you might need to change

Training

  • Download DP defocus deblurring dataset [1] link, or visit project GitHub link

  • After downloading and generating datasets, place them in the same directory e.g., dd_dp_datasets

  • Run main.py in rdpd_code directory as follows:

     python main.py --op_phase train --ms_edge_loss True --data_dir ./dd_dp_datasets/
    • --op_phase: operation phase training or testing
    • --ms_edge_loss: whether to use our edge loss or not in addition to the typical MSE loss
    • --data_dir: path to the directory that has both datasets i.e., dd_dp_dataset_canon and dd_dp_dataset_synth_vid
  • Other training options

    • --ms_edge_loss_weight_x: the weight of our edge loss at the vertical direction
    • --ms_edge_loss_weight_y: the weight of our edge loss at the horizontal direction
    • --patch_size: training patch size
    • --img_mini_b: image mini-batch size
    • --vid_mini_b: video mini-batch size
    • --num_frames: number of video frames
    • --epoch: number of training epochs
    • --lr: initial learning rate
    • --schedule_lr_rate': learning rate scheduler (after how many epochs to decrease)
    • --dropout_rate': dropout rate of the convLSTM unit
  • The trained model and checkpoints will be saved in ModelCheckpoints after each epoch

Contact

Should you have any question/suggestion, please feel free to reach out:

Abdullah Abuolaim ([email protected])

Related Links

  • ECCV'18 paper: Revisiting Autofocus for Smartphone Cameras   [project page]
  • WACV'20 paper: Online Lens Motion Smoothing for Video Autofocus   [project page]   [presentation]
  • ICCP'20 paper: Modeling Defocus-Disparity in Dual-Pixel Sensors   [github]   [presentation]
  • ECCV'20 paper: Defocus Deblurring Using Dual-Pixel Data   [project page]   [github]   [presentation]
  • CVPRW'21 paper: NTIRE 2021 Challenge for Defocus Deblurring Using Dual-pixel Images: Methods and Results   [pdf]   [presentation]
  • WACV'22 paper: Improving Single-Image Defocus Deblurring: How Dual-Pixel Images Help Through Multi-Task Learning   [github]   [presentation]
  • WACVW'22 paper: Multi-View Motion Synthesis via Applying Rotated Dual-Pixel Blur Kernels   [pdf]   [presentation]

References

[1] Abdullah Abuolaim and Michael S. Brown. Defocus Deblurring Using Dual-Pixel Data. In ECCV, 2020.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].