DeepLens: Shallow Depth of Field from a Single Image

Lijun Wang, Xiaohui Shen, Jianming Zhang, Oliver Wang
Zhe Lin, Chih-Yao Hsieh, Sarah Kong and Huchuan Lu
ACM Transactions on Graphics (Proc. SIGGRAPH Asia), 2018

Each high resolution, shallow DoF image shown here was synthetically generated from an all-in-focus input image with a single forward pass through a neural network system. Users can freely interact with the system by modifying the focal plane and aperture size. Photo credits: Franco Vannini, Jim Liestman, wombatarama, and European Space Agency.

Abstract

We aim to generate high resolution shallow depth-of-field (DoF) images from a single all-in-focus image with controllable focal distance and aperture size. To achieve this, we propose a novel neural network model comprised of a depth prediction module, a lens blur module, and a guided upsampling module. All modules are differentiable and are learned from data. To train our depth prediction module, we collect a dataset of 2462 RGB-D images captured by mobile phones with a dual-lens camera, and use existing segmentation datasets to improve border prediction. We further leverage a synthetic dataset with known depth to supervise the lens blur and guided upsampling modules. The effectiveness of our system and training strategies are verified in the experiments. Our method can generate high-quality shallow DoF images at high resolution, and produces significantly fewer artifacts than the baselines and existing solutions for single image shallow DoF synthesis. Compared with the iPhone portrait mode, which is a state-of-the-art shallow DoF solution based on a dual-lens depth camera, our method generates comparable results, while allowing for greater flexibility to choose focal points and aperture size, and is not limited to one capture setup.

Paper Download

[Low-res] [High-res]

Video

Contact

BibTeX

@ARTICLE{deeplens2018,
author={Wang Lijun and Shen Xiaohui and Zhang Jianming and Wang Oliver and Hsieh Chih-Yao and Kong Sarah and Lu Huchuan},
title={DeepLens: Shallow Depth of Field from a Single Image},
journal={ACM Trans. Graph. (Proc. SIGGRAPH Asia)},
year={2018},
pages = {6:1-6:11},
volume = {37},
number = {6}
}