Developers have found hints inside Apple's early HomePod firmware that point to the iPhone 8 making use of infrared facial recognition. The entries were found in the BiometricKit framework, which is where TouchID also resides.
https://www.notebookcheck.net/iPhone-8-to-have-infrared-face-detection.239668.0.html