A method, apparatus and device for dynamic adjustment of additive angle interval parameters
By dynamically adjusting the additive angular interval parameter of the face recognition model, the problem of limited adaptability and recognition performance caused by fixed parameters is solved, and the stability and recognition performance of the model in different scenarios are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUSU LAB OF MATERIALS
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-01
AI Technical Summary
Existing face recognition models are limited by fixed additive angular interval parameters in terms of adaptability and recognition performance under different data distributions and application scenarios, which affects training stability and discrimination ability, and also results in high parameter tuning complexity.
By setting the total number of training iterations and the initial additive angle interval parameter of the face recognition model, and combining the number of iterations and feature distribution during the training process, the target additive angle interval parameter is dynamically adjusted. The angle constraint strength is gradually adjusted by using a monotonically increasing scheduling function or a calculation method based on the angle variance, included angle, and confidence rate of change.
It improves the model's adaptability to different data distributions and application scenarios, reduces the optimization difficulty in the early stages of training, and enhances the discrimination strength in the later stages of training, thereby improving the model's convergence stability and feature discrimination ability.
Smart Images

Figure CN121661697B_ABST
Abstract
Description
A method, apparatus, and device for dynamically adjusting additive angular interval parameters. Technical Field
[0001] This invention relates to the field of model parameter adjustment technology, and more specifically to a method, apparatus, device, and readable storage medium for dynamically adjusting additive angular interval parameters. Background Technology
[0002] With the development of deep learning, facial recognition technology typically extracts facial feature vectors through neural networks and identifies individuals based on feature similarity. To enhance the ability to distinguish between different identities, existing methods generally adopt an angle-based loss function design, which normalizes the feature vectors so that they are distributed on the same hypersphere, and uses the angle between the feature vectors as the similarity measure.
[0003] In this type of method, an additive angular spacing parameter is typically introduced into the angular space to impose additional angular constraints on the correct category, thereby expanding the angular spacing between different categories on the hypersphere and improving feature discriminativeness. This technique has achieved good recognition results on some controlled datasets.
[0004] However, the aforementioned additive angular interval parameters typically use fixed values, and their effectiveness largely depends on the training data and application scenario. When the data distribution or application conditions change, the model performance becomes highly sensitive to this parameter value, limiting its generalization ability. Furthermore, during training, the distribution of feature angles continuously changes with each training phase, and a fixed angular interval cannot be dynamically adjusted, easily affecting training stability and further improvement in discriminative ability. Moreover, in complex scenarios with significant differences in sample difficulty, a fixed angular interval struggles to meet the optimization needs of different samples, increasing the complexity of model parameter tuning and deployment.
[0005] Therefore, existing technologies still need to be improved to achieve more flexible adjustment of angular interval constraints within the angular discrimination framework, thereby enhancing the adaptability and recognition performance of face recognition models in different scenarios. Summary of the Invention
[0006] The purpose of this invention is to provide a method, apparatus, device, and readable storage medium for dynamically adjusting additive angle interval parameters. By adaptively adjusting the additive angle interval parameters, the technical solution of this application can dynamically adjust the angle constraint strength according to the training process and feature distribution state, so that the angle interval is no longer fixed to a single value, thereby effectively improving the model's adaptability under different data distributions and application scenarios. Compared with existing technical solutions that use fixed angle interval parameters, this adaptive adjustment method can reduce the optimization difficulty caused by angle constraints in the early stage of training, and gradually increase the discrimination constraint strength in the later stage of training, which is beneficial to improving the convergence stability and feature discrimination ability of the model.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] In a first aspect, the present invention provides a method for dynamically adjusting an additive angle interval parameter, the method comprising:
[0009] Set the total number of training iterations for the face recognition model;
[0010] Set the initial additive angle interval parameter and the maximum additive angle interval parameter; the maximum additive angle interval parameter is greater than the initial additive angle interval parameter;
[0011] During the training process of the face recognition model, the target additive angle interval parameter of the face recognition model is determined based on the number of training iterations and the total number of training iterations, as well as the initial additive angle interval parameter and the maximum additive angle interval parameter.
[0012] In some embodiments, the target additive angular interval parameter of the face recognition model is determined based on the number of training iterations and the total number of training iterations of the face recognition model, as well as the initial additive angular interval parameter and the maximum additive angular interval parameter, including:
[0013] Based on the number of training iterations and the total number of training iterations of the face recognition model, as well as the initial additive angle interval parameter and the maximum additive angle interval parameter, a monotonically increasing scheduling function for the target additive angle interval parameter is determined.
[0014] The target additive angular interval parameter of the face recognition model is calculated based on a monotonically increasing scheduling function; the formula for calculating the target additive angular interval parameter is as follows:
[0015] ;
[0016] in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. maxis the maximum additive angular interval parameter, t is the number of training iterations, T is the total number of training iterations, and f is the monotonically increasing scheduling function.
[0017] In some embodiments, the target additive angular interval parameter of the face recognition model is determined based on the number of training iterations of the face recognition model, as well as the initial additive angular interval parameter and the maximum additive angular interval parameter, including:
[0018] In the early stages of training the face recognition model, after each iteration of training, the mean angle variance within the validation set is calculated.
[0019] Based on the rate of change of the average angular variance, the number of training iterations, the initial additive angular interval parameter, and the maximum additive angular interval parameter, the target additive angular interval parameter of the face recognition model is determined.
[0020] In the later stages of training the face recognition model, after each training iteration, the minimum angle between the validation set classes is calculated.
[0021] The target additive angle interval parameter of the face recognition model is determined based on the rate of change of the minimum included angle, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter.
[0022] In some embodiments, the target additive angular interval parameter of the face recognition model is determined based on the rate of change of the average angular variance, the number of training iterations, the initial additive angular interval parameter, and the maximum additive angular interval parameter, including:
[0023] If the average angle variance decreases, then based on the rate of change of the average angle variance, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, the target additive angle interval parameter of the face recognition model should be increased. The formula for calculating the target additive angle interval parameter is as follows:
[0024] ;
[0025] in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max denoted as the maximum additive angle interval parameter, t as the number of training iterations, clip as the numerical clipping parameter, m(t) as the target additive angle interval parameter in the previous training iteration, and r(t) as the rate of change of the mean angle variance.
[0026] In some embodiments, the target additive angle interval parameter of the face recognition model is determined based on the rate of change of the minimum included angle, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, including:
[0027] If the minimum included angle decreases, then based on the rate of change of the minimum included angle, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, the target additive angle interval parameter of the face recognition model is increased; the formula for calculating the target additive angle interval parameter is:
[0028] ;
[0029] in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max is the maximum additive angle interval parameter, t is the number of training iterations, clip represents numerical clipping, m(t) represents the target additive angle interval parameter in the previous training iteration, and r(t) is the rate of change of the minimum angle.
[0030] In some embodiments, during each iteration of training of the face recognition model, the average confidence level of the face recognition model is calculated based on all samples in the validation set.
[0031] Based on the rate of change of the average confidence level, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, the target additive angle interval parameter of the face recognition model is calculated; the formula for calculating the target additive angle interval parameter is:
[0032] ;
[0033] in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max denoted as the maximum additive angular margin parameter, t as the number of training iterations, clip as the numerical clipping parameter, m(t) as the target additive angular margin parameter in the previous training iteration, and r(t) as the rate of change of the confidence average.
[0034] Secondly, the present invention also provides a dynamic adjustment device for additive angular interval parameters, the device comprising:
[0035] The number of iterations setting module is used to set the total number of training iterations for the face recognition model;
[0036] The parameter setting module is used to set the initial additive angle interval parameter and the maximum additive angle interval parameter; the maximum additive angle interval parameter is greater than the initial additive angle interval parameter.
[0037] The angle determination module is used to determine the target additive angle interval parameter of the face recognition model during the training process, based on the number of training iterations and the total number of training iterations of the face recognition model, as well as the initial additive angle interval parameter and the maximum additive angle interval parameter.
[0038] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the dynamic adjustment method for the additive angular interval parameter provided in the first aspect.
[0039] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the dynamic adjustment method for the additive angular interval parameter provided in the first aspect.
[0040] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the method for dynamically adjusting the additive angular interval parameter provided in the first aspect.
[0041] The beneficial effects of this invention are as follows: The dynamic adjustment method for the additive angle interval parameter in this invention first sets the total number of training iterations of the face recognition model; then sets the initial additive angle interval parameter and the maximum additive angle interval parameter; the maximum additive angle interval parameter is greater than the initial additive angle interval parameter; finally, during the training process of the face recognition model, based on the number of training iterations and the total number of training iterations of the face recognition model, as well as the initial additive angle interval parameter and the maximum additive angle interval parameter, the target additive angle interval parameter of the face recognition model is determined. By adaptively adjusting the additive angle interval parameter, the technical solution of this application can dynamically adjust the angle constraint strength according to the training process and feature distribution state, so that the angle interval is no longer fixed to a single value, thereby effectively improving the model's adaptability under different data distributions and application scenarios. Compared with the existing technical solution that uses a fixed angle interval parameter, this adaptive adjustment method can reduce the optimization difficulty caused by angle constraints in the early stage of training, and gradually increase the discrimination constraint strength in the later stage of training, which is conducive to improving the convergence stability and feature discrimination ability of the model.
[0042] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, the preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings. Attached Figure Description
[0043] Figure 1 is a flowchart illustrating a dynamic adjustment method for additive angle interval parameters according to an embodiment of the present invention.
[0044] Figure 2 is a flowchart illustrating a method for calculating target additive angle interval parameters according to an embodiment of the present invention;
[0045] Figure 3 is a flowchart illustrating another method for calculating the target additive angle interval parameter according to an embodiment of the present invention;
[0046] Figure 4 is a schematic diagram of the structure of a dynamic adjustment device for additive angle interval parameters according to an embodiment of the present invention;
[0047] Figure 5 is a schematic diagram of another dynamic adjustment device for additive angle interval parameters according to an embodiment of the present invention;
[0048] Figure 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0049] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. It should be noted that references to "an embodiment," "embodiment," "example embodiment," etc., in this specification refer to the described embodiment including specific features, structures, or characteristics; however, not every embodiment must include these specific features, structures, or characteristics. Furthermore, such expressions do not refer to the same embodiment. Moreover, when describing specific features, structures, or characteristics in conjunction with embodiments, whether or not explicitly described, it indicates that incorporating such features, structures, or characteristics into other embodiments is within the knowledge scope of those skilled in the art.
[0050] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0051] In some embodiments, as shown in Figure 1, a method for dynamically adjusting an additive angle interval parameter is provided, the specific method including:
[0052] S101 sets the total number of training iterations for the face recognition model.
[0053] Specifically, the total number of training iterations for a face recognition model can be set based on historical training experience. This total number of training iterations can help the face recognition model converge.
[0054] S102, set the initial additive angle interval parameter and the maximum additive angle interval parameter.
[0055] Among them, the maximum additive angle interval parameter is greater than the initial additive angle interval parameter.
[0056] For example, the initial additive angle interval parameter can be set to 0.3 and the maximum additive angle interval parameter to 0.8. In this way, a smaller additive angle interval parameter is used in the early stage of training to promote the stable convergence of the face recognition model, and the additive angle interval parameter is increased in the later stage to increase the face recognition model's ability to distinguish different categories.
[0057] S103, During the training process of the face recognition model, the target additive angle interval parameter of the face recognition model is determined based on the number of training iterations and the total number of training iterations of the face recognition model, as well as the initial additive angle interval parameter and the maximum additive angle interval parameter.
[0058] The number of training iterations is the number of times in the current training round.
[0059] Specifically, the current training progress of the face recognition model can be determined based on the number of training iterations and the total number of training iterations. Based on the current training progress, the target additive angular interval parameter can be gradually adjusted from the initial additive angular interval parameter to the maximum additive angular interval parameter. This is to achieve the goal of using a smaller additive angular interval parameter in the early stage of training to promote the stable convergence of the face recognition model, and increasing the additive angular interval parameter in the later stage to increase the face recognition model's ability to distinguish different categories.
[0060] For example, a monotonically increasing scheduling function for the target additive angle interval parameter can be determined based on the number of training iterations and the total number of training iterations of the face recognition model, as well as the initial additive angle interval parameter and the maximum additive angle interval parameter.
[0061] Specifically, the monotonically increasing scheduling function can be set as a linear, logarithmic, or cosine annealing function. The monotonically increasing scheduling function for the target additive angular interval parameter is: f(t / T). Here, t is the number of training iterations, T is the total number of training iterations, and f is the monotonically increasing scheduling function. As the number of training iterations increases, the value of t / T also increases, and since f is a monotonically increasing scheduling function, the value of f(t / T) also increases.
[0062] The target additive angular interval parameter of the face recognition model is calculated based on a monotonically increasing scheduling function; the formula for calculating the target additive angular interval parameter is as follows:
[0063] ;
[0064] in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max is the maximum additive angular interval parameter, t is the number of training iterations, T is the total number of training iterations, and f is the monotonically increasing scheduling function.
[0065] The dynamic adjustment method for the additive angle interval parameter in the above embodiments first sets the total number of training iterations of the face recognition model; then sets the initial additive angle interval parameter and the maximum additive angle interval parameter; the maximum additive angle interval parameter is greater than the initial additive angle interval parameter; finally, during the training process of the face recognition model, based on the number of training iterations and the total number of training iterations of the face recognition model, as well as the initial additive angle interval parameter and the maximum additive angle interval parameter, the target additive angle interval parameter of the face recognition model is determined. By adaptively adjusting the additive angle interval parameter, the technical solution of this application can dynamically adjust the angle constraint strength according to the training process and feature distribution state, so that the angle interval is no longer fixed to a single value, thereby effectively improving the model's adaptability under different data distributions and application scenarios. Compared with the existing technical solution that uses a fixed angle interval parameter, this adaptive adjustment method can reduce the optimization difficulty caused by angle constraints in the early stage of training, and gradually increase the discrimination constraint strength in the later stage of training, which is conducive to improving the convergence stability and feature discrimination ability of the model.
[0066] In another embodiment, as shown in Figure 2, a method for calculating the target additive angular interval parameter is also provided, the specific method including:
[0067] S201, in the early stage of training the face recognition model, calculate the mean angle variance within the validation set after each iteration of training.
[0068] In particular, the early stage of training a face recognition model can be the first half of the face recognition model training process, that is, the number of training iterations is less than or equal to half of the total number of training iterations.
[0069] Specifically, after each round of training iterations, the mean angular variance within the validation set can be calculated using the following formula:
[0070] ;
[0071] in, Let N be the mean angular variance, N be the number of samples in the validation set class, and t be the number of training iterations. It is the mean of the angles between all vectors in the t-th training round.
[0072] S202, based on the rate of change of the average angle variance, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, determine the target additive angle interval parameter of the face recognition model.
[0073] Specifically, the formula for calculating the rate of change of the mean angular variance is:
[0074] ;
[0075] Where r(t) is the rate of change of the average angle variance, and t is the number of training iterations. Let be the average angle variance of the t-th training iteration. Let be the average angular variance of the (t-1)th training iteration.
[0076] If the average angle variance decreases, then based on the rate of change of the average angle variance, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, the target additive angle interval parameter of the face recognition model should be increased. The formula for calculating the target additive angle interval parameter is as follows:
[0077] ;
[0078] in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max denoted as the maximum additive angle interval parameter, t as the number of training iterations, clip as the numerical clipping parameter, m(t) as the target additive angle interval parameter in the previous training iteration, and r(t) as the rate of change of the mean angle variance.
[0079] S203, in the later stages of training the face recognition model, calculates the minimum angle between the validation set classes after each training iteration.
[0080] In particular, the later stage of training a face recognition model can be the second half of the face recognition model training process, that is, the number of training iterations is greater than half of the total number of training iterations.
[0081] Specifically, after each round of training iterations, the minimum angle between the validation set classes can be calculated based on the following formula:
[0082] ;
[0083] in, This refers to the vector corresponding to the j-th face in the batch during the t-th round. It refers to the vector corresponding to the k-th face in the batch during the t-th round.
[0084] S204. Based on the rate of change of the minimum included angle, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, the target additive angle interval parameter of the face recognition model is determined.
[0085] Specifically, the formula for calculating the rate of change of the minimum included angle is:
[0086] ;
[0087] in, Let be the minimum angle between the classes in the validation set during the t-th round.
[0088] If the minimum included angle decreases, then based on the rate of change of the minimum included angle, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, the target additive angle interval parameter of the face recognition model is increased; the formula for calculating the target additive angle interval parameter is:
[0089] ;
[0090] in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max is the maximum additive angle interval parameter, t is the number of training iterations, clip represents numerical clipping, m(t) represents the target additive angle interval parameter in the previous training iteration, and r(t) is the rate of change of the minimum angle.
[0091] The method in the above embodiments uses the two strategies in stages: considering the compactness within a class in the early stage and the separation between classes in the later stage, which helps to improve the convergence stability and feature discrimination ability of the model.
[0092] In another embodiment, as shown in Figure 3, another method for calculating the target additive angular interval parameter is provided, the specific method including:
[0093] S301, in each iteration of training of the face recognition model, calculate the average confidence level of the face recognition model based on all samples in the validation set.
[0094] Specifically, the formula for calculating the average confidence level is:
[0095] ;
[0096] in, It is the sum of the number of samples in the validation set. For samples Authentic Labels The predicted probability is considered as the confidence level. These are model parameters.
[0097] S302, based on the rate of change of the average confidence level, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, calculate the target additive angle interval parameter of the face recognition model.
[0098] Specifically, first calculate the rate of change of the confidence average based on the confidence average:
[0099] ;
[0100] Where r(t) is the rate of change of the confidence average, t is the number of training iterations, C(t) is the confidence average of the t-th training iteration, and C(t-1) is the confidence average of the (t-1)-th training iteration.
[0101] Then calculate the target additive angular interval parameter:
[0102] ;
[0103] in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max denoted as the maximum additive angular margin parameter, t as the number of training iterations, clip as the numerical clipping parameter, m(t) as the target additive angular margin parameter in the previous training iteration, and r(t) as the rate of change of the confidence average.
[0104] The method in the above embodiments adjusts the target additive angular interval parameter by changing the rate of change of the average confidence level, thereby increasing the confidence level of the face recognition model.
[0105] Based on the same inventive concept, this application also provides a device for dynamically adjusting additive angle interval parameters to implement the above-described method for dynamically adjusting additive angle interval parameters. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the device for dynamically adjusting additive angle interval parameters provided below can be found in the limitations of the method for dynamically adjusting additive angle interval parameters described above, and will not be repeated here.
[0106] In one embodiment, as shown in FIG4, a dynamic adjustment device for additive angular interval parameters is provided, the device comprising:
[0107] The number of iterations setting module 40 is used to set the total number of training iterations for the face recognition model;
[0108] The parameter setting module 41 is used to set the initial additive angle interval parameter and the maximum additive angle interval parameter; the maximum additive angle interval parameter is greater than the initial additive angle interval parameter.
[0109] The angle determination module 42 is used to determine the target additive angle interval parameter of the face recognition model during the training process of the face recognition model, based on the number of training iterations and the total number of training iterations of the face recognition model, as well as the initial additive angle interval parameter and the maximum additive angle interval parameter.
[0110] In another embodiment, as shown in FIG5, the angle determination module 42 in FIG4 further includes:
[0111] The function determination unit 420 is used to determine the monotonically increasing scheduling function of the target additive angle interval parameter based on the number of training iterations and the total number of training iterations of the face recognition model, as well as the initial additive angle interval parameter and the maximum additive angle interval parameter.
[0112] The parameter calculation unit 421 is used to calculate the target additive angular interval parameter of the face recognition model based on a monotonically increasing scheduling function; the calculation formula for the target additive angular interval parameter is:
[0113] ;
[0114] in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max is the maximum additive angular interval parameter, t is the number of training iterations, T is the total number of training iterations, and f is the monotonically increasing scheduling function.
[0115] In another embodiment, the angle determination module 42 in Figure 4 above is further configured to: in the early stage of training the face recognition model, calculate the average angle variance within the validation set after each training iteration; determine the target additive angle interval parameter of the face recognition model based on the rate of change of the average angle variance, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter; in the later stage of training the face recognition model, calculate the minimum angle between the validation set classes after each training iteration; determine the target additive angle interval parameter of the face recognition model based on the rate of change of the minimum angle, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter.
[0116] Specifically, the target additive angular interval parameters for the face recognition model are determined based on the rate of change of the average angular variance, the number of training iterations, the initial additive angular interval parameter, and the maximum additive angular interval parameter, including:
[0117] If the average angle variance decreases, then based on the rate of change of the average angle variance, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, the target additive angle interval parameter of the face recognition model should be increased. The formula for calculating the target additive angle interval parameter is as follows:
[0118] ;
[0119] in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. maxdenoted as the maximum additive angle interval parameter, t as the number of training iterations, clip as the numerical clipping parameter, m(t) as the target additive angle interval parameter in the previous training iteration, and r(t) as the rate of change of the mean angle variance.
[0120] Based on the rate of change of the minimum included angle, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, the target additive angle interval parameter of the face recognition model is determined, including:
[0121] If the minimum included angle decreases, then based on the rate of change of the minimum included angle, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, the target additive angle interval parameter of the face recognition model is increased; the formula for calculating the target additive angle interval parameter is:
[0122] ;
[0123] in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max is the maximum additive angle interval parameter, t is the number of training iterations, clip represents numerical clipping, m(t) represents the target additive angle interval parameter in the previous training iteration, and r(t) is the rate of change of the minimum angle.
[0124] In another embodiment, the angle determination module 42 in Figure 4 above is also used to: calculate the average confidence level of the face recognition model based on all samples in the validation set during each iteration of training of the face recognition model;
[0125] Based on the rate of change of the average confidence level, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, the target additive angle interval parameter of the face recognition model is calculated; the formula for calculating the target additive angle interval parameter is:
[0126] ;
[0127] in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max denoted as the maximum additive angular margin parameter, t as the number of training iterations, clip as the numerical clipping parameter, m(t) as the target additive angular margin parameter in the previous training iteration, and r(t) as the rate of change of the confidence average.
[0128] This application also provides an electronic device. In some embodiments, referring to FIG6, the electronic device 700 includes an input unit 710, a memory 720, a processor 730, and an output unit 740. The memory 720 stores program instructions that can be executed on the processor 730. The processor 730 can execute the dynamic adjustment method and / or technical solution based on the additive angular interval parameter in the foregoing embodiments by calling the program instructions. The electronic device 700 can be a mobile terminal device such as a mobile phone or a computer.
[0129] Furthermore, embodiments of this application also provide a computer-readable storage medium for storing a computer program that performs a dynamic adjustment method for additive angular interval parameters. For example, computer program instructions, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. The program instructions that invoke the methods of this application may be stored in a fixed or removable storage medium, and / or transmitted via data streams in broadcast or other signal carrying media, and / or stored in a storage medium that operates according to the program instructions.
[0130] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device, or fabricating them separately as individual integrated circuit modules, or fabricating multiple modules or steps as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0131] The technical features of the above embodiments can be arbitrarily integrated. For the sake of brevity, not all possible integrations of the technical features in the above embodiments are described. However, as long as the integration of these technical features does not contradict each other, they should be considered to be within the scope of this specification.
[0132] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A method for dynamically adjusting an additive angular interval parameter, characterized in that, The method includes: setting the total number of training iterations for the face recognition model; setting an initial additive angle interval parameter and a maximum additive angle interval parameter; the maximum additive angle interval parameter being greater than the initial additive angle interval parameter; in the early stage of training the face recognition model, after each training iteration, calculating the mean angle variance within the validation set; if the mean angle variance decreases, then based on the rate of change of the mean angle variance, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, increasing the target additive angle interval parameter of the face recognition model; the calculation formula for the target additive angle interval parameter is: in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max Let be the maximum additive angular interval parameter, t be the number of training iterations, clip represent numerical clipping, m(t) represent the target additive angular interval parameter at the previous training iteration, and r(t) be the rate of change of the average angular variance. In the later stages of training the face recognition model, after each training iteration, the minimum angle between validation set classes is calculated. If the minimum angle decreases, the target additive angular interval parameter of the face recognition model is increased based on the rate of change of the minimum angle, the number of training iterations, the initial additive angular interval parameter, and the maximum additive angular interval parameter. The formula for calculating the target additive angular interval parameter is: in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max is the maximum additive angle interval parameter, t is the number of training iterations, clip represents numerical clipping, m(t) represents the target additive angle interval parameter in the previous training iteration, and r(t) is the rate of change of the minimum angle.
2. A dynamic adjustment device for additive angular interval parameters, characterized in that, The device includes: a number setting module for setting the total number of training iterations of the face recognition model; a parameter setting module for setting an initial additive angle interval parameter and a maximum additive angle interval parameter; wherein the maximum additive angle interval parameter is greater than the initial additive angle interval parameter; and an angle determination module for calculating the mean angle variance within the validation set after each training iteration in the early stage of training the face recognition model; if the mean angle variance decreases, then based on the rate of change of the mean angle variance, the number of training iterations, the initial additive angle interval parameter, and the maximum additive angle interval parameter, increasing the target additive angle interval parameter of the face recognition model; the calculation formula for the target additive angle interval parameter is: in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max Let be the maximum additive angular interval parameter, t be the number of training iterations, clip represent numerical clipping, m(t) represent the target additive angular interval parameter at the previous training iteration, and r(t) be the rate of change of the average angular variance. In the later stages of training the face recognition model, after each training iteration, the minimum angle between validation set classes is calculated. If the minimum angle decreases, the target additive angular interval parameter of the face recognition model is increased based on the rate of change of the minimum angle, the number of training iterations, the initial additive angular interval parameter, and the maximum additive angular interval parameter. The formula for calculating the target additive angular interval parameter is: in, m is the target additive angular interval parameter. min m is the initial additive angular interval parameter. max is the maximum additive angle interval parameter, t is the number of training iterations, clip represents numerical clipping, m(t) represents the target additive angle interval parameter in the previous training iteration, and r(t) is the rate of change of the minimum angle.
3. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the dynamic adjustment method for the additive angle interval parameter as described in claim 1.
4. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the dynamic adjustment method for the additive angle interval parameter as described in claim 1.
5. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the dynamic adjustment method for the additive angle interval parameter as described in claim 1.
Citation Information
Patent Citations
Face recognition model training method and device, electronic equipment and storage medium
CN111860364A
Face recognition method and device, electronic equipment and storage medium
CN113901956A