Color augmentation method using white balance emulation. It improves the results of models for different computer vision tasks, such as image classification and image semantic segmentation.
This is the implementation of our paper: What Else Can Fool Deep Learning? Addressing Color Constancy Errors on Deep Neural Network Performance. International Conference on Computer Vision (ICCV), 2019.
Project page: http://cvil.eecs.yorku.ca/projects/public_html/wb_emulation/index.html
To start:
1. Run `install_.m`
2. Try our demos:
* `demo_single_image.m to process signle image
* demo_batch.m to process an image directory
* demo_WB_color_augmentation.m to process an image directory and repeating the corresponding ground truth files for our generated images
* demo_GUI (located in `GUI` directory) for a GUI interface
3. To use the WB augmenter inside your code, please follow the following steps:
* Either run install_() or addpath to code/model directories:
addpath('src');
addpath('models');
%or use install_()
* Load our model:
load('synthWBmodel.mat'); %load WB_emulator
* Run the WB emulator:
out = WB_emulator.generate_wb_srgb(I, NumOfImgs);
* Use the generated images:
new_img = out(:,:,:,i); %access the ith generated image
Please cite our paper if you use this code.
Mahmoud Afifi and Michael S. Brown. What Else Can Fool Deep Learning? Addressing Color Constancy Errors on Deep Neural Network Performance. International Conference on Computer Vision (ICCV), 2019.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.