In order to ensure that the system will not let anyone just inject a face in there and then pass at any door, a encryption of the actual user data must be made as well a hash comparison of the pictures in the database and in here, maybe. Any measure that prevents image injection and results manipulation outside the code.