Filter Style Transfer Between Photos

Jonghwa Yim, Jisung Yoo, Won-joon Do, Beomsu Kim, Jihwan ChoeECCV 2020

Abstract

We present Filter Style Transfer (FST), a novel approach for extracting and applying photo filter parameters from a single reference image. Unlike traditional artistic style transfer, FST prioritizes photorealism and computational efficiency. By modeling filters as global polynomial functions and utilizing uncertainty-based regression, FST achieves state-of-the-art color accuracy and runs in under 2ms on mobile hardware.

Introduction

Traditional style transfer techniques, such as neural style transfer, often focus on "artistic" transformations that alter textures and shapes to mimic famous paintings. However, most mobile users prefer "filter transfer": applying the specific color, brightness, and contrast adjustments of one photograph to another while maintaining perfect photorealism. Extracting these parameters from a single stylized image is an ill-posed problem, as the original unedited state of the reference image is unknown. Previous attempts often required pairs of images or were too computationally expensive for real-time mobile applications.

Methodology

The FST pipeline addresses the challenge of single-image filter extraction through a four-stage process designed for speed and visual fidelity.

  1. Defilterization: A trained autoencoder estimates the original, "natural" version of the reference image. By training on thousands of natural images, the network learns to map filtered pixels back to their likely mean colors.
  2. Filter Style Estimation: Using the filtered reference and the estimated clean version, the system performs nonlinear regression to determine the mathematical parameters ($\beta$) of the filter. The filter is modeled as a 3rd-order polynomial function, accounting for brightness, contrast, and cross-channel correlations.
  3. Uncertainty-based Regression: To mitigate errors from the defilterization step, the model employs weighted least squares. Pixels with high reconstruction uncertainty are given lower weight during parameter estimation.
  4. Regularization: L2 regularization terms are added to ensure the filter function remains stable at the boundaries of the color spectrum, preventing artifacts like color clipping in highlights and shadows.
FST extracts global filter parameters from a style reference and applies them to new content.

Computational Efficiency

A key innovation of FST is its focus on global operations. By modeling filters as global polynomial functions rather than local pixel-to-pixel mappings, the method avoids the "shimmering" artifacts common in neural methods. Furthermore, once parameters are extracted, they can be precomputed into a Look-Up Table (LUT). This allows the filter to be applied in less than 2ms for Full HD images on a Samsung Galaxy S10, enabling real-time previews.

Experimental Results

FST was evaluated using the MSCOCO dataset and the CSSgram library, which provides ground-truth data for 26 real Instagram filters.

Quantitative Performance

FST significantly outperformed existing photorealistic style transfer methods. On the MSCOCO benchmark, FST achieved a Peak Signal-to-Noise Ratio (PSNR) of 26.09, a substantial improvement over the 16.47 achieved by WCT2. It also showed superior performance in $\Delta E^*_{00}$, a metric for perceptual color accuracy.

Qualitative Analysis

Visual results demonstrate that FST maintains sharp edges and smooth gradients without the texture degradation or painterly artifacts seen in competing methods. The model's use of channel correlation allows it to accurately infer how a filter would affect colors not present in the reference image (e.g., inferring red adjustments from a primarily blue seascape).

Qualitative comparison of filter transfer results, highlighting the preservation of photorealistic details.

Conclusion and Future Work

Filter Style Transfer provides a robust, high-speed solution for photorealistic style editing on mobile devices. While currently limited to global operations—excluding local effects like vignetting or bokeh—the method sets a new standard for efficiency and color accuracy. Future research may incorporate semantic labeling to further refine the defilterization process and improve extraction accuracy for complex scenes.

Summary updated

BibTeX
@inproceedings{yim2020filter,
  author = {Jonghwa Yim and Jisung Yoo and Won-joon Do and Beomsu Kim and Jihwan Choe},
  title = {{Filter Style Transfer Between Photos}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58539-6\_7},
}
Figure