Background and
Objectives
Background
Depth ofField (DoF) is crucial in photography for
emphasizing specific subjects via focus and blur.
Traditional methods limit post-capture flexibility in
adjusting DoF.
4.
Background and
Objectives
Objective
• UtilizePatchFusion, a deep learning model, to
generate depth maps from single images and simulate
DoF effects.
• Enable flexible post-capture adjustments of DoF
effects.
5.
Data Collection
• Equipment:
。Canon R10 camera, 50mm lens, tripod, remote
shutter.
• Dataset:
。 Images taken with two aperture settings: shallow
DoF (f/2.5) and deep DoF (f/16).
。 Diverse lighting, arrangements, and locations ensure
variety.
• Preprocessing:
。 Images resized to 1024x1024 pixels, normalized,
and augmented with rotations, brightness, and
contrast adjustments.
6.
Data Collection
The showingda ta show the different arrangement, location and
lighting, ensuring the diversity of DataSet.
7.
Data Collection
In augmentationphase, we do severa l preprocessing to enhance
the da ta set, such as Flip, HSV setting or others.
Horizontal Fli p Satura ti on Contrast
Loss Function
Generator LossFunctions:
• Commitment Loss: Aligns encoded features with the codebook for accurate
depth representation.
• VQ Loss: Adjusts codebook vectors to better match the encoder's outputs.
• L1 Loss: Ensures the generated image closely resembles the target blurred
image.
• Adversarial Loss: Encourages realism by improving generator quality via
feedback from the discriminator.
Total generator loss combines these components with adjustable weights.
18.
Loss Function
Discriminator LossFunctions:
• Real Loss: Measures the difference between the discriminator's prediction
and the ground truth for real images, ensuring accurate classification.
• Fake Loss: Quantifies the discriminator's ability to detect generated (fake)
images, encouraging the generator to produce more realistic outputs.
Total generator loss combines these components with adjustable weights.
Key Contributions andConclusion
Key Contribution:
• Adopt PatchFusion for monocular depth estimation.
• Generate realistic DoF effects using gaussian filter and enhancing layer.
• Demonstrate improved flexibility compared to traditional DoF methods.
Conclusion:
• The model effectively generates realistic DoF effects.
• The proposed model demonstrates a novel application of deep learning for generating DoF
effects.