The article/advert misses this information out; is this depth estimation a model in the OS somewhere, or part of the vision api, coremedia api (where the stereo->depth frames are), or just inside the camera app and not exposed to developers?
The portrait mode is likely to be implemented with monocular depth estimation using deep learning.
Also in the article "We’re happy that this depth data — both the human matte and the newfangled machine-learned depth map — was exposed to us developers, though."