Core set construction method, device, equipment and medium

Through feature extraction and optimal transmission distance matrix calculation, the core set is constructed, which solves the problem of poor robustness of noisy data, improves model training efficiency and generalization, and realizes the optimized core set construction for downstream tasks.

CN118135357BActive Publication Date: 2024-08-27PENG CHENG LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410551155.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2024-08-27
Estimated Expiration
2044-05-07

AI Technical Summary

Technical Problem

Existing core set construction methods have poor robustness when processing noisy data and are difficult to effectively exclude noise samples that are far away from the data feature distribution, resulting in low model training efficiency and poor generalization performance.

Method used

Through feature extraction, feature distribution mapping, clustering and optimal transmission distance matrix calculation, the target image data that meets the preset conditions is determined, a core set is constructed to reduce the feature distribution difference between the complete data and the core set, and noisy samples are eliminated. Improve model training efficiency.

Benefits of technology

Effectively eliminate noise samples, reduce model training computational overhead, improve model generalization and training speed, and achieve optimized core set construction for downstream tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118135357B
    Figure CN118135357B
Patent Text Reader

Abstract

The embodiments of the present application provide a core set construction method, apparatus, device and medium, wherein the method extracts features from image data of an image data set; maps data features of the image data set to a feature space to obtain a feature distribution of the image data set; clusters the feature distribution of the image data set to obtain a central feature of the feature distribution of category data; determines a cost matrix between the distribution of the image data set to the core set based on the feature distribution and the central feature of the image data set; determines an optimal transmission distance matrix between the distribution of the image data set to the core set based on the central feature and the cost matrix; determines target image data from the image data set that makes the optimal transmission distance matrix meet preset conditions and forms the target image data into a core set; can effectively exclude noise samples far from the data feature distribution, and screen out important samples to form a core set, thereby achieving the purpose of accelerating model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of data processing, and in particular to core set construction methods, devices, equipment and media. Background Art

[0002] Deep learning methods rely on a large amount of training data, resulting in a large amount of computational overhead. The core set construction method is used to select important samples from the complete data set, and the core set is composed of important samples. The core set can accelerate the training of the model and improve the performance of the model in specific scenarios. The current core set construction methods mainly include dataset distillation and few-shot learning. Among them, dataset distillation focuses on reconstructing a small number of samples from the original data to replace the complete data, but its effect needs to be improved due to the influence of reconstruction strategy and noise data; the few-shot learning method focuses on predicting unknown categories through a small number of samples, but still requires a large number of training samples when training a priori models of known categories. In addition, other core set construction methods usually evaluate the contribution of a single sample based on the gradient value or gradient matching method to find the core set closest to the gradient of the entire dataset, but because they rely on gradients for judgment, they are less robust for datasets containing gradient abnormal noise samples. Summary of the invention

[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0004] The purpose of the present application is to solve at least one of the technical problems existing in the related art to a certain extent. The embodiments of the present application provide a core set construction method, device, equipment and medium, which can effectively exclude noise samples far away from the data feature distribution and screen out important samples to form a core set, thereby accelerating model training.

[0005] An embodiment of the first aspect of the present application, a core set construction method, includes:

[0006] Obtain the image dataset to be processed;

[0007] Extracting features from the image data of the image data set to obtain data features of the image data set;

[0008] Mapping the data features of the image data set to a feature space to obtain a feature distribution of the image data set;

[0009] Clustering the feature distribution of the image data set to obtain central features of feature distributions of data of different categories;

[0010] Determining a cost matrix of the feature distribution of the image data set to the feature distribution of the core set according to the feature distribution of the image data set and the central feature;

[0011] Determining an optimal transmission distance matrix from the feature distribution of the image data set to the feature distribution of the core set according to the central feature and the cost matrix;

[0012] Target image data that enables the optimal transmission distance matrix to satisfy preset conditions is determined from the image data set, and a core set is formed by the target image data that enables the optimal transmission distance matrix to satisfy preset conditions.

[0013] According to certain embodiments of the first aspect of the present application, mapping the data features of the image data set to a feature space to obtain a feature distribution of the image data set includes:

[0014] Mapping the data features to the feature space according to a mapping formula to obtain a feature distribution of the image data set;

[0015] Wherein, the mapping formula is: ;

[0016] In the formula, is the data feature of the image dataset, is the feature encoding of the image dataset in the feature space, and the feature encoding constitutes the feature distribution of the image dataset, is a preset first hyperparameter for adjusting the feature distribution of the image dataset.

