Exactly this! I experimented with a depth estimation model. An image was added as an input, the output was a depth map in grayscale, which I later used in Photoshop as a mask for Lens-blur simulation.