FaceIdentification

所属分类:图形图象
开发工具:WINDOWS
文件大小:18946KB
下载次数:10
上传日期:2018-01-09 15:57:38
上 传 者星星雨
说明:  人脸识别代码,提取人脸特征,进行人脸对比,给出人脸相似度,识别效果还行,VS2015编译通过
(Face recognition code, face feature extraction, face contrast, face similarity, recognition effect is good, build with VS2015)

文件列表:
FaceIdentification\CMakeLists.txt (1176, 2017-08-31)
FaceIdentification\data\test_face_recognizer\crop_file_list.txt (1650, 2017-08-31)
FaceIdentification\data\test_face_recognizer\crop_sdk_file_list.txt (1850, 2017-08-31)
FaceIdentification\data\test_face_recognizer\feats.dat (409616, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\compare_im\Aaron_Peirsol_0001.jpg (13089, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\compare_im\Aaron_Peirsol_0004.jpg (15876, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200001_001.jpg (2680, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200002_002.jpg (3185, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200003_002.jpg (4472, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200004_003.jpg (4173, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200005_037.jpg (3908, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200006_005.jpg (3184, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200007_001.jpg (2997, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200008_002.jpg (2806, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200009_001.jpg (3498, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200010_003.jpg (3201, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200011_001.jpg (3173, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200012_001.jpg (3754, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200013_004.jpg (3221, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200014_006.jpg (4058, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200015_001.jpg (3309, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200016_005.jpg (3603, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200017_005.jpg (3874, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200018_001.jpg (3300, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200019_004.jpg (3084, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200020_003.jpg (4124, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200021_002.jpg (2982, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200022_001.jpg (3333, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200023_001.jpg (3138, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200024_004.jpg (3140, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200025_006.jpg (3372, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200026_003.jpg (3250, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200027_001.jpg (3481, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200028_002.jpg (3369, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200029_005.jpg (3386, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200030_003.jpg (3231, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200031_001.jpg (3709, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200032_001.jpg (3673, 2017-08-31)
FaceIdentification\data\test_face_recognizer\images\crop\NF_200033_001.jpg (2926, 2017-08-31)
... ...

## SeetaFace Identification [![License](https://img.shields.io/badge/license-BSD-blue.svg)](../LICENSE) ### Brief Description As most state-of-the-art face recognition technologies, SeetaFace Identification is based on deep convolutional neural network (DCNN). Specifically, it is an implementation of the VIPLFaceNet, which consists of 7 convolutional layers and 2 fully-connected layers with input size of 256x256x3. Simply speaking, it is tailored from AlexNet for fast and accurate face recognition in the wild based on the cutting-edge findings in deep learning research. Compared with AlexNet, VIPLFaceNet is deeper by replacing the 5x5 convolutional kernel layer with two 3x3 kernel layers, and it also reduces the number of kernels in each layer. Additionally, VIPLFaceNet introduces the Fast Normalization Layer for faster convergence of the network optimization. Evaluation shows that, compared with original AlexNet, the error rate of VIPLFaceNet is reduced by 40% in case of the same training set, while its training time is reduced by 80% and its computational cost for feature extraction is reduced by 40%. The model shipped in with the codes is trained with 1.4M face images of 16K subjects including both Mongolians and Caucasians. In the SeetaFace open-source face identification engine, the outputs of the 2048 nodes of the FC2 layer in the VIPLFaceNet are exploited as the feature of the input face. For verification or identification, the cosine similarity between their 2048D features of two given faces is used for thresholding or ranking. SeetaFace identification achieves a mean accuracy of 97.1% on LFW under the standard Image-Restricted protocol. To reproduce this result, one needs to use SeetaFace Detection and SeetaFace Alignment for face detection and alignment respectively. Please note that, for few faces not detected, one should use the central region of the original images instead for face alignment. In terms of speed, when tested on a single core of i7-3770 CPU, the engine can extract the features of a face in 115ms (excluding face detection and alignment). ### Compile #### Linux & Mac OS Change current working directory to `SeetaFace/FaceIdentification` and run the following command: ``` mkdir build cd build cmake .. && make ``` If everything goes fine, move on to test the program: ``` ./build/src/test/test_face_recognizer.bin ``` #### Windows A Visual Studio 2013 solution is provided in the subdirectory [**examples**](./examples). The solution contains 2 projects: (1) [**Identification**](./examples/Identification) which generates the shared lib, and (2) [**Tester**](./examples/Tester) which performs face recognition using the generated lib. To build the Tester project, one needs to ensure the configuration of [OpenCV](http://opencv.org/) is correctly set. ### How to Use SeetaFace Identification The class for face identification is included in `seeta` namespace. To use the function of SeetaFace Identification, one should first instantiate an object of `seeta::FaceIdentification` with path of the model file. The model file seeta_fr_v1.0.bin can be achieved by unzipping the files "seeta_fr_v1.0.part1.rar" and "seeta_fr_v1.0.part2.rar" in subdirectory [**model**](./model). ```c++ FaceIdentification face_recognizer("seeta_fr_v1.0.bin"); ``` After a face image is read, one needs to pack the image data with `seeta::ImageData`. Note that the pixel values should stored in a continuous 1D array in row-major style. ```c++ seeta::ImageData img_data(width, height, channels); img_data.data = img_data_buf; ``` To get features of the face, call `ExtractFeatureWithCrop()` after obtaining the coordiates of the 5 landmarks (`pt5`) with [SeetaFace Alignment](https://github.com/seetaface/SeetaFaceEngine/tree/master/FaceAlignment). ```c++ float* feats = new float[face_recognizer.feature_size()]; FacialLandmark pt5[5]; face_recognizer.ExtractFeatureWithCrop(img_data, pt5, feats); ``` To calculate the similarity between two faces, call `CalcSimilarity()` with the corresponding feature vectors. ```c++ float sim = face_recognizer.CalcSimilarity(feats1, feats2); ``` See an [example test file](./src/test/test_face_recognizer.cpp) for details. ### Citation If you find SeetaFace Identification (VIPLFaceNet) useful in your research work, please consider citing: @article{liu2016viplfacenet, Author = {Liu, Xin, and Kan, Meina, and Wu, Wanglong, and Shan, Shiguang, and Chen, Xilin}, Journal = {Frontiers of Computer Science}, Title = {{VIPLFaceNet}: An Open Source Deep Face Recognition SDK}, Year = {2016} } ### License SeetaFace Identification is released under the [BSD 2-Clause license](../LICENSE).

近期下载者

相关文件


收藏者