[0017] According to certain embodiments of the first aspect of the present application, determining, according to the feature encoding in the feature distribution of the image data set and the central feature, a cost matrix of the feature distribution of the image data set to the feature distribution of the core set includes:

[0018] Performing norm calculation on the difference between the feature code in the feature distribution of the image data set and the central feature to obtain a cost value;

[0019] A cost matrix from the feature distribution of the image dataset to the feature distribution of the core set is composed of the cost values.

[0020] According to certain embodiments of the first aspect of the present application, determining, based on the central feature and the cost matrix, an optimal transmission distance matrix from the feature distribution of the image data set to the feature distribution of the core set includes:

[0021] Get the size of the core set and the number of categories;

[0022] Setting the feature marginal distribution of the image data set and the feature marginal distribution of the core set according to the size of the core set, the number of the categories and the central feature;

[0023] Determining a mapping transfer matrix of a feature edge distribution of the image data set to a feature edge distribution of the core set;

[0024] An optimal transmission distance from the feature distribution of the image data set to the feature distribution of the core set is determined according to the mapping transmission matrix and the cost matrix.

[0025] According to some embodiments of the first aspect of the present application, determining the optimal transmission distance matrix from the feature distribution of the image data set to the feature distribution of the core set according to the mapped transmission matrix and the cost matrix includes:

[0026] Determine an initial optimal transmission distance matrix according to the mapping transmission matrix and the cost matrix;

[0027] Obtaining a penalty term according to the mapping transfer matrix and a preset second hyperparameter for adjusting the penalty term;

[0028] The initial optimal transmission distance matrix is ​​adjusted according to the penalty item to obtain the optimal transmission distance matrix.

[0029] According to certain embodiments of the first aspect of the present application, the row vectors of the mapping transfer matrix correspond to the feature distribution of the image data set, and the column vectors of the mapping transfer matrix correspond to the feature distribution of the core set.

[0030] According to certain embodiments of the first aspect of the present application, determining, from the image data set, target image data that enables the optimal transmission distance matrix to satisfy a preset condition comprises:

[0031] Determine a mapping transmission matrix that minimizes the optimal transmission distance matrix as a target mapping transmission matrix;

[0032] Determining the characteristic distribution of the category data in the target mapping transfer matrix as the target characteristic distribution corresponding to each category;

[0033] According to the order of the corresponding cost value from small to large, the feature codes in the target feature distribution corresponding to each category are sorted respectively to obtain multiple feature sequences;

[0034] Determine the plurality of target center features that are ranked first in each of the feature sequences as target feature codes;

[0035] Image data corresponding to the target feature code is selected from the image data set as target image data.

[0036] An embodiment of the second aspect of the present application, a core set construction device, includes:

[0037] An input unit, used for obtaining an image data set to be processed;

[0038] A feature extraction unit, used to extract features from the image data of the image data set to obtain data features of the image data set;

[0039] A mapping unit, used to map the data features of the image data set to a feature space to obtain a feature distribution of the image data set;

[0040] A clustering unit, used for clustering the feature distribution of the image data set to obtain the central features of the feature distribution of different categories of data;

[0041] a cost matrix calculation unit, configured to determine a cost matrix of a feature distribution of an image data set to a feature distribution of a core set according to the feature distribution of the image data set and the central feature;

[0042] An optimal transmission distance calculation unit, used to determine an optimal transmission distance matrix from the feature distribution of the image data set to the feature distribution of the core set according to the central feature and the cost matrix;

[0043] The core set calculation unit is used to determine the target image data that makes the optimal transmission distance matrix meet the preset conditions from the image data set, and the target image data that makes the optimal transmission distance matrix meet the preset conditions constitutes a core set.

[0044] An embodiment of the third aspect of the present application is an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the core set construction method as described above when executing the computer program.

[0045] An embodiment of the fourth aspect of the present application is a computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the core set construction method as described above.

[0046] The above scheme has at least the following beneficial effects: by matching the feature distribution of the image data set with the feature distribution of the core set in the feature space through the feature distribution matching algorithm, the feature distribution difference between the complete data and the core set data is reduced to find the core set that is optimal for the current downstream task and closest to the input image data set, which can effectively exclude noise samples that are far away from the data feature distribution, thereby accelerating model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0048] Figure 1 It is a schematic diagram of the core set construction method;

