Recognizes classmates and displays their names.
This program requires face_recognition and cv2 library to be installed.
- Paste the faces you want to recognize into faces folder. The images have to be in JPG format with file name NAME.jpg.
- Run the file PreSavedFace.py to encode and store the faces.
- Change the HAS_GPU in FaceRecog.py to true to use GPU.
- Run the file main.py to recognize the faces.
- Press SPACE to register current faces or new faces as players.
- Press ENTER to start the game.
- Press 'r' to restart or 'q' to close the program.
The name, location and angle of the players to the camera will be calculated and displayed on the screen with the format: name, location(cm), angle(degree). Location and angle is calculated by using simple trigonometry and optical knowledge. The values will return to caller(main.py) after all players has been detected for more than 2 seconds.