DFace is an open source deep learning face detection and face recognition system. All functions are developed using the pytorch framework. Pytorch is a deep learning framework developed by Facebook. It contains some interesting advanced features, such as automatic derivation, dynamic composition, etc. DFace naturally inherits these advantages, making its training process simpler and more convenient, and the implemented code clearer and easier to understand. DFace can leverage CUDA to support GPU acceleration mode. We recommend trying the Linux GPU mode, which can achieve almost real-time effects.
If you are interested in DFace and want to participate in this project, the following TODO are some functions that need to be implemented
1. Develop the face comparison function based on the center loss or triplet loss principle, and the model uses ResNet inception v2. This feature compares the similarity of two face images. For details, please refer to Paper and FaceNet
2. Anti-fraud function, which prevents photo attacks, video attacks, playback attacks, etc. based on face characteristics such as light and texture. For details, please refer to the LBP algorithm and SVM training model.
3. 3D face anti-fraud.
4. Mobile transplantation: migrate the pytorch-trained model to caffe2 according to the ONNX standard, and some numpy algorithms are implemented in c++.
5. Tensor RT transplantation, high concurrency.
6. Docker support, gpu version
Install
DFace mainly has two modules, face detection and face recognition. I will provide detailed steps for training and running all models. You first need to build a python environment for pytorch and cv2. I recommend using Anaconda to set up an independent virtual environment. If you use GPU training mode, you need to install Nvidia's cuda and cudnn. The author currently prefers the Linux Ubuntu installation environment. Thanks to the enthusiastic netizen for providing the windows DFace installation experience. For the detailed windos installation tutorial, please refer to his blog.
rely
cuda 8.0
anaconda
pytorch
torchvision
cv2
matplotlib