Google Pixel 2's Portrait Mode unofficially ported to non-Google phones
The Google Pixel 2's background-blurring Portrait mode may no longer be exclusive to the Pixel 2, thanks to work from the XDA Developer community. XDA Senior Member Charles_I was able to get the Portrait Mode software to work on non-Google devices running on Android 8.0 Oreo, including the original Pixel & Pixel XL as well as Google's Nexus 5X and 6P phones via a custom app.
XDA Senior Member Arnova8G2 then adjusted that app to work on a broad range of non-Google devices, with users reporting it functioning on Xiaomi, OnePlus and Moto G5s Plus phones.
If you want to try it for yourself, check it out here.
Source: XDA Developers