Use VS2015 to open /DeepCamFaceDemo/DeepCamFaceDemo.sln, compile Win32-release version (or x64-release version), and generate DeepCamFaceDemo.exe program in Bin32 (or Bin64) directory to demonstrate the following functions.
To call the demo code specifically, please read /DeepCamFaceDemo/DeepCamFaceDemo.cpp
The demo running interface is shown in the figure (the X64 version of the Demo has no “personal verification” function):
选择图一:Select Picture 1
选择图二:Select Picture 2
1:1图片对比:1:1 picture comparison
摄像头比图一:Camera than figure 1
图一录入:Input figure 1
按名删除:Delete by name
图一识别:Figure 1 to identify
IR活体阈值:IR living body threshold
RGB活体阈值:RGB living body threshold
人脸识别阈值:Face recognition threshold
张闭嘴阈值:Open mouth and shut-off threshold
左右摇头阈值:Left and right head shaking threshold
Note: in the red box of the figure, the title bar will show some hints of success or failure of the operation; The elapsed time position displays the elapsed time in milliseconds (ms) for some operations; Similarity position, will show the similarity of feature comparison; The edit box can be used to input the feature name/display the feature name matched by the search; Three threshold Settings are used for in vivo detection and face recognition.
Identification camera: “camera input”, “camera than figure 1”, “authentication verification” and “camera recognition” are all derived from this camera;；
Live camera: the live detection in “live detection” and “camera than in figure 1” are all from this camera. The RGB/IR radio box behind this camera is used to set the live detection interface used at the bottom, which must be consistent with the live camera you selected。
IR living body threshold: 0 to 1 floating point value, and the default value is 0.9.
RGB living body threshold: 0 to 1 floating point value, and the default value is 0.5.
Face recognition threshold: 0 to 1 floating point value, the default value is 0.8, the higher the higher it is considered to be the same person. When comparing people and witnesses, because id photos are generally processed, the comparison score is relatively low, and the threshold is generally set at 0.8, and whether or not to wear eyes has a great impact on it. For recent photos, the threshold can be set to 0.85 or higher.
Left and right head shaking threshold: in the Demo, only simple pixel difference value is taken as the threshold value, and the default value is 30;
Open mouth and shut-off threshold: Demo is only based on the pixel difference value as the threshold, the default is 4;；
1 Click “Select Picture 1” to select the first picture to be compared;
2 Click “Select Picture 2” to select the second picture to be compared;
3 Click “1:1 Picture Contrast” (the first comparison will be time-consuming, normal!), the comparison success will be displayed in the “Time-consuming” and “Similarity” positions; there will be a title bar when the comparison fails. prompt.
1 Click “Select Picture 1” to select the picture to be compared;
2 Select ‘recognition camera’, ‘living camera’ and live detection type (‘live camera’ and ‘living detection type’ to ensure correspondence, otherwise the detection result is inaccurate);
(3) click “camera than figure 1” to start real-time comparison (press Esc to end the real-time comparison), the area in figure 2 will first display the live camera image and conduct in vivo detection; After the in vivo detection is passed, the recognition camera screen will be displayed and the real-time comparison with figure 1 will be started. If the comparison is successful, the results will be displayed at the positions of “time-consuming” and “similarity”. When the comparison fails, there will be a prompt in the title bar, and the comparison will be stopped automatically after passing(the in vivo detection and face recognition can be controlled by setting the bottom threshold).
人脸识别已通过:Face recognition has passed
(1) choose ‘live camera’ and live detection type; (ensure the correspondence between ‘live camera’ and ‘live detection type’, otherwise the detection result is not accurate)
- click ” live detection” to detect whether the face in the camera is in vivo in real time (press Esc to end the in live detection). The area in fig.2 will display the camera screen in real time. When the detection fails, there will be a prompt in the title bar (by setting the threshold at the bottom, it can control whether the detection in vivo passes or not).
已通过活体检测:It’s been tested in vivo
①select ‘identification camera’ and click “verification of identity card” to start cyclic reading of id card (press Esc to end verification of identity card);
②With the id card brush, the program reads the id card, the id photo will be displayed in the area of figure 1, the name will be displayed in the edit box, and then the camera will be opened (the screen is displayed in the area of figure 2), real-time start verification; The results are displayed in the positions of “time consumption” and “similarity”. Other information is displayed in the title bar position;
③After reading the id card, the verification will be stopped after 1 minute (or you can actively press F8), and the next id card will be read in a cycle to verify the identity of the person (the verification can be controlled by setting the face recognition threshold at the bottom).
Note: due to the limitation of SDK for secondary development of card reader (cvr-100ud USB card reader, supporting driver), only x86 version Demo program is supported (if there is no card reader of cvr-100ud, this function shall not be used).
人脸识别已通过:Face recognition has passed
(1) click “select figure 1” to input the picture;
(2) in the edit box to input the name (a name can be input up to five mutual similarity is not less than 0.7 features);
(3) click “input figure 1”, the input result will be displayed in the “time-consuming” position; There will be a prompt in the title bar when the entry fails.
图一人脸特征入库成功:FIG. 1 facial features successfully entered into the database
① select “recognition camera” and enter a name in the compilation box to mark the characteristics to be entered;
②click “camera input” (press Esc to stop the camera input), and the camera screen will be displayed in the area shown in figure 2;
③Press F9 for face input (5 features can be input for one name), and the input result will be displayed in the “time-consuming” position. There will be a prompt in the title bar when the entry fails.
④After entering a name, you can directly modify the name, and then repeat the operation in 3 to enter multiple people.
特征入库成功:Feature successful storage
①1 Click “Batch Entry” and select the directory where the image set to be entered is located in the pop-up folder selection window.
②Wait for the words “Batch entry completed!” to appear in the title bar before starting other operations;
③If there is a picture entry failure, the name of the picture that failed to be entered will be displayed in the pop-up window after the entry is completed; if the entry is successful, there is no pop-up window.
批量录入已经完成:Batch entry completed
①Enter the name of the face feature you want to delete in the edit box;
②Click “delete by name”, all features of the specified name will be deleted, the “time consuming” position will show the time consuming, and the title bar position will show the result of deletion
根据名字删除特征成功:Deleted successfully based on name feature
Click “delete all”, will delete all the characteristics of the specified name, “time” position will show the time, the title bar position will show the result of deletion.
删除所有特征成功:Delete all features successfully
①click “select figure 1”, select a picture to search;；
②Figure 1 click on the “identification”, you will search feature library, “time” and “similarity”, edit box location will display search results ( time-consuming, similarity matching to the characteristics of the name), the title bar location search the information of pointing out (by setting the bottom face recognition threshold, can control whether can search to match the face feature information).
已搜索到匹配的人脸特征:Matching facial features have been found
①Select “identification camera” and click “camera identification” (press Esc to exit identification) to start real-time identification. The camera screen is displayed in the area shown in figure 2.
②”Time-consuming”, “similarity”, and the location of the edit box will display the search results (time-consuming, similarity, and the matching feature name), and the title bar location will have a search prompt message (by setting the face recognition threshold at the bottom, you can control whether the matching face feature information can be searched).
已搜索到匹配的人脸特征:Matching facial features have been found
①Click on “Landmarks Demo”. In the area of Figure 1, the “Recognition Camera” screen will be displayed in real time, and the face coordinates and face landmarks will be marked. The window title will display the left and right shaking heads and the mouth opening state.
②The “time-consuming” display shows that it takes time to check the face. If you feel that you are shaking your head and opening your mouth too sensitively, you can increase the threshold to control.
居中:In the middle