Skip to content

sevenHsu/Face_Recognition_IN_Video

Repository files navigation

Face_Recognition_IN_Video

About

This is a desktop programe for finding and marking the faces required in videos.

Requirement

  • python36

    I use python36 in this programe for using pytorch.

  • Pytorch

    Only Pytorch.02+ can work in this programe.If you want using GPU to make it run faster,please download and install Cuda.

  • Mxnet

    I use Mtcnn for detecting face from videos which need Mxnet.

  • OpenCV

    Dealing image such as resizing,converting coler and more.

  • PyQT5

    Using this third package pyQT5 just for UI realization of the programe.

Using

run:

python main.py

README_MTCNN_face_detection_and_alignment

MTCNN_face_detection_and_alignment

About

This is a python/mxnet implementation of Zhang's work . it's fast and accurate, see link.

It should have almost the same output with the original work, for mxnet fans and those can't afford matlab :)

中文blog

Test

you can change ctx to mx.gpu(0) for faster detection

by setting num_worker=4 accurate_landmark=False we can reduce the detection time by 1/4-1/3, the bboxes are still the same, but we skip the last landmark fine-tune stage( mtcnn_v1 ).

add function extract_face_chips, examples:

1 2 3 4

see mtcnn_detector.py for the details about the parameters. this function use dlib's align strategy, which works well on profile images :)

Results

big4

Reference

K. Zhang and Z. Zhang and Z. Li and Y. Qiao Joint, Face Detection and Alignment Using Multitask Cascaded Convolutional Networks, IEEE Signal Processing Letters

README_SphereFace

SphereFace

Introduction

The repository contains the entire pipeline (including all the preprocessings) for deep face recognition with SphereFace. The recognition pipeline contains three major steps: face detection, face alignment and face recognition.

SphereFace is a recently proposed face recognition method. It was initially described in an arXiv technical report and then published in CVPR 2017. The most up-to-date paper with more experiments can be found at arXiv or here. To facilitate the face recognition research, we give an example of training on CAISA-WebFace and testing on LFW using the 20-layer CNN architecture described in the paper (i.e. SphereFace-20).

In SphereFace, our network architecures use residual units as building blocks, but are quite different from the standrad ResNets (e.g., BatchNorm is not used, the prelu replaces the relu, different initializations, etc). We proposed 4-layer, 20-layer, 36-layer and 64-layer architectures for face recognition (details can be found in the paper and prototxt files). We provided the 20-layer architecure as an example here. If our proposed architectures also help your research, please consider to cite our paper.

SphereFace achieves the state-of-the-art verification performance (previously No.1) in MegaFace Challenge under the small training set protocol. A PyTorch Implementation of SphereFace. The code can be trained on CASIA-Webface and the best accuracy on LFW is 99.22%.

SphereFace: Deep Hypersphere Embedding for Face Recognition

Models

  1. Visualizations of network architecture (tools from ethereon):
    • SphereFace-20: link
  2. Model file

Results

  1. Following the instruction, we go through the entire pipeline for 5 times. The accuracies on LFW are shown below. Generally, we report the average but we release the model-3 here.

    Experiment #1 #2 #3 (released) #4 #5
    ACC 99.24% 99.20% 99.30% 99.27% 99.13%
  2. Other intermediate results:

Reference

Mtcnn for face detection

Sphereface_pytorch for face recognition

paper of MTCNN

paper of Sphereface

About

Finding and marking faces requested from videos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages