Skip to content

Rendering natural camera bokeh effect using deep learning

Notifications You must be signed in to change notification settings

harpoonix/Bokeh-Effect-Rendering

Repository files navigation

Rendering Natural Camera Bokeh Effect with Deep Learning

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. Unlike the current solu- tions simulating bokeh by applying Gaussian blur to image background, in this implementation of the paper conceptualised by the Andrey Ignatov and team at ETH Zurich Vision Lab, we try to learn a realistic shallow focus technique directly from the photos produced by DSLR cameras.

Code

The code for the model, data input preprocessing and training the model, can be found as a jupyter notebook here.
The summary of the PyNET CNN, built using tensorflow.keras.Model functional API, can be found here. It shows all the layers in the model, with their input and output dimensions, and number of parameters in each layer. The total number of parameters in PyNET is 48.9M.

PyNET Architecture

PyNET

Report

My report with details on the project, its theory and implementation can be found here.

Data

You can find the training data with 4694 images (original and its bokeh counterpart) (3.4GB) here.

You can download the pretrained VGG-19 Model here.

About

Rendering natural camera bokeh effect using deep learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published