Depth of field segmentation
February 10, 2020
MODEL
Encoder Takes an input image and generates a high-dimensional feature vector Decoder Takes a high-dimensional feature vector and generates a semantic segmentation mask There are 3 major building blocks: Convolution Down-Sampling Up-Sampling
The encoder in the network computes progressively higher-level abstract features as the receptive fields in the encoder increase with the depth of the encoder. The spatial resolution of the feature maps is reduced progressively via a down-sampling operation, whereas the decoder computes feature maps of progressively increasing resolution via un-pooling (Zeiler and Fergus, 2014) or up-sampling
EXAMPLES
In this example, we will show how can we blur part of the background and emphasize the foreground. Starting with the original image:
We are calculating depth map and converting it into grayscale:
Based on the given threshold we extract the foreground and inverted mask
This helps us to make foreground image with transparent background:
When we concatenate this image with blured version of original image:
We get the end result: