For face recognition you need to add photos who is gonna be recognized, The program uses OpenCV, let's suppose there is a camera enterance of the bathroom, it recognizes who you are and adds your name a list, also it gets time when you enter and exit, puts both time to two different list.It calculates duration(How long have you been there).Finally it saves all of data to Firebase.