Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 2.8 KB

README.md

File metadata and controls

60 lines (37 loc) · 2.8 KB

FaceID for macOS 10.14.1

This is a custom implementation of Apples FaceID feature using Google "FaceNet" run as a Launch Daemon service provider. Uses a "SleepWatcher" Launch Daemon to call a client Apple / Bash script on screen wake. Uses Pyro4 with a nameserver to host the tensorflow facnet as a Daemon. Client Apple / Bash script can also be called from "BetterTouchTools" to provide FaceID password entry to any app with trackpad gestures.
.

Setup

WARNING Build script is still under development, use at your own risk!

Requires:

  • homebrew
  • python3.6
  1. Follow "LFA Validation" to get facenet running on your machine with a current frozen version of the model. Update the path to the model in face_id/face.py line 49.

  2. Follow "Custom Facenet Classifier" to train a classifier on your own images. For you will need to align you images using the first guide. I used a training set of ten images of myself from different angles in a folder labeled with my name, and several images from the LFA set in a different folder labeled unknown. Update the path to the classifier in /face_id/face.p line 50.

  3. Follow "SleepWatcher" to get SleepWatcher installed on your system.

  4. Update the client and server .plst files to reflect correct script locations and then place both in /Library/LaunchDaemons.

  5. Update face_id_client.scpt to use you password

  6. Update face.py and face_id_server.py to set the path if necessary. Also change the classier label to whatever you used when training your classier.

Compatibility

The code was developed using Tensorflow r1.12 under macOS 10.14.1 with Python 3.6.

Performance

Performs inference in roughly 2-3 seconds, feels natural with IOS faceid. Using the server client model allowed us to get rid of the startup overhead from reimporting the dependencies and the Tensorflow model. Shaved about 6 seconds off total runtime.

Tools usedf

  • Activity Monitor
  • Script Editor
  • Automator for script timing
  • Pycharm
  • Homebrew
  • Py2app, exfreeze, pyinstaller

ToDO

  1. Add client launch daemons for login and for screen savor dismiss
  2. Add support for auto filling password while logged in
  3. Create a build script.
  4. Add support for multiple users.
  5. Add web cam overlay to login screen.
  6. Add support for detecting eye gaze
  7. Use a cnn to predict image depth then run detect face from pre-processing on the rgbd image, if it cant bound a face then they're probably using a image
  8. Add travis online build verifier

this output might help with keychain ioreg -b -r -n AppleKeyStore