In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Introduction
Using the free face recognition algorithm, the feeling is still very good, but the first contact will have some doubts about the parameters of some interfaces. Here, I would like to share the verification results of some parameters (take the windows version as an example, linux and android are basically the same). I hope it can better help you to access Hong soft's face recognition algorithm.
This paper mainly analyzes the following two parameters:
DetectFaceMaxNum
CombinedMask
Introduction of detectMode parameters
When initializing the engine, you need to select video or image mode. The macros ASF _ DETECT_MODE_VIDEO and ASF_DETECT_MODE_IMAGE are defined in the interface file, and can be passed in according to the desired mode. Video pattern corresponds to face tracking algorithm (FT), image pattern corresponds to face detection algorithm (FD). For the difference of FT/FD algorithm, please refer to Rainbow soft AI face recognition SDK access-Parameter Optimization (1) through the test data, I feel that the data in image mode can more accurately reflect the ability of the algorithm. The following introduction of other parameters are carried out in image mode.
Test the machine hardware configuration:
Processor: Intel (R) Corei5-7400 CPU @ 3.00GHZ 300GHZ
Install memory (RAM): 16.00GB (available for 15.9GB)
System type: win-10 64-bit operating system
1. DetectFaceMaxNum parameter description
1.1 recommended valu
The setting of the detectFaceMaxNum parameter in the initialization interface determines the maximum number of faces allowed to be detected in a single frame of the ASFDetectFaces (FT/FD) API. The maximum value recommended on the official website is no more than 50. Although a larger value can be set, it is not necessary. The following data can be described.
1.2 performance consumption corresponding to the number of faces detected
Test case:
1280mm 720 pixel image data; cycle detection 100 times to take the average
ASF_DETECT_MODE_IMAGE mode
ASF_DETECT_MODE_VIDEO mode
From the above data, we can see that the more the number of faces in the image mode, the longer the time of single detection, and the more the number of faces in the video mode, the more time it takes to detect. To sum up, the setting of detectFaceMaxNum parameters does not affect memory allocation and performance consumption, but only sets the maximum number of faces detected by the algorithm in a single frame.
2. Description of combinedMask parameters
2.1 memory footprint
The combinedMask parameter is a combination of different attributes passed in when the engine is initialized. The more attributes passed in, the more memory the engine allocates. In the case of practical application, you can pass in the necessary combination of attributes, and passing in redundant attributes will only take up memory.
The following data is used to initialize the memory usage of the interface when other parameters are fixed and only the mask parameter is modified (data is taken from the windows task manager):
ASFInitEngine (ASF_DETECT_MODE_IMAGE, ASF_OP_0_ONLY, 32, 5, combinedMask, & handle)
2.2 relationship between ASFInitEngine interface and combinedMask parameters in ASFProcess interface
The official document explains the combinedMask parameter in the ASFProcess API:
Initialization parameters combinedMask and ASF_AGE | ASF_GENDER | ASF_FACE3DANGLE | subset of the intersection of ASF_LIVENESS
Examples are as follows:
For example, if all attributes are passed into the 1:ASFInitEngine interface, the ASFProcess interface can pass any combination of ASF_AGE, ASF_GENDER, ASF_FACE3DANGLE, and ASF_ live attributes.
For example, if ASF_FACE_DETECT | ASF_FACERECOGNITION | ASF_AGE | ASF_GENDER is passed into the 2:ASFInitEngine API, only any combination of ASF_AGE and ASF_GENDER can be passed into the ASFProcess API.
2.3 cpu occupancy
The occupation of cpu is greatly affected by the equipment and test conditions. According to the usage, the algorithm corresponding to ASF_AGE | ASF_GENDER | ASF_FACE3DANGLE consumes less cpu, but ASF_LIVENESS consumes cpu resources and needs to be processed according to its own equipment.
2.4 performance of different properties of ASFProcess interface
Test case:
1280mm 720 pixel image data; cycle detection 100 times to take the average
Test code: LARGE_INTEGER litmp;LONGLONG QPart = 0, QPart1 = 0, QPart2 = 0: & litmp; / / get the clock frequency QPart = litmp.QuadPart;// get the starting CPU tick QueryPerformanceCounter (& litmp); / / get the clock initial value QPart1 = litmp.QuadPart;// the time of execution of the code to be calculated here for (int I = 0; iwidth, cutImg1- > height, ASVL_PAF_RGB24_B8G8R8, (MUInt8*) cutImg1- > imageData, & detectedFaces1, processMask) } QueryPerformanceCounter (& litmp); / / get clock termination value QPart2 = litmp.QuadPart;// calculation time difference (ms) double time = (double) (QPart2-QPart1) / (double) QPart * 1000 position printf ("time =% lf\ n", time); test results
To sum up, the detection of age, sex and 3D angle is very fast, while in vivo detection is relatively slow. In practical applications, if you only need to detect ASF_AGE, ASF_GENDER and ASF_FACE3DANGLE, you can deal with them in the main thread, but if you need to detect ASF_LIVENESS, it is recommended to open a single thread to deal with it, so that there will be no stuck frames in video mode, and the interface display is more smooth.
If you want to download Hong soft sdk, you can go to: https://ai.arcsoft.com.cn/product/arcface.html?utm_source=it&utm_medium=referral
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.