[0049] Figure 2 It is a step diagram of the core set construction method;

[0050] Figure 3 is a sub-step diagram of step S600;

[0051] Figure 4 is a sub-step diagram of step S630;

[0052] Figure 5 A sub-step diagram of determining target image data from an image data set so that an optimal transmission distance satisfies a preset condition;

[0053] Figure 6 is a plot of the average likelihood between the core set and the full dataset versus the accuracy obtained using the core set;

[0054] Figure 7 It is a structural diagram of the core set construction device;

[0055] Figure 8 It is a structural diagram of an electronic device. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims or the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0058] Deep learning methods rely on a large amount of training data, resulting in a large amount of computational overhead. The core set construction method is used to select important samples from the complete data set, and the core set is composed of important samples. The core set can accelerate the training of the model and improve the performance of the model in specific scenarios. The current core set construction methods mainly include Dataset distillation and Few-shot learning. Among them, Dataset distillation focuses on reconstructing a small number of samples from the original data to replace the complete data, but its effect needs to be improved due to the influence of reconstruction strategy and noise data; Few-shot learning methods focus on predicting unknown categories through a small number of samples, but still require a large number of training samples when training prior models of known categories. In addition, other core set construction methods usually evaluate the contribution of a single sample based on the gradient value or gradient matching method to find the core set closest to the gradient of the entire data set, but because they rely on gradients for judgment, they have poor robustness for data sets containing gradient abnormal noise samples.

[0059] In order to solve the above problems, an embodiment of the present application provides a core set construction method.

[0060] The core set construction method is based on the following principles.

[0061] Task definition: From an unknown Borel probability distribution and Given a complete dataset as a training set and a core set ,in represents the complete dataset, represents the core set, Represents the probability distribution of the complete data set, that is, the feature distribution of the complete data set in the feature space; Represents the probability distribution of the core set, that is, the feature distribution of the core set in the feature space; represents the input data of the complete dataset, express Tags, is the number of samples in the complete dataset, is the number of samples in the core set. The goal of core set construction is to Find the most representative core set under the condition , using core sets Data and full dataset The same model is trained on the data of The model trained on the data obtained is different from the model trained on the complete dataset. The model trained on the data has a similar generalization performance. The parameters of the model trained on the data are expressed as , in the complete dataset The parameters of the model trained on the data are expressed as .

[0062] Optimization goal: The goal of feature distribution matching is to minimize the maximum average difference between the core set and the feature distribution of the entire dataset in the feature embedding space. According to the optimization scheme, the optimization goals are as follows: ;in, Represents the feature distribution of the complete dataset expectations, Represents the distribution of features of the core set The goal is to find the upper limit of the maximum average difference between the complete data set and the core set, and minimize the upper limit on the core set. After obtaining the upper limit of the maximum average difference between the complete data set and the core set, the optimal solution is defined as the optimal transmission distance, which can be expressed as: ;in, represents the optimal transmission distance between the feature distribution of the complete dataset and the feature distribution of the core set, Represents the marginal distribution of features from the complete dataset Feature marginal distribution to core set The mapping transfer matrix, Represents the cost matrix from the feature distribution of the image dataset to the feature distribution of the core set.

[0063] The core set can be obtained by solving the optimal transmission distance to reduce the distribution deviation between the probability distribution of the complete data set and the probability distribution of the core set.

[0064] The embodiments of the present application are further described below in conjunction with the accompanying drawings.

[0065] Reference Figure 1 Based on the above principle, the core set construction method extracts image features from the input complete data set through feature extractors such as encoders, maps the image features to the feature space to obtain data feature distribution, and then uses the feature distribution matching algorithm to match the feature distribution of the complete data set with the feature distribution of the core set in the feature space, reducing the feature distribution difference between the complete data and the core set data, so as to find the optimal core set for the current downstream task, and classify the data in the complete data set except the core set as redundant data.

[0066] Reference Figure 2 Specifically, the core set construction method includes the following steps:

[0067] Step S100, obtaining an image data set;

[0068] Step S200, extracting features from image data of the image data set to obtain data features of the image data set;

[0069] Step S300, mapping the data features of the image data set to the feature space to obtain the feature distribution of the image data set;

[0070] Step S400, clustering the feature distribution of the image data set to obtain the central features of the feature distribution of different categories of data;

[0071] Step S500, determining a cost matrix of the feature distribution of the image data set to the feature distribution of the core set according to the feature distribution and the central feature of the image data set;

