abdalwhabmalkawi / iOS-MobileFaceNet-MTCNN-FaceAntiSpoofing

Use tensorflow Lite on iOS platform, integrated face detection (MTCNN), face anti spoofing (CVPR2019-DeepTreeLearningForZeroShotFaceAntispoofing) and face comparison (MobileFaceNet use InsightFace loss)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MobileFaceNet-iOS

This project includes three models.

MTCNN(pnet.tflite, rnet.tflite, onet.tflite), input: one UIImage, output: Box. Use this model to detect faces from an image.

FaceAntiSpoofing(FaceAntiSpoofing.tflite), input: one UIImage, output: float score. Use this model to determine whether the image is an attack.

MobileFaceNet(MobileFaceNet.tflite), input: two UIImages, output: float score. Use this model to judge whether two face images are one person.

Android platform implementation: https://github.com/syaringan357/Android-MobileFaceNet-MTCNN-FaceAntiSpoofing

References

https://github.com/vcvycy/MTCNN4Android
This project is the Android implementaion of MTCNN face detection.

https://github.com/davidsandberg/facenet
Use the MTCNN here to convert .tflite, so that you can adapt to any shape.

https://github.com/jiangxiluning/facenet_mtcnn_to_mobile
Here's how to convert .tflite.

https://github.com/yaojieliu/CVPR2019-DeepTreeLearningForZeroShotFaceAntispoofing
Face Anti-spoofing. I trained FaceAntiSpoofing.tflite, which only supports print attack and replay attack. If you have other requirements, please use this source code to retrain.

https://github.com/sirius-ai/MobileFaceNet_TF
Use this model for face comparison on mobile phones because it is very small.

BUILD

After putting .tflite in your project, remember to add .tflite file in Build Phases -> Copy Bundle Resources

SCREEN SHOT

About

Use tensorflow Lite on iOS platform, integrated face detection (MTCNN), face anti spoofing (CVPR2019-DeepTreeLearningForZeroShotFaceAntispoofing) and face comparison (MobileFaceNet use InsightFace loss)

License:MIT License


Languages

Language:Objective-C++ 49.6%Language:Objective-C 48.5%Language:C++ 1.6%Language:Ruby 0.2%