All Projects → mahmoudnafifi → Wb_color_augmenter

mahmoudnafifi / Wb_color_augmenter

Licence: mit
WB color augmenter improves the accuracy of image classification and image semantic segmentation methods by emulating different WB effects (ICCV 2019) [Python & Matlab].

Programming Languages

matlab
3953 projects

Projects that are alternatives of or similar to Wb color augmenter

Jacinto Ai Devkit
Training & Quantization of embedded friendly Deep Learning / Machine Learning / Computer Vision models
Stars: ✭ 49 (-44.94%)
Mutual labels:  cnn, deeplearning, semantic-segmentation
Quickdraw
Implementation of Quickdraw - an online game developed by Google
Stars: ✭ 805 (+804.49%)
Mutual labels:  cnn, deeplearning, image-classification
Tools To Design Or Visualize Architecture Of Neural Network
Tools to Design or Visualize Architecture of Neural Network
Stars: ✭ 1,143 (+1184.27%)
Mutual labels:  cnn, deeplearning, semantic-segmentation
Tf Mobilenet V2
Mobilenet V2(Inverted Residual) Implementation & Trained Weights Using Tensorflow
Stars: ✭ 85 (-4.49%)
Mutual labels:  cnn, deeplearning, image-classification
Eda nlp
Data augmentation for NLP, presented at EMNLP 2019
Stars: ✭ 902 (+913.48%)
Mutual labels:  data-augmentation, cnn
Torchio
Medical image preprocessing and augmentation toolkit for deep learning
Stars: ✭ 708 (+695.51%)
Mutual labels:  data-augmentation, cnn
Servenet
Service Classification based on Service Description
Stars: ✭ 21 (-76.4%)
Mutual labels:  cnn, deeplearning
Keras basic
keras를 이용한 딥러닝 기초 학습
Stars: ✭ 39 (-56.18%)
Mutual labels:  cnn, deeplearning
Cvat
Powerful and efficient Computer Vision Annotation Tool (CVAT)
Stars: ✭ 6,557 (+7267.42%)
Mutual labels:  semantic-segmentation, image-classification
Deepmodels
TensorFlow Implementation of state-of-the-art models since 2012
Stars: ✭ 33 (-62.92%)
Mutual labels:  cnn, image-classification
Awesome Semantic Segmentation
🤘 awesome-semantic-segmentation
Stars: ✭ 8,831 (+9822.47%)
Mutual labels:  deeplearning, semantic-segmentation
Paddleclas
A treasure chest for image classification powered by PaddlePaddle
Stars: ✭ 625 (+602.25%)
Mutual labels:  data-augmentation, image-classification
Meme Generator
MemeGen is a web application where the user gives an image as input and our tool generates a meme at one click for the user.
Stars: ✭ 57 (-35.96%)
Mutual labels:  cnn, image-classification
Usss iccv19
Code for Universal Semi-Supervised Semantic Segmentation models paper accepted in ICCV 2019
Stars: ✭ 57 (-35.96%)
Mutual labels:  deeplearning, semantic-segmentation
Concise Ipython Notebooks For Deep Learning
Ipython Notebooks for solving problems like classification, segmentation, generation using latest Deep learning algorithms on different publicly available text and image data-sets.
Stars: ✭ 23 (-74.16%)
Mutual labels:  deeplearning, image-classification
Label Studio
Label Studio is a multi-type data labeling and annotation tool with standardized output format
Stars: ✭ 7,264 (+8061.8%)
Mutual labels:  semantic-segmentation, image-classification
Twitter Sentiment Analysis
Sentiment analysis on tweets using Naive Bayes, SVM, CNN, LSTM, etc.
Stars: ✭ 978 (+998.88%)
Mutual labels:  cnn, deeplearning
Convcrf
This repository contains the reference implementation for our proposed Convolutional CRFs.
Stars: ✭ 514 (+477.53%)
Mutual labels:  deeplearning, semantic-segmentation
Deeplearning
深度学习入门教程, 优秀文章, Deep Learning Tutorial
Stars: ✭ 6,783 (+7521.35%)
Mutual labels:  cnn, deeplearning
Cnn Paper2
🎨 🎨 深度学习 卷积神经网络教程 :图像识别,目标检测,语义分割,实例分割,人脸识别,神经风格转换,GAN等🎨🎨 https://dataxujing.github.io/CNN-paper2/
Stars: ✭ 77 (-13.48%)
Mutual labels:  cnn, deeplearning