[0072] Step S600, determining the optimal transmission distance matrix from the feature distribution of the image data set to the feature distribution of the core set according to the central feature and the cost matrix;

[0073] Step S700, determining target image data that makes the optimal transmission distance matrix satisfy preset conditions from the image data set, and forming a core set with the target image data that makes the optimal transmission distance matrix satisfy the preset conditions.

[0074] In step S100, an image data set is acquired.

[0075] For downstream image data processing tasks such as image classification, image segmentation, and object detection, the image dataset is used as input data. The image dataset is represented as: ; For images, For images Tags, is the number of samples in the image dataset.

[0076] The image dataset is input into the model that calculates the core set; the input to the model usually also includes parameters such as the size of the core set k, the number of categories w, and hyperparameters.

[0077] In this embodiment, for downstream tasks such as image data processing tasks such as image classification, image segmentation, and target detection, an image dataset is selected as input data; in other embodiments, for other types of downstream tasks, other types of data can be selected as input data, for example, for a downstream task such as a text generation task, text data can be selected; for a downstream task such as a speech recognition task, speech data can be selected.

[0078] In step S200, feature extraction is performed on the image data of the image data set to obtain data features of the image data set.

[0079] Through feature extractor , for each image in the image dataset Perform feature extraction to obtain data features .

[0080] The feature extractor can be a feature extractor based on a convolutional neural network, a long short-term memory network, a Transformer framework, etc.

[0081] The data features of the image data set may include color features, shape features, texture features, and spatial relationship features.

[0082] For step S300, the data features of the image data set are mapped to the feature space to obtain the feature distribution of the image data set.

[0083] For the data features of each image data set, the data features are mapped to the feature space according to the mapping formula, and the feature encoding of the image data set in the feature space is obtained by conversion.

[0084] The mapping formula is: .

[0085] In the formula, is the data feature of the image dataset; Encode the features of the image dataset in the feature space; is the first hyperparameter preset for adjusting the feature distribution of the image dataset, The value range of is a real number, and the optimal value is 0.5.

[0086] The feature distribution of image datasets is composed of the feature encodings of all image datasets in the feature space.

[0087] It can be understood that the feature space refers to the space composed of feature vectors. In the feature space, each sample can be represented by a feature vector, which contains all the feature information related to the sample. The features of the image dataset in the feature space are encoded as feature vectors.

[0088] For step S400, the feature distribution of the image data set is clustered to obtain the central features of the feature distribution of different categories of data.

[0089] According to the label, the feature codes in the feature distribution of the image data set are clustered to obtain the feature distribution of J categories of image data. All image data of each category become category data, and the feature distribution of each category of image data is called the feature distribution of category data. The clustering method can be K-means method, hierarchical clustering, spectral clustering, etc. According to the clustering formula, the center of the feature distribution of each category of image data is obtained, that is, the central feature of the feature distribution of the category data is obtained.

[0090] The clustering formula is: .

[0091] In the formula, Represents the central feature of the feature distribution of the j-th category of data, represents the number of data of the jth category, is the feature distribution of the image dataset.

[0092] It can be understood that there is usually only one central feature in the feature distribution of each type of image data.

[0093] For step S500, a cost matrix of the feature distribution of the image data set to the feature distribution of the core set is determined according to the feature distribution and the central feature of the image data set.

[0094] The difference between each feature encoding and each central feature in the feature distribution of the image data set is calculated by norm to obtain the cost value; the cost value constitutes the cost matrix of the feature distribution of the image data set to the feature distribution of the core set. It is expressed by the following formula: ; In the formula, For the value of The jth element in the ith row of the cost matrix M represents the feature distribution of the image dataset to the feature distribution of the core set.

[0095] For step S600, an optimal transmission distance matrix from the feature distribution of the image data set to the feature distribution of the core set is determined according to the central feature and the cost matrix.

[0096] Reference Figure 3 ,The calculation of the optimal transmission distance matrix includes the following steps:

[0097] Step S610, setting the feature edge distribution of the image data set and the feature edge distribution of the core set according to the size of the core set, the number of categories and the central feature;

[0098] Step S620, determining a mapping transfer matrix from the feature edge distribution of the image data set to the feature edge distribution of the core set;

[0099] Step S630, determining an optimal transmission distance matrix from the feature distribution of the image data set to the feature distribution of the core set according to the mapping transmission matrix and the cost matrix.

