Skip to content

How to create a FaceID functionality using CoreML and CreateML in Swift. (Basic Project + Passcode)

License

Notifications You must be signed in to change notification settings

Dr-Groot/FaceID_Swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FaceID_Swift

For creating FaceID using CoreML, we first need a model. This model will help us to detect the respective person to unlock the device. We have used 3 animals image data - [Cat - Dog - Horse] and created a model using CreateML image classfication.

We have assumed that the owner of the device is cat and it will unlock when it will get atleat 95% confident that the user is a cat.

I request you to first check CoreML and CreateML for better understaning: CoreML - Object Detection || CoreML - CreateML

Now let's jump back to our project, when you will open the app it will appear like this:

IMG_2101

I have added tap gesture to the screen, this means when you will tap on the screen it will start scanning your face like this:

IMG_2102

If identity is matched as cat with more than 95% confidence, it will unlock the screen. I will provide model + data from which the model is created so that you can use this functionality and practice more.

IMG_2104

Don't worry if you aren't able to match the face within 3 seconds, passcode screen will appear so that you can unlock the device. and passcode is 123456.

IMG_2103

You can change the screening time (3 sec) and passcode (123456).

Happy Learning !

About

How to create a FaceID functionality using CoreML and CreateML in Swift. (Basic Project + Passcode)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages