Description of Android SDK Demo for God’s Eye Face Recognition
1.Demo Instructions
The main interface of SDK Demo is shown in Figure 1-1. The main functions are: 1:1, 1:N, face library Four major functions of management and setting options. The specific instructions are as follows:
(1) 1:1, that is, the face of picture 1 and picture 2 are compared, and the similarity score of the two is obtained. The interface is shown in Figure 1-2. Click the picture in the blank space to enter the picture selection interface and select the face picture that needs to be compared. Note: The picture should be kept positive, and the recommended size should be lower than 1920 X 1080, and the face should be clear.
(2) 1:N, please go to the face database management to register the face before using this function. After the registration is completed, enter 1:N, as shown in Figure 1-3. The figure shows the result of the comparison between the current face and the face in the library. The upper score indicates the comparison threshold, the red box indicates the non-living body, and the green The box represents a living body, and the upper left corner of the face box represents the registered name.
(3) Face database management, the main interface is shown in Figure 1-4. The main functions are: face registration, face deletion, registered face display, face search, face turning display. Click “photo entry” to enter the interface as shown in Figure 1-5, fill in the registered name, and click the Camera icon below to register for a photo, as shown in Figure 1-6. After the registration is completed, return to the face display interface and click the registration button To register. Perform 1:N again to perform face comparison, as shown in Figure 1-3, which displays the comparison score, face name, living body effect, and so on.
(4) Settings. The interface is shown in Figure 1-7, and the description of the batch import function is as follows: Click the “Please select the import folder” button to enter the interface as shown in Figure 1-8, select the corresponding picture folder, and click “Batch import”, Start to import the face. After the import is complete, enter the face frame management, you can view the imported face information.
Figure 1-1 Demo main interface
Figure 1-2 1:1 interface
Figure 1-3 1:N main interface
Figure 1-4 The main interface of face frame management
Figure 1-5 Photo entry interface
Figure 1-6 Take a photo and enter a face
Figure 1-7 Setting interface
Figure 1-8 Picture selection interface
2. Algorithm flow description
Deepcam SDK uses the deepcam.key network verification method, and you need to obtain The key file provided by Deepcam can be used normally. For details, please refer to the official website registration process or contact the staff at https://ai.deepca m.cn.
The Deepcam algorithm interface only supports synchronous calls. The algorithm description flowchart is shown in Figure 2-1, and the description is as follows:
(1) Enter the application and load all the feature objects saved locally to the memory in the background.
(2) After registering the face information, enter 1:N, turn on the camera, and turn on the camera preview.
(3) Start two threads. Thread 1 is responsible for face detection and camera image echo, and thread 2 is responsible for live body detection, feature extraction and 1:N comparison.
(4) Thread 1, will first carry out the face, after detecting the face, save the face information to the array of global variables, and update the camera screen preview at the same time.
(5) In thread 2, if the living body is opened, the living body detection is performed first, and if not, the feature extraction is performed directly. Perform a 1:N comparison according to the extracted feature values, and obtain information such as the name and score of the feature object in the comparison.
(6) Finally, the required information is displayed in the main interface asynchronously.
Figure 1-2 Face algorithm flow chart