[0100] For step S610, the feature edge distribution of the image data set is set according to the number of categories, , will soon Assign to ,in, represents the feature marginal distribution of the image dataset, and w is the number of categories.

[0101] According to the size of the core set and the center of the feature distribution of the category data, the feature marginal distribution of the core set is set. , will soon Assign to ,in, represents the characteristic marginal distribution of the core set, It represents the central feature of the feature distribution of the j-th category data, and k is the size of the core set.

[0102] For step S620, a mapping transfer matrix from the feature edge distribution of the image data set to the feature edge distribution of the core set is determined according to the mapping transfer matrix formula. The mapping transfer matrix formula is expressed as: ;in, Represents the characteristic marginal distribution of the image dataset Feature marginal distribution to core set The set of mapping transfer matrices, and is a matrix vector, is the characteristic marginal distribution of the image dataset Feature marginal distribution to core set The mapping transfer matrix, represents the jth element in the i-th row of the mapping transfer matrix Z, n is the number of samples in the image dataset, and m is the number of samples in the core set.

[0103] The row vectors of the mapping transfer matrix correspond to the feature distribution of the image data set. The column vectors of the mapping transfer matrix correspond to the feature distribution of the core set. The number of rows of the mapping transfer matrix corresponds to the number of categories, and the row vectors of the mapping transfer matrix are the feature distributions of each category of data.

[0104] Reference Figure 4 For step S630, determining the optimal transmission distance matrix from the feature distribution of the image data set to the feature distribution of the core set according to the mapping transmission matrix and the cost matrix includes the following steps:

[0105] Step S631, determining an initial optimal transmission distance matrix according to the mapping transmission matrix and the cost matrix;

[0106] Step S632, obtaining a penalty term according to the mapping transfer matrix and a preset second hyperparameter for adjusting the penalty term;

[0107] Step S633: adjusting the initial optimal transmission distance matrix according to the penalty term to obtain the optimal transmission distance matrix.

[0108] For step S631, according to the formula Determine the initial optimal transmission distance matrix; where, represents the initial optimal transmission distance matrix, Represents the characteristic marginal distribution of the image dataset Feature marginal distribution to core set The set of mapping transfer matrices, represents the jth element in the i-th row of the mapping transfer matrix Z, Represents the cost matrix from the feature distribution of the image dataset to the feature distribution of the core set The jth element in the ith row of .

[0109] For step S632, the penalty term is obtained according to the mapping transfer matrix and the preset second hyperparameter, ; In the formula, represents the second hyperparameter for adjusting the penalty term, The value range is 1 to 10.

[0110] For step S633, the initial optimal transmission distance is adjusted according to the penalty term to obtain the optimal transmission distance, ; In the formula, represents the optimal transmission distance matrix.

[0111] The optimal transmission distance is adjusted through the penalty item to improve the accuracy of the optimal transmission distance.

[0112] It can be understood that each element of the optimal transmission distance matrix from the feature distribution of the image dataset to the feature distribution of the core set is the optimal transmission distance between each feature encoding of the feature distribution of the image dataset and each feature encoding of the feature distribution of the core set.

[0113] Reference Figure 5 For step S700, determining target image data that makes the optimal transmission distance meet the preset conditions from the image data set includes the following steps:

[0114] Step S710, determining a mapping transmission matrix that minimizes the optimal transmission distance matrix as a target mapping transmission matrix;

[0115] Step S720, determining the characteristic distribution of the category data in the target mapping transfer matrix as the target characteristic distribution corresponding to each category;

[0116] Step S730, sorting the feature codes in the target feature distribution corresponding to each category in ascending order of the corresponding cost value to obtain a plurality of feature sequences;

[0117] Step S740, determining the plurality of target center features that are ranked first in each feature sequence as target feature codes;

[0118] Step S750: taking image data corresponding to the target feature code from the image data set as target image data.

[0119] from The mapping transmission matrix Z that minimizes the optimal transmission distance matrix is ​​obtained and determined as the target mapping transmission matrix.

[0120] The characteristic distribution of the category data of the target mapping transfer matrix is ​​determined as the target characteristic distribution corresponding to each category. Since the row vectors of the mapping transfer matrix correspond to the characteristic distribution of the category data of each category, the w row vectors of the target mapping transfer matrix are respectively used as the target characteristic distribution corresponding to each category; w is the number of row vectors of the mapping transfer matrix, which is also the number of categories.