White-Balance Emulator for Color Augmentation

What Else Can Fool Deep Learning? Addressing Color Constancy Errors on Deep Neural Network Performance

Mahmoud Afifi1 and Michael S. Brown1,2
1York University    2Samsung AI Center (SAIC) - Toronto

Project page - Paper - Supplementary Materials

ICCV_github_teaser

Our augmentation method can accurately emulate realistic color constancy degradation. Existing color augmentation methods often generate unrealistic colors which rarely happen in reality (e.g., green skin or purple grass). More importantly, the visual appearance of existing color augmentation techniques does not well represent the color casts produced by incorrect WB applied onboard cameras, as shown below.

ICCV_github_examples

Quick start

1. Python:

  1. Requirements: numpy & opencv-python
  • pip install numpy
  • pip install opencv-python
  1. Run wbAug.py; examples:
  • Process a singe image (generate ten new images and a copy of the given image):
    • python wbAug.py --input_image_filename ../images/image1.jpg
  • Process all images in a directory (for each image, generate ten images and copies of original images):
    • python wbAug.py --input_image_dir ../images
  • Process all images in a directory (for each image, generate five images without original images):
    • python wbAug.py --input_image_dir ../images --out_dir ../results --out_number 5 --write_original 0
  • Augment all training images and generate corresponding ground truth files (generate three images and copies of original images):
    • python wbAug.py --input_image_dir ../example/training_set --ground_truth_dir ../example/ground_truth --ground_truth_ext .png --out_dir ../new_training_set --out_ground_truth ../new_ground_truth --out_number 3 --write_original 1
  1. demo.py shows an example of how to use the WBEmulator module

2. Matlab:

View WB color augmenter on File Exchange

  1. Run install_.m
  2. Try our demos:
    • demo_single_image to process signle image
    • demo_batch to process an image directory
    • demo_WB_color_augmentation 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 CPU model --  use load('synthWBmodel_GPU.mat');  to load WB_emulator GPU model
    
  • Run the WB emulator:
    out = WB_emulator.generate_wb_srgb(I, NumOfImgs); %I: input image tensor & NumOfImgs (optional): numbre of images to generate [<=10]
    
  • Use the generated images:
    new_img = out(:,:,:,i); %access the ith generated image
    

Dataset

We used images from Set1 of the Rendered WB dataset to build our method.

Cat-2_testing_set_CIFAR10_classes

In our paper, we introduced a new testing set that contains CIFAR-10 classes to evaluate trained models with different settings. This testing set contains 15,098 rendered images that reflect real in-camera WB settings. Our testing set is divided into ten directories, each includes testing images for one of CIFAR-10 classes. You can download our testing set from the following links: 32x32 pixels | 224x224 pixels | 227x227 pixels

MIT License

Publication

If you use this code or our dataset, please cite our paper:

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.

@InProceedings{Afifi_2019_ICCV,
author = {Afifi, Mahmoud and Brown, Michael S.},
title = {What Else Can Fool Deep Learning? Addressing Color Constancy Errors on Deep Neural Network Performance},
booktitle = {The IEEE International Conference on Computer Vision (ICCV)},
month = {October},
year = {2019}
}

Related Research Projects

  • sRGB Image White Balancing:
  • Raw Image White Balancing:
    • APAP Bias Correction: A locally adaptive bias correction technique for illuminant estimation (JOSA A 2019).
    • SIIE: A sensor-independent deep learning framework for illumination estimation (BMVC 2019).
    • C5: A self-calibration method for cross-camera illuminant estimation (arXiv 2020).
  • Image Enhancement:
    • CIE XYZ Net: Image linearization for low-level computer vision tasks; e.g., denoising, deblurring, and image enhancement (arXiv 2020).
    • Exposure Correction: A coarse-to-fine deep learning model with adversarial training to correct badly-exposed photographs (CVPR 2021).
  • Image Manipulation:
    • MPB: Image blending using a two-stage Poisson blending (CVM 2016).
    • Image Recoloring: A fully automated image recoloring with no target/reference images (Eurographics 2019).
    • Image Relighting: Relighting using a uniformly-lit white-balanced version of input images (Runner-Up Award overall tracks of AIM 2020 challenge for image relighting, ECCV Workshops 2020).
    • HistoGAN: Controlling colors of GAN-generated images based on features derived directly from color histograms (CVPR 2021).
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].