Data enhancement method, device, computing device, and computer-readable storage medium
By obtaining the target data augmentation strategy, the samples are operated based on the target operation levels of multiple data augmentation operations, and multiple target augmentation samples are generated, which solves the problem of insufficient sample diversity in the prior art and improves the performance and generalization capabilities of deep learning models.
Patent Information
- Application Number
- CN202011606784.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-11-09
- Filing Date
- 2020-12-30
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2040-12-30
AI Technical Summary
The existing technology is difficult to effectively improve the diversity of samples through data augmentation technology, resulting in insufficient sample size or single categories in some business scenarios, affecting the accuracy and generalization capabilities of deep learning models.
By acquiring the target data augmentation strategy, multiple data augmentation operations are performed on the sample based on the operation intensity change interval indicated by the target operation level of the target operation level of the multiple data augmentation operations, and multiple target augmentation samples are generated, thereby improving the diversity of the sample.
It realizes the expansion of samples through data augmentation technology, improves the diversity of samples, and thus improves the performance and generalization capabilities of deep learning models.
Smart Images

Figure CN114462628B_ABST
Abstract
Description
[0001] This application claims priority to Chinese patent application No. 202011237954.6, filed on November 9, 2020, with invention name “Method and system for implementing data enhancement strategy”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of artificial intelligence technology, and in particular to a data enhancement method, apparatus, computing device, and computer-readable storage medium. Background Art
[0003] With the development of artificial intelligence (AI) technology, deep learning models, as the mainstream algorithm model of artificial intelligence, have been widely used in computer vision, natural language processing, language recognition and other fields, and have achieved excellent performance. Compared with traditional machine learning models, deep learning models can extract hierarchical representations from a large amount of labeled data (i.e. samples annotated with labels). These hierarchical representations obtained through learning are the key to the superior performance of deep learning models (whether classification or regression).
[0004] For example, a deep learning model with recognition function (referred to as recognition model) requires a large number of samples during the learning process. In many cases, the quantity and quality of samples play a crucial or even decisive role in the performance of the trained recognition model. However, existing samples (including public or private samples) cannot fully meet the quantity and quality requirements of certain business scenarios. For example, in many special or complex business scenarios, the sample data volume is insufficient or the sample category is single, resulting in problems such as low accuracy and low generalization ability of the trained recognition model.
[0005] At present, samples are generally expanded through data enhancement technology. For example, according to the operation intensity of each data enhancement operation in the data enhancement strategy, each data enhancement operation is performed on the sample, and the obtained enhanced sample is used as the actual sample in the application scenario to expand the sample size of the application scenario. According to the operation intensity of each data enhancement operation in this data enhancement operation strategy, each data enhancement operation is performed on the sample, and the category of the obtained enhanced samples is single and lacks diversity. Summary of the invention
[0006] The embodiments of the present application provide a data enhancement method, apparatus, computing device, chip and computer storage medium, which can improve the diversity of samples. The technical solution is as follows:
[0007] In a first aspect, a data enhancement method is provided, which is performed by a first node, and the method includes:
[0008] Acquire a first target data enhancement strategy; based on the first target data enhancement strategy, perform the multiple data enhancement operations on the first sample within the operation intensity variation interval indicated by the target operation levels of the multiple data enhancement operations to obtain multiple target enhanced samples of the first sample, wherein the first target data enhancement strategy is used to indicate the target operation level of the data enhancement operation, and one target operation level is used to indicate one operation intensity variation interval.
[0009] The method processes samples through multiple data enhancement operations indicated by the data enhancement strategy, and can obtain multiple target enhanced samples, thereby achieving the purpose of expanding the samples. In addition, since multiple data enhancement operations are performed on samples within the operation intensity variation range indicated by the target operation levels of the multiple data enhancement operations, the multiple target enhanced samples obtained can vary within the operation intensity variation range indicated by the target operation levels of the multiple data enhancement operations, thereby improving the diversity of samples.
[0010] In a possible implementation, for any data in the first sample, any data in the multiple target enhanced samples undergoes a change corresponding to any data enhancement operation, within the operation intensity variation interval indicated by the target intensity level of any data enhancement operation. Take the first sample as an image, the any data as any pixel in the image, the target enhanced sample of the first sample as an enhanced image, and any data enhancement operation as a rotation operation as an example. There may be countless rotation angles (that is, operation intensity) within the operation intensity variation interval indicated by the target intensity level of the rotation operation. The partially enhanced image is obtained by performing a rotation operation of different rotation angles on the image by the first node within the operation intensity variation interval. Therefore, for any pixel in the image, the position of the any pixel in the partially enhanced image undergoes a rotation change, and the rotation change is reflected in the rotation angle, and the change in the rotation angle is within the operation intensity variation interval indicated by the target intensity level of the rotation operation. It can be understood that for a fixed position in the image, since this partially enhanced image is obtained by performing a rotation operation of different rotation angles on the image, the pixel at the fixed position in this partially enhanced image has changed.
[0011] In a possible implementation, the first target data enhancement strategy is obtained by searching for multiple operation levels of the configured multiple data enhancement operations, and any data enhancement operation is configured with multiple operation levels, and one operation level is used to indicate an intensity variation interval.
[0012] In one possible implementation, the first target data enhancement strategy is determined based on multiple data enhancement strategies, and the multiple data enhancement strategies are searched based on multiple operation levels of the configured multiple data enhancement operations. Any data enhancement operation is configured with multiple operation levels, and one operation level is used to indicate an intensity variation interval.
[0013] In a possible implementation, the multiple data enhancement strategies are evaluated by multiple evaluation devices.
[0014] In a possible implementation manner, the objects of the second samples used in the evaluation of the multiple data enhancement strategies are the same object, or are objects of the same type.
[0015] In a possible implementation, the multiple operation levels configured for any one of the data enhancement operations are obtained based on a target operation intensity variation range for any one of the data enhancement operations, and the target operation intensity variation range for any one of the data enhancement operations is configured by a configuration device.
[0016] In a possible implementation, the configuration process of any one of the data enhancement operations includes:
[0017] For any one of the multiple data enhancement operations, a target operation intensity variation range corresponding to the any one of the data enhancement operations is divided into multiple operation intensity variation intervals; and an operation level is configured for each of the multiple operation intensity variation intervals.
[0018] Based on the above possible implementation methods, after the first node divides the target operation intensity variation range of any data enhancement operation into multiple operation intensity variation intervals, an operation level is configured for each operation intensity variation interval, so that the intensity level can be used to indicate the operation intensity variation interval in the data enhancement strategy, which simplifies the representation of the operation intensity variation interval.
[0019] In a possible implementation, the first target data enhancement strategy is further used to indicate a target operation probability of each data enhancement operation in the multiple data enhancement operations, and the target operation probability of any data enhancement operation is a probability of performing any data enhancement operation on the first sample; obtaining the first target data enhancement strategy includes:
[0020] Based on multiple data enhancement strategies, the first target data enhancement strategy is determined, and any data enhancement strategy is used to indicate the operation probability and operation level of each data enhancement operation in the multiple data enhancement operations, and the operation probability of any data enhancement operation is the probability of performing any data enhancement operation on the second sample.
[0021] Based on the above possible implementation methods, the first node generates an optimal data enhancement strategy based on multiple data enhancement strategies, that is, the first target data enhancement strategy, so as to subsequently expand the samples and improve the diversity of the samples based on the optimal target data enhancement strategy.
[0022] In a possible implementation, determining the first target data enhancement strategy based on multiple data enhancement strategies includes:
[0023] Based on the evaluation values of the multiple data enhancement strategies, select multiple second target data enhancement strategies from the multiple data enhancement strategies, and generate the first target data enhancement strategy based on the multiple second target data enhancement strategies;
[0024] Among them, the evaluation values of the multiple second-target data enhancement strategies are all higher than the evaluation values of the data enhancement strategies other than the multiple second-target data enhancement strategies, and the evaluation value of any data enhancement strategy is used to indicate the quality of the recognition model trained by the enhanced samples obtained based on any data enhancement strategy.
[0025] Based on the above possible implementation methods, the first node can first select some better data enhancement strategies, such as the second target data enhancement strategy, from the multiple data enhancement strategies according to the evaluation values of the multiple data enhancement strategies, and then generate the optimal first target data enhancement strategy based on the selected multiple second target data enhancement strategies, thereby ensuring the quality of the first target data enhancement strategy.
[0026] In a possible implementation manner, generating the first target data enhancement strategy based on the multiple second target data enhancement strategies includes:
[0027] Based on the operation probabilities and operation levels of the multiple data enhancement operations in the multiple second target data enhancement strategies, determine the target operation probabilities and target operation levels of the multiple data enhancement operations; based on the determined target operation probabilities and target operation levels of the multiple data enhancement operations, generate the first target data enhancement strategy.
[0028] In a possible implementation, determining the target operation probabilities and target operation levels of the multiple data enhancement operations based on the operation probabilities and operation levels of the multiple data enhancement operations in the multiple second target data enhancement strategies includes:
[0029] For any one of the data enhancement operations, multiple operation levels of any one of the data enhancement operations in the multiple second target data enhancement strategies are clustered to obtain at least one operation level category; for any one of the at least one operation level category, based on the operation level in any one of the operation level categories and the operation probability of any one of the data enhancement operations in a third target data enhancement strategy in the multiple second target data enhancement strategies, a target operation intensity and a target operation probability of any one of the data enhancement operations are determined, and the third target data enhancement strategy is the second target data enhancement strategy to which the operation level of any one of the operation level categories belongs.
[0030] In a possible implementation, determining the target operation intensity and the target operation probability of any data enhancement operation based on the operation level in any operation level category and the operation probability of any data enhancement operation in a third target data enhancement strategy in the multiple second target data enhancement strategies includes:
[0031] Based on the operation level in any one of the operation level categories, the target operation level of any one of the data enhancement operations is determined; based on the operation probability of any one of the data enhancement operations within the third target data enhancement strategy among the multiple second target data enhancement strategies, the target operation probability of any one of the data enhancement operations is determined.
[0032] In a possible implementation manner, determining the target operation level of any one of the data enhancement operations based on the operation level in any one of the operation level categories includes:
[0033] Determine a minimum operation level and a maximum operation level in any one of the operation level categories; and determine each operation level that is greater than or equal to the minimum operation level and less than or equal to the maximum operation level as a target operation level for any one of the data enhancement operations.
[0034] Based on the above possible implementation methods, the first node determines each operation level that is greater than or equal to the minimum operation level and less than or equal to the maximum operation level as the target operation level of any data enhancement operation, so that the multiple target operation levels of any data enhancement operation are continuous, and the intensity change intervals corresponding to the continuous target operation levels are also continuous. Therefore, the first node subsequently performs any data enhancement operation on the first sample within the operation intensity change interval indicated by the target operation level of any data enhancement operation, and the enhanced sample obtained changes in the continuous operation intensity change interval, thereby further increasing the diversity of the samples and being more in line with the changes of samples in real application scenarios.
[0035] In a possible implementation manner, determining the target operation level of any one of the data enhancement operations based on the operation level in any one of the operation level categories includes:
[0036] Each operation level in any one of the operation level categories is determined as a target operation level for any one of the data enhancement operations.
[0037] In a possible implementation, the target operation probability of any one of the data enhancement operations is an average probability of the operation probability of any one of the data enhancement operations in the third target data enhancement strategy among the multiple second target data enhancement strategies.
[0038] In a possible implementation, before determining the first target data enhancement strategy based on multiple data enhancement strategies, the method further includes:
[0039] Iterative calculation is performed based on the initial data enhancement strategy to obtain the multiple data enhancement strategies.
[0040] In a possible implementation, the iterative calculation based on the initial data enhancement strategy includes:
[0041] During the i-th iterative calculation process, based on the data enhancement strategies determined in the previous i-1 iterative calculation process and each data enhancement strategy in the initial data enhancement strategy, the i-th data enhancement strategy among the multiple data enhancement strategies is determined, wherein i is an integer greater than or equal to 1 or less than or equal to N, and i is the total number of iterative calculations.
[0042] In a possible implementation, determining the i-th data enhancement strategy among the multiple data enhancement strategies based on the data enhancement strategies determined in the previous i-1 iterative calculation process and each data enhancement strategy in the initial data enhancement strategy includes:
[0043] For any of the data enhancement operations, based on a plurality of operation levels of any of the data enhancement operations in the respective data enhancement strategies and a plurality of evaluation values of the respective data enhancement strategies, predicting the operation level of any of the data enhancement operations in the i-th data enhancement strategy, wherein the evaluation value of any of the data enhancement strategies is used to indicate the quality of a recognition model trained by an enhanced sample obtained based on the respective data enhancement strategies;
[0044] For any of the data enhancement operations, based on a plurality of operation levels of any of the data enhancement operations in the respective data enhancement strategies and a plurality of evaluation values of the respective data enhancement strategies, predicting the operation level of any of the data enhancement operations in the i-th data enhancement strategy, wherein the evaluation value of any of the data enhancement strategies is used to indicate the quality of a recognition model trained by an enhanced sample obtained based on the respective data enhancement strategies;
[0045] For any of the data enhancement operations, based on a plurality of operation probabilities of the data enhancement operations in each of the data enhancement strategies and a plurality of evaluation values of the data enhancement strategies, predicting an operation probability of the data enhancement operations in the i-th data enhancement strategy;
[0046] The i-th data enhancement strategy is generated based on the predicted operation levels and operation probabilities of the multiple data enhancement operations.
[0047] Based on the above possible implementation methods, the first node predicts the operation level and operation probability of any data enhancement operation in the new data enhancement strategy based on the operation level, operation probability and evaluation value of any data enhancement operation in the various data strategies, so that the subsequently predicted data enhancement strategy can have a higher evaluation value.
[0048] In a possible implementation, predicting the operation level of any one of the data enhancement operations in the i-th data enhancement strategy based on the multiple operation levels of any one of the data enhancement operations in the respective data enhancement strategies and the multiple evaluation values of the respective data enhancement strategies includes:
[0049] Determine, based on the multiple operation levels and the multiple evaluation values, a multivariate Gaussian distribution to which the operation level of any one of the data enhancement operations obeys;
[0050] Under the multivariate Gaussian distribution obeyed by the operation level of any one of the data enhancement operations, the operation level that makes the acquisition function take the maximum value is determined as the operation level of any one of the data enhancement operations in the i-th data enhancement strategy.
[0051] In a possible implementation, predicting the operation probability of any one of the data enhancement operations in the i-th data enhancement strategy based on the multiple operation probabilities of any one of the data enhancement operations in the respective data enhancement strategies and the multiple evaluation values of the respective data enhancement strategies includes:
[0052] Based on the multiple operation probabilities and the multiple evaluation values, determine a multivariate Gaussian distribution obeyed by the operation probability of any one of the data augmentation operations;
[0053] Under the multivariate Gaussian distribution obeyed by the operation probability of any one of the data enhancement operations, the operation probability that makes the acquisition function take the maximum value is determined as the operation probability of any one of the data enhancement operations in the i-th data enhancement strategy.
[0054] In a possible implementation manner, after determining the i-th data enhancement strategy among the multiple data enhancement strategies, the method further includes:
[0055] Based on the operation probabilities and operation levels of the multiple data enhancement operations in the i-th data enhancement strategy, perform the multiple data enhancement operations on the multiple second samples to obtain multiple enhanced samples of the multiple second samples;
[0056] Obtaining an i-th recognition model based on the multiple enhanced sample training;
[0057] Based on the i-th recognition model, an evaluation value of the i-th data enhancement strategy is obtained.
[0058] In a possible implementation, the training based on the multiple enhanced samples to obtain the i-th recognition model includes:
[0059] Based on the multiple enhanced samples, a pre-trained model is trained to obtain the i-th recognition model, the pre-trained model is trained by multiple third samples of multiple objects of different types, and the accuracy of the pre-trained model is less than an accuracy threshold.
[0060] In a possible implementation manner, the object of the first sample and the object of the second sample belong to the same category, or the object of the first sample and the object of the second sample are the same object.
[0061] Based on the above possible implementation methods, each data enhancement strategy in the iterative calculation process is evaluated using samples of the same object or samples of objects of the same type, so that the evaluation results of each data enhancement strategy are related to the same object or objects of the same type. Therefore, the first target data enhancement strategy ultimately generated based on each data enhancement strategy corresponds to the same object or objects of the same type. The subsequent recognition model trained by this first target data enhancement strategy will have the best recognition effect when recognizing the same object or objects of the same type.
[0062] In a possible implementation, there are multiple i-th data enhancement strategies. After generating the i-th data enhancement strategy, the method further includes:
[0063] Sending at least one i-th data enhancement operation strategy to each of the plurality of evaluation devices;
[0064] The evaluation values of the at least one i-th data enhancement operation strategy are received from the plurality of evaluation devices respectively.
[0065] In a possible implementation manner, the first target data enhancement strategy is further used to indicate a target operation probability of each data enhancement operation in the multiple data enhancement operations, and the target operation probability of any data enhancement operation is a probability of performing any data enhancement operation on the first sample;
[0066] The performing the multiple data enhancement operations on the first sample within the operation intensity variation interval indicated by the target operation levels of the multiple data enhancement operations based on the first target data enhancement strategy includes:
[0067] Based on the target operation probability and the target operation level of each of the multiple data enhancement operations, the multiple data enhancement operations are performed on the first sample, wherein the target enhancement sample with the target operation probability of any data enhancement operation has performed any of the data enhancement operations.
[0068] Based on the above possible implementation methods, the enhanced samples that have undergone various data enhancement operations account for a certain proportion in the multiple enhanced samples, so that the multiple enhanced samples are more in line with real application scenarios.
[0069] In a possible implementation manner, performing the multiple data enhancement operations on the first sample based on the target operation probability and the target operation level of each data enhancement operation in the multiple data enhancement operations includes:
[0070] For any one of the data enhancement operations, based on a target operation probability of the data enhancement operation, the first sample is subjected to any one of the data enhancement operations within an operation intensity variation interval indicated by a target operation level of the data enhancement operation.
[0071] In a possible implementation manner, obtaining the first sample from an application node through a target interface;
[0072] The multiple target enhancement samples are sent to the application node through the target interface.
[0073] In a second aspect, a data enhancement device is provided, the device comprising:
[0074] An acquisition module, configured to acquire a first target data enhancement strategy, wherein the first target data enhancement strategy is used to indicate a target operation level of a data enhancement operation, and a target operation level is used to indicate an operation intensity variation interval;
[0075] An enhancement module is used to perform the multiple data enhancement operations on the first sample within the operation intensity variation range indicated by the target operation levels of the multiple data enhancement operations based on the first target data enhancement strategy to obtain multiple target enhanced samples of the first sample.
[0076] In a possible implementation, for any data in the first sample, any data in the multiple target enhanced samples undergoes a change corresponding to any data enhancement operation, which is within an operation intensity change interval indicated by a target intensity level of any data enhancement operation.
[0077] In a possible implementation, the first target data enhancement strategy is obtained by searching for multiple operation levels of the configured multiple data enhancement operations, and any data enhancement operation is configured with multiple operation levels, and one operation level is used to indicate an intensity variation interval.
[0078] In one possible implementation, the first target data enhancement strategy is determined based on multiple data enhancement strategies, and the multiple data enhancement strategies are searched based on multiple operation levels of the configured multiple data enhancement operations. Any data enhancement operation is configured with multiple operation levels, and one operation level is used to indicate an intensity variation interval.
[0079] In a possible implementation, the multiple data enhancement strategies are evaluated by multiple evaluation devices.
[0080] In a possible implementation manner, the objects of the second samples used in the evaluation of the multiple data enhancement strategies are the same object, or are objects of the same type.
[0081] In a possible implementation, the multiple operation levels configured for any one of the data enhancement operations are obtained based on a target operation intensity variation range for any one of the data enhancement operations, and the target operation intensity variation range for any one of the data enhancement operations is configured by a configuration device.
[0082] In a possible implementation manner, the device further includes:
[0083] a division module, configured to divide, for any one of the multiple data enhancement operations, a target operation intensity variation range corresponding to the any one of the data enhancement operations into a plurality of operation intensity variation intervals;
[0084] A configuration module is used to configure an operation level for each operation intensity variation interval in the multiple operation intensity variation intervals.
[0085] In a possible implementation manner, the first target data enhancement strategy is further used to indicate a target operation probability of each data enhancement operation in the multiple data enhancement operations, and the target operation probability of any data enhancement operation is a probability of performing any data enhancement operation on the first sample;
[0086] The acquisition module is used for:
[0087] Based on multiple data enhancement strategies, the first target data enhancement strategy is determined, and any data enhancement strategy is used to indicate the operation probability and operation level of each data enhancement operation in the multiple data enhancement operations, and the operation probability of any data enhancement operation is the probability of performing any data enhancement operation on the second sample.
[0088] In a possible implementation, the acquisition module includes:
[0089] A selection submodule, configured to select a plurality of second target data enhancement strategies from the plurality of data enhancement strategies based on the evaluation values of the plurality of data enhancement strategies, wherein the evaluation values of the plurality of second target data enhancement strategies are all higher than the evaluation values of the data enhancement strategies other than the plurality of second target data enhancement strategies among the plurality of data enhancement strategies, and the evaluation value of any data enhancement strategy is used to indicate the quality of a recognition model trained by an enhanced sample obtained based on any data enhancement strategy;
[0090] A generating submodule is used to generate the first target data enhancement strategy based on the multiple second target data enhancement strategies.
[0091] In a possible implementation, the generating submodule includes:
[0092] a determining unit, configured to determine target operation probabilities and target operation levels of the multiple data enhancement operations based on the operation probabilities and operation levels of the multiple data enhancement operations in the multiple second target data enhancement strategies;
[0093] A generating unit is used to generate the first target data enhancement strategy based on the determined target operation probabilities and target operation levels of the multiple data enhancement operations.
[0094] In a possible implementation manner, the determining unit includes:
[0095] a clustering subunit, configured to cluster, for any one of the data enhancement operations, a plurality of operation levels of any one of the data enhancement operations in the plurality of second target data enhancement strategies to obtain at least one operation level category;
[0096] A determination subunit is used to determine, for any operation level category in the at least one operation level category, a target operation intensity and a target operation probability of any data enhancement operation based on the operation level in the any operation level category and the operation probability of any data enhancement operation within a third target data enhancement strategy among the multiple second target data enhancement strategies, wherein the third target data enhancement strategy is the second target data enhancement strategy to which the operation level of any operation level category belongs.
[0097] In a possible implementation manner, the determining subunit includes:
[0098] A first determining element, configured to determine a target operation level of any one of the data enhancement operations based on the operation level in any one of the operation level categories;
[0099] The second determining element is used to determine the target operation probability of any data enhancement operation based on the operation probability of any data enhancement operation in the third target data enhancement strategy among the multiple second target data enhancement strategies.
[0100] In a possible implementation manner, the first determining element is used to:
[0101] Determining a minimum operation level and a maximum operation level in any of the operation level categories;
[0102] Each operation level that is greater than or equal to the minimum operation level and less than or equal to the maximum operation level is determined as a target operation level of any one of the data enhancement operations.
[0103] In a possible implementation manner, the first determining element is used to:
[0104] Each operation level in any one of the operation level categories is determined as a target operation level for any one of the data enhancement operations.
[0105] In a possible implementation, the target operation probability of any one of the data enhancement operations is an average probability of the operation probability of any one of the data enhancement operations in the third target data enhancement strategy among the multiple second target data enhancement strategies.
[0106] The device also includes:
[0107] The iterative module is used to perform iterative calculation based on the initial data enhancement strategy to obtain the multiple data enhancement strategies.
[0108] In a possible implementation, the iteration module is used to:
[0109] During the i-th iterative calculation process, based on the data enhancement strategies determined in the previous i-1 iterative calculation process and each data enhancement strategy in the initial data enhancement strategy, the i-th data enhancement strategy among the multiple data enhancement strategies is determined, wherein i is an integer greater than or equal to 1 or less than or equal to N, and i is the total number of iterative calculations.
[0110] In a possible implementation, the iteration module includes:
[0111] A first prediction submodule is used to predict, for any one of the data enhancement operations, an operation level of any one of the data enhancement operations in the i-th data enhancement strategy based on a plurality of operation levels of any one of the data enhancement operations in the respective data enhancement strategies and a plurality of evaluation values of the respective data enhancement strategies, wherein the evaluation value of any one of the data enhancement strategies is used to indicate the quality of a recognition model trained by an enhanced sample obtained based on any one of the data enhancement strategies;
[0112] A second prediction submodule, for predicting, for any one of the data enhancement operations, an operation probability of any one of the data enhancement operations in the i-th data enhancement strategy based on a plurality of operation probabilities of any one of the data enhancement operations in the respective data enhancement strategies and a plurality of evaluation values of the respective data enhancement strategies;
[0113] A generating submodule is used to generate the i-th data enhancement strategy based on the predicted operation levels and operation probabilities of the multiple data enhancement operations.
[0114] In a possible implementation, the first prediction submodule is used to:
[0115] Determine, based on the multiple operation levels and the multiple evaluation values, a multivariate Gaussian distribution to which the operation level of any one of the data enhancement operations obeys;
[0116] Under the multivariate Gaussian distribution obeyed by the operation level of any one of the data enhancement operations, the operation level that makes the acquisition function take the maximum value is determined as the operation level of any one of the data enhancement operations in the i-th data enhancement strategy.
[0117] In a possible implementation, the second prediction submodule is used to:
[0118] Based on the multiple operation probabilities and the multiple evaluation values, determine a multivariate Gaussian distribution obeyed by the operation probability of any one of the data augmentation operations;
[0119] Under the multivariate Gaussian distribution obeyed by the operation probability of any one of the data enhancement operations, the operation probability that makes the acquisition function take the maximum value is determined as the operation probability of any one of the data enhancement operations in the i-th data enhancement strategy.
[0120] The device also includes:
[0121] an obtaining module, configured to perform the multiple data enhancement operations on the multiple second samples based on the operation probabilities and operation levels of the multiple data enhancement operations in the i-th data enhancement strategy, to obtain multiple enhanced samples of the multiple second samples;
[0122] A training module, used for training and obtaining an i-th recognition model based on the multiple enhanced samples;
[0123] A target acquisition module is used to obtain an evaluation value of the i-th data enhancement strategy based on the i-th recognition model.
[0124] In a possible implementation, the training module is used to:
[0125] Based on the multiple enhanced samples, a pre-trained model is trained to obtain the i-th recognition model, the pre-trained model is trained by multiple third samples of multiple objects of different types, and the accuracy of the pre-trained model is less than an accuracy threshold.
[0126] In a possible implementation manner, the object of the first sample and the object of the second sample belong to the same category, or the object of the first sample and the object of the second sample are the same object.
[0127] In a possible implementation manner, the device further includes:
[0128] A first sending module, configured to send at least one i-th data enhancement operation strategy to a plurality of evaluation devices respectively;
[0129] The first receiving module is configured to receive evaluation values of the at least one i-th data enhancement operation strategy from the multiple evaluation devices respectively.
[0130] In a possible implementation manner, the first target data enhancement strategy is further used to indicate a target operation probability of each data enhancement operation in the multiple data enhancement operations, and the target operation probability of any data enhancement operation is a probability of performing any data enhancement operation on the first sample;
[0131] The enhancement module is used to:
[0132] Based on the target operation probability and the target operation level of each of the multiple data enhancement operations, the multiple data enhancement operations are performed on the first sample, wherein the target enhancement sample with the target operation probability of any data enhancement operation has performed any of the data enhancement operations.
[0133] In a possible implementation, the enhancement module is used to:
[0134] For any one of the data enhancement operations, based on a target operation probability of the data enhancement operation, the first sample is subjected to any one of the data enhancement operations within an operation intensity variation interval indicated by a target operation level of the data enhancement operation.
[0135] In a possible implementation manner, the device further includes:
[0136] A second receiving module, configured to obtain the first sample from an application node through a target interface;
[0137] The second sending module is used to send the multiple target enhanced samples to the application node through the target interface.
[0138] In a third aspect, a computing device is provided, which includes a processor and a memory, wherein the memory stores at least one program code, and the program code is loaded and executed by the processor to implement the operations performed by the data enhancement method in the first aspect above.
[0139] In a fourth aspect, a computer-readable storage medium is provided, in which at least one program code is stored, and the program code is loaded and executed by a processor to implement the operations performed by the data enhancement method in the first aspect above.
[0140] In a fifth aspect, a computer program product or a computer program is provided, which includes a program code, and the program code is stored in a computer-readable storage medium. A processor of a computing device reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the computer device executes the method provided in the above-mentioned first aspect or various optional implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0141] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0142] Figure 1 is a schematic diagram of a data enhancement system provided in an embodiment of the present application;
[0143] Figure 2 is a structural diagram of a first node provided in an embodiment of the present application;
[0144] Figure 3 is a schematic diagram of a data enhancement strategy provided in an embodiment of the present application;
[0145] Figure 4 is a structural diagram of another data enhancement system provided in an embodiment of the present application;
[0146] Figure 5 is a working principle diagram of a second node provided in an embodiment of the present application;
[0147] Figure 6 is a schematic diagram of a data enhancement system in a cloud scenario provided by an embodiment of the present application;
[0148] Figure 7 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0149] Figure 8 This is a flowchart of an initialization configuration provided by an embodiment of the present application;
[0150] Fig. 9 is a flow chart of a data enhancement method provided in an embodiment of the present application;
[0151] Fig.10 This is a schematic diagram of the causal relationship between a sample label, an object, and a shooting method provided in an embodiment of the present application;
[0152] Fig.11 It is a curve diagram of the accuracy change of a recognition model during a training process provided by an embodiment of the present application;
[0153] Fig.12 It is a distribution fitting process of an operation level of a data enhancement operation provided in an embodiment of the present application;
[0154] Fig.13 is a flow chart of a data enhancement method provided in an embodiment of the present application;
[0155] Fig.14 is a schematic diagram of a data enhancement system provided in an embodiment of the present application;
[0156] Fig.15 is a schematic diagram of data change distribution provided by an embodiment of the present application;
[0157] Fig.16It is a distribution diagram of a change in a specific pixel value when a sharpening operation changes, provided in an embodiment of the present application;
[0158] Fig.17 It is a structural schematic diagram of a data enhancement device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0159] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0160] Figure 1 is a schematic diagram of a data enhancement system provided in an embodiment of the present application, see Figure 1 , the data enhancement system 100 includes a first node 101, a second node 102 and a third node 103. In the data enhancement system 100, the first node 101 predicts a data enhancement strategy that can achieve a better evaluation result based on the evaluation result of at least one data enhancement strategy, and feeds back the predicted data enhancement strategy to the second node 102, and the second node 102 evaluates the predicted data enhancement strategy and feeds back the evaluation result of the predicted data enhancement strategy to the first node 101, wherein the at least one data enhancement strategy is a data enhancement strategy historically predicted by the first node.
[0161] At this time, for the first node 101, the data enhancement strategy predicted last time and having an evaluation result is a historically predicted data enhancement strategy, indicating that the various data enhancement strategies historically predicted by the first node 101 have been updated. Then the first node 101, based on the evaluation results of the various data enhancement strategies predicted historically, predicts again a data enhancement strategy that can achieve a better evaluation result. And so on, until the various data enhancement strategies historically predicted by the first node 101 meet the preset conditions, the first node 101 sends the various data enhancement strategies predicted historically to the third node 103, and the third node 103 generates at least one first target data enhancement strategy based on the received various data enhancement strategies.
[0162] Afterwards, the third node 103 provides the at least one first target data enhancement strategy to an external application node, and the application node adopts any of the first target data enhancement strategies to perform data enhancement on multiple samples to obtain a large number of enhanced samples, so that the application node can subsequently use a large number of enhanced samples for model training to obtain a recognition model with higher accuracy.
[0163] In order to further illustrate the working principle of each node in the data enhancement system 100, each node is described as follows in combination with the physical architecture of each node.
[0164] (1) First Node 101
[0165] See also Figure 2 The schematic diagram of the structure of a first node provided by an embodiment of the present application shown in the figure, the first node 101 includes an operation pool 1011, a strategy change space 1012 and a strategy optimizer 1013. The operation pool 1011 is used to provide the user with the configuration of data enhancement operations. In a possible implementation, the user configures multiple data enhancement operations and the target operation intensity variation range of each data enhancement operation in the operation pool 1011 based on the needs of the application scenario. Among them, the multiple data enhancement operations are the data enhancement operations required for the samples in the application scenario, and the target operation intensity variation range of a data enhancement operation is: the intensity variation range of the data enhancement operation performed on the samples in the application scenario. In the strategy variation space 1012, for any of the multiple data enhancement operations, the first node allocates multiple operation levels to any of the data enhancement operations based on the target operation intensity variation range of any of the data enhancement operations configured in the operation pool 1011, and allocates a probability variation interval to any of the data enhancement operations, so that any of the data enhancement operations corresponds to multiple operation levels and a probability variation interval. The first node can also store the operation level and probability variation interval corresponding to each data enhancement operation in the plurality of data enhancement operations in the strategy variation space 1012. An operation level of any data enhancement operation is used to indicate an operation intensity variation interval, and the operation intensity variation interval is a sub-interval of the target operation intensity variation range of the data enhancement operation.
[0166] Initially, for any data enhancement operation, the policy optimizer 1013 randomly selects an operation level of any data enhancement operation and an operation probability in the probability variation interval from the policy variation space 1012 to implement a random search for a data enhancement strategy. The data enhancement strategy includes the operation probability and operation level of each data enhancement operation in the multiple data enhancement operations in the policy variation space 1012. For example Figure 3 The schematic diagram of a data enhancement strategy provided by an embodiment of the present application is shown in FIG. Figure 3 The data enhancement strategy shown includes S data enhancement operations, namely data enhancement operations 1-S, the data enhancement strategy also includes the operation probability of the data enhancement operations 1-S, respectively, the operation probability 1-S, and the data enhancement strategy also includes the operation level of the data enhancement operations 1-S, respectively, the operation level 1-S, where S is an integer greater than or equal to 1. It should be noted that Figure 3Any data enhancement operation in the data enhancement strategy shown has an operation level and an operation probability, while in some other embodiments, the operation level of any data enhancement operation in a data enhancement operation strategy may also have multiple operation levels.
[0167] After the policy optimizer 1013 searches for the first data enhancement strategy, it sends the first data enhancement strategy to the second node 102, and the second node 102 feeds back the evaluation result of the first data enhancement strategy. Based on the evaluation result of the first data enhancement strategy, the policy optimizer 1013 searches in the policy change space 1012 to obtain the second data enhancement strategy. Since the second data enhancement strategy is searched based on the evaluation result of the first data enhancement strategy, then, for the first data enhancement operation strategy, the second data enhancement strategy is unknown, so the second data enhancement strategy is also the data enhancement strategy predicted by the policy optimizer 1013 to achieve a better evaluation result. The policy optimizer 1013 sends the second data enhancement strategy to the second node 102, and the second node 102 feeds back the evaluation result of the second data enhancement strategy. Based on the evaluation results of the first data enhancement strategy and the second data enhancement strategy, the policy optimizer 1013 continues to search in the policy change space 1012 to obtain the third data enhancement strategy. And so on, until the data enhancement strategies searched by the strategy optimizer 1013 meet the preset conditions, the strategy optimizer 1013 sends the data enhancement strategies to the third node 103, and the third node 103 generates at least one first target data enhancement strategy based on the received data enhancement strategies.
[0168] In some embodiments, the policy optimizer 1013 can also fuse sample labels of samples to predict data enhancement policies. In a possible implementation, the data enhancement policies predicted by the policy optimizer 1013 during the iteration process are oriented to samples with the same sample labels, or to samples with sample labels of the same type.
[0169] In some embodiments, a sample label of an object is used to identify the object and the type of the object. If the objects of the samples in the training set belong to different types, the first node 101 can eventually generate different types of target data enhancement strategies, wherein each type of target data enhancement strategy corresponds to a type of object. For example, in the iterative process of generating any type of target data enhancement strategy by the first node, the strategy optimizer 1013 sends the predicted data enhancement strategy and the any type to the second node 102, so that the second node 102 evaluates the received data enhancement strategy based on the sample with the sample label of the any type. When any type of data enhancement strategy meets the preset conditions, the strategy optimizer 1013 sends each data enhancement strategy of the type to the third node 103, and each third node 103 generates the optimal data enhancement strategy (i.e., target data enhancement strategy) for the any type based on the various data enhancement strategies of the type, so that the application node can be based on the enhanced samples obtained by the optimal data enhancement strategy of the any type, and train a recognition model suitable for each object of the any type.
[0170] It should be noted that Figure 1 The data enhancement system 100 shown is described by taking the first node 101 and the third node 103 as two independent nodes as an example. In some other embodiments, the first node 101 and the third node 103 are the same node, and the third node 103 can be a unit in the first node 101 and exist in the first node 101. For example, Figure 2 The first node 101 shown may also include a policy generator 1014 , which is also the third node 103 .
[0171] (2) Second Node 102
[0172] The number of second nodes 102 in the data enhancement system 100 may be one or more, and the second nodes 102 may be regarded as evaluation devices. In some embodiments, the first node 101 can predict multiple data enhancement strategies in each iteration process (that is, the search process). If there are multiple second nodes 102 in the data enhancement system 100, the first node 101 can disperse and send the multiple data enhancement strategies predicted each time to multiple second nodes 102. Each second node 102 evaluates some of the multiple data enhancement strategies, and each second node 102 sends the evaluation results of the data enhancement strategies it is responsible for evaluating to the first node 101. In this way, the first node 101 can obtain the evaluation results of the multiple data enhancement strategies predicted in each iteration process, thereby realizing distributed evaluation. In this distributed evaluation process, multiple second nodes 102 perform evaluations in parallel, thereby improving the evaluation efficiency of the data enhancement system 100. For example Figure 4 In the structural diagram of another data enhancement system provided by the embodiment of the present application shown, the first node sends multiple data enhancement strategies in each iteration process to multiple second nodes, and the multiple second nodes evaluate the multiple data enhancement strategies and return the evaluation results of each data enhancement strategy. Afterwards, the first node generates a first target data enhancement strategy based on each historical data enhancement strategy, and sends the first target data enhancement strategy to the application node. The application node adopts the first target data enhancement strategy to perform data enhancement on the samples obtained from the data server, and performs model training based on the enhanced samples obtained after enhancement, and deploys the trained recognition model to the service.
[0173] In a possible implementation, for any data enhancement strategy received, the second node 102 adopts the data enhancement strategy to perform data enhancement operations on multiple samples to obtain multiple enhanced samples of the multiple samples. Afterwards, the second node 102 uses the multiple enhanced samples to train the initial model to obtain a recognition model. Among them, the multiple samples can be obtained by the second node 102 from the data server. Furthermore, the second node 102 evaluates the recognition effect of the recognition model, and uses the evaluation result of the recognition model as the evaluation result of the data enhancement strategy, and feeds it back to the first node 101.
[0174] In some embodiments, the second node 102 may first obtain a pre-trained model, which may be a recognition model that is about to be trained, for example, the accuracy of the pre-trained model is less than the accuracy threshold, and when the second node 102 obtains multiple enhanced samples based on a data enhancement strategy, the second node 102 uses the multiple enhanced samples to train the pre-trained model to obtain a recognition model. Figure 5A working principle diagram of a second node provided in an embodiment of the present application is shown. After the second node receives a data enhancement strategy, it adopts the enhanced samples obtained by the data enhancement strategy to retrain and fine-tune the pre-trained model to obtain a recognition model, and evaluates the recognition effect of the recognition model to obtain an evaluation result of the data enhancement strategy.
[0175] (3) Third Node 103
[0176] In one possible implementation, the third node 103 selects multiple superior data enhancement strategies (e.g., data enhancement strategies with higher evaluation results among the multiple data enhancement strategies) from the multiple data enhancement strategies based on the evaluation results of the received multiple data enhancement strategies, and generates a first target data enhancement strategy based on the multiple superior data enhancement strategies.
[0177] When the multiple data enhancement strategies are evaluated based on multiple samples of an object, or are evaluated based on multiple samples of multiple objects of a type, the first target data enhancement strategy finally generated by the third node 103 based on the multiple data enhancement strategies corresponds to the object or the type. The application node trains a recognition model based on the enhanced samples obtained based on the first target data enhancement strategy, which has a better recognition effect on the object or objects of this type.
[0178] It should be noted that the data enhancement system 100 can be deployed on multiple computing devices, which are used to implement the functions of the first node 101, the second node 102 and the third node 103 respectively. In this case, the first node 101, the second node 102 and the third node 103 are independent computing devices. In some embodiments, some or all of the first node 101, the second node 102 and the third node 103 are integrated into one computing device, so each node in the computing device is also a unit of the device, for example, the first node 101 also has the functions of the second node 102 and the third node 103. The embodiment of the present application does not limit the deployment method of each node in the data enhancement system 100.
[0179] In some embodiments, the first node 101, the second node 102, and the third node 103 may also be cloud computing devices. When the first node 101, the second node 102, and the third node 103 are cloud computing devices, the data enhancement system 100 is deployed in the cloud. Figure 6The schematic diagram of a data enhancement system in a cloud scenario provided by an embodiment of the present application shown, the application node uploads the sample to be enhanced (such as customer data) to the first node deployed in the cloud through the target interface. For example, an upload interface is displayed in the application node, and the user uploads the sample to be enhanced in the upload interface. When the application node detects that the user has performed a confirmation operation in the upload interface, the application node sends the sample to be enhanced to the first node through the target interface to achieve the upload. After the sample to be enhanced is uploaded, the first node randomly searches for multiple data enhancement strategies in the strategy change space, and sends the searched at least one data enhancement strategy and the sample to be enhanced to multiple second nodes respectively. When any second node receives the at least one data enhancement strategy and the sample to be enhanced, for any data enhancement strategy in the at least one data enhancement strategy, the any second node evaluates the any data enhancement strategy based on the sample to be enhanced, and feeds back the evaluation result of the any data enhancement strategy to the first node. Afterwards, the first node generates multiple new data enhancement strategies based on the evaluation results of the multiple data enhancement strategies, and the multiple new data enhancement strategies are evaluated again by multiple nodes. By analogy, when there are enough historically generated data enhancement strategies, the first node generates a target data enhancement strategy based on each historically generated data enhancement strategy. The first node adopts the target data enhancement strategy to perform multiple data enhancement operations on the sample to be enhanced, and obtains multiple enhanced samples of the sample to be enhanced. The application node downloads the multiple enhanced samples through the target interface, so that the application node can subsequently perform model training based on the downloaded multiple enhanced samples to obtain a recognition model, and deploy the recognition model to the service. Among them, the target interface is a software interface or hardware interface for data interaction between the data enhancement system in the cloud and the application node.
[0180] In a possible implementation, the application node can also directly download the target data enhancement strategy through the target interface, and parse the target data enhancement strategy. Based on the parsed target data enhancement strategy, multiple data enhancement operations are performed on the samples to be enhanced to obtain multiple enhanced samples.
[0181] In some embodiments, the first node includes a central processing unit (CPU), and the CPU implements each step executed by the first node. The first node includes a graphics processing unit (GPU), and the CPU implements each step executed by the second node.
[0182] In some embodiments, when the data enhancement system is not deployed in the cloud, the first node or the third node in the data enhancement system may also generate multiple target data enhancement strategies, any target data enhancement strategy is a data enhancement strategy finally generated based on the various data enhancement strategies generated historically by the first node, and any target data enhancement strategy corresponds to an object type or an object; the node generating the multiple target data enhancement strategies uploads each target data enhancement strategy and the object type or object identifier corresponding to each target data enhancement strategy to the cloud, so that the application node downloads the corresponding target data enhancement strategy from the cloud according to the sample to be enhanced, and then the application node can adopt the downloaded target data enhancement strategy to obtain a recognition model suitable for the sample to be enhanced or the object. Alternatively, the first node can also train a recognition model based on each target data enhancement strategy, associate each recognition model with the object type or object identifier corresponding to each target data enhancement strategy, and upload it to the cloud, and the application node directly downloads the required recognition model from the cloud according to the needs of the application scenario. Alternatively, the first node can also train a recognition model based on each target data enhancement strategy, generate multiple enhanced samples, and upload the multiple enhanced samples and the sample label of each enhanced sample to the cloud. The application node can directly download each required enhanced sample from the cloud according to the requirements of the application scenario.
[0183] The first node 101, the second node 102 and the third node 103 in the present application may be servers, and the application node may be a user device such as a terminal, a personal computer (PC) or an application server. The embodiment of the present application does not limit the implementation form of the first node 101, the second node 102, the third node 103 and the application node.
[0184] The present application also provides a schematic diagram of the structure of a computing device. Figure 7The computing device 700 may be configured as any of the first node, the second node, and the third node. The computing device 700 may have relatively large differences due to different configurations or performances, and may include one or more processors 701 and one or more memories 702, wherein the memory 702 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 701 to implement the method provided by each method embodiment described below. For example, if the computing device 700 is configured as the first node, the at least one instruction is loaded and executed by the processor 701 to implement the steps performed by the first node in each method embodiment described below. Of course, the computing device 700 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The computing device 700 may also include other components for implementing device functions, which will not be described in detail here. The processor 701 can be any processor such as a CPU, a GPU, a tensor processing unit (TPU), a neural network processing unit (NPU), a brain processing unit (BPU), a deep learning processing unit (DPU), a holographic processing unit (HPU), a vector processing unit (VPU), and an intelligence processing unit (IPU).
[0185] The processor 701 can adopt a general-purpose CPU, a microprocessor, an application-specific integrated circuit (ASIC), a GPU or one or more integrated circuits to execute relevant programs to implement the following data enhancement method.
[0186] The processor 701 may also be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps performed by any node in the data enhancement method of the present application may be completed by an integrated logic circuit of hardware or software instructions in the processor 701. The above-mentioned processor 701 may also be a general-purpose processor, a digital signal processor (digital signal processing, DSP), ASI, a field programmable gate array (field programmable gatearray, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory (RAM), a flash memory, a read-only memory (ROM), a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702, and combines its hardware to complete the functions required to be performed by the modules included in the data enhancement device of the embodiment of the present application, or executes the data enhancement method of the method embodiment of the present application.
[0187] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions, which can be executed by a processor in a terminal to perform the data enhancement method in the following embodiments. For example, the computer-readable storage medium can be a ROM, a RAM, a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0188] For example, before obtaining the optimal data enhancement strategy for a certain application scenario, the first node performs initial configuration for the application scenario. Figure 8 A flowchart of an initialization configuration provided in an embodiment of the present application is shown.
[0189] 801. The first node configures multiple data enhancement operations and target operation intensity variation ranges of the multiple data enhancement operations.
[0190] The multiple data enhancement operations are data enhancement operations required for samples in a certain application scenario, and the application scenario is any one of an image recognition scenario, an audio and video scenario, and a text recognition scenario. The embodiment of the present application does not limit the application scenario.
[0191] The sample is composed of data collected in the application scenario, or it is considered that the sample is composed of real data. In the embodiment of the present application, the application scenario is taken as an image recognition scenario as an example. The sample can be an image taken by any device with a shooting function in the image recognition scenario.
[0192] In order to expand the existing samples, data enhancement operations can be used to enhance the existing samples to obtain enhanced samples, and the enhanced samples are regarded as real data collected in the application scenario for model training. However, there may be various changes between the real data collected in the application scenario. In order to make the subsequently obtained enhanced samples highly simulate the real data in the application scenario, it is necessary to use a variety of data enhancement operations to enhance the existing samples. For example, in an image recognition scenario, the multiple data enhancement operations include at least one of a flip operation, a rotation operation, a scaling operation, a cropping operation, a translation operation, a noise addition operation, and a sharpening operation. Of course, other types of data enhancement operations may also be included. The multiple data enhancement operations can be adaptively configured according to the specific application scenario. Here, the embodiments of the present application do not limit the multiple data enhancement operations.
[0193] It should be noted that the change of real data in this application scenario is a distribution, not a few specific change points. For example, different people take pictures of the same kitten. Since everyone holds the phone in a different posture, the inclination and size of the cat in the captured image will have infinite changes, not just a few specific degrees of inclination. Of course, not only the different changes in the inclination of the cat in the image, but also the images taken by different mobile phones will be different in terms of color saturation, color temperature, etc. Therefore, in order to simulate the change of real data, it is necessary to take data enhancement operations with different intensity variation ranges on the image, so as to obtain more enhanced samples, while ensuring that the variation distribution of these enhanced samples can be as consistent as possible with the variation distribution of the actual samples in the application scenario. Therefore, in addition to configuring multiple data enhancement operations, the first node is also configured with the target operation intensity variation range of the multiple data enhancement operations, so that each data operation is performed on the sample in the target operation intensity variation range of each data enhancement operation, so that each variation range of the enhanced sample finally obtained is within the target operation intensity variation range of each data enhancement operation, so as to simulate the variation distribution of the real data in the application scenario.
[0194] Among them, a target operation intensity variation range of a data enhancement operation includes multiple operation intensities. The embodiment of the present application does not limit the operation intensity range of the target operation intensity variation range of each data enhancement operation, and can be adaptively configured according to the actual application scenario. Taking the image recognition scenario as an example, a data enhancement operation is a rotation operation, and the operation intensity of the rotation operation can be expressed by the rotation angle. If the objects in the multiple images in the image recognition scenario will rotate, and the rotation range is [0 degrees, 180 degrees], the first node can configure the target operation intensity variation range of the rotation operation to be [0 degrees, 180 degrees], so that the image in the image recognition scenario is subsequently rotated within the range of [0 degrees, 180 degrees] to obtain multiple data enhancement images (that is, multiple enhancement samples). And the objects in the multiple data enhancement images are rotated within the range of [0 degrees, 180 degrees], so that the multiple data enhancement images conform to the change law of the real image in the image recognition scenario, then the multiple data enhancement data can be used as the real sample in the image recognition scenario for model training.
[0195] In some embodiments, the first node configures multiple data enhancement operations and target operation intensity variation ranges of the multiple data enhancement operations based on manual operation. In one possible implementation, the first node displays a data enhancement operation configuration interface, and the user configures multiple data enhancement operations and target operation intensity variation ranges of each data enhancement operation in the data enhancement operation configuration interface. When it is detected that the user has performed a confirmation operation on the data enhancement operation configuration interface, the first node stores the multiple data enhancement operations configured by the user on the data enhancement operation configuration interface and the target operation intensity variation range of each data enhancement operation, and the configuration is completed.
[0196] In some embodiments, the process shown in step 801 is performed by the operation pool in the first node, for example Figure 2 The operation pool 1011 in the first node 101 is shown.
[0197] It should be noted that this step 801 is performed by the first node, and the first node can be regarded as a configuration device. In some embodiments, this step 801 is not performed by the first node, but by any configuration device other than the first node.
[0198] 802. For any data enhancement operation among the multiple data operations, the first node divides the operation intensity of the data enhancement operation into multiple intensity levels based on a target operation intensity variation range of the data enhancement operation.
[0199] An intensity level is used to indicate an intensity variation interval, which may be any subset of the target operation intensity variation range.
[0200] The first node divides the target operation intensity variation range corresponding to any one of the data enhancement operations into a plurality of intensity variation intervals, and there is no intersection between the plurality of intensity variation intervals. The first node configures an operation level for each of the plurality of operation intensity variation intervals. The operation intensity within the plurality of intensity variation intervals is positively correlated with the intensity level of the operation intensity variation interval. That is, the higher the operation intensity among the plurality of intensity variation intervals, the higher the intensity level of the operation intensity variation interval, and vice versa.
[0201] For example, any of the data enhancement operations is a rotation operation, and the target operation intensity variation range of the rotation operation is [0 degrees, 180 degrees]. The first node divides the target operation intensity variation range [0 degrees, 180 degrees] into 10 intensity variation intervals, namely [0 degrees, 18 degrees), [18 degrees, 36 degrees), ..., [162 degrees, 180 degrees]. According to the high and low operation intensity in the 10 intensity variation intervals, the first node configures the intensity levels corresponding to the 10 intensity variation intervals to intensity levels 1, 2, ..., 10, and these 10 intensity levels increase successively.
[0202] In some embodiments, the process shown in step 802 is completed by the first node in the strategy change space, for example Figure 2 The policy change space 1012 in the first node 101 is shown.
[0203] It should be noted that this step 802 is performed by the first node, and the first node can be regarded as a configuration device. In some embodiments, this step 802 is not performed by the first node, but by any configuration device other than the first node.
[0204] 803. The first node configures probability change intervals for the multiple data enhancement operations.
[0205] A probability variation interval includes multiple operation probabilities, and an operation probability of any data enhancement operation is the probability of performing any data enhancement operation on the sample.
[0206] In some embodiments, the first node configures the same probability change interval for each of the multiple data enhancement operations, or configures different probability change intervals for the multiple data enhancement operations. The embodiments of the present application do not limit the probability change intervals configured by the first node for the multiple data enhancement operations.
[0207] In some embodiments, the first node directly configures the multiple data enhancement operations to have the same probability variation interval, for example, [0, 1].
[0208] In some embodiments, the process shown in step 803 is completed by the first node in the strategy change space, for example Figure 2 The policy change space 1012 in the first node 101 is shown.
[0209] It should be noted that there is no order of execution for step 803 and step 802. The first node may execute step 803 first and then execute step 802. Here, the embodiment of the present application does not limit the execution order of steps 802-803.
[0210] When the first node has configured the intensity levels and probability change intervals of the multiple data enhancement operations, the initialization configuration is completed. In addition to using data enhancement operations alone to change samples to increase sample diversity and simulate data changes encountered in real scenarios, different data enhancement operations can also be combined to form multiple data enhancement strategies to achieve more diverse data changes. The first node can also obtain a first target data enhancement strategy based on multiple data enhancement strategies so that the first target data enhancement strategy can be used later to expand the sample. To further illustrate this process, see Fig. 9 A flow chart of a data enhancement method provided in an embodiment of the present application is shown.
[0211] 901. A first node obtains an initial data enhancement strategy, where the initial data enhancement strategy is used to indicate operation probabilities and intensity levels of multiple data enhancement operations.
[0212] Exemplarily, each of the multiple data enhancement operations can be identified by an operation identifier, and the operation identifiers of different data enhancement operations are different. In one possible implementation, the initial data enhancement strategy includes the operation identifiers, operation probabilities, and intensity levels of the multiple data enhancement operations, and the operation identifier of each data enhancement operation corresponds to the operation intensity and operation probability of each data enhancement operation. In one possible implementation, the sum of the operation probabilities of the multiple data enhancement operations in the initial data enhancement strategy is 1, and the intensity level of each data enhancement operation in the initial data enhancement strategy has at least one, and the operation probability of each data enhancement is 1. It should be noted that the embodiment of the present application is described by taking the initial data enhancement strategy as an example in which each data enhancement operation has one intensity level.
[0213] In some embodiments, the initial data enhancement strategy obtained by the first node may be one or more. Here, the embodiment of the present application does not limit the number of initial data enhancement strategies obtained by the first node. It should be noted that the embodiment of the present application takes the first node obtaining an initial data enhancement strategy as an example for explanation.
[0214] In one possible implementation, the process of the first node acquiring an initial data enhancement strategy is: for any one of the multiple data enhancement operations configured, the first node randomly selects an intensity level from the multiple intensity levels of the configured data enhancement operations, and randomly selects an operation probability from the probability variation range of the configured data enhancement operations; the first node generates an initial data enhancement strategy based on the operation identifiers of the multiple data enhancement operations, the intensity level of each of the selected data enhancement operations, and the operation probability.
[0215] In some embodiments, the process shown in step 901 is performed by a policy optimizer in the first node, for example Figure 2 The policy optimizer 1013 in the first node 101 is shown.
[0216] Since there are many types of data enhancement operations, and different combinations of different types of data enhancement operations are actually another form of data enhancement operation, the first node needs to find a better data enhancement strategy from the multiple data enhancement strategies obtained, and it is necessary to evaluate each acquired data enhancement strategy, so as to obtain a better data enhancement strategy based on the evaluation results of the multiple acquired data enhancement strategies. Among them, the initial data enhancement strategy is a data enhancement strategy obtained by the first node. In a possible implementation, the first node evaluates the initial data enhancement strategy through the following step 902.
[0217] 902. The first node evaluates the initial data enhancement strategy to obtain an evaluation value of the initial data enhancement strategy, where the evaluation value of the initial data enhancement strategy is used to indicate the quality of a recognition model trained by enhanced samples obtained based on the initial data enhancement strategy.
[0218] The evaluation value of the initial data enhancement strategy is also the evaluation result of the initial data enhancement strategy by the first node. Optionally, the evaluation value of the initial data enhancement strategy is the accuracy of the recognition model trained by the enhanced samples obtained based on the initial data enhancement strategy.
[0219] The first node adopts the initial data enhancement strategy to perform data enhancement on the samples in the application scenario, and performs model training based on the enhanced samples after data enhancement, and evaluates the quality of the initial data enhancement strategy through the trained recognition model. In a possible implementation, the process shown in this step 902 is implemented by the process shown in the following steps 9021-9023.
[0220] Step 9021: The first node performs the multiple data enhancement operations on the multiple second samples based on the operation probabilities and operation levels of the multiple data enhancement operations in the initial data enhancement strategy to obtain multiple enhanced samples of the multiple second samples.
[0221] For any one of the multiple data enhancement operations in the initial data enhancement strategy, the enhanced samples with an operation probability of the any one of the data enhancement operations in the multiple enhanced samples have undergone the any one of the data enhancement operations.
[0222] Each second sample among the multiple second samples is composed of data collected in the application scenario, and for any second sample among the multiple second samples, the any second sample has a sample label, and the sample label of the any second sample is used to indicate the object of the any second sample. Optionally, the sample label of the any second sample includes an object identifier, and the object identifier is used to identify the object of the any second sample. The object of the any second sample is the object collected when the any second sample is collected. For example, if the any second sample is an image of a cat, then the cat is also the object of the any second sample. In some embodiments, the objects of the multiple second samples are different, or the objects of some of the multiple second samples are different.
[0223] It should be noted that the samples involved in this application are all composed of data collected in the application scenario, which are real data in the application scenario. For example, the second sample mentioned above, the first sample, the third sample and the fourth sample mentioned below, etc. The enhanced samples involved in this application are all obtained by performing data enhancement operations on the real data in the application scenario, and are used to imitate the real data in the application scenario to expand the sample size in the application scenario.
[0224] The samples or enhanced samples involved in this application are ultimately used for model training, and the data changes of the samples used for model training depend on the way these samples are generated. For example, the same cat photographed with different mobile phones will have different image properties. For example, some mobile phones produce images with warmer color temperatures, while others have colder colors. For another example, when taking a static cat and a dynamic bird, the image properties of the cat and the bird will also be significantly different. The bird image is blurry, so the camera may automatically add more sharpening operations, while the cat image does not need to be automatically sharpened. For example Fig.10The embodiment of the present application shown is a schematic diagram of the causal relationship between a sample label, an object, and a shooting method, wherein a static flagpole and a dynamic hummingbird are used as objects, which determine different shooting methods and different sample labels of the captured images, and different shooting methods determine different change distributions of the captured images. The captured images and image labels form a training set for model training.
[0225] If the data enhancement strategy is used to generate enhanced samples with data that are as similar as possible to the real data population, it is necessary to consider the impact of the sample generation method, and then calculate different data enhancement strategies for different sample generation methods. The sample generation method is generally related to the type of sample object or the sample object itself. Therefore, in some embodiments, the objects of the multiple second samples belong to the same type. For example, the objects of the multiple second samples are all birds, amphibians or reptiles. Or, in some embodiments, the objects of the multiple second samples are the same object, for example, the objects of the multiple second samples are all cats or birds. Optionally, the sample label of each second sample also includes the type identification of the object of each second sample. If the objects of the multiple second samples belong to the same type, the sample labels of the multiple second samples include the same type identification. For the convenience of description, the type to which the objects of the multiple second samples belong is recorded as the target type; if the objects of the multiple second samples are the same object, the object identification included in the sample labels of the multiple second samples is the same.
[0226] In one possible implementation, for any one of the multiple data enhancement operations within the initial data enhancement strategy, the first node performs any one of the data enhancement operations on the multiple second samples based on the operation probability of the any one of the data enhancement operations within the operation intensity variation range indicated by the operation level of the any one of the data enhancement operations, thereby obtaining multiple enhanced samples that have undergone any one of the data enhancement operations.
[0227] For any second sample among the multiple second samples, the first node is provided with a target number of enhanced samples of the any second sample required. Based on the target number and the operation probability of the any data enhancement operation, the first node performs the any data enhancement operation on the any second sample multiple times within the operation intensity variation interval indicated by the intensity level of the any data enhancement operation, and obtains multiple enhanced samples of the any second sample that have undergone the any data enhancement operation. Among the multiple enhanced samples of the any second sample, the number of enhanced samples that have undergone the any data enhancement operation is the product of the target number and the operation probability of the any data enhancement operation.
[0228] To facilitate understanding of the process, the number of second samples is M, and the initial data enhancement strategy is: Figure 3 Taking the data enhancement strategy shown as an example, this step 9021 is explained as follows: for the jth data enhancement operation among the S data enhancement operations in the initial data enhancement strategy and the rth second sample among the multiple second samples, if the operation probability of the jth data enhancement operation is 0.2, and the target number of enhanced samples of the rth second sample set in the first node is 100, then within the intensity variation interval indicated by the intensity level of the jth data enhancement operation in the initial data enhancement strategy, the first node performs the jth data enhancement operation 20 times on the rth second sample to obtain 20 enhanced samples of the rth second sample. Wherein, j is an integer greater than or equal to 1 or less than or equal to S, and r is an integer greater than or equal to 1 or less than or equal to M.
[0229] In a possible implementation, within the operation intensity variation interval indicated by the intensity level of any data enhancement operation, the process of the first node performing any data enhancement operation on any second sample multiple times is: the first node performs any data enhancement operation on any second sample multiple times with equal probability according to the operation intensity in the operation intensity variation interval indicated by the intensity level of any data enhancement operation. For example, if any data enhancement operation is a rotation operation, the operation intensity variation interval corresponding to the intensity level of the rotation operation in the initial data enhancement strategy is [0 degrees, 18 degrees), and 18 rotation operations are required for any second sample, then the first node selects 18 rotation angles from the operation intensity variation interval [0, 18 degrees) with equal probability, which are 0, 1 degree, ..., 17 degrees respectively, and the first node performs a rotation operation on any second sample based on each selected rotation angle, and obtains 18 enhanced samples of the second sample, so that the distribution of the change in rotation angle of these 18 enhanced samples is approximately [0, 18 degrees).
[0230] It should be noted that the objects of each enhanced sample obtained by performing a data augmentation operation on any second sample are the same as the object of any second sample, and the first node can use the sample label of any second sample as the sample label of each enhanced sample obtained by performing a data augmentation operation on any second sample.
[0231] Step 9022: The first node obtains an initial recognition model based on the multiple enhanced samples of the multiple second samples.
[0232] The initial recognition model is used to identify samples. Optionally, the initial recognition model is a neural network model, such as a deep neural network model.
[0233] In some embodiments, the first node inputs the multiple enhanced samples into an initial model, and uses the multiple enhanced samples to perform model training on the initial model to obtain the initial recognition model, wherein the initial model is a neural network model that has not undergone any training.
[0234] In some other embodiments, the first node first obtains a pre-trained model, and then trains the pre-trained model based on the multiple enhanced samples to obtain the initial recognition model. The pre-trained model is obtained by training multiple third samples of multiple objects of different types, and the accuracy of the pre-trained model is less than the accuracy threshold, which can be set according to the actual application scenario, and the embodiment of the present application does not limit the accuracy threshold.
[0235] The multiple third samples are composed of data collected in the application scenario. Since the accuracy of the pre-trained model is less than the accuracy threshold, the pre-trained model is considered to be an untrained model. Then, the first node continues to train the pre-trained model based on the multiple enhanced samples, and the time to obtain the initial recognition model is much shorter than the time from the initial model training to the initial recognition model, thereby shortening the total time for the first node to evaluate the initial data enhancement strategy and improving the evaluation efficiency of the data enhancement operation. For example Fig.11 The embodiment of the present application shown in the graph shows a curve of the change in accuracy of the recognition model during the training process. If the first node trains the initial model based on the multiple enhanced samples, if you want to obtain an initial recognition model with an accuracy of more than 95%, the training time will be 200 minutes. If the first node trains a pre-trained model in advance for 115 minutes, after obtaining the multiple enhanced samples, the pre-trained model is trained based on the multiple enhanced samples, and the training time for the initial recognition model with an accuracy of more than 95% is 95 minutes, which significantly shortens the time taken for model training in the evaluation process and improves the evaluation efficiency of the data enhancement operation.
[0236] Exemplarily, the process of the first node acquiring the pre-trained model is: the first node trains the initial model based on the multiple third samples to obtain the pre-trained model. Alternatively, the pre-trained model is trained by other devices other than the first node, and the first node acquires the pre-trained model from other devices. The embodiment of the present application does not limit the manner in which the first node acquires the pre-trained model. In addition, the first node only needs to acquire the pre-trained model once, without having to acquire it multiple times.
[0237] The pre-trained model trained by multiple third samples of objects of different types is applicable to enhanced samples of objects of different types. Therefore, even if the objects of the multiple enhanced samples belong to the same type or the same object, the first node can still train the initial recognition model by training the pre-trained model based on the multiple enhanced samples. Since the objects of the multiple enhanced samples belong to the same type or the same object, the trained initial recognition model has a better recognition effect when recognizing objects of the target type or other samples of the objects of the multiple enhanced samples.
[0238] Step 9023: The first node obtains an evaluation value of the initial data enhancement strategy based on the initial recognition model.
[0239] Exemplarily, the first node uses a plurality of fourth samples to test the initial recognition model, and obtains the accuracy of the initial recognition model based on the test results, and the first node obtains the accuracy of the initial recognition model as the evaluation value of the initial data enhancement strategy. Among them, the plurality of fourth samples are composed of data collected in the application scenario; if the types of objects of the plurality of second samples are different, then the types of objects of the plurality of fourth samples are different; if the objects of the plurality of second samples all belong to the target type, then the objects of the plurality of fourth samples also belong to the target type; if the objects of the plurality of second samples are the same object, then the objects of the plurality of fourth samples are the same as the objects of the plurality of second samples. The initial recognition model is also a recognition model trained by the enhanced samples obtained based on the initial data enhancement strategy, and the accuracy of the initial recognition model is the accuracy rate of the initial recognition model correctly identifying the objects of the plurality of fourth samples.
[0240] In a possible implementation, the first node inputs the multiple fourth samples into the initial recognition model, and the initial recognition model recognizes each fourth sample input and outputs the recognition result of each fourth sample. If the object indicated by the recognition result of a fourth sample is the same as the object indicated by the sample label of the fourth sample, then the fourth sample is correctly recognized, otherwise the fourth sample is incorrectly recognized. The first node counts the number of fourth samples correctly recognized by the initial model, divides the number of correctly recognized fourth samples by the total number of the multiple fourth samples, and obtains the accuracy of the initial recognition model. The first node uses the accuracy as the evaluation value of the initial data enhancement strategy.
[0241] In some embodiments, in addition to using the accuracy of the initial recognition model as the evaluation value of the initial data enhancement strategy, the first node can also use other evaluation indicators of the initial recognition model as the evaluation value of the initial data enhancement strategy, such as recall rate, F1 value or area under the curve (AUC) value. Here, the embodiments of the present application do not limit these other evaluation indicators.
[0242] In some embodiments, the process shown in step 902 is performed by a policy optimizer in the first node, for example Figure 2 The policy optimizer 1013 in the first node 101 is shown.
[0243] 903. The first node performs iterative calculation based on the initial data enhancement strategy to obtain multiple data enhancement strategies.
[0244] Any data enhancement strategy is used to indicate the operation probability and operation level of each data enhancement operation in the multiple data enhancement operations. During the i-th iterative calculation process, the first node determines the i-th data enhancement strategy among the multiple data enhancement strategies based on the data enhancement strategy determined in the previous i-1 iterative calculation process and each data enhancement strategy in the initial data enhancement strategy. Wherein, i is an integer greater than or equal to 1 or less than or equal to N, and N is the total number of iterative calculations. The i-th data enhancement strategy is the data enhancement strategy determined by the first node during the i-th iterative calculation process. Wherein, the data enhancement strategy determined in the previous i-1 iterative calculation process and each data enhancement strategy in the initial data enhancement strategy are, that is, the various historical data enhancement strategies determined by the first node at the current moment.
[0245] When i is equal to 1, that is, it is the first iterative calculation process, there is no first i-1 iterative calculation process, and the first node determines the i-th data enhancement strategy among the multiple data enhancement strategies based on the initial data enhancement strategy.
[0246] When i is not equal to 1, there are the first i-1 iterative calculation processes. The first node determines the i-1th data enhancement strategy among the multiple data enhancement strategies based on the data enhancement strategies determined in the first i-1 iterative calculation processes and each data enhancement strategy in the initial data enhancement strategy.
[0247] During the i-th iterative calculation process, the first node can determine at least one i-th data enhancement strategy. In the process of determining an i-th data enhancement strategy, the first node first predicts the operation level and operation probability of each data enhancement operation in the i-th data enhancement strategy, and then generates the i-th data enhancement strategy based on the predicted operation level and operation probability of each data enhancement operation in the i-th data enhancement strategy. In a possible implementation, the i-th iterative calculation process is implemented by the process shown in the following steps 9031-9033.
[0248] Step 9031: For any data enhancement operation among the multiple data enhancement operations, the first node predicts the operation level of any data enhancement operation in the i-th data enhancement strategy based on the multiple operation levels of the any data enhancement operation in the respective data enhancement strategies and the multiple evaluation values of the respective data enhancement strategies. The evaluation value of any data enhancement strategy is used to indicate the quality of the recognition model trained by the enhanced samples obtained based on the any data enhancement strategy.
[0249] Among them, each data enhancement strategy is the data enhancement strategy determined in the previous i-1 iterative calculation process and each data enhancement strategy in the initial data enhancement strategy, that is, each historical data enhancement strategy.
[0250] In order to make each change distribution of the enhanced samples finally obtained conform to each change distribution of each sample collected in the application scenario, the change distribution of the operation intensity of each data enhancement operation in the predicted i-th data enhancement strategy and the change distribution of the operation probability must conform to the change distribution of each sample collected in the application scenario. It is generally believed that each change distribution of each sample collected in the application scenario conforms to the normal distribution, that is, the Gaussian distribution. Optionally, the first node fits the multivariate Gaussian distribution obeyed by the multiple operation levels of each data enhancement operation in each data enhancement strategy through the Gaussian distribution obeyed by each data enhancement operation in each data enhancement strategy, so as to predict the new operation level of each data enhancement operation. Among them, the new operation level of each data enhancement operation is also the operation level of each data enhancement operation in the i-th data enhancement strategy.
[0251] In a possible implementation, step 9031 is implemented by the following steps A1-A2.
[0252] Step A1: The first node determines the multivariate Gaussian distribution obeyed by the operation level of any data enhancement operation in the i-th data enhancement strategy based on the multiple operation levels and the multiple evaluation values.
[0253] The multiple operation levels correspond to the multiple evaluation values one by one, wherein any operation level in the multiple operation levels corresponds to the evaluation value of the data enhancement strategy to which the any operation level belongs. Each operation level in the multiple operation levels obeys a Gaussian distribution, and the Gaussian distribution obeyed by each operation level is a value range of the evaluation value corresponding to each operation level, and the evaluation value corresponding to each operation level is regarded as the average value of the Gaussian distribution obeyed by each operation level.
[0254] The Gaussian process is a generalization of the multivariate Gaussian probability distribution. It is first assumed that there is a prior distribution p(f|X) for the intensity level of any data enhancement operation in the multiple data enhancement strategies, as shown in the following formula (1).
[0255]
[0256] Where X is a set of strength levels of any data enhancement operation in the multiple data enhancement strategies, expressed as X = {x0, x1, ..., x i-1}, x0 is the intensity level of any data enhancement operation in the initial data enhancement strategy, x1 is the intensity level of any data enhancement operation in the first data enhancement strategy, x i-1 is the intensity level of any data enhancement operation in the i-1th data enhancement strategy; f is a set of function values of a mapping function, which is a function between the intensity level of any data enhancement operation and the evaluation value of the data enhancement strategy to which the data enhancement operation belongs, or it is considered that the evaluation value of the data enhancement strategy to which the data enhancement operation belongs is also the function value of the mapping function, then f is expressed as f={f(x0), f(x1), ..., f(x i-1 )}; μ is the mean of X, K is the sum of k pq The covariance matrix composed of k pq = k(x p , x q ), used to represent the x in X p With x q The similarity distance (that is, the degree of similarity) between p is the pth intensity level in X, x q is the qth intensity level in X, 0≤p≤i-1, 0≤q≤i-1. Optionally, k(x p , x q ) = exp(-γ|||x p -x q || 2 ),||x p -x q || is x p With x q γ is the smoothing factor, which is usually a decimal to reduce the adverse effects of extreme values.
[0257] Since the Gaussian process is a set of random variables, any finite number of random variables satisfies a joint Gaussian distribution. Then, the first node determines, based on the multiple operation levels and the multiple evaluation values, that the multiple operation levels and the operation level of any one of the data enhancement strategies in the i-th data enhancement operation strategy obey the joint distribution shown in the following formula (2).
[0258]
[0259] Where Y is the set of function values of the observed unknown function, that is, the set of evaluation values of each historical data enhancement strategy, then Y = {f(x0), f(x1), ..., f(x i-1 )}, is the evaluation value of the predicted i-th data enhancement strategy, is the strength level of any data enhancement strategy in the predicted i-th data enhancement strategy, m(X) is the mean function of X, for Mean function of the mean, K ** for and The similarity distance between * for Similar distances to each x in X, For each x in X and Similar distances.
[0260] Based on the above formula (2), the first node predicts the multivariate Gaussian distribution obeyed by the operation level of any data enhancement operation in the i-th data enhancement strategy, that is, predicts the value range of the evaluation value of the i-th data enhancement strategy. Among them, the multivariate Gaussian distribution obeyed by the operation level of any data enhancement operation in the predicted i-th data enhancement strategy is As shown in the following formula (3).
[0261]
[0262] Among them, μ * is the mean of the Gaussian distribution of the predicted evaluation value of the i-th data enhancement strategy, ∑ * is the variance of the Gaussian distribution of the predicted evaluation value of the i-th data augmentation strategy.
[0263] Step A2: Under the multivariate Gaussian distribution obeyed by the operation level of any data enhancement operation, the first node determines the operation level that makes the acquisition function take the maximum value as the operation level of any data enhancement operation in the i-th data enhancement strategy.
[0264] In a possible implementation, the acquisition function is expressed by the following formula (4).
[0265] α(x)=μ * +β∑ * (4)
[0266] Where β is the control factor. The first node substitutes the intensity level of any data enhancement operation in each historical data enhancement strategy and the evaluation value of each historical data enhancement strategy into the above formula (4) to obtain the various function values of the acquisition function under multiple intensity levels of any configured data enhancement operation. Since x that makes the acquisition function take the maximum value has a greater probability of making y take the maximum value, x that makes the acquisition function take the maximum value is taken as Can make If a larger value is taken, the first node will determine the intensity level that makes the acquisition function take the maximum value as the operation level of any data enhancement operation in the i-th data enhancement strategy.
[0267] In some embodiments, the number of multiple intensity levels of any data enhancement operation configured is relatively large. In order to quickly determine the intensity level that can make the acquisition function take the maximum value from the multiple intensity levels of any data enhancement operation configured, the first node calculates the operation level that makes the acquisition function take the maximum value through an optimization algorithm. Optionally, the optimization algorithm is a quasi-Newton algorithm. The quasi-Newton algorithm is implemented by the python package scipy. In one possible implementation, the first node calls the scipy.optimize.minimize() function. Since the quasi-Newton algorithm is used to solve the x value corresponding to the minimization, the first node inputs the evaluation value of each data enhancement strategy and the operation level of any data enhancement operation in each historical data enhancement strategy, as well as -α(x) into the scipy.optimize.minimize() function, and the operation level of any data enhancement operation in the i-th data enhancement strategy can be calculated.
[0268] To further explain the process described in step 9031, see Fig.12 The distribution fitting process of the operation level of a data enhancement operation provided by the embodiment of the present application is shown. Assuming that the searched data enhancement strategy has only one random variable x, x is the strength level, and the evaluation value of the data enhancement strategy corresponding to x is y (that is, f(x)). For any data enhancement operation, the first node first randomly selects i strength levels x ( Fig.12 The black cross in the figure is the operation level of any data enhancement operation in each historical data enhancement strategy). Each y corresponding to x is understood as the probability distribution of an x value ( Fig.12 Curve 1 in the figure is the estimated mean curve of this probability distribution, the gray area is the probability distribution based on a specific mean, and curve 2 is a function curve that represents the corresponding relationship between the assessed intensity level x and the assessed value y). Since the y value corresponding to the black cross is a fixed value, the variance of the y value will be very small, and it can be seen that there is almost no gray area above and below the black cross.
[0269] for Fig.12 Curve 1 and the gray area in the figure, assuming that when a certain intensity level x is taken, the range of y values will vary within a certain Gaussian distribution range, where the mean of this Gaussian distribution is the value with the highest probability of y values, and the probability of y values higher than the mean point will gradually decrease, and the probability of y values lower than the mean will also gradually decrease. In other words, the y values corresponding to each intensity level x value are all such Gaussian distributions, the difference is that their means and variances are different. Curve 1 is a curve composed of the means of the distribution of y values corresponding to all intensity levels x, and the gray area is the area covered by the variance distance above and below the mean of the distribution of y values corresponding to all intensity levels x points, that is, the y values corresponding to different intensity levels x will appear in their corresponding gray areas, and the probability of appearing on curve 1 is the highest. As for the black cross, since the intensity level x and y value have been determined, the y value corresponding to the intensity level x must be on the mean line shown in Curve 1. At the same time, since it has been determined that its variance will be very small, that is, the probability that the corresponding y takes a value other than the determined value is very small, there is almost no gray area near the black cross.
[0270] Since the value of y corresponding to each intensity level x is a Gaussian distribution, the multivariate Gaussian distribution can be used to model the problem of "what kind of x should take what kind of y value". That is, the black cross obeys the multivariate Gaussian distribution described in the above formula (1), which is based on the multivariate Gaussian distribution composed of the known i black crosses. When we want to take the i+1th intensity level x (that is, ) corresponds to When the distribution of values is considered, the first node estimates the corresponding The distribution of , that is, we get the above formula (2). Then for a new K -1 , K ** Therefore, through the above formula (3), the first node can predict the new point Timely The probability distribution of the values of . The x value corresponding to the maximum value of the acquisition function α(x) shown in the above formula (4), where β is the control factor used to control how much weight is considered In the variance range, when β = 0, the first node only takes the value that makes Take the x value with the largest mean in the distribution and ignore The possibility of taking a larger value within the variance range. When β is larger, it means that the first node is more considered. The possibility of taking a larger value within the variance range, the subsequent first node can Based on this, continue to evaluate and obtain the corresponding The true value of the known x and y values will increase by one pair, which will make the y value calculated by the first node using the multivariate Gaussian distribution more and more accurate, and the estimated x * It is more likely to obtain a higher y value. With continuous iteration, the first node can obtain the x value corresponding to higher and higher y values. The x value corresponding to the highest y value is the desired x, which is the optimal intensity level of any numerical enhancement operation.
[0271] Step 9032: For any one of the data enhancement operations, the first node predicts the operation probability of any one of the data enhancement operations in the i-th data enhancement strategy based on multiple operation probabilities of the any one of the data enhancement operations in each of the data enhancement strategies and multiple evaluation values of each of the data enhancement strategies.
[0272] The first node fits the multivariate Gaussian distribution obeyed by the multiple operation probabilities of each data enhancement operation in each data enhancement strategy through the Gaussian distribution obeyed by the multiple operation probabilities of each data enhancement operation in each data enhancement strategy, so as to predict the new operation probability of each data enhancement operation. The new operation probability of each data enhancement operation is also the operation probability of each data enhancement operation in the i-th data enhancement strategy.
[0273] In a possible implementation, this step 9032 is implemented by the following steps B1-B2.
[0274] Step B1: The first node determines the multivariate Gaussian distribution obeyed by the operation probability of any data enhancement operation based on the multiple operation probabilities and the multiple evaluation values.
[0275] The process shown in this step B1 is the same as the process shown in the above step A1. The difference is that this step B1 uses the operation probability of any data enhancement operation as the random variable x, while the above step A1 uses the operation intensity of any data enhancement operation as the random variable x. Here, the embodiment of the present application does not elaborate on the process shown in this step B1.
[0276] Step B2: Under the multivariate Gaussian distribution obeyed by the operation probability of any data enhancement operation, the first node determines the operation probability that makes the acquisition function take the maximum value as the operation probability of any data enhancement operation in the i-th data enhancement strategy.
[0277] The process shown in this step B2 is the same as the process shown in the above step A2. The difference is that this step B2 uses the operation probability of any data enhancement operation as the random variable x, while the above step A2 uses the operation intensity of any data enhancement operation as the random variable x. Here, the embodiment of the present application does not elaborate on the process shown in this step B2.
[0278] Step 9033: The first node generates the i-th data enhancement strategy based on the predicted operation levels and operation probabilities of the multiple data enhancement operations.
[0279] The first node performs the process shown in steps 9031-9032 for each of the multiple data enhancement operations, so that the first node can obtain the predicted operation levels and operation probabilities of the multiple data enhancement operations. After the first node predicts the operation levels and operation probabilities of the multiple data enhancement operations, the first node packages the operation identifiers of the multiple data enhancement operations, the predicted operation levels and operation probabilities of the multiple data enhancement operations into the i-th data enhancement strategy.
[0280] After the first node determines the i-th data enhancement strategy, the first node also needs to obtain the evaluation value of the i-th data enhancement strategy. The first node adopts the i-th data enhancement strategy to perform data enhancement on the samples in the application scenario, and performs model training based on the enhanced samples after data enhancement, and evaluates the quality of the i-th data enhancement strategy through the trained recognition model. The process of the first node evaluating the i-th data enhancement strategy is implemented by the process described in the following steps C1-C3.
[0281] Step C1: The first node performs the multiple data enhancement operations on the multiple second samples based on the operation probabilities and operation levels of the multiple data enhancement operations in the i-th data enhancement strategy to obtain multiple enhanced samples of the multiple second samples.
[0282] The process shown in this step C1 is the same as the process shown in step 9011. Here, this embodiment of the application does not repeat this step C1.
[0283] Step C2: The first node obtains an i-th recognition model based on the multiple enhanced sample training.
[0284] The i-th recognition mode is a recognition model trained based on the enhanced samples obtained by the i-th data enhancement strategy. The process shown in step C2 is the same as the process shown in step 9022. Here, the embodiment of the present application does not repeat step C2.
[0285] Step C3: The first node obtains an evaluation value of the i-th data enhancement strategy based on the i-th recognition model.
[0286] The process shown in step C3 is the same as the process shown in step 9023. Here, the embodiment of the present application will not elaborate on step C3.
[0287] When the first node obtains the evaluation value of the i-th data enhancement strategy, if the data enhancement strategy determined in the previous i-th iteration process meets the preset conditions, the first node terminates the iterative calculation, otherwise the first node enters the i+1-th iterative calculation process. The preset conditions include at least one of the following: the total number of data enhancement strategies determined in the previous i-th iteration process reaches the target number; the average evaluation value of the data enhancement strategies determined in the previous i-th iteration process reaches the target evaluation value.
[0288] If the total number of data enhancement strategies determined by the previous i iterations reaches the target number, it means that the data enhancement strategies determined by the first node are sufficient. If the average evaluation value of the data enhancement strategies determined by the previous i iterations reaches the target evaluation value, it means that the data enhancement strategies determined by the previous i iterations are of sufficient quality. When the data enhancement strategies are sufficient and / or of sufficient quality, the first node terminates the iterative calculation.
[0289] It should be noted that the process shown in step 903 is a process in which the first node obtains multiple data enhancement strategies. In some embodiments, the process shown in step 903 is performed by a strategy optimizer in the first node, for example Figure 2 The policy optimizer 1013 in the first node 101 is shown.
[0290] 904. The first node determines the first target data enhancement strategy based on multiple data enhancement strategies, where the first target data enhancement strategy includes a target operation probability and a target operation level for each data enhancement operation in the multiple data enhancement operations.
[0291] Among them, the first target data enhancement strategy is an optimal data enhancement strategy finally determined by the first node.
[0292] In a possible implementation, the first node uses the data enhancement strategy with the highest evaluation value among the multiple data enhancement strategies as the first target data enhancement strategy. Since the multiple data enhancement strategies are all searched based on multiple configured data enhancement operations at multiple operation levels, the first target data enhancement strategy is one of the multiple data enhancement strategies, and therefore, the first target data enhancement strategy is also searched based on multiple configured data enhancement operations at multiple operation levels.
[0293] In another possible implementation, the first node first selects some data enhancement strategies from the multiple data enhancement strategies, and then determines the first target data enhancement strategy based on the selected data enhancement strategies. Optionally, the process shown in step 904 is implemented by the process shown in steps 9041-9042 below.
[0294] Step 9041: The first node selects multiple second target data enhancement strategies from the multiple data enhancement strategies based on the evaluation values of the multiple data enhancement strategies, and the evaluation values of the multiple second target data enhancement strategies are all higher than the evaluation values of the data enhancement strategies other than the multiple second target data enhancement strategies in the multiple data enhancement strategies.
[0295] Exemplarily, the first node sorts the evaluation values of the multiple data enhancement strategies, and determines a second target data enhancement strategy among the multiple data enhancement strategies based on the sorting result.
[0296] In one possible implementation, the first node sorts the evaluation values of the multiple data enhancement strategies in descending order of the evaluation values to obtain a first evaluation value sequence, and the first node uses the evaluation value ranked at the front target position in the first evaluation value sequence as the evaluation value of the second target data enhancement strategy, thereby the first node selects multiple second target data enhancement strategies from the multiple data enhancement strategies.
[0297] In one possible implementation, the first node sorts the evaluation values of the multiple data enhancement strategies in order from small to large to obtain a second evaluation value sequence, and the first node uses the evaluation value ranked at the rear target position in the second evaluation value sequence as the evaluation value of the second target data enhancement strategy, thereby the first node selects multiple second target data enhancement strategies from the multiple data enhancement strategies.
[0298] Among them, the target bit is an integer greater than 1, and the embodiment of the present application does not limit the number of target bits.
[0299] Step 9042: The first node generates the first target data enhancement strategy based on the multiple second target data enhancement strategies.
[0300] In a possible implementation, the process shown in step 9042 is implemented by the process shown in the following steps D1-D2.
[0301] Step D1: The first node determines target operation probabilities and target operation levels of the multiple data enhancement operations based on the operation probabilities and operation levels of the multiple data enhancement operations in the multiple second target data enhancement strategies.
[0302] The first node determines the target operation probability and target operation level of any data enhancement operation based on the clustering result of the strength level of any data enhancement operation. In a possible implementation, this step D1 is implemented by the process shown in the following steps D11-D12.
[0303] Step D11: For any one of the multiple data enhancement operations, the first node clusters multiple operation levels of the any one of the data enhancement operations in the multiple second target data enhancement strategies to obtain at least one operation level category.
[0304] In one possible implementation, the first node clusters the multiple operation levels of any data enhancement operation in the multiple second target data enhancement strategies based on a density clustering algorithm to obtain the at least one operation level category, wherein an operation level category includes at least one operation level of any data enhancement operation.
[0305] Optionally, the density clustering algorithm is a density-based spatial clustering method with noise (density-based spatial clustering of applications with noise, DBSCAN). DBSCAN is a density-based spatial clustering algorithm that can divide areas with sufficient density into clusters and find clusters of arbitrary shapes in a spatial database with noise. A cluster is the largest set of density-connected points (i.e., operation levels), and the operation level of any data enhancement operation in an operation level category is also a cluster.
[0306] For example, there are five intensity levels for any one of the data enhancement operations in the multiple second target data enhancement strategies, namely intensity levels 1, 3, 5, 6 and 7. Through DBSCAN, the first node clusters these five intensity levels to obtain operation level categories (i.e., clusters) 1 and 2, wherein operation level category 1 includes intensity levels 1 and 3, and operation level category 2 includes intensity levels 5, 6 and 7.
[0307] It should be noted that the first node may also use other types of clustering algorithms besides DBSCAN to cluster multiple operation levels of any data enhancement operation. Here, the embodiments of the present application do not limit other types of clustering algorithms besides DBSCAN.
[0308] Step D12: For any operation level category in the at least one operation level category, the first node determines the target operation intensity and the target operation probability of any data enhancement operation based on the operation level in the any operation level category and the operation probability of the any data enhancement operation within a third target data enhancement strategy among the multiple second target data enhancement strategies, where the third target data enhancement strategy is the second target data enhancement strategy to which the operation level of the any operation level category belongs.
[0309] In a possible implementation, the first node determines a target operation level of any one data enhancement operation based on the operation level in any one operation level category.
[0310] In some embodiments, the first node determines the minimum operation level and the maximum operation level in any operation level category; and determines each operation level greater than or equal to the minimum operation level and less than or equal to the maximum operation level as the target operation level of any data enhancement operation. Taking the above-mentioned operation level category 1 as an example, the minimum operation level in operation level category 1 is operation level 1, and the maximum operation level is operation level 3, then each operation level greater than or equal to the minimum operation level and less than or equal to the maximum operation level includes operation levels 1, 2, and 3, and the first node determines the operation levels 1-3 as the target operation levels of any data enhancement operation.
[0311] In some embodiments, the first node determines each operation level in any operation level category as the target operation level of any data enhancement operation. Taking the above-mentioned operation level category 1 as an example, the first node determines operation level 1 and operation level 3 in the operation level category 1 as the target operation level of any data enhancement operation.
[0312] In a possible implementation, the first node determines the target operation probability of any data enhancement operation based on the operation probability of the any data enhancement operation within a third target data enhancement strategy among the multiple second target data enhancement strategies.
[0313] Optionally, the first node determines the average probability of the operation probability of any data enhancement operation in the third target data enhancement strategy among the multiple second target data enhancement strategies as the target operation probability of any data enhancement operation. For example, if the operation level 1 includes operation levels 1 and 3, the operation probability of any data enhancement operation in the data enhancement strategy to which the operation level 1 belongs is 0.6, and the operation probability of any data enhancement operation in the data enhancement strategy to which the operation level 3 belongs (that is, the third target data enhancement strategy) is 0.4, when the target operation levels are operation levels 1 and 3, the target operation probability of any data enhancement operation is the average probability of 0.5 between 0.6 and 0.4.
[0314] Optionally, the product of the target operation probability and the number of operation levels in any one of the operation level categories is the sum of the operation probabilities corresponding to each operation level in any one of the operation level categories, wherein the operation probability corresponding to an operation level is the operation probability of any one of the data enhancement operations in the data enhancement strategy to which the operation level belongs. For example, if operation level 1 includes operation levels 1 and 3, the operation probability of any one of the data enhancement operations in the data enhancement strategy to which operation level 1 belongs is 0.6, and the operation probability of any one of the data enhancement operations in the data enhancement strategy to which operation level 3 belongs is 0.3, when the target operation levels are operation levels 1, 2, and 3, and operation level 2 does not belong to any data enhancement strategy, the default operation probability corresponding to operation level 2 is 0, and the target operation probability of any one of the data enhancement operations = (0.6 + 0.3) / 3 = 0.3.
[0315] Step D2: The first node generates the first target data enhancement strategy based on the determined target operation probabilities and target operation levels of the multiple data enhancement operations.
[0316] Exemplarily, the first node packages the operation identifiers, target operation probabilities, and target operation probabilities of the multiple data enhancement operations into the first target data enhancement strategy.
[0317] It should be noted that the process shown in step 904 is also the process of the first node acquiring the first target data enhancement strategy.
[0318] In some embodiments, the process shown in step 904 is performed by a policy optimizer in the first node, for example Figure 2 The optimal strategy generator 1014 in the first node 101 is shown.
[0319] 905. The first node performs the multiple data enhancement operations on the first sample within an operation intensity variation range indicated by the target operation levels of the multiple data enhancement operations based on the first target data enhancement strategy to obtain multiple target enhanced samples of the first sample.
[0320] The first sample is a sample composed of data collected in the application scenario. In some embodiments, the object of the first sample belongs to the same category as the object of the second sample, or the object of the first sample and the object of the second sample are the same object. In some other embodiments, the object of the first sample and the object of the second sample belong to different categories. The embodiment of the present application is explained by taking the example that the object of the first sample and the object of the second sample belong to the same category, that is, the object of the first sample belongs to the target category.
[0321] Before executing step 903, the first node may also obtain the first sample, for example, Figure 6 In the cloud scenario shown, the first node obtains the first sample uploaded by the application node through the target interface. Of course, in some embodiments, the first sample can also be a sample stored locally by the first node, and the first node obtains the first sample from the locally stored sample.
[0322] The first node performs the multiple data enhancement operations on the first sample based on the target operation probability and the target operation level of each data enhancement operation in the multiple data enhancement operations in the first target data enhancement strategy to obtain the multiple target enhancement samples, wherein the target enhancement sample with the target operation probability of any data enhancement operation in the multiple target enhancement samples has undergone any data enhancement operation.
[0323] For any data enhancement operation, the first node performs the any data enhancement operation on the first sample based on the target operation probability of the any data enhancement operation and within the operation intensity variation interval indicated by the target operation level of the any data enhancement operation. This process is similar to the process in the above step 9021 in which the first node performs the any data enhancement operation on the multiple second samples based on the operation probability of the any data enhancement operation and within the operation intensity variation interval indicated by the operation level of the any data enhancement operation. Here, this embodiment of the present application does not elaborate on this process.
[0324] In some embodiments, the process shown in step 905 is performed by a policy optimizer in the first node, for example Figure 2 The optimal strategy generator 1014 in the first node 101 is shown.
[0325] 906. The first node obtains a target recognition model based on multiple target enhancement sample training.
[0326] The target recognition model is the model ultimately used to identify samples in the application scenario. After acquiring the target recognition model, the first node associates and stores the target recognition model with the type identifier of the target type so that the target recognition model can be subsequently used in sample identification of objects of the target type.
[0327] The process shown in step 906 is similar to the process in step 9022 in which the first node obtains an initial recognition model based on the training of multiple enhanced samples of the multiple second samples. In this embodiment of the present application, step 906 is not described in detail. In some embodiments, the process shown in step 906 is performed by the policy optimizer in the first node, for example Figure 2 The optimal strategy generator 1014 in the first node 101 is shown.
[0328] It should be noted that, in the cloud scenario, after the first node obtains the first target data enhancement strategy, the first node can also send the multiple target enhancement samples to the application node through the target interface, and the application node executes the process shown in step 906, for example Figure 6 The cloud scene shown.
[0329] The data enhancement method provided in the embodiment of the present application processes samples through multiple data enhancement operations in the data enhancement strategy, and can obtain multiple target enhanced samples, thereby achieving the purpose of expanding the samples. In addition, since multiple data enhancement operations are performed on the samples within the operation intensity variation range indicated by the target operation levels of the multiple data enhancement operations, the multiple target enhanced samples obtained can vary within the operation intensity variation range indicated by the target operation levels of the multiple data enhancement operations, thereby improving the diversity of the samples.
[0330] Above Fig. 9 The process shown is a process in which the first node alone completes data enhancement when the first node has the functions of each node in the data enhancement system. In some other embodiments, the data enhancement process is completed by each node in the data enhancement system in collaboration. To further illustrate the process, see Fig.13 A flow chart of a data enhancement method provided in an embodiment of the present application is shown.
[0331] 1301. The first node obtains an initial data enhancement strategy.
[0332] The process shown in this step 1301 is the same as the process shown in the above step 901. Here, this embodiment of the application does not repeat this step 1301.
[0333] In some embodiments, the process shown in step 904 is performed by a policy optimizer in the first node, for example Figure 2 The policy optimizer 1013 in the first node 101 is shown.
[0334] 1302. The first node sends the initial data enhancement strategy to the second node.
[0335] 1303. The second node evaluates the received initial data enhancement strategy to obtain an evaluation value of the initial data enhancement strategy.
[0336] The process shown in this step 1303 is the same as the process shown in the above step 902. Here, this embodiment of the application does not repeat this step 1303.
[0337] 1304. The second node sends an evaluation value of the initial data enhancement strategy to the first node.
[0338] 1305. When i is equal to 1, during the first iterative calculation process, the first node determines the first data enhancement strategy among the multiple data enhancement strategies based on the initial data enhancement strategy.
[0339] The process shown in this step 1305 is the same as the process shown in the above steps 9031-9033. Here, this embodiment of the application does not repeat this step 1305.
[0340] 1306. The first node sends the first data enhancement strategy to the second node.
[0341] 1307. The second node evaluates the received first data enhancement strategy to obtain an evaluation value of the first data enhancement strategy.
[0342] The process shown in step 1307 is the same as the process shown in step 902 above, and the present embodiment of the application does not repeat step 1307. In some embodiments, the process shown in step 904 is performed by the policy optimizer in the first node, for example Figure 2 The policy optimizer 1013 in the first node 101 is shown.
[0343] 1308. The second node sends the evaluation value of the first data enhancement strategy to the first node.
[0344] 1309. When i is not equal to 1, during the i-th iterative calculation process, the first node determines the i-th data enhancement strategy based on the data enhancement strategy determined in the previous i-1 iterative calculation process and each data enhancement strategy in the initial data enhancement strategy.
[0345] The process shown in step 1309 is the same as the process shown in steps 9031-9033 above. Here, the embodiment of the present application does not repeat step 1309. In some embodiments, the process shown in step 904 is performed by the policy optimizer in the first node, for example Figure 2 The policy optimizer 1013 in the first node 101 is shown.
[0346] 1310. The first node sends the i-th data enhancement strategy to the second node.
[0347] 1311. The second node evaluates the received i-th data enhancement strategy to obtain an evaluation value of the i-th data enhancement strategy.
[0348] The process shown in this step 1311 is the same as the process shown in the above step 902. Here, this embodiment of the application does not repeat this step 1311.
[0349] 1312. The second node sends the evaluation value of the i-th data enhancement strategy to the first node.
[0350] For the process shown in 1309-1312 above, in some embodiments, after the first node obtains multiple data enhancement strategies during each iteration, the first node sends the multiple data enhancement strategies to different second nodes, and different second nodes evaluate different data enhancement strategies to achieve distributed evaluation.
[0351] In a possible implementation, if the first node obtains multiple i-th data enhancement strategies, the first node sends at least one i-th data enhancement strategy to multiple second nodes respectively, and each second node evaluates each received i-th data enhancement strategy based on the process shown in the following step 1311, so that the first node subsequently receives the evaluation value of at least one i-th data enhancement strategy from the multiple second nodes respectively. At this time, the second node is also an evaluation device, which is used to evaluate the data enhancement strategy sent by the first node.
[0352] For example Fig.14 A schematic diagram of a data enhancement system provided by an embodiment of the present application is shown. Each time the first node generates a data enhancement strategy, the data enhancement strategy is sent to the second node. The second node adopts the received data enhancement strategy to perform data enhancement on samples obtained from the data server to obtain multiple enhanced samples, and trains and tests the recognition model based on the multiple enhanced samples, and returns the evaluation value of the data enhancement strategy to the first node.
[0353] In some embodiments, a scheduling node is also provided in the data enhancement system. During each evaluation of a data enhancement strategy by the second node, the second node sends the evaluation value of the data enhancement strategy to the scheduling node. If the evaluation value of the data enhancement strategy is lower than the target evaluation value, the data enhancement strategy is considered not optimal, and the scheduling node instructs the second node not to return the evaluation value of the data enhancement strategy to the first node. If the first node does not receive the evaluation value of the data enhancement strategy from the second node, the first node abandons the data enhancement strategy so that the evaluation values of multiple data enhancement strategies ultimately determined by the first node are greater than or equal to the target evaluation value, that is, the multiple data enhancement strategies ultimately determined by the first node are all relatively optimal. In some embodiments, after the second node receives a data enhancement strategy, if the scheduling node does not obtain the evaluation value of the data enhancement strategy for a long time, it is considered that the second node has a problem in the process of evaluating the data enhancement strategy, for example, the second node cannot train a recognition model based on the enhanced samples obtained by the data enhancement strategy for a long time, and the scheduling node instructs the second node to end the evaluation process of the data enhancement strategy and proceed to the evaluation process of the next data enhancement strategy. For example Fig.14The scheduling node in .
[0354] 1313. When the multiple data enhancement strategies determined after multiple iterations meet the preset conditions, the first node sends the multiple data enhancement strategies to the third node.
[0355] In some embodiments, the first node does not send the multiple data enhancement policies to the third node after obtaining the multiple data enhancement policies, but the first node sends the multiple data enhancement policies to the third node every time it obtains a data enhancement policy. The embodiment of the present application does not limit the timing when the first node sends the multiple data enhancement policies to the third node.
[0356] In some embodiments, in addition to sending the multiple data enhancement strategies to the third node, the first node also sends the initial data enhancement strategy to the third node.
[0357] 1314. The third node determines the first target data enhancement strategy based on the received multiple data enhancement strategies.
[0358] The process shown in this step 1314 is the same as the process shown in the above step 904. Here, this embodiment of the application does not elaborate on this step 1314.
[0359] 1315. The third node sends the first target data enhancement strategy to the application node.
[0360] 1316. The application node obtains a target recognition model based on the first target data enhancement strategy.
[0361] In a possible implementation, the application node performs multiple data enhancement operations on the first sample based on the first target data enhancement strategy to obtain multiple target enhanced samples of the first sample, and the application node trains the target recognition model based on the multiple target enhanced samples of at least one first sample. This process is similar to the process shown in steps 905 and 906 above, and the present embodiment of the application does not repeat this step 1316.
[0362] Since there may be multiple target intensity levels for any data enhancement operation in the first target data enhancement strategy, and each target intensity level corresponds to an intensity variation interval, the enhanced samples obtained based on the first target data enhancement strategy will present a variation distribution. Fig.15 A schematic diagram of data change distribution provided by an embodiment of the present application is shown in Fig.15In the figure, the horizontal axis is the rotation angles of the rotation operation, and the vertical axis is the proportion of the enhanced samples after the rotation operation of the multiple enhanced samples at different rotation angles. The distribution formed by curve 1 is the change distribution of the real data in the application scenario, and the distribution formed by curve 2 is the change distribution of the data of the enhanced samples obtained by the first target data enhancement operation. Fig.15 The vertical line in the figure is the distribution of the data changes of the enhanced samples obtained by using the data enhancement strategy provided by the relevant technology. Fig.15 It can be seen that the vertical line can only cover a very small part of the real data change distribution in this application scenario, while the data change distribution of the enhanced sample obtained by the first target data enhancement operation can cover a larger range of the real data change distribution. Therefore, the subsequent enhanced samples generated based on the first target data enhancement strategy can better simulate the real data, and the recognition model trained by the enhanced samples based on the first target data enhancement strategy has stronger generalization ability and is more adaptable to real application scenarios.
[0363] In addition, in the image application scenario, the change distribution of the data enhancement operation in the first target data enhancement strategy can also be expressed as the change distribution of the pixel value of the enhanced sample. For example, if the data enhancement operation is a sharpening operation, when the sharpening operation is implemented, the color contrast on both sides of the contour of the relevant part of the contour line of the object in the image (sample) will be improved. For example, if the sample is an image of a bird, after the image is subjected to a strong sharpening operation, taking the pixels near the bird's beak in the image (enhanced sample) obtained after the strong sharpening operation as an example, the black and white contrast near the bird's beak in the original image is not strong, and the black and white contrast near the bird's beak in the image obtained after the strong sharpening operation will be stronger, and these contrasts can be reflected in the changes of each related pixel. Furthermore, because pixels are composed of red, green, blue (RGB) triplets, there are three numbers in the triplet ranging from 0 to 256, representing the intensity of the three colors of red, green, and blue at the pixel position, therefore, the change distribution of the data enhancement operation can be expressed as the change distribution of the pixel value of the enhanced sample.
[0364] For example Fig.16 The embodiment of the present application provides a distribution diagram of a specific pixel value change when a sharpening operation is changed. Taking the sharpening operation as an example, Fig.16The distribution of changes in the value of a certain pixel in an image enhanced by the data enhancement method of the present application is shown in the figure, and the distribution of changes in the value of the specific pixel in the image enhanced by the sharpening operation provided by the relevant technology is also shown. The horizontal axis is the value of the specific pixel after the image data is enhanced into several enhanced images (due to mapping reasons, in order to present a contrast effect, the values on the horizontal axis are multiplied by 100), and the vertical axis is the number of enhanced images that take the value at the specific pixel after the image data is enhanced into several enhanced images, that is, the distribution of values at the specific pixel after the image is enhanced (i.e., the distribution of changes in data enhancement). It can be seen that the data enhancement by the relevant technology can only bring limited changes, while the data changes brought about by the data enhancement performed by the present application are presented as a distribution, and there are infinitely many change points in this distribution. On the other hand, since different data enhancement strategies are evaluated using samples of different object types in the embodiment of the present application during the evaluation of the data enhancement strategy, the data enhancement strategies corresponding to different object types are different. As shown in FIG. Fig.16 In the figure, the distribution of pixel changes of birds and airplanes is different, and the related technology can only use the same data enhancement strategy for different object types, so no matter it is a bird or an airplane, the pixel changes after the related technology data enhancement are the same.
[0365] It should be noted that the process shown in steps 1314-1316 is that the first node sends multiple data enhancement strategies to the third node, and the third node determines the first target data enhancement strategy based on the received multiple data enhancement strategies, and sends it to the application node, and the application node obtains the first target data enhancement strategy from the third node. In some other embodiments, the first node determines the first target data enhancement strategy based on multiple data enhancement strategies, and sends the determined first target data enhancement strategy to the application node. The application node performs data enhancement on multiple samples obtained from the data server based on the first target data enhancement strategy to obtain enhanced samples, and performs model training based on the multiple enhanced samples, and deploys the trained recognition model to the service, for example Fig.14 A first node and an application node in a data enhancement system are shown.
[0366] The data enhancement method provided in the embodiment of the present application completes the data enhancement process through the collaboration of multiple nodes. Since multiple nodes work in parallel, the efficiency of the data enhancement system in performing data enhancement is improved.
[0367] It should be noted that the data enhancement strategy provided in the relevant technology and the data enhancement strategy provided in this application are used to enhance the data of the samples in the public data set CIFAR10NEI. When the artificial baseline of the accuracy of the trained recognition model is 92.1%, the enhanced sample obtained by the data enhancement strategy provided by the relevant technology has an accuracy of 92.3% for the trained recognition model, and the enhanced sample obtained by the data enhancement strategy provided by this application has an accuracy of 96.1% for the trained recognition model. It can be seen that the accuracy of the recognition model trained by the data enhancement strategy provided by this application can be improved by 4%. In addition, the search time used to search for the final data enhancement strategy in the relevant technology is 5000 GPU hours, while this application performs distributed evaluation in the process of searching for the final data enhancement strategy, and is trained based on the pre-trained model during the evaluation process. The search time used by this application to search for the final data enhancement strategy is 114 GPU hours, which saves 50 times compared to the search time in the relevant technology. Among them, the accuracy of the recognition model and the search time of the data enhancement strategy are compared, as shown in Table 1 below.
[0368] Table 1
[0369] Comparison parameters Artificial baseline Related technologies This application Accuracy 92.1% 92.3% 96.1% Search time 5000 GPU hours 114 GPU hours
[0370] Fig.17 1700 is a schematic diagram of a data enhancement device provided in an embodiment of the present application. The device 1700 includes:
[0371] An acquisition module 1701 is used to acquire a first target data enhancement strategy, where the first target data enhancement strategy is used to indicate a target operation level of a data enhancement operation, and a target operation level is used to indicate an operation intensity variation interval;
[0372] The enhancement module 1702 is used to perform the multiple data enhancement operations on the first sample within the operation intensity variation range indicated by the target operation levels of the multiple data enhancement operations based on the first target data enhancement strategy to obtain multiple target enhanced samples of the first sample.
[0373] In a possible implementation, for any data in the first sample, any data in the multiple target enhanced samples undergoes a change corresponding to any data enhancement operation, which is within an operation intensity change interval indicated by a target intensity level of any data enhancement operation.
[0374] In a possible implementation, the first target data enhancement strategy is obtained by searching for multiple operation levels of the configured multiple data enhancement operations, and any data enhancement operation is configured with multiple operation levels, and one operation level is used to indicate an intensity variation interval.
[0375] In one possible implementation, the first target data enhancement strategy is determined based on multiple data enhancement strategies, and the multiple data enhancement strategies are searched based on multiple operation levels of the configured multiple data enhancement operations. Any data enhancement operation is configured with multiple operation levels, and one operation level is used to indicate an intensity variation interval.
[0376] In a possible implementation, the multiple data enhancement strategies are evaluated by multiple evaluation devices.
[0377] In a possible implementation manner, the objects of the second samples used in the evaluation of the multiple data enhancement strategies are the same object, or are objects of the same type.
[0378] In a possible implementation, the multiple operation levels configured for any one of the data enhancement operations are obtained based on a target operation intensity variation range for any one of the data enhancement operations, and the target operation intensity variation range for any one of the data enhancement operations is configured by a configuration device.
[0379] Optionally, the device 1700 further includes:
[0380] a division module, configured to divide, for any one of the multiple data enhancement operations, a target operation intensity variation range corresponding to the any one of the data enhancement operations into a plurality of operation intensity variation intervals;
[0381] A configuration module is used to configure an operation level for each operation intensity variation interval in the multiple operation intensity variation intervals.
[0382] Optionally, the first target data enhancement strategy is further used to indicate a target operation probability of each data enhancement operation in the multiple data enhancement operations, and the target operation probability of any data enhancement operation is a probability of performing any data enhancement operation on the first sample;
[0383] The acquisition module 1701 is used for:
[0384] Based on multiple data enhancement strategies, the first target data enhancement strategy is determined, and any data enhancement strategy is used to indicate the operation probability and operation level of each data enhancement operation in the multiple data enhancement operations, and the operation probability of any data enhancement operation is the probability of performing any data enhancement operation on the second sample.
[0385] Optionally, the acquisition module 1701 includes:
[0386] A selection submodule, configured to select a plurality of second target data enhancement strategies from the plurality of data enhancement strategies based on the evaluation values of the plurality of data enhancement strategies, wherein the evaluation values of the plurality of second target data enhancement strategies are all higher than the evaluation values of the data enhancement strategies other than the plurality of second target data enhancement strategies among the plurality of data enhancement strategies, and the evaluation value of any data enhancement strategy is used to indicate the quality of a recognition model trained by an enhanced sample obtained based on any data enhancement strategy;
[0387] A generating submodule is used to generate the first target data enhancement strategy based on the multiple second target data enhancement strategies.
[0388] Optionally, the generating submodule includes:
[0389] a determining unit, configured to determine target operation probabilities and target operation levels of the multiple data enhancement operations based on the operation probabilities and operation levels of the multiple data enhancement operations in the multiple second target data enhancement strategies;
[0390] A generating unit is used to generate the first target data enhancement strategy based on the determined target operation probabilities and target operation levels of the multiple data enhancement operations.
[0391] Optionally, the determining unit includes:
[0392] a clustering subunit, configured to cluster, for any one of the data enhancement operations, a plurality of operation levels of any one of the data enhancement operations in the plurality of second target data enhancement strategies to obtain at least one operation level category;
[0393] A determination subunit is used to determine, for any operation level category in the at least one operation level category, a target operation intensity and a target operation probability of any data enhancement operation based on the operation level in the any operation level category and the operation probability of any data enhancement operation within a third target data enhancement strategy among the multiple second target data enhancement strategies, wherein the third target data enhancement strategy is the second target data enhancement strategy to which the operation level of any operation level category belongs.
[0394] Optionally, the determining subunit includes:
[0395] A first determining element, configured to determine a target operation level of any one of the data enhancement operations based on the operation level in any one of the operation level categories;
[0396] The second determining element is used to determine the target operation probability of any data enhancement operation based on the operation probability of any data enhancement operation in the third target data enhancement strategy among the multiple second target data enhancement strategies.
[0397] Optionally, the first determining element is used to:
[0398] Determining a minimum operation level and a maximum operation level in any of the operation level categories;
[0399] Each operation level that is greater than or equal to the minimum operation level and less than or equal to the maximum operation level is determined as a target operation level of any one of the data enhancement operations.
[0400] Optionally, the first determining element is used to:
[0401] Each operation level in any one of the operation level categories is determined as a target operation level for any one of the data enhancement operations.
[0402] Optionally, the target operation probability of any one of the data enhancement operations is an average probability of the operation probability of any one of the data enhancement operations within the third target data enhancement strategy among the multiple second target data enhancement strategies.
[0403] The device 1700 further includes:
[0404] The iterative module is used to perform iterative calculation based on the initial data enhancement strategy to obtain the multiple data enhancement strategies.
[0405] Optionally, the iteration module is used to:
[0406] During the i-th iterative calculation process, based on the data enhancement strategies determined in the previous i-1 iterative calculation process and each data enhancement strategy in the initial data enhancement strategy, the i-th data enhancement strategy among the multiple data enhancement strategies is determined, wherein i is an integer greater than or equal to 1 or less than or equal to N, and i is the total number of iterative calculations.
[0407] Optionally, the iteration module includes:
[0408] A first prediction submodule is used to predict, for any one of the data enhancement operations, an operation level of any one of the data enhancement operations in the i-th data enhancement strategy based on a plurality of operation levels of any one of the data enhancement operations in the respective data enhancement strategies and a plurality of evaluation values of the respective data enhancement strategies, wherein the evaluation value of any one of the data enhancement strategies is used to indicate the quality of a recognition model trained by an enhanced sample obtained based on any one of the data enhancement strategies;
[0409] A second prediction submodule, for predicting, for any one of the data enhancement operations, an operation probability of any one of the data enhancement operations in the i-th data enhancement strategy based on a plurality of operation probabilities of any one of the data enhancement operations in the respective data enhancement strategies and a plurality of evaluation values of the respective data enhancement strategies;
[0410] A generating submodule is used to generate the i-th data enhancement strategy based on the predicted operation levels and operation probabilities of the multiple data enhancement operations.
[0411] Optionally, the first prediction submodule is used to:
[0412] Determine, based on the multiple operation levels and the multiple evaluation values, a multivariate Gaussian distribution to which the operation level of any one of the data enhancement operations obeys;
[0413] Under the multivariate Gaussian distribution obeyed by the operation level of any one of the data enhancement operations, the operation level that makes the acquisition function take the maximum value is determined as the operation level of any one of the data enhancement operations in the i-th data enhancement strategy.
[0414] Optionally, the second prediction submodule is used to:
[0415] Based on the multiple operation probabilities and the multiple evaluation values, determine a multivariate Gaussian distribution obeyed by the operation probability of any one of the data augmentation operations;
[0416] Under the multivariate Gaussian distribution obeyed by the operation probability of any one of the data enhancement operations, the operation probability that makes the acquisition function take the maximum value is determined as the operation probability of any one of the data enhancement operations in the i-th data enhancement strategy.
[0417] The device 1700 further includes:
[0418] an obtaining module, configured to perform the multiple data enhancement operations on the multiple second samples based on the operation probabilities and operation levels of the multiple data enhancement operations in the i-th data enhancement strategy, to obtain multiple enhanced samples of the multiple second samples;
[0419] A training module, used for training and obtaining an i-th recognition model based on the multiple enhanced samples;
[0420] A target acquisition module is used to obtain an evaluation value of the i-th data enhancement strategy based on the i-th recognition model.
[0421] Optionally, the training module is used to:
[0422] Based on the multiple enhanced samples, a pre-trained model is trained to obtain the i-th recognition model, the pre-trained model is trained by multiple third samples of multiple objects of different types, and the accuracy of the pre-trained model is less than an accuracy threshold.
[0423] Optionally, the object of the first sample and the object of the second sample belong to the same category, or the object of the first sample and the object of the second sample are the same object.
[0424] Optionally, the device 1700 further includes:
[0425] A first sending module, configured to send at least one i-th data enhancement operation strategy to a plurality of evaluation devices respectively;
[0426] The first receiving module is configured to receive evaluation values of the at least one i-th data enhancement operation strategy from the multiple evaluation devices respectively.
[0427] Optionally, the first target data enhancement strategy is further used to indicate a target operation probability of each data enhancement operation in the multiple data enhancement operations, and the target operation probability of any data enhancement operation is a probability of performing any data enhancement operation on the first sample;
[0428] The enhancement module 1702 is used to:
[0429] Based on the target operation probability and the target operation level of each of the multiple data enhancement operations, the multiple data enhancement operations are performed on the first sample, wherein the target enhancement sample with the target operation probability of any data enhancement operation has performed any of the data enhancement operations.
[0430] Optionally, the enhancement module 1702 is used to:
[0431] For any one of the data enhancement operations, based on a target operation probability of the data enhancement operation, the first sample is subjected to any one of the data enhancement operations within an operation intensity variation interval indicated by a target operation level of the data enhancement operation.
[0432] Optionally, the device 1700 further includes:
[0433] A second receiving module, configured to obtain the first sample from an application node through a target interface;
[0434] The second sending module is used to send the multiple target enhanced samples to the application node through the target interface.
[0435] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0436] It should be noted that: the data enhancement device provided in the above embodiment only uses the division of the above functional modules as an example when performing data enhancement. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the data enhancement method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0437] An embodiment of the present application also provides a computer program product or a computer program, which includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computing device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computing device performs the above-mentioned data enhancement method.
[0438] It should be noted that those skilled in the art can realize that the units, modules, chips and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0439] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device, module or unit described above can refer to the corresponding process in the data enhancement method embodiment, and will not be repeated here.
[0440] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules within the device or units in the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0441] The modules or units described as separate components may or may not be physically separated, and the components displayed as modules or units may or may not be physical modules or physical units, that is, they may be located in one place or distributed to multiple computing devices. Some or all of the modules or units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0442] In addition, each functional module or unit in each embodiment of the present invention may be integrated into a target processing module, or each module or unit may exist physically separately, or two or more modules or units may be integrated into a target processing module. The above-mentioned integrated modules or units may be implemented in the form of hardware or in the form of software functional units.
[0443] A person skilled in the art will appreciate that all or part of the steps for implementing the above embodiments may be accomplished by hardware or by hardware associated with program instructions, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0444] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A data enhancement method, characterized in that: Executed by the first node, the method includes: Acquire a first target data enhancement strategy, where the first target data enhancement strategy is used to indicate a target operation level of a data enhancement operation, where one target operation level is used to indicate an operation intensity variation interval, where the first target data enhancement strategy is determined based on a plurality of data enhancement strategies, where the plurality of data enhancement strategies are searched based on a plurality of operation levels of a plurality of configured data enhancement operations, where any one of the data enhancement operations is configured with a plurality of operation levels, where one operation level is used to indicate an operation intensity variation interval, and where the operation intensity variation intervals indicated by the plurality of operation levels are respectively a sub-interval of a target operation intensity variation range of any one of the data enhancement operations; Based on the first target data enhancement strategy, within the operation intensity variation range indicated by the target operation levels of the multiple data enhancement operations, the multiple data enhancement operations are performed on the first sample to obtain multiple target enhanced samples of the first sample, where the first sample is an image and the target enhanced samples are enhanced images.
2. The method according to claim 1, characterized in that The multiple data enhancement strategies are evaluated by multiple evaluation devices.
3. The method according to claim 2, characterized in that The objects of the second samples used in the evaluation of the multiple data enhancement strategies are the same object, or objects of the same type.
4. The method according to any one of claims 1 to 3, characterized in that: The multiple operation levels configured for any one of the data enhancement operations are obtained based on a target operation intensity variation range for any one of the data enhancement operations, and the target operation intensity variation range for any one of the data enhancement operations is configured by a configuration device.
5. The method according to claim 4, characterized in that The configuration process of any of the data enhancement operations includes: Dividing a target operation intensity variation range of any one of the data enhancement operations into a plurality of operation intensity variation intervals; An operation level is configured for each of the plurality of operation intensity variation intervals.
6. The method according to claim 1, characterized in that The first target data enhancement strategy is further used to indicate a target operation probability of each data enhancement operation in the multiple data enhancement operations, and the target operation probability of any data enhancement operation is a probability of performing any data enhancement operation on the first sample; Any data enhancement strategy among the multiple data enhancement strategies is used to indicate the operation probability and operation level of each data enhancement operation among the multiple data enhancement operations, and the operation probability of any data enhancement operation is the probability of performing any data enhancement operation on the second sample.
7. The method according to claim 6, characterized in that Based on the multiple data enhancement strategies, determining the first target data enhancement strategy includes: Based on the evaluation values of the multiple data enhancement strategies, multiple second target data enhancement strategies are selected from the multiple data enhancement strategies, the evaluation values of the multiple second target data enhancement strategies are all higher than the evaluation values of the data enhancement strategies other than the multiple second target data enhancement strategies among the multiple data enhancement strategies, and the evaluation value of any data enhancement strategy is used to indicate the quality of the recognition model trained by the enhanced samples obtained based on any data enhancement strategy; Based on the multiple second target data enhancement strategies, the first target data enhancement strategy is generated.
8. The method according to claim 7, characterized in that The generating the first target data enhancement strategy based on the multiple second target data enhancement strategies comprises: Determining target operation probabilities and target operation levels of the multiple data enhancement operations based on the operation probabilities and operation levels of the multiple data enhancement operations in the multiple second target data enhancement strategies; The first target data enhancement strategy is generated based on the determined target operation probabilities and target operation levels of the multiple data enhancement operations.
9. The method according to claim 8, characterized in that The determining, based on the operation probabilities and operation levels of the multiple data enhancement operations in the multiple second target data enhancement strategies, target operation probabilities and target operation levels of the multiple data enhancement operations comprises: For any one of the data enhancement operations, clustering multiple operation levels of any one of the data enhancement operations in the multiple second target data enhancement strategies to obtain at least one operation level category; For any operation level category among the at least one operation level category, the target operation intensity and the target operation probability of any data enhancement operation are determined based on the operation level in the any operation level category and the operation probability of any data enhancement operation within a third target data enhancement strategy among the multiple second target data enhancement strategies, wherein the third target data enhancement strategy is the second target data enhancement strategy to which the operation level of any operation level category belongs.
10. The method according to claim 9, characterized in that The determining, based on the operation level in any one of the operation level categories and the operation probability of any one of the data enhancement operations in the third target data enhancement strategy in the plurality of second target data enhancement strategies, the target operation intensity and the target operation probability of any one of the data enhancement operations comprises: Determining a target operation level for any one of the data enhancement operations based on the operation level in any one of the operation level categories; Based on the operation probability of any one of the data enhancement operations in the third target data enhancement strategy among the multiple second target data enhancement strategies, a target operation probability of any one of the data enhancement operations is determined.
11. The method according to any one of claims 6 to 10, characterized in that: Before determining the first target data enhancement strategy based on the multiple data enhancement strategies, the method further includes: Iterative calculation is performed based on the initial data enhancement strategy to obtain the multiple data enhancement strategies.
12. The method according to claim 11, characterized in that The iterative calculation based on the initial data enhancement strategy includes: During the i-th iterative calculation process, based on the data enhancement strategies determined in the previous i-1 iterative calculation process and each data enhancement strategy in the initial data enhancement strategy, the i-th data enhancement strategy among the multiple data enhancement strategies is determined, wherein i is an integer greater than or equal to 1 or less than or equal to N, and i is the total number of iterative calculations.
13. The method according to claim 12, characterized in that After determining the i-th data enhancement strategy among the multiple data enhancement strategies, the method further includes: Based on the operation probabilities and operation levels of the multiple data enhancement operations in the i-th data enhancement strategy, perform the multiple data enhancement operations on the multiple second samples to obtain multiple enhanced samples of the multiple second samples; Obtaining an i-th recognition model based on the multiple enhanced sample training; Based on the i-th recognition model, an evaluation value of the i-th data enhancement strategy is obtained.
14. The method according to claim 13, characterized in that The training based on the multiple enhanced samples to obtain the i-th recognition model comprises: Based on the multiple enhanced samples, a pre-trained model is trained to obtain the i-th recognition model, the pre-trained model is trained by multiple third samples of multiple objects of different types, and the accuracy of the pre-trained model is less than an accuracy threshold.
15. The method according to any one of claims 1-3, 5-10 and 12-14, characterized in that: The first target data enhancement strategy is further used to indicate a target operation probability of each data enhancement operation in the multiple data enhancement operations, and the target operation probability of any data enhancement operation is a probability of performing any data enhancement operation on the first sample; The performing the multiple data enhancement operations on the first sample within the operation intensity variation interval indicated by the target operation levels of the multiple data enhancement operations based on the first target data enhancement strategy includes: Based on the target operation probability and the target operation level of each of the multiple data enhancement operations, the multiple data enhancement operations are performed on the first sample, wherein the target enhancement sample with the target operation probability of any data enhancement operation has performed any of the data enhancement operations.
16. The method according to any one of claims 1-3, 5-10 and 12-14, characterized in that: The method further comprises: Acquire the first sample from the application node through the target interface; The multiple target enhancement samples are sent to the application node through the target interface.
17. A data enhancement device, characterized in that: The device comprises: an acquisition module, configured to acquire a first target data enhancement strategy, wherein the first target data enhancement strategy is used to indicate a target operation level of a data enhancement operation, and one target operation level is used to indicate an operation intensity variation interval, wherein the first target data enhancement strategy is determined based on a plurality of data enhancement strategies, and the plurality of data enhancement strategies are searched based on a plurality of operation levels of a plurality of configured data enhancement operations, wherein any data enhancement operation is configured with a plurality of operation levels, and one operation level is used to indicate an operation intensity variation interval, and the operation intensity variation intervals indicated by the plurality of operation levels are respectively a sub-interval of a target operation intensity variation range of any data enhancement operation; An enhancement module is used to perform the multiple data enhancement operations on a first sample within an operation intensity variation range indicated by a target operation level of the multiple data enhancement operations based on the first target data enhancement strategy to obtain multiple target enhanced samples of the first sample, wherein the first sample is an image and the target enhanced sample is an enhanced image.
18. A computing device, characterized in that The computing device comprises a processor, and the processor is configured to execute program code so that the computing device performs the method according to any one of claims 1 to 16.
19. A computer-readable storage medium, characterized in that: At least one program code is stored in the storage medium, and the at least one program code is read by the processor to enable the computing device to execute the method according to any one of claims 1 to 16.
Citation Information
Patent Citations
Method for video enhancement and apparatus thereof
CN101340510A
Learning data augmentation policies
CN111758105A
Network model training method and device, equipment and storage medium
CN111857793A
Cited By
Data enhancement method and apparatus, computer device, and computer-readable storage medium
WO2022095476A1