[0121] For the target feature distribution corresponding to each category, the feature sequence is obtained by sorting the cost values ​​corresponding to the feature codes in the target feature distribution from small to large; that is, for each row vector, the feature sequence is obtained by sorting the cost values ​​corresponding to the elements in the row vector from small to large; and then w feature sequences can be obtained. The a target center features ranked first in each feature sequence are determined as the target feature codes.

[0122] The topk algorithm is used to obtain a central features with the lowest cost for each category of target feature distribution. For the target feature distribution of w categories of data, a feature codes are extracted from the target feature distribution of each category of data, and the image data corresponding to w times a feature codes are composed of k target image data.

[0123] The k target image data constitute the core set. ; In the formula, represents the core set, Indicates the optimal transmission distance.

[0124] In other embodiments, if the downstream task is a text generation task and the input is text data, the core set is composed of k target text data; if the downstream task is a speech recognition task and the input is speech data, the core set is composed of k target speech data.

[0125] In this embodiment, the feature distribution of the image data set is matched with the feature distribution of the core set in the feature space through the feature distribution matching algorithm, so as to reduce the difference in feature distribution between the complete data and the core set data, so as to find the core set that is optimal for the current downstream task and closest to the input image data set. This can effectively exclude noise samples that are far away from the data feature distribution, achieve better core set construction performance, and thus improve the generalization of the model.

[0126] When the core set construction method is applied to the training of deep learning models, it can accelerate the training of the model by selecting the training data, reduce the number of training samples and computational overhead. At the same time, when the training data contains noise samples, the core set construction can be used to select important samples, exclude abnormal samples far from the feature distribution, and improve the generalization of the model.

[0127] Reference Figure 6 , a relationship diagram is drawn based on the relationship between the average likelihood between the core set and the complete data set and the accuracy obtained using the core set. It can be seen that the core set construction method FDMat has a larger average likelihood and higher test accuracy than the existing methods (LCMat-s, Adacore, Glister, GradMatch, Craig), and the core set construction method is superior to the existing methods.

[0128] An embodiment of the present application provides a core set construction device, which applies the core set construction method described above.

[0129] Reference Figure 7 The core set construction device includes: an input unit 110, a feature extraction unit 120, a mapping unit 130, a clustering unit 140, a cost matrix calculation unit 150, an optimal transmission distance calculation unit 160 and a core set calculation unit 170.

[0130] Among them, the input unit 110 is used to obtain an image data set; the feature extraction unit 120 is used to extract features from the image data of the image data set to obtain data features of the image data set; the mapping unit 130 is used to map the data features of the image data set to the feature space to obtain the feature distribution of the image data set; the clustering unit 140 is used to cluster the feature distribution of the image data set to obtain the central features of the feature distribution of different categories of data; the cost matrix calculation unit 150 is used to determine the cost matrix of the feature distribution of the image data set to the feature distribution of the core set according to the feature distribution and the central features of the image data set; the optimal transmission distance calculation unit 160 is used to determine the optimal transmission distance matrix of the feature distribution of the image data set to the feature distribution of the core set according to the central features and the cost matrix; the core set calculation unit 170 is used to determine the target image data from the image data set so that the optimal transmission distance matrix satisfies the preset conditions, and the core set is composed of the target image data that makes the optimal transmission distance matrix satisfy the preset conditions.

[0131] In this embodiment, the feature distribution of the image data set is matched with the feature distribution of the core set in the feature space through a feature distribution matching algorithm, thereby reducing the feature distribution difference between the complete data and the core set data, so as to find the core set that is optimal for the current downstream task and closest to the input image data set, and can effectively exclude noise samples that are far away from the data feature distribution, thereby accelerating model training.

[0132] It can be understood that the various units of the core set construction device of the embodiment of the present application correspond one-to-one to the various steps of the core set construction method, the input unit 110 corresponds to executing step S100 of the core set construction method, the feature extraction unit 110 corresponds to executing step S200 of the core set construction method, the mapping unit 130 corresponds to executing step S300 of the core set construction method, the clustering unit 140 corresponds to executing step S400 of the core set construction method, the cost matrix calculation unit 150 corresponds to executing step S500 of the core set construction method, the optimal transmission distance calculation unit 160 corresponds to executing step S600 of the core set construction method, and the core set calculation unit 170 corresponds to executing step S700 of the core set construction method; the core set construction device and the core set construction method have the same technical solution, solve the same technical problems, and bring the same technical effects.

