17 Star 72 Fork 38

Gitee 极速下载 / SeetaFace2

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/seetafaceengine/SeetaFace2
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README_en.md

SeetaFace2

License

中文 English

1 Introduction

The SeetaFace2 face recognition engine includes three core modules required to build a fully automated face recognition system: face detection module FaceDetector, facial key positioning module FaceLandmarker and face feature extraction and Compare the module FaceRecognizer. There are two additional auxiliary modules FaceTracker and QualityAssessor for face tracking and face quality assessment.

SeetaFace2 is developed in standard C++. All modules do not depend on any third-party libraries and support x86 architecture (Windows, Linux) and ARM architecture (Android). The top applications supported by SeetaFace2 include, but are not limited to, face access, insensitivity, face matching, and the like.

SeetaFace2 is a milestone version for face recognition business. The face detection module can achieve more than 92% recall rate under 100 false detection conditions on FDDB. Face key point positioning supports 5 points and 81 points positioning. A face recognition application that supports thousands of people's base libraries than the N module.

Modules Method Overview Basic Specifications Typical Platform Speed
** Face Detection** Cascaded CNN FDDB has a recall rate of 92% (100 false detections). 40 Minimal Face
I7: 70FPS(1920x1080)
RK3399: 25FPS(640x480)
** Facial closure point positioning (81 points and 5 points)** FEC-CNN Average positioning error (normalized according to the center distance between the two eyes)
0.069 on the 300-W Challenge Set.
I7: 450FPS and 500FPS
RK3399: 110FPS and 220FPS
Face feature extraction and comparison ResNet50 Recognition: In the general 1:N+1 scenario, when the error acceptance rate is 1%,
1000 base library, the preferred recognition rate is over 98%,
The 5,000-person base library has a preferred recognition rate of over 95%.
I7: 8FPS
RK3399: 2.5FPS

Compared to the 2016 open source SeetaFace 1.0, SeetaFace2 has an order of magnitude improvement in both speed and accuracy.

Version Face Detection Key Point Positioning Face Recognition Third-party dependencies
Speed ​​[1] single precision [2] speed Features Training data size Application
1.0 16FPS 85% 200FPS 5 points 1.4 million sheets Laboratory no
2.0 77FPS 92% 500FPS 5/81 points 33 million sheets Business Environment no
Remarks [1] 640x480 input, detection 40x40 face, I7-6700.
[2] The accuracy of face detection refers to the recall rate of 100 misunderstood FDDB data sets.

Knowing people to understand everything, open source empowerment and development. SeetaFace2 is committed to the development of AI, and together with industry partners to promote the face recognition technology.

2. Compile

2.1 Compiling dependencies

  • compilation tool
    • For linux
      • GNU Make tool
      • GCC or Clang compiler
    • For windows
  • dependent library
    • [Optional] OpneCV Required only when compiling examples
  • dependency architecture
    • CPU supports SSE2 and FMA [optinal] (x86) or NENO (ARM) support

2.2 Compile parameter

  • BUILD_DETECOTOR: Whether to compile the face detection module. ON: On; OFF: Off
  • BUILD_LANDMARKER: Whether to compile the face key positioning module. ON: On; OFF: Off
  • BUILD_RECOGNIZER: Whether to compile the face feature extraction and comparison module. ON: On; OFF: Off
  • BUILD_EXAMPLE: Whether to compile the example. ON: On; OFF: Off, open requires pre-installation of OpneCV
  • CMAKE_INSTALL_PREFIX: Installation prefix
  • SEETA_USE_FMA: Whether use FMA instructions. Default off. Only works in x86 architecture.
  • SEETA_USE_SSE2: Whether use SSE2 instructions。window and unix default ON,other default OFF。

2.3 Platforms

