Microsoft has a kattenluikje with face detection developed, and with some good will, some programming knowledge and the right tools you can also build it yourself.
The ‘Cat By with Pet Recognition is a knutselproject with on a Raspberry Pi 3 model B or MinnowBoard Max-computer, which is running on a special version of Windows 10 for the internet-of-things: Windows 10 IoT Core. A part thereof is OpenCV, machine learning-software that the face detection is run. Also a webcam and motion detector may not be missing.
A kattenluikje with face detection ensures that only your own pets to go inside and unnecessary guests outside the door. How that works, you can see in the below YouTube video. Extensions are also an option, such as a display with information about the coming and going of the cat or (small) dog. Or receive notifications on your smartphone as soon as they are back home.
The supplies for the build it yourself of such a smart panel with step-by-step explanation on how to program it, you can find on this website.