CS6101

Deep Learning via Fast.AI


Perspective Control in Architectural Photography

By gabrielle ong

Have you taken photo of a building taller than you, and it appears to be tilting back in the photo? Have you used Instagram's adjust tools to make lines in your photo perfectly vertical? If yes, you've done perspective control! Such a manual process with no promise of the perfect photo. What if AI could do it for us?

Dataset

  • Created my own dataset
  • 360 pairs of distorted-corrected images of architectural photography
  • distorted images produced by augmenting a perspective-corrected photo 10 times
  • with random augmentations (skew, rotations)

Model Training

  • trained pix2pix, a Conditional Generative Adversarial Network
  • 200 epochs
  • on Generator loss, discriminator loss, and L1 loss

Results

  • Model produces decent perspective correction
  • But inaccurately transfers pixels, resulting in the 'content' of the buildings being blurred / having new content

Future improvements

  1. More realistic augmentations (less rotation)
  2. Highlight building edges for the model to attend to
  3. Train for more epochs as the losses are still steadily increasing/decreasing

Media Links


Images