1. Demo usage instructions
Figure 1-1 shows the main interface of SDK Demo. The main functions are 1:1, 1:N, face database management, and setting options. Specific instructions are as follows:
(1) 1:1, that is, face comparison between Picture 1 and picture 2, and the similarity score of the two is obtained. As shown in Figure 1-2, click the picture in the blank to enter the picture selection interface and select the face picture to be compared. Note: Keep the image forward, recommended size below 1920 X 1080, clear face.
(2) 1:N, please register face in face database management before using this function. After the registration is completed, enter 1:N, as shown in Figure 1-3, which shows the result of the comparison between the current face and the face in the database. The upper score represents the comparison threshold, the red box represents the non-living person, the green box represents the living person, 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 page turning display. Click “Photo Entry” to enter the interface as shown in Figure 1-5, fill in the registration name, click the Camera icon below to take photos and register, as shown in Figure 1-6. After registration, return to the face display interface and click the registration button to register. Perform 1:N again for face comparison, as shown in Figure 1-3, showing the comparison score, face name, living effect and so on.
(4) Setting. The interface is shown in Figure 1-7, where the batch import function is described as follows: Click “Please select the import folder” button to enter the interface as shown in Figure 1-8. Select the corresponding image folder and click “Batch Import” to import faces. After the import, enter the face frame management, you can view the imported face information.
1. Algorithm flow description
The Deepcam SDK uses the deepcam.key network authentication method, and you need to obtain the key file provided by Deepcam to use it normally. For details, see the registration process on the official website or contact the staff at https://ai.deepcam.cn.
The Deepcam algorithm interface supports only synchronous invocation. Figure 2-1 shows the algorithm description flow chart, as follows:
(1) Enter the application and load all locally saved feature objects into memory in the background.
(2) after registering face information, enter 1:N, open the camera, open the camera preview.
(3) Start two threads, thread 1 is responsible for face detection and camera image echo, thread 2 is responsible for in vivo detection, feature extraction and 1:N comparison.
(4) Thread 1, the first will be face, face detection, save face information to the global variable array, while updating the camera picture preview.
(5) Thread 2: If living objects are opened, live detection will be performed first; if not, feature extraction will be performed directly. According to the extracted feature values, 1:N comparison is performed to obtain the name and score of feature objects in the ratio.
(6) Finally, the required information is asynchronously displayed on the main interface.