How to overcome face detection security issues so it cannot detect a face if someone shows a picture?
An idea to improve security is asking people to perform something like: 

blink one or both eyes
open mouth
turn left or right... 

Probably choose one or two of these randomly... This will improve security, but it is not really safe. It may be useful to overcome some accessibility issues.
Some other ideas I've read eslewhere:

check background of the image (if the camera is fixed) 
use infrared camera to detect heat patterns
use two cameras to get a stereoscopic image
I have build a real time face detection using OPENCV in python now i am expanding my project to fyp and making a iot based smart home automation using AI.I am implementing a door lock as a initial state which will be opened if it detect a face which will be in dataset.
I don't want it to detect or opened if someone show a picture from mobile of same person which is a security concern
please Help.