Step by step process to generate 3d Photography of any image with an AI (CVPR 2020)

Generate a 3d image with any of your pictures. Try, be amazed, be inspired.

Image for post
Image for post
Source: Project home

I am an enthusiast in AI field. Just looking for intresting things and learning along the way. I was looking at Two Minutes Paper’s video and found this topic interesting to explore. I couldn’t resist trying it on my own image. So if you are here to convert your still image into 3D photo with this AI. I hope this article satisfies that hunger of yours.

At the final you will be able to:

  • Create an awesome 3D image from your still image
Image for post
Image for post
Image by @worldsbetweenlines on Unsplash

First, go to the project’s home, click here, and click Google Colab link in the project description. You’ll see the following:

First, Go to Runtime > Change Runtime Type > Select GPU

Image for post
Image for post

You can see the play button in Google Colab to run your code in the notebook. So everytime you see them it means you can run them pressing the button.

Now, click the first play button and you will see the code running and installing or if already satisfied it will say “Requirement already satisfied”

Image for post
Image for post

Now run the training code as well.

Image for post
Image for post

Run switch off off-screen rendering code and when you run the other one you will be asked to upload a picture. Please be advised that you’ll need to grant Google Drive access to the folder first as given in image below. Go ahead and choose an image that you’d like and press. After uploading you’ll see file uploaded as given below:

Image for post
Image for post

Note: You have to enable acess to Google Drive from files. Click drive icon at top (3rd icon) to see the permission and give access accordingly.

I suggest you to delete all other files from /images and /video folder before moving to Step 4.

This is the step where you execute the 3d photo inpainting.

Just run(press play) the remaining codes:

!python main.py — config argument.ymlfrom google.colab import drive
drive.mount('/content/drive')

You’ll be asked for authorization like the following. Click the link that says “Go to thie URL in a browser”. And you’ll get a code. Copy code and paste it.

Image for post
Image for post

After the code runs successfully you will get final video in /video folder.

Results

Image for post
Image for post
Image by @worldsbetweenlines on Unsplash
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

Something we never thought possible is turning out to be true. This shows a new opportunity in the imaging arena. We can be hopeful the future will be better. It's not 100% accurate but it's near there.

I hope you learned something good or get inspired by this. Thanks for reading.

Title: 3D Photography using Context-aware Layered Depth Inpainting
Author: Shih, Meng-Li and Su, Shih-Yang and Kopf, Johannes and Huang, Jia-Bin

Like What You Read?

If you want to read more informative articles like this one, my Email digest is just the thing for you.

Click to join My Email Digest today.

Written by

I design, develop web components and systems and write about them.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store