• Stars
    star
    523
  • Rank 84,684 (Top 2 %)
  • Language
    MATLAB
  • License
    Other
  • Created over 4 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Project page of the paper "Learning Multi-Scale Photo Exposure Correction" (CVPR 2021).

Learning Multi-Scale Photo Exposure Correction

Mahmoud Afifi1,2, Konstantinos G. Derpanis1, Björn Ommer3, and Michael S. Brown1

1Samsung AI Center (SAIC) - Toronto    2York University    3Heidelberg University

teaser

Project page of the paper Learning Multi-Scale Photo Exposure Correction. Mahmoud Afifi, Konstantinos G. Derpanis, Björn Ommer, and Michael S. Brown. In CVPR, 2021. If you use this code or our dataset, please cite our paper:

@inproceedings{afifi2021learning,
  title={Learning Multi-Scale Photo Exposure Correction},
  author={Afifi, Mahmoud and Derpanis, Konstantinos G, and Ommer, Bj{\"o}rn and Brown, Michael S},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  year={2021}
}

Dataset

dataset_figure

Download our dataset from the following links: Training | Validation | Testing | Our results

As the dataset was originally rendered using raw images taken from the MIT-Adobe FiveK dataset, our dataset follows the original license of the MIT-Adobe FiveK dataset.

Code

Prerequisite

  1. Matlab 2019b or higher (tested on Matlab 2019b)
  2. Deep Learning Toolbox

Get Started

Run install_.m

Demos:

  1. Run demo_single_image.m or demo_image_directory.m to process a single image or image directory, respectively. If you run the demo_single_image.m, it should save the result in ../result_images and output the following figure:

exposure_demo

  1. Run demo_GUI.m for a gui demo.

We provide a way to interactively control the output results by scaling each layer of the Laplacian pyramid before feeding them to the network. This can be controlled from the S variable in demo_single_image.m or demo_image_directory.m or from the GUI demo. Each scale factor in the S vector is multiplied by the corresponding pyramid level.

Additional post-processing options include fusion and histogram adjustment that can be turned on using the fusion and pp variables, respectively in demo_single_image.m or demo_image_directory.m. These options are also available in the GUI demo. Note that none of the fusion and pp options was used in producing our results in the paper, but they can improve the quality of results in some cases as shown below.

fusion

Training:

We train our model end-to-end to minimize: reconstruction loss, Laplacian pyramid loss, and adversarial loss. We trained our model on patches randomly extracted from training images with different dimensions. We first train on patches of size 128×128 pixels. Next, we continue training on 256×256 patches, followed by training on 512×512 patches.

exposure_training

Before starting, run src/patches_extraction.m to extract random patches with different dimensions -- adjust training/validation image directories before running the code. In the given code, the dataset is supposed to be located in the exposure_dataset folder in the root directory. The exposure_dataset should include the following directories:

- exposure_dataset/
         training/
              INPUT_IMAGES/
              GT_IMAGES/
         validation/
              INPUT_IMAGES/
              GT_IMAGES/

The src/patches_extraction.m will create subdirectories with patches extracted from each image and its corresponding ground-truth at different resolutions as shown below.

patch_extraction

After extracting the training patches, run main_training.m to start training -- adjust training/validation image directories before running the code. All training options are available in the main_training.m.

Results

exposure_results_1 exposure_results_2 exposure_results_3

This software is provided for research purposes only and CANNOT be used for commercial purposes.

Maintainer: Mahmoud Afifi ([email protected])

Related Research Projects

More Repositories

1

Deep_White_Balance

Reference code for the paper: Deep White-Balance Editing (CVPR 2020). Our method is a deep learning multi-task framework for white-balance editing.
Python
530
star
2

WB_sRGB

White balance camera-rendered sRGB images (CVPR 2019) [Matlab & Python]
MATLAB
334
star
3

HistoGAN

Reference code for the paper HistoGAN: Controlling Colors of GAN-Generated and Real Images via Color Histograms (CVPR 2021).
Jupyter Notebook
271
star
4

WB_color_augmenter

WB color augmenter improves the accuracy of image classification and image semantic segmentation methods by emulating different WB effects (ICCV 2019) [Python & Matlab].
MATLAB
166
star
5

C5

Reference code for the paper "Cross-Camera Convolutional Color Constancy" (ICCV 2021)
Python
104
star
6

mixedillWB

Reference code for the paper Auto White-Balance Correction for Mixed-Illuminant Scenes.
Python
83
star
7

CIE_XYZ_NET

PyTorch & Matlab code for the paper: CIE XYZ Net: Unprocessing Images for Low-Level Computer Vision Tasks (TPAMI 2021).
MATLAB
78
star
8

11K-Hands

Two-stream CNN for gender classification and biometric identification using a dataset of 11K hand images.
MATLAB
77
star
9

Image_recoloring

Image Recoloring Based on Object Color Distributions (Eurographics 2019)
MATLAB
47
star
10

color-aware-style-transfer

Reference code for the paper CAMS: Color-Aware Multi-Style Transfer.
Jupyter Notebook
45
star
11

Semantic-Color-Constancy-Using-CNN

Semantic information can help CNNs to get better illuminant estimation -- a proof of concept
MATLAB
37
star
12

SIIE

Sensor-Independent Illumination Estimation for DNN Models (BMVC 2019)
MATLAB
33
star
13

ColorTempTuning

A camera pipeline that allows accurate post-capture white balance editing (CIC best paper award, 2019)
MATLAB
31
star
14

raw2raw

Project page for the paper Semi-Supervised Raw-to-Raw Mapping 2021.
Python
30
star
15

modified-Poisson-image-editing

Realistic image blending -- a Matlab implementation of MPB: A modified Poisson blending technique, Computational Visual Media 2015.
MATLAB
28
star
16

Interactive_WB_correction

Reference code for the paper Interactive White Balancing for Camera-Rendered Images Mahmoud Afifi and Michael S. Brown. In Color and Imaging Conference (CIC), 2020.
MATLAB
26
star
17

image_relighting

Python
25
star
18

colour_transfer_MKL

Python implementation of colour transfer algorithm based on linear Monge-Kantorovitch solution
Python
15
star
19

Poisson-image-editing

Matlab implementation of Poisson image editing
MATLAB
14
star
20

APAP-bias-correction-for-illumination-estimation-methods

Bias correction method for illuminant estimation -- JOSA 2019
MATLAB
9
star
21

seam-carving

MATLAB
9
star
22

Multi-stream-CNN

Matlab example of Multi-stream-CNN
MATLAB
5
star
23

WB_color_augmenter_python

Python version of the WB augmenter (ICCV'19)
Python
3
star
24

dynamic-length-color-palettes

Dynamic length colour palettes
MATLAB
2
star
25

FlickrImageDownloader

Download up to 4K images with specific keyword(s) from Flickr
Python
1
star
26

plot_rg_chromaticity

MATLAB
1
star