Rendering Natural Camera Bokeh Effect with Deep Learning

Andrey Ignatov, Jagruti Patel, Radu Timofte
6/10/2020
cs.CVcs.LGeess.IV

Official code: aiff22/PyNET-Bokeh (185 stars, Python, last commit 2025-08-23).

Abstract

Bokeh is an important artistic effect used to highlight the main object of interest on the photo by blurring all out-of-focus areas. While DSLR and system camera lenses can render this effect naturally, mobile cameras are unable to produce shallow depth-of-field photos due to a very small aperture diameter of their optics.

Show full abstract

Unlike the current solutions simulating bokeh by applying Gaussian blur to image background, in this paper we propose to learn a realistic shallow focus technique directly from the photos produced by DSLR cameras. For this, we present a large-scale bokeh dataset consisting of 5K shallow / wide depth-of-field image pairs captured using the Canon 7D DSLR with 50mm f/1.8 lenses. We use these images to train a deep learning model to reproduce a natural bokeh effect based on a single narrow-aperture image. The experimental results show that the proposed approach is able to render a plausible non-uniform bokeh even in case of complex input data with multiple objects. The dataset, pre-trained models and codes used in this paper are available on the project website.

View on arXivView PDF

Code Implementations(1)

aiff22/PyNET-BokehOfficial100%

Rendering Realistic Bokeh Images with PyNET

18532PythonJun 10, 20201 years agoNOASSERTION
apertureblurblurred-backgroundbokehbokeh-effect+13 more

Similar Papers

Cite this paper

@article{ignatov2020rendering,
  title  = {Rendering Natural Camera Bokeh Effect with Deep Learning},
  author = {Andrey Ignatov and Jagruti Patel and Radu Timofte},
  year   = {2020},
  eprint = {2006.05698},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2006.05698}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2006.05698.svg)](https://codeofpaper.com/paper/2006.05698)

Discussion