[0133] An embodiment of the present application provides an electronic device. Figure 8 The electronic device includes: a memory 220, a processor 210, and a computer program stored in the memory 220 and executable on the processor 210. When the processor 210 executes the computer program, the training method of the core set construction model as described above or the core set construction method as described above is implemented.

[0134] In this embodiment, the feature distribution of the image data set is matched with the feature distribution of the core set in the feature space through the feature distribution matching algorithm, so as to reduce the difference in feature distribution between the complete data and the core set data, so as to find the core set that is optimal for the current downstream task and closest to the input image data set. This can effectively exclude noise samples that are far away from the data feature distribution, achieve better core set construction performance, and thus improve the generalization of the model.

[0135] The electronic device may be any intelligent terminal including a computer.

[0136] In general, for the hardware structure of the electronic device, the processor 210 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc., to execute related programs to implement the technical solutions provided in the embodiments of the present application.

[0137] The memory 220 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 220 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 220, and the processor 210 calls and executes the methods of the embodiments of this application.

[0138] The input / output interface is used to realize information input and output.

[0139] The communication interface is used to realize the communication interaction between this device and other devices. Communication can be achieved through wired methods (such as USB, network cable, etc.) or wireless methods (such as mobile network, WIFI, Bluetooth, etc.).

[0140] The bus 230 transmits information between the various components of the device (such as the processor 210, the memory 220, the input / output interface, and the communication interface). The processor 210, the memory 220, the input / output interface, and the communication interface are connected to each other through the bus 230 within the device.

[0141] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for executing the training method for constructing a core set model or the core set construction method as described above.

[0142] In this embodiment, the feature distribution of the image data set is matched with the feature distribution of the core set in the feature space through a feature distribution matching algorithm, thereby reducing the feature distribution difference between the complete data and the core set data, so as to find the core set that is optimal for the current downstream task and closest to the input image data set, and can effectively exclude noise samples that are far away from the data feature distribution, thereby accelerating model training.

[0143] It will be appreciated by those skilled in the art that all or some of the steps and systems in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium. In the above description of this specification, the description of reference terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" and the like means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0144] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0145] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0146] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0147] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0148] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above-mentioned units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. Although the embodiments of the present application have been shown and described, it can be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and purposes of the present application, and the scope of the present application is defined by the claims and their equivalents.

[0149] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above-mentioned units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. Although the embodiments of the present application have been shown and described, it can be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and purposes of the present application, and the scope of the present application is defined by the claims and their equivalents.

[0150] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the embodiments. Technical personnel familiar with the field can make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A core set construction method, It is characterized in that include: Obtain the image dataset to be processed; Extracting features from the image data of the image data set to obtain data features of the image data set; Mapping the data features of the image data set to a feature space to obtain a feature distribution of the image data set; Clustering the feature distribution of the image data set to obtain central features of feature distributions of data of different categories; Determining a cost matrix of the feature distribution of the image data set to the feature distribution of the core set according to the feature distribution of the image data set and the central feature; Determining an optimal transmission distance matrix from the feature distribution of the image data set to the feature distribution of the core set according to the central feature and the cost matrix; Determine target image data that makes the optimal transmission distance matrix meet preset conditions from the image data set, and form a core set with the target image data that makes the optimal transmission distance matrix meet the preset conditions; The step of determining the cost matrix of the feature distribution of the image data set to the feature distribution of the core set according to the feature distribution of the image data set and the central feature includes: Performing norm calculation on the difference between the feature distribution of the image data set and the central feature to obtain a cost value; A cost matrix of feature distribution of the image data set to feature distribution of the core set composed of the cost values; The step of determining the optimal transmission distance matrix from the feature distribution of the image data set to the feature distribution of the core set according to the central feature and the cost matrix includes: Get the size of the core set and the number of categories; Setting the feature marginal distribution of the image data set and the feature marginal distribution of the core set according to the size of the core set, the number of the categories and the central feature; Determining a mapping transfer matrix of a feature edge distribution of the image data set to a feature edge distribution of the core set; Determining an optimal transmission distance from a feature distribution of an image data set to a feature distribution of a core set according to the mapping transmission matrix and the cost matrix; The step of determining, from the image data set, target image data that enables the optimal transmission distance matrix to satisfy a preset condition comprises: Determine a mapping transmission matrix that minimizes the optimal transmission distance matrix as a target mapping transmission matrix; Determining the characteristic distribution of the category data in the target mapping transfer matrix as the target characteristic distribution corresponding to each category; According to the order of the corresponding cost value from small to large, the feature codes in the target feature distribution corresponding to each category are sorted respectively to obtain multiple feature sequences; Determine the plurality of target center features that are ranked first in each of the feature sequences as target feature codes; Image data corresponding to the target feature code is selected from the image data set as target image data.