2.3.1 linux

  • Dependence

    • opencv. Only need to compile the example

      sudo apt-get install libopencv-dev

  • Compile

    cd SeetaFace2
    mkdir build
    cd build
    cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/install -DBUILD_EXAMPLE=OFF # Set to ON if there is OpneCV
    cmake --build . --config Release
  • Installation

    cmake --build . --config Release --target install/strip
  • Run the example

    • Add the directory of the build library to the variable LD_LIBRARY_PATH

        export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/bin
    • Copy the model file to the model directory of the program execution directory

        cd SeetaFace2
        cd build
        cd bin
        mkdir model
        cp fd_2_00.dat pd_2_00_pts5.dat pd_2_00_pts81.dat .
    • Execute the program in the bin directory

      • points81

        cd SeetaFace2
        cd build
        cd bin
        ./point81
      • search

        cd SeetaFace2
        cd build
        cd bin
        ./search

2.3.2 windows

  • Dependence
    • opencv. Only need to compile the example
  • Compile with the cmake-gui.exe tool. Open cmake-gui.exe
  • Command line compilation
    • Add the directory where the cmake command is located to the environment variable PATH

    • Open "VS2015 Developer Command Prompt" from the Start menu to enter the command line

      • Compile

        cd SeetaFace2
        mkdir build
        cd build
        cmake .. -G"Visual Studio 14 2015" \
              -DCMAKE_INSTALL_PREFIX=install \
              -DCMAKE_BUILD_TYPE=Release \
              -DBUILD_EXAMPLE=OFF # Set to ON if there is OpneCV
        #Note: -G: Generators. The generators must match the msvc compiler.
        cmake --build . --config Release
      • Installation

        cmake --build . --config Release --target install
      • Run the example

        • Copy the model file to the model directory of the program execution directory

            cd SeetaFace2
            cd build
            cd bin
            mkdir model
            cp fd_2_00.dat pd_2_00_pts5.dat pd_2_00_pts81.dat .
        • Execute the program in the bin directory

          • points81
          • search

