A self-adaptive method for multi-directional algorithm model
Through the self-adaptation method of the multi-directional algorithm model, including algorithm model self-adaptation, peripheral self-adaptation and transmission self-adaptation, the problem of poor recognition effect of the algorithm model in different scenarios in the existing technology is solved, and the Fast, accurate recognition and accuracy improvement in complex scenes.
Patent Information
- Application Number
- CN202210524304.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-13
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-05-13
Smart Images

Figure CN115035324B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition and heuristic learning, and in particular to a self-adaptation method of a multi-faceted algorithm model. Background Art
[0002] With the rapid development of neural network models, artificial intelligence and machine learning applications represent the next major market opportunity, and traditional processing solutions are not designed to calculate the workloads of neural networks, which power many applications, so new architectures are needed to meet our growing demand for intelligence. However, at present, all domestic and foreign methods are based on a certain algorithm to achieve a certain demand, and various methods are studied independently and have their own defects. If a network model trained in a certain scenario is applied to another different scenario, the image recognition effect will be greatly reduced, and it is difficult to achieve general learning.
[0003] Due to the above reasons, existing algorithm models cannot be applied to different scenarios quickly, effectively and accurately. Summary of the invention
[0004] In order to solve the above technical problems, the present invention proposes a self-adaptation method of a multi-faceted algorithm model, which can effectively solve the problem that the universal algorithm has low accuracy in certain scenarios or times.
[0005] The present invention is achieved by adopting the following technical solutions:
[0006] A multi-faceted algorithm model self-adaptation method, characterized by: including algorithm model self-adaptation, peripheral self-adaptation and transmission self-adaptation; wherein the algorithm model self-adaptation is to select the most suitable algorithm model, specifically including the following steps:
[0007] S1. Image acquisition and preprocessing;
[0008] S2. Statistical analysis of the algorithm model: set up a model set, put the pre-set native model and the derived model into the model set; input the pre-processed image in step S1 into the model set for analysis and prediction; set the model judgment threshold, judge the actual data prediction results, and judge whether to use the model with the best result or perform model training and derivation again, and finally obtain the most suitable algorithm model;
[0009] The peripheral self-adaptation specifically refers to: identifying and training the most suitable algorithm model obtained in step S2 by adjusting the peripheral parameters, and finally outputting a specialized model;
[0010] The transmission self-adaptation specifically refers to: simulating and testing the output specialized model, and further optimizing the specialized model based on the results.
[0011] The type of the judgment threshold is prediction accuracy.
[0012] The criteria for determining whether to select the model with the best result or to perform model training and derivation again in step S2 are: after the captured image is recognized, if the prediction accuracy is less than a threshold, model training and derivation are performed again; if the prediction accuracy is greater than or equal to the threshold, the model with the best result is selected.
[0013] The peripheral parameters include the direction and distance parameters of the target.
[0014] The peripheral self-adaptation specifically comprises the following steps:
[0015] S 31 . Using the most appropriate algorithm model obtained in step S2 to predict the direction and distance parameters of the target;
[0016] S 32 .Set the prediction accuracy threshold, adjust the peripheral parameters, obtain the prediction accuracy of the peripheral parameters through the most appropriate algorithm model, and determine whether the prediction accuracy of the model reaches the preset threshold. If so, directly output the specialized model. If not, derive the model again.
[0017] The image preprocessing in step S1 includes image geometric transformation, image enhancement, image restoration and image reconstruction.
[0018] The image acquisition in step S1 specifically refers to: using a camera to acquire images at the video acquisition end, capturing 25 frames of images per second, and capturing effective face images.
[0019] Further optimizing the specialized model according to the results specifically refers to: adjusting the transmission parameters of the specialized model, including pruning and knowledge distillation.
[0020] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0021] 1. The present invention aims at model adaptation in complex scenes. First, the algorithm model is self-adapted to select the most suitable algorithm model in complex practical problems; secondly, the peripheral self-adaptation is studied to optimize the recognition effect by adjusting the peripheral parameters, such as camera parameters, etc.; finally, the transmission self-adaptation is studied to reduce the redundancy of transmission data to reduce the burden of embedded devices. The present invention optimizes the whole system effect from all aspects, solves the problems of low accuracy and slow data interaction of current embedded intelligent devices, and takes the multi-faceted self-adaptive algorithm model framework as the object for research, so that the self-adaptive model can be obtained quickly and accurately in complex scenes.
[0022] 2. The present invention screens specialized models by setting relevant thresholds, thereby greatly improving the detection accuracy of specialized models.
[0023] 3. The present invention adjusts peripheral parameters, such as camera parameters, to capture more precise targets, thereby enhancing image effects and thus improving model effects.
[0024] 4. The present invention preprocesses the image to improve the clarity of the image, making it easy to observe the details of the target in the image, while suppressing the display of non-target areas in the image and highlighting the characteristics of the target area. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, wherein:
[0026] Figure 1 It is a schematic diagram of the process of self-adaptation of the algorithm model in the present invention;
[0027] Figure 2 It is a schematic diagram of the process of peripheral self-adaptation in the present invention. DETAILED DESCRIPTION
[0028] Example 1
[0029] As a basic implementation method of the present invention, the present invention includes a multi-faceted algorithm model self-adaptation method, including algorithm model self-adaptation, peripheral self-adaptation and transmission self-adaptation. The algorithm model self-adaptation is to select the most suitable algorithm model, which specifically includes the following steps:
[0030] S1. Image acquisition and preprocessing;
[0031] S2. Statistical analysis of the algorithm model: set up a model set, put the pre-set native model and the derived model into the model set; input the pre-processed image in step S1 into the model set for analysis and prediction; set the model judgment threshold, judge the actual data prediction results, and determine whether to use the model with the best results or perform model training and derivation again, and finally obtain the most suitable algorithm model.
[0032] The peripheral self-adaptation specifically refers to: identifying and training the most suitable algorithm model obtained in step S2 by adjusting the peripheral parameters, and finally outputting a specialized model.
[0033] The transmission self-adaptation specifically refers to: simulating and testing the output specialized model, and further optimizing the specialized model based on the results.
[0034] Example 2
[0035] As a preferred embodiment of the present invention, the present invention includes a multi-faceted algorithm model self-adaptation method, including algorithm model self-adaptation, peripheral self-adaptation and transmission self-adaptation. The algorithm model self-adaptation is to select the most suitable algorithm model, which specifically includes the following steps:
[0036] S1. Image acquisition and preprocessing: A series of images are collected at regular intervals and preprocessed. That is, digital image processing is used to remove irrelevant elements such as noise in the image that interfere with recognition, so as to obtain an image suitable for feature extraction.
[0037] S2. Statistical analysis of algorithm model: set up a model set, and put the pre-set native model and the derived model that has been derived into the model set. Input the pre-processed image in step S1 into the model set for analysis and prediction to obtain the prediction result of the image. Set the model judgment threshold to judge the prediction result of the actual data to determine whether to use the model with the best result or to train and derive the model again, that is, use the actual observation data to train and update the model, and finally obtain the most suitable algorithm model. Among them, the native model is a general preset model that has not been processed, and the derived model is a model after the native model is trained and updated with actual data.
[0038] The peripheral self-adaptation specifically means that the peripheral adjustment needs to clarify the target's direction information and distance information, use the most suitable algorithm model obtained in step S2, and then perform recognition training on the target's direction and distance. By judging whether a small amount of pre-processed image recognition results reaches a set threshold, it is decided whether to derive the model again or output the results. The output result is a specialized model.
[0039] The transmission self-adaptation specifically refers to: simulating and testing the output specialized model, and further optimizing the specialized model based on the results.
[0040] Example 3
[0041] As another preferred embodiment of the present invention, the present invention includes a multi-faceted algorithm model self-adaptation method, including algorithm model self-adaptation, peripheral self-adaptation and transmission self-adaptation. The algorithm model self-adaptation is to select the most suitable algorithm model, which specifically includes the following steps:
[0042] S1. Image acquisition and preprocessing: A camera is used to acquire images at the video acquisition end, capturing 25 frames per second to capture valid face images. Preprocessing operations mainly include image geometric transformation, image enhancement, image restoration, and image reconstruction, with the aim of improving image clarity, making it easier to observe the details of the target in the image, while suppressing the display of non-target areas in the image and highlighting the features of the target area.
[0043] S2. Statistical analysis of the algorithm model: set up a model set, put the pre-set native model and the derived model into the model set; input the pre-processed image in step S1 into the model set for analysis and prediction; set the model judgment threshold, judge the actual data prediction results, and determine whether to use the model with the best results or perform model training and derivation again, and finally obtain the most suitable algorithm model.
[0044] The peripheral self-adaptation specifically comprises the following steps:
[0045] S 31 This step does not require the type of target to be specified, only the target's direction and distance parameters are required, and then the most appropriate algorithm model obtained in step S2 is used to make predictions based on this parameter information;
[0046] S 32 . Adjust peripheral parameters, such as the distance of the camera, set an appropriate prediction accuracy threshold, and use the model to obtain the prediction accuracy of the attributes of the target location, with the goal of achieving the best prediction accuracy. Then determine whether to output the result or derive the model again, that is, determine whether the prediction accuracy of the model reaches the preset threshold. If so, directly output the specialized model. If not, derive the model again.
[0047] The transmission self-adaptation specifically comprises the following steps:
[0048] S 41 : Collection step S 32 The specialization model in
[0049] S 42 :Use a large number of actual pre-processed images to simulate and test this specialized model, and calculate the model prediction accuracy and other results;
[0050] S 43 : The model is further optimized based on simulation and test results, including the adjustment of transmission parameters, including pruning and knowledge distillation.
[0051] Example 4
[0052] As the best embodiment of the present invention, the present invention includes a multi-faceted algorithm model self-adaptation method, including algorithm model self-adaptation, peripheral self-adaptation and transmission self-adaptation. Figure 1, where the algorithm model self-adaptation is to select the most suitable algorithm model, specifically: first, collect a series of images at regular intervals and pre-process the images; then pass these pre-processed images through the derivative model and the native model, and judge whether to use the best model or derive through statistics and analysis of the model results. The specific judgment process is to set a prediction accuracy threshold. After identifying these collected images, if the prediction accuracy is less than the threshold, that is, the model recognition effect does not reach the expected value, the derivative algorithm is turned on to train this type of image to achieve better results. If the prediction accuracy is greater than or equal to the threshold, that is, the model recognition effect reaches the expected value, the best model is selected to achieve adaptive matching and analysis between the model and the actual environment. Among them, the native model is a general preset model that has not been processed, and the derivative model is a model that has been updated after the native model is trained with actual data.
[0053] Refer to the instruction manual Figure 2 , the peripheral self-adaptation specifically refers to optimizing the recognition effect by adjusting the peripheral parameters, such as camera parameters, etc. For the problem of the distance of the target in the scene, the parameters of the peripherals can be adjusted to enhance the image effect by capturing more accurate targets, thereby improving the model effect. What needs to be clarified in this process is the direction and distance of the target. Then the recognition training of the direction and distance of the target can be carried out. Therefore, for this kind of training, it is not necessary to specify the type of target, because only the direction and distance information of the target is required. Specifically, it can be: adjusting the peripheral parameters, such as the distance of the camera, setting a suitable prediction accuracy threshold, and then judging whether to output the result or derive the model again, that is, judging whether the prediction accuracy of the model reaches the preset prediction accuracy threshold. If so, the model recognition effect reaches the expected value, and the specialized model is directly output. If not, the model recognition effect does not reach the expected value, then the model is derived again to achieve adaptation.
[0054] The transmission self-adaptation specifically means that through this specialized model, actual data can be tested and the simulation results can be optimized and updated to finally obtain an output model.
[0055] The transmission self-adaptation reduces the burden on the device by reducing the redundancy of the transmitted data. The whole system effect is optimized from all aspects to solve the problems of low accuracy and slow data interaction of current embedded intelligent devices. If changing the peripheral parameters does not achieve good results for any model, the setting initiative should be handed over to the model self-adaptation method to achieve the enhanced effect. In addition, during data transmission, the areas where the positions of the targets in the image often appear are counted, and then the positions where the targets appear with a small probability in the image are cropped, and the parameters of the peripheral transmission are adjusted, which can reduce a large amount of data transmission and greatly improve the operation capacity of embedded devices.
[0056] Pruning refers to removing unimportant weights, reducing the number of connections between neural network layers, and reducing the parameters involved in the calculation to achieve the purpose of compressing the model. However, this may lead to a decrease in accuracy, so the model must be compacted and fine-tuned to restore performance.
[0057] The batch normalization (BN) layer is widely used in target detection networks. After the introduction of the BN layer, the average value μ can be learned for each mini-batch of input data during the training process. B Variance σ B :
[0058]
[0059]
[0060] Where: x (i) represents the i-th data in the mini-batch, m B represents Bachsize. Then, after zero mean and standardization, It can be expressed as:
[0061]
[0062] In order to prevent the denominator from being zero, a very small value ε is used for smoothing, which is generally taken as ε = 10 -3 After the BN layer, the output is:
[0063]
[0064] Among them, γ is the scaling factor and β is the translation factor. These two parameters are learned when training the network model. The scale factor γ is introduced to restore the original feature learning ability of the network. After introducing the adjustable scaling factor γ and translation factor β, it can be evaluated whether the lost data is beneficial to the feature expression of the network model. When the data is beneficial to the network model, the scaling factor and translation factor are updated to ensure the expression ability of the input data. For the convolutional layer with multiple channels, it can be expressed as:
[0065]
[0066] in is the data output, γ j , β jis the scaling factor and translation factor of the i-th channel. When γ is less than a certain threshold, it is considered that the channel is of low importance to the network structure and can be pruned. For a trained network, the distribution of γ is close to Gaussian distribution. In order to better evaluate the importance of the channel, L1 regularization is used to impose sparsity on the scaling factor of the BN layer. Based on this, the training goal is:
[0067]
[0068] The first term is the empirical loss function, Γ is the set of all, and α is the penalty factor that balances empirical loss and sparsity. You can change γ j The distribution of the BN layer is sparse, and the scaling factor of the BN layer is imposed on the channel. This stage is sparse training. After sparse training, the scaling factors of some channels will become very small, and these channels are also considered to contribute little to the entire network structure and can be removed.
[0069] Then, knowledge distillation is performed. The purpose of knowledge distillation is to use a high-precision and bulky network model 1 to guide a more compact network model 2. The specific idea is to increase the temperature parameter of the softmax layer of network model 1 to obtain a suitable soft-target set. The formula is as follows:
[0070]
[0071] Where T is the temperature, is the classification category probability output by the softmax layer, and is the soft target output. When the temperature T tends to 0, the softmax output will converge to a one-hot vector. When the temperature T tends to infinity, the softmax output will be softer. Therefore, when training a new model, a higher T can be used to make the distribution generated by softmax soft enough, so that the softmax output of the new model is close to the original model; after the training is completed, use the normal temperature T = 1 for prediction. Specifically, during training, we need to minimize the cross-entropy of the two distributions. Remember that the distribution generated by the new model using the formula is q, and the distribution generated by the original model is p, then we only need to minimize:
[0072] C=-p T log q
[0073] After performing operations such as performance optimization on the model, the results are output.
[0074] In summary, after reading the present invention document, ordinary technicians in this field can make various other corresponding transformation schemes based on the technical scheme and technical concept of the present invention without creative mental labor, which all fall within the scope of protection of the present invention.
Claims
1. A self-adaptive method for a multi-faceted algorithm model, Features: It includes algorithm model self-adaptation, peripheral self-adaptation and transmission self-adaptation; algorithm model self-adaptation is to select the most suitable algorithm model, which specifically includes the following steps: S 1 . Image acquisition and preprocessing; S 2 . Statistical analysis of algorithm models: set up a model set, put the pre-set native model and the derived model into the model set; 1 The pre-processed images are input into the model set for analysis and prediction; the model judgment threshold is set to judge the actual data prediction results to determine whether to use the model with the best results or to train the model again to derive the most suitable algorithm model; The peripheral self-adaptation specifically refers to: by adjusting the peripheral parameters, identifying and training step S 2 The most suitable algorithm model is obtained, and the specialized model is finally output, which specifically includes the following steps: S 31 . For the target's direction and distance parameters, use step S 2 The most suitable algorithm model obtained in the prediction is used; S 32 . Set the prediction accuracy threshold, adjust the peripheral parameters, obtain the prediction accuracy of the peripheral parameters through the most appropriate algorithm model, and determine whether the prediction accuracy of the model reaches the preset threshold. If so, directly output the specialized model. If not, derive the model again; The transmission self-adaptation specifically refers to: simulating and testing the output specialized model, and further optimizing the specialized model based on the results, that is, adjusting the transmission parameters of the specialized model, including pruning and knowledge distillation.
2. The self-adaptation method of a multi-directional algorithm model according to claim 1, Features: The type of the judgment threshold is prediction accuracy.
3. The self-adaptation method of a multi-directional algorithm model according to claim 2, Features: The step S 2 The criteria for determining whether to select the model with the best result or to perform model training and derivation again are as follows: after the captured image is recognized, if the prediction accuracy is less than the threshold, the model is trained and derived again; if the prediction accuracy is greater than or equal to the threshold, the model with the best result is selected.
4. The self-adaptation method of a multi-directional algorithm model according to claim 2, Features: The peripheral parameters include the direction and distance parameters of the target.
5. The self-adaptation method of a multi-directional algorithm model according to claim 1, Features: The step S 1 Image preprocessing includes image geometric transformation, image enhancement, image restoration and image reconstruction.
6. The self-adaptation method of a multi-directional algorithm model according to claim 1, Features: The step S 1 The image acquisition specifically refers to: using a camera to acquire images at the video acquisition end, capturing 25 frames of images per second, and capturing effective face images.
Citation Information
Patent Citations
Exposure parameter determining method and apparatus, and readable medium
CN108769542A
Pedestrian attribute recognition method based on ResNet-50 in monitoring scene
CN110457984A