2. A core set construction method according to claim 1, It is characterized in that Mapping the data features of the image data set to a feature space to obtain a feature distribution of the image data set includes: Mapping the data features to the feature space according to a mapping formula to obtain a feature distribution of the image data set; Wherein, the mapping formula is: ; In the formula, is the feature extractor, is the i-th image in the image dataset, is the data feature of the image dataset, is the feature encoding of the image dataset in the feature space, and the feature encoding constitutes the feature distribution of the image dataset, is a preset first hyperparameter for adjusting the feature distribution of the image dataset.

3. A core set construction method according to claim 1, It is characterized in that The step of determining an optimal transmission distance matrix from the feature distribution of the image data set to the feature distribution of the core set according to the mapping transmission matrix and the cost matrix includes: Determine an initial optimal transmission distance matrix according to the mapping transmission matrix and the cost matrix; Obtaining a penalty term according to the mapping transfer matrix and a preset second hyperparameter for adjusting the penalty term; The initial optimal transmission distance matrix is ​​adjusted according to the penalty item to obtain the optimal transmission distance matrix.

4. A core set construction method according to claim 1 or 3, It is characterized in that The row vectors of the mapping transfer matrix correspond to the feature distribution of the image data set, and the column vectors of the mapping transfer matrix correspond to the feature distribution of the core set.

5. A core set construction device, It is characterized in that include: An input unit, used for obtaining an image data set to be processed; A feature extraction unit, used to extract features from the image data of the image data set to obtain data features of the image data set; A mapping unit, used to map the data features of the image data set to a feature space to obtain a feature distribution of the image data set; A clustering unit, used for clustering the feature distribution of the image data set to obtain the central features of the feature distribution of different categories of data; a cost matrix calculation unit, configured to determine a cost matrix of a feature distribution of an image data set to a feature distribution of a core set according to the feature distribution of the image data set and the central feature; An optimal transmission distance calculation unit, used to determine an optimal transmission distance matrix from the feature distribution of the image data set to the feature distribution of the core set according to the central feature and the cost matrix; A core set calculation unit, used to determine target image data that makes the optimal transmission distance matrix meet preset conditions from the image data set, and the target image data that makes the optimal transmission distance matrix meet preset conditions constitute a core set; The step of determining the cost matrix of the feature distribution of the image data set to the feature distribution of the core set according to the feature distribution of the image data set and the central feature includes: Performing norm calculation on the difference between the feature distribution of the image data set and the central feature to obtain a cost value; A cost matrix of feature distribution of the image data set to feature distribution of the core set composed of the cost values; The step of determining the optimal transmission distance matrix from the feature distribution of the image data set to the feature distribution of the core set according to the central feature and the cost matrix includes: Get the size of the core set and the number of categories; Setting the feature marginal distribution of the image data set and the feature marginal distribution of the core set according to the size of the core set, the number of the categories and the central feature; Determining a mapping transfer matrix of a feature edge distribution of the image data set to a feature edge distribution of the core set; Determining an optimal transmission distance from a feature distribution of an image data set to a feature distribution of a core set according to the mapping transmission matrix and the cost matrix; The step of determining, from the image data set, target image data that enables the optimal transmission distance matrix to satisfy a preset condition comprises: Determine a mapping transmission matrix that minimizes the optimal transmission distance matrix as a target mapping transmission matrix; Determining the characteristic distribution of the category data in the target mapping transfer matrix as the target characteristic distribution corresponding to each category; According to the order of the corresponding cost value from small to large, the feature codes in the target feature distribution corresponding to each category are sorted respectively to obtain multiple feature sequences; Determine the plurality of target center features that are ranked first in each of the feature sequences as target feature codes; Image data corresponding to the target feature code is selected from the image data set as target image data.

6. An electronic device, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the core set construction method according to any one of claims 1 to 4 when executing the computer program.

7. A computer storage medium, It is characterized in that Computer executable instructions are stored, and the computer executable instructions are used to execute the core set construction method according to any one of claims 1 to 4.