You can now post 3D photos on Facebook timeline from smartphones with single camera. The feature has so far relied on the dual-lens “portrait mode” capabilities available only in new, higher-end smartphones.

The feature hasn’t been available on typical mobile devices, which have only a single, rear-facing camera, according to Facebook.

“To bring this new visual format to more people, we have used state-of-the-art machine learning techniques to produce 3D photos from virtually any standard 2D picture,” the company said in a blog post on Friday.

This system infers the 3D structure of any image, whether it is a new shot just taken on an Android or iOS device with a standard single camera, or a decades-old image recently uploaded to a phone or laptop.

“This advance makes 3D photo technology easily accessible for the first time to the many millions of people who use single-lens camera phones or tablets,” said the company.

It also allows everyone to experience decades-old family photos and other treasured images in a new way, by converting them to 3D.

People with state-of-the-art dual-camera devices can benefit, too, since they can now use their single, front-facing camera to take 3D selfies.

“Anyone with an iPhone 7 or higher, or a recent mid-range or better Android device, can now try these options in the Facebook app,” said the social networking giant.

 

According to Facebook, building this enhanced 3D Photos technique required overcoming a variety of technical challenges, such as training a model that correctly infers 3D positions of an extremely wide variety of subject matter and optimizing the system so that it works on-device on typical mobile processors in a fraction of a second.

“To overcome these challenges, we trained a convolutional neural network (CNN) on millions of pairs of public 3D images and their accompanying depth maps, and leveraged a variety of mobile-optimization techniques previously developed by Facebook AI, such as FBNet and ChamNet,” the company explained.

This feature is now available to everyone who uses Facebook.