2.3.3 Android platform compilation instructions

  • Install ndk

  • Complie

    • The host is linux

      • Compile

          cd SeetaFace2
          mkdir build
          cd build
          cmake .. -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a with NEON" -DANDROID_PLATFORM=android-18 -DBUILD_EXAMPLE=OFF # set ON if OpenCV
          cmake --build . --config MinSizeRel
      • Installation

          cmake --build . --config MinSizeRel --target install/strip
    • The host is windows

      • cmd

        • Compile

          cd SeetaFace2
          mkdir build
          cd build
          cmake .. -DCMAKE_INSTALL_PREFIX=%cd%\install ^
                -G"Unix Makefiles" ^
                -DCMAKE_BUILD_TYPE=MinSizeRel ^
                -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK%/build/cmake/android.toolchain.cmake ^
                -DCMAKE_MAKE_PROGRAM=%ANDROID_NDK%/prebuilt/windows-x86_64/bin/make.exe ^
                -DANDROID_ABI=arm64-v8a ^
                -DANDROID_ARM_NEON=ON ^
                -DANDROID_PLATFORM=android-24 ^
                -DBUILD_EXAMPLE=OFF : set ON if OpenCV
          cmake --build . --config MinSizeRel
        • Installation

          cmake --build . --config MinSizeRel --target install/strip
      • msys2 or cygwin

        • Compile

          cd SeetaFace2
          mkdir build
          cd build
          cmake .. -DCMAKE_INSTALL_PREFIX=install -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake  -DCMAKE_MAKE_PROGRAM=${ANDROID_NDK}\prebuilt\windows-x86_64\bin\make.exe -DANDROID_ABI=arm64-v8a -DANDROID_ARM_NEON=ON -DBUILD_EXAMPLE=OFF # set ON if OpenCV
          cmake --build . --config MinSizeRel
        • Installation

          cmake --build . --config MinSizeRel --target install/strip
    • Parameter Description: https://developer.android.google.cn/ndk/guides/cmake

      • ANDROID_ABI: The following values can be taken: Goal ABI. If the target ABI is not specified, CMake uses armeabi-v7a by default. Valid ABI are:
        • armeabi:CPU with software floating point arithmetic based on ARMv5TE
        • armeabi-v7a:ARMv7-based device with hardware FPU instructions (VFP v3 D16)
        • armeabi-v7a with NEON:Same as armeabi-v7a, but with NEON floating point instructions enabled. This is equivalent to setting -DANDROID_ABI=armeabi-v7a and -DANDROID_ARM_NEON=ON.
        • arm64-v8a:ARMv8 AArch64 Instruction Set
        • x86:IA-32 Instruction Set
        • x86_64 - x86-64 Instruction Set
      • ANDROID_NDK The path of installed ndk in host
      • ANDROID_PLATFORM: For a full list of platform names and corresponding Android system images, see the [Android NDK Native API] (https://developer.android.google.com/ndk/guides/stable_apis.html)
      • ANDROID_ARM_MODE
      • ANDROID_ARM_NEON
      • ANDROID_STL:Specifies the STL that CMake should use.
        • c++_shared: use libc++ shared library
        • c++_static: use libc++ static library
        • none: no stl
        • system: use system STL

2.3.4 IOS platfrom

example IOS device.

  • Dependence

    • One PC within MacOS.
    • Source code from git
  • Command lines

    • Use cmake compile and install

      cd SeetaFace2
      mkdir build
      cd build
      chmod +x ../ios/cmake.sh
      ../ios/cmake.sh -DCMAKE_INSTALL_PREFIX=`pwd`/install
      make -j4
      make install

      After all commands above succeed, libraries would install into SeetaFace2/build/install.

    • Compile for simlulator. Change cmake parameters like: ../ios/cmake.sh -DIOS_PLATFORM=SIMULATOR64 -DPLATFORM=x64

    • See <root>/ios/cmake.sh and <root>/ios/iOS.cmake for more compilation controls.

3. Directory structure

|-- SeetaFace2  
    |-- documents (SDK interface documentation)  
    |-- example(C++ version SDK sample code)  
    |-- FaceDetector  
    |-- FaceLandmarker(Feature Point Positioning Module)  
    |-- FaceRecognizer (Face Feature Extraction and Alignment Module)  
    |-- SeetaNet (forward computing framework module)  

4. Model download

5. example

5.1 This project comes with examples

The example/search/example.cpp example shows a simple and complete process for face recognition, including:

  1. Pre-registered images in the face-to-face recognition base library (the default registration in the example is "1" .jpg "Face in the face";
  2. Turn on the camera to detect the face in the camera screen; 3. Identify the detected face and determine the identity of the face.

If the tester wants to successfully identify his face in the bottom library, he needs to add the image named after his own name (name + .jpg) in the bottom register registration list of example.cpp, and copy the image file named by his own name. Go to the program's running directory, recompile example and run the program to test the recognition effect.

5.2 Other projects that have used this project

6. Developer Community

Developers are welcome to join the SeetaFace developer community, please add SeetaFace assistant helper WeChat, after review, invite to join the group.

QR

6.1 Code Contribution

Developers are welcome to contribute quality code, and all developer code needs to be submitted in the develop branch.

7. Business cooperation

If you want to purchase the SeetaFace commercial version engine for more accurate and faster face recognition algorithms or more for face verification, expression recognition, heart rate estimation, attitude estimation, line-of-sight tracking, etc., please contact Business Email bd@seetatech.com.

8. Open source agreement

SeetaFace2 is open source according to [BSD 2-Clause license] (LICENSE).

Comments ( 0 )

Sign in for post a comment

About

SeetaFace2 人脸识别引擎包括了搭建一套全自动人脸识别系统所需的三个核心模块,即:人脸检测模块 FaceDetector、面部关键点定位模块 FaceLandmarker  spread retract
Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
C/C++
1
https://gitee.com/mirrors/SeetaFace2.git
git@gitee.com:mirrors/SeetaFace2.git
mirrors
SeetaFace2
SeetaFace2
master

Search