资源简介

开源的SeetaFace人脸识别引擎是由中科院计算所山世光研究员带领的人脸识别研究组研发。代码基于C++实现,且不依赖于任何第三方的库函数.本系统基于opencv2.4+vs2013,压缩包中包含详细配置文档。 SeetaFace人脸识别引擎包括了搭建一套全自动人脸识别系统所需的三个核心模块,即:人脸检测模块(SeetaFace Detection)、面部特征点定位模块(SeetaFace Alignment)以及人脸特征提取与比对模块(SeetaFace Identification)。 Github开源项目: https://github.com/seetaface/SeetaFaceEngine

资源截图

代码片段和文件信息

/*
 *
 * This file is part of the open-source SeetaFace engine which includes three modules:
 * SeetaFace Detection SeetaFace Alignment and SeetaFace Identification.
 *
 * This file is part of the SeetaFace Alignment module containing codes implementing the
 * facial landmarks location method described in the following paper:
 *
 *
 *   Coarse-to-Fine Auto-Encoder Networks (CFAN) for Real-Time Face Alignment 
 *   Jie Zhang Shiguang Shan Meina Kan Xilin Chen. In Proceeding of the
 *   European Conference on Computer Vision (ECCV) 2014
 *
 *
 * Copyright (C) 2016 Visual Information Processing and Learning (VIPL) group
 * Institute of Computing Technology Chinese Academy of Sciences Beijing China.
 *
 * The codes are mainly developed by Jie Zhang (a Ph.D supervised by Prof. Shiguang Shan)
 *
 * As an open-source face recognition engine: you can redistribute SeetaFace source codes
 * and/or modify it under the terms of the BSD 2-Clause License.
 *
 * You should have received a copy of the BSD 2-Clause License along with the software.
 * If not see < https://opensource.org/licenses/BSD-2-Clause>.
 *
 * Contact Info: you can send an email to SeetaFace@vipl.ict.ac.cn for any problems.
 *
 * Note: the above information must be kept whenever or wherever the codes are used.
 *
 */


#include “cfan.h“
#include 
#include 
/** A constructor.
  *  Initialize basic parameters.
  */
CCFAN::CCFAN(void)
{
  pts_num_ = 5;
  fea_dim_ = pts_num_ * 128;

  lan1_w_ = NULL;
  lan1_b_ = NULL;
  lan1_structure_ = NULL;

  lan2_w_ = NULL;
  lan2_b_ = NULL;
  lan2_structure_ = NULL;

  mean_shape_ = NULL;
}

/** A destructor which should never be called explicitly.
  *  Release all dynamically allocated resources.
  */
CCFAN::~CCFAN(void)
{
  if (lan1_structure_ != NULL)
  {
    delete[]lan1_structure_;
    lan1_structure_ = NULL;
  }
  if (lan1_w_ != NULL)
  {
    for (int i = 0; i < lan1_size_ - 1; i++)
    {
      delete[](lan1_w_[i]);
      delete[](lan1_b_[i]);
    }
    delete[]lan1_w_;
    delete[]lan1_b_;
    lan1_w_ = NULL;
    lan1_b_ = NULL;
  }

  if (lan2_structure_ != NULL)
  {
    delete[]lan2_structure_;
  }
  if (lan2_w_ != NULL)
  {
    for (int i = 0; i < lan2_size_ - 1; i++)
    {
      delete[](lan2_w_[i]);
      delete[](lan2_b_[i]);
    }
    delete[]lan2_w_;
    delete[]lan2_b_;
    lan2_w_ = NULL;
    lan2_b_ = NULL;
  }

  if (mean_shape_)
  {
    delete[]mean_shape_;
    mean_shape_ = NULL;
  }
}

/** Initialize the facial landmark detection model.
  *  @param model_path Path of the model file either absolute or relative to
  *                   the working directory.
  */
void CCFAN::InitModel(const char *model_path)
{
  /*Open the model file*/
  FILE *fp = fopen(model_path “rb+“);
  mean_shape_ = new float[pts_num_ * 2];
  fread(mean_shape_ sizeof(float) pts_num_ * 2 fp);

  /*Load the parameters of the first local stacked autoencoder network*/
  fread(&lan1_size_ sizeof(int) 1 fp);
  lan1_structure_ 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\
     文件        1115  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\CMakeLists.txt
     目录           0  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\data\
     文件      512159  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\data\image_0001.png
     目录           0  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\doc\
     文件       15886  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\doc\aflw_nrmse.png
     目录           0  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\examples\
     文件        2064  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\examples\examples.sln
     文件       24064  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\examples\examples.v12.suo
     目录           0  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\examples\examples\
     文件        8246  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\examples\examples\examples.vcxproj
     文件         965  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\examples\examples\examples.vcxproj.filters
     文件         162  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\examples\examples\examples.vcxproj.user
     文件       88576  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\examples\examples\FaceDetection.dll
     文件        4854  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\examples\examples\FaceDetection.lib
     目录           0  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\examples\FaceAlignment\
     文件        7509  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\examples\FaceAlignment\FaceAlignment.vcxproj
     文件        1151  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\examples\FaceAlignment\FaceAlignment.vcxproj.filters
     目录           0  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\include\
     文件        4528  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\include\cfan.h
     文件        2717  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\include\common.h
     文件        2420  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\include\face_alignment.h
     文件        3679  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\include\sift.h
     目录           0  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\model\
     文件     2083352  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\model\seeta_fa_v1.1.bin
     文件        5078  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\README.md
     目录           0  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\src\
     文件       14246  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\src\cfan.cpp
     文件        3004  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\src\face_alignment.cpp
     文件       13437  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\src\sift.cpp
     目录           0  2017-09-01 10:23  SeetaFaceEngine\FaceAlignment\src\test\
............此处省略289个文件信息

评论

共有 条评论