Image sample feature selection method, device, computer equipment and storage medium
The feature selection method optimized by Filter method and Wrapper method, combined with Schmidt orthogonal processing and correlation screening, solves the problem of dimensionality reduction in small sample data features, and improves the training accuracy and recognition accuracy of the image recognition model.
Patent Information
- Application Number
- CN201910964124.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-11
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2039-10-11
AI Technical Summary
The prior art is difficult to accurately reduce the feature dimensions of small sample data in image recognition model training, resulting in low training accuracy.
The Filter method is used to filter out the redundant feature subset and the non-redundant feature subset, and the linear similarity of the redundant feature is removed by Schmitt orthogonalization. Then, the Wrapper method is used to filter the orthogonal feature subset, and the correlation between the image sample features and the target category features is calculated, and the relevant features are selected, and the new feature set is finally obtained through union operations.
It realizes accurate feature dimensionality reduction of small sample data processed in image, and improves the training accuracy and recognition accuracy of the image recognition model.
Smart Images

Figure CN110991473B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, computer equipment and storage medium for feature selection of image samples. Background Art
[0002] At present, when data mining and machine learning are applied in scenarios related to image recognition, in the training process of image recognition models, in order to meet the requirements of training accuracy, a large number of sample images are often required to train the image recognition models.
[0003] However, in actual applications, there are often some application scenarios where only a small number of samples can be collected. For example, in target recognition through remote sensing images or infrared images, due to the high cost and difficulty of collecting images from airborne radars, remote sensing satellites, etc., only a small number of samples can be collected, and it is impossible to collect a large number of remote sensing images or infrared images for accurate model training. For example, when identifying underwater organisms, due to the complex marine environment, the collection of underwater images requires a lot of manpower and material resources, which also makes it impossible to have enough sample images for accurate model training. Moreover, these small samples often cover the effects of many factors that cannot be included, resulting in the phenomenon of high-dimensional small samples.
[0004] In the case of insufficient samples, more feature dimensions can make the problem to be quantified better fit, but at the same time it also increases the possibility of carrying a large number of redundant, irrelevant, overly correlated features or even noise. These small sample data have relatively more feature dimensions and often contain irrelevant or redundant features, which leads to unsatisfactory results of model training using small sample data and low accuracy of training results.
[0005] In order to improve the model training accuracy of the image recognition model and then improve the target recognition accuracy of the image recognition model, it is urgent to study and solve the problem of using appropriate feature selection methods to achieve feature dimensionality reduction of small sample data. However, the existing filtering feature selection method only uses a single correlation metric to filter redundant features and irrelevant features, which has dimensionality reduction errors, resulting in low interpretability of the features after dimensionality reduction and inability to accurately reduce the feature dimensionality of small sample data, resulting in low accuracy of model training using small sample data. Summary of the invention
[0006] The embodiments of the present invention provide a method, apparatus, computer device and storage medium for feature selection of image samples to solve the problem that the prior art cannot accurately perform feature dimension reduction on small sample data for image processing, thus affecting the training accuracy of image recognition models.
[0007] A feature selection method for an image sample, comprising:
[0008] Get a feature set containing image sample features;
[0009] Based on a preset filter method, redundant feature screening is performed on the image sample features in the feature set to obtain N redundant feature subsets and non-redundant feature subsets containing non-redundant features, wherein each of the redundant feature subsets contains redundant features that are redundant to each other, and N is a positive integer;
[0010] Performing Schmidt orthogonalization processing on each of the redundant feature subsets to obtain N orthogonalized feature subsets, and using a preset Wrapper method to perform feature screening on the N orthogonalized feature subsets, and forming the screened features into a first feature subset;
[0011] Calculating the correlation between each of the image sample features in the feature set and a preset target category feature, and filtering out the image sample features related to the target category feature according to the correlation, and forming the filtered image sample features into a second feature subset;
[0012] A union operation is performed on the non-redundant feature subset, the first feature subset, and the second feature subset to obtain a new feature set.
[0013] A feature selection device for an image sample, comprising:
[0014] An acquisition module, used for acquiring a feature set including features of image samples;
[0015] A first screening module is used to screen the image sample features in the feature set for redundant features based on a preset filter method to obtain N redundant feature subsets and non-redundant feature subsets containing non-redundant features, wherein each of the redundant feature subsets contains the redundant features that are redundant to each other, and N is a positive integer;
[0016] A second screening module is used to perform Schmidt orthogonalization processing on each of the redundant feature subsets to obtain N orthogonalized feature subsets, and use a preset Wrapper method to perform feature screening on the N orthogonalized feature subsets, and the screened features form a first feature subset;
[0017] a third screening module, configured to calculate the correlation between each of the image sample features in the feature set and a preset target category feature, and screen out the image sample features related to the target category feature according to the correlation, and form the screened image sample features into a second feature subset;
[0018] The combination module is used to perform a union operation on the non-redundant feature subset, the first feature subset and the second feature subset to obtain a new feature set.
[0019] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the feature selection method of the above-mentioned image sample when executing the computer program.
[0020] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for selecting features of image samples.
[0021] In the above-mentioned feature selection method, device, computer equipment and storage medium for image samples, on the one hand, a filter method is used to filter out N redundant feature subsets and non-redundant feature subsets containing non-redundant features from the image sample features of a feature set, and then each redundant feature subset is subjected to Schmidt orthogonalization processing to remove the linear similarity between the redundant features, and a preset Wrapper method is used to perform feature screening on the N orthogonalized feature subsets, and the screened features are combined into a first feature subset, thereby reconstructing the redundant features into new image features; on the other hand, the correlation between each image sample feature in the feature set and the preset target category feature is calculated, and sample features related to the target category feature are screened according to the correlation to form a second feature subset; finally, the non-redundant feature subset, the first feature subset and the second feature subset are unioned to obtain a new feature set. It realizes parallel feature selection from three aspects: extracting non-redundant features, reconstructing redundant features, and screening image sample features with high correlation with target category features, reducing feature dimensions, removing unimportant factors, and fully considering the interactivity between features, so as to obtain core features that can comprehensively and accurately reflect the characteristics of the image. This makes the explanatory credibility of this core feature in the application scenario high, and achieves accurate feature dimensionality reduction of small sample data for image processing, thereby effectively improving the training accuracy of the image recognition model using the small sample data after feature dimensionality reduction, and then improving the recognition accuracy of the image recognition model. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0023] Figure 1is a schematic diagram of an application environment of a feature selection method for image samples in one embodiment of the present invention;
[0024] Figure 2 is a flow chart of a method for selecting features of image samples in one embodiment of the present invention;
[0025] Figure 3 is a flow chart of step S2 in a method for selecting features of image samples in one embodiment of the present invention;
[0026] Figure 4 is a flow chart of step S4 of a method for selecting features of image samples in one embodiment of the present invention;
[0027] Figure 5 is a flow chart of step S1 of a method for selecting features of image samples in one embodiment of the present invention;
[0028] Figure 6 is a schematic diagram of a feature selection device for image samples in one embodiment of the present invention;
[0029] Figure 7 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] The feature selection method of image samples provided in this application can be applied to Figure 1 In the application environment shown, the application environment includes a server and a database, wherein the server and the database are connected via a network, which may be a wired network or a wireless network, and the server may be implemented using an independent server or a server cluster consisting of multiple servers. The server obtains image sample data from the database and completes feature dimensionality reduction processing of the image sample data.
[0032] In one embodiment, if Figure 2 As shown, a feature selection method for image samples is provided, and the method is applied in Figure 1 The server in the example is used as an example to illustrate, specifically including steps S1 to S5, which are described in detail as follows:
[0033] S1: Get a feature set containing image sample features.
[0034] Specifically, the server obtains image sample data from the database. The image sample data may be high-dimensional small sample data, that is, sample data with a small number of samples and many feature dimensions contained in the samples. Usually, the number of feature dimensions of high-dimensional small sample data is much larger than the number of samples.
[0035] The server extracts and filters the image sample data according to the preset extraction method to obtain the image sample features, and performs preprocessing such as abnormal dimension cleaning and standardization on the values of the image sample features. The image sample features obtained after the preprocessing are combined into a feature set.
[0036] S2: Based on the preset Filter method, redundant features of the image sample features in the feature set are screened to obtain N redundant feature subsets and non-redundant feature subsets containing non-redundant features, wherein each redundant feature subset contains redundant features that are redundant to each other, and N is a positive integer.
[0037] Specifically, the Filter method is an existing filter method, and its core idea is to first use a scoring function to score and measure each image sample feature, and then filter out the image sample features that meet the conditions according to a threshold. Among them, the scoring function can be divided into three types of scoring functions, namely, similarity measurement, dissimilarity measurement, and information theory-based scoring functions. In this embodiment, the scoring function can specifically use a similarity measurement scoring function.
[0038] The server uses the scoring function of the similarity measurement in the preset Filter method to calculate the similarity between every two image sample features in the feature set, and screens out redundant features with similar features and non-redundant features that are not similar to any other image sample features in the feature set based on the similarity, and groups the non-redundant features into non-redundant feature subsets, and groups the redundant features that are redundant to each other into redundant feature subsets.
[0039] It should be noted that since the Filter method does not rely on the classification results of the training model, it is less sensitive to the size of sample data. At the same time, the Filter method has better interpretability and lower time complexity, and can meet the needs of real-time computing, thereby efficiently and quickly screening out non-redundant feature subsets and redundant feature subsets with strong resolution in the feature set.
[0040] It can be understood that each non-redundant feature in the non-redundant feature subset is a feature that is different from each other, the redundant features in each redundant feature subset are similar features, and different redundant feature subsets are different from each other.
[0041] S3: Perform Schmidt orthogonalization processing on each redundant feature subset to obtain N orthogonalized feature subsets, and use a preset Wrapper method to perform feature screening on the N orthogonalized feature subsets, and form the screened features into a first feature subset.
[0042] Specifically, Schmidt orthogonalization is a method for finding an orthogonal basis in Euclidean space. In each redundant feature subset, each redundant feature contained therein is subjected to Schmidt orthogonalization to obtain a standard orthogonal vector group, which is used as the orthogonalized feature subset corresponding to the redundant feature subset, and a total of N orthogonalized feature subsets are obtained. By performing Schmidt orthogonalization on redundant features, the similarity between redundant features in the same direction can be removed, so that the linear similarity after orthogonalization is reduced and the features are differentiated into different dimensions.
[0043] The Wrapper method is an existing wrapper method. This method trains the selected feature set with a classifier and uses the training effect as the evaluation of the feature set. That is, it searches for feature subsets from the feature set through continuous heuristic search, and puts the feature subsets searched each time into the classifier learning model for training. The advantages and disadvantages of the feature subsets are compared according to the training results to find the optimal feature subset.
[0044] In this embodiment, the Wrapper method commonly used in the prior art is used to complete the feature screening of N orthogonalized feature subsets. The server uses the Wrapper method to search and screen all features contained in the N orthogonalized feature subsets, and the screened optimal features are combined into the first feature subset, thereby realizing the reconstruction of redundant features, obtaining new image features, and reducing the feature dimension.
[0045] It should be noted that the Filter method and the Wrapper method are two complementary modes. Through the combination of the two, the Filter method is first used to preliminarily eliminate most of the redundant features such as irrelevant or noise, and only a small number of non-redundant features are retained, which can effectively reduce the scale of the subsequent search process and improve the execution efficiency. Then, the redundant features are Schmidt orthogonalized and the Wrapper method is used for feature screening to further optimize and obtain new image features.
[0046] S4: Calculate the correlation between each image sample feature in the feature set and the preset target category feature, and filter out the image sample features related to the target category feature according to the correlation, and form the filtered image sample features into a second feature subset.
[0047] Specifically, the preset target category feature is the category feature of the target sample image required for the preset model training. The server calculates the correlation between each image sample feature in the feature set and the preset target category feature. The correlation is used to identify the correlation between the image sample feature and the target category feature. The higher the correlation, the higher the availability of this image sample feature as a feature for model-specific recognition, that is, the higher the importance of this image sample feature.
[0048] The server selects correlations exceeding a preset correlation threshold from the obtained correlations, uses the image sample features corresponding to the selected correlations as the image sample features related to the target category features, and forms the image sample features corresponding to the selected correlations into a second feature subset.
[0049] It should be noted that there is no necessary execution order between steps S2 to S3 and step S4, and they can also be executed in parallel, which is not limited here.
[0050] S5: Perform a union operation on the non-redundant feature subset, the first feature subset, and the second feature subset to obtain a new feature set.
[0051] Specifically, the non-redundant feature subset obtained in step S2, the first feature subset obtained in step S3, and the second feature subset obtained in step S4 may have the same features. The server performs a union operation on the non-redundant feature subset, the first feature subset, and the second feature subset according to the union operation in the set operation, removes repeated identical features, and uses the obtained union as the new feature set.
[0052] Since the image features in the new feature set are the core features obtained after feature selection and dimensionality reduction of the original small amount of high-dimensional image sample data, the core features can accurately reflect the characteristics of the image and have a high degree of credibility. Using the features in the new feature set to train the image recognition model can improve the training accuracy of the model, thereby improving the recognition accuracy of the image recognition model.
[0053] In this embodiment, on the one hand, a Filter method is used to filter out N redundant feature subsets and a non-redundant feature subset containing non-redundant features from the image sample features of a feature set, and then each redundant feature subset is subjected to Schmidt orthogonalization processing to remove the linear similarity between the redundant features, and a preset Wrapper method is used to perform feature screening on the N orthogonalized feature subsets, and the screened features are formed into a first feature subset, thereby reconstructing the redundant features into new image features; on the other hand, the correlation between each image sample feature in the feature set and the preset target category feature is calculated, and sample features related to the target category feature are screened out according to the correlation to form a second feature subset; finally, the non-redundant feature subset, the first feature subset, and the second feature subset are unioned to obtain a new feature set. It realizes parallel feature selection from three aspects: extracting non-redundant features, reconstructing redundant features, and screening image sample features with high correlation with target category features, reducing feature dimensions, removing unimportant factors, and fully considering the interactivity between features, so as to obtain core features that can comprehensively and accurately reflect the characteristics of the image. This makes the explanatory credibility of this core feature in the application scenario high, and achieves accurate feature dimensionality reduction of small sample data for image processing, thereby effectively improving the training accuracy of the image recognition model using the small sample data after feature dimensionality reduction, and then improving the recognition accuracy of the image recognition model.
[0054] In one embodiment, if Figure 3 As shown, in step S2, redundant features are screened for image sample features in the feature set based on a preset Filter method to obtain N redundant feature subsets and a non-redundant feature subset containing non-redundant features, specifically including steps S21 to S22, which are described in detail as follows:
[0055] S21: Calculate the feature similarity between every two image sample features in the feature set.
[0056] Specifically, the server calculates the feature similarity between each two image sample features in the feature set. For example, if the feature set contains four image sample features, namely A1, A2, A3 and A4, the server calculates the feature similarities of A1 and A2, A1 and A3, A1 and A4, A2 and A3, A2 and A4, and A3 and A4, for a total of six features.
[0057] Furthermore, calculating the feature similarity between every two image sample features in the feature set may specifically include:
[0058] The Euclidean distance between every two image sample features in the feature set is calculated, and the value of the Euclidean distance is used as the feature similarity between every two image sample features.
[0059] Specifically, the server calculates the Euclidean distance between the feature vectors of the two image sample features, and uses the value of the Euclidean distance as the feature similarity between the two image sample features.
[0060] S22: Determine redundant features and non-redundant features according to feature similarity, group the non-redundant features into non-redundant feature subsets, and group mutually redundant redundant features into redundant feature subsets, to obtain N redundant feature subsets.
[0061] Specifically, the server determines two image sample features whose feature similarity is greater than a preset similarity threshold as mutually redundant features based on each feature similarity calculated in step S21, and forms the mutually redundant redundant features into a redundant feature subset, that is, each image sample feature contained in each redundant feature subset is mutually redundant. For example, if it is obtained based on the feature similarity that image sample feature A1 and image sample feature A2 are mutually redundant features, and image sample feature A1 and image sample feature A3 are also mutually redundant features, then image sample feature A1, image sample feature A2, and image sample feature A3 are mutually redundant features and belong to a redundant feature subset.
[0062] The server determines two image sample features whose feature similarity is less than or equal to a preset similarity threshold as non-redundant features, that is, the features of the two are not similar. If the image sample feature is not redundant with other image sample features in the feature set, the image sample feature is determined as a non-redundant feature. The server will form a non-redundant feature subset with all the non-redundant features screened out.
[0063] In this embodiment, the feature similarity between every two image sample features in the feature set is calculated, and the Euclidean distance is used as a measure of feature similarity. This can quickly and accurately analyze the degree of similarity between the image sample features, and identify the redundant features and non-redundant features in the feature set based on the degree of similarity. The screened non-redundant features are combined into a non-redundant feature subset, which reduces the feature dimension and realizes simple, reliable and fast screening of redundant features. This reasonably reduces the computational complexity and time complexity, improves the feature screening efficiency, and combines mutually redundant redundant features into a redundant feature subset, providing a data basis for further reconstructing redundant features into new features.
[0064] In one embodiment, if Figure 4 As shown, in step S4, the correlation between each image sample feature in the feature set and the preset target category feature is calculated, and the image sample features related to the target category feature are screened out according to the correlation, and the screened image sample features are formed into a second feature subset, which specifically includes steps S41 to S42, which are described in detail as follows:
[0065] S41: Calculate the covariance matrix between each image sample feature in the feature set and the preset target category feature, and determine the correlation between each image sample feature and the preset target category feature according to the covariance matrix.
[0066] Specifically, the server uses the covariance matrix to measure the correlation between the image sample features and the target category features. The covariance matrix between the image sample features and the target category features can reflect the degree to which each dimension of the image sample features deviates from the preset dimension mean of the target category features. The greater the deviation, the lower the correlation.
[0067] The server calculates the deviation value of each dimension of the image sample feature relative to the preset dimension mean of the target category feature based on the obtained covariance matrix, and substitutes the cumulative sum of the deviation values of each dimension into the preset inverse proportional function between the deviation value and the correlation, to obtain the correlation between the image sample feature and the target category feature. In the preset inverse proportional function, the deviation value and the correlation value are in an inverse proportional linear function relationship, that is, the larger the deviation value, the smaller the correlation value, and the smaller the deviation value, the larger the correlation value.
[0068] S42: Filter out correlations that meet a preset correlation condition from the obtained correlations, and form image sample features corresponding to the filtered correlations into a second feature subset.
[0069] Specifically, the preset correlation condition can be that the correlation is greater than a preset correlation threshold, that is, from the correlation between each image sample feature and the target category feature obtained in step S41, image sample features whose correlation values are greater than the preset correlation threshold are screened out, and the screened image sample features are formed into a second feature subset.
[0070] In this embodiment, by calculating the covariance matrix between the image sample features and the preset target category features, the covariance matrix is used to measure the correlation between the image sample features and the target category features, and from the correlation between the image sample features and the target category features determined according to the covariance matrix, the image sample features corresponding to the correlation that meets the preset correlation condition are screened out to form a second feature subset, thereby achieving accurate screening of image sample features with a high correlation with the target category features through the covariance matrix, thereby improving the accuracy of feature dimensionality reduction.
[0071] In one embodiment, the image sample feature is a high-dimensional small sample feature. The high-dimensional small sample feature refers to the sample feature of high-dimensional small sample data, that is, sample data with a small number of samples and many feature dimensions contained in the samples. The high-dimensional small sample feature contains a large number of redundant, irrelevant, or overly correlated features, or even noise features.
[0072] Furthermore, if Figure 5 As shown, in step S1, a feature set including image sample features is obtained, which specifically includes steps S11 to S13, which are described in detail as follows:
[0073] S11: Obtain image sample data from a preset database.
[0074] Specifically, the preset database stores image sample data, which is image information contained in the pre-collected image samples. The server obtains the image sample data from the database.
[0075] S12: According to the preset model training requirements, feature extraction is performed on the image sample data to obtain basic sample features.
[0076] Specifically, the model training requirements correspond to the business functions of the image recognition model. The model training requirements corresponding to different business functions may be the same or different. The server is pre-set with the model training requirements corresponding to each business function.
[0077] The server extracts image features related to the business functions of the image recognition model from the image sample data according to the model training requirements to obtain basic sample features. For example, if the image recognition model is a biological recognition model for a specific population and its business function is to identify the species of a specific population, the server extracts the biological appearance features of the population from the image sample data as the basic sample features.
[0078] S13: Perform data cleaning on basic sample features to obtain image sample features, and group the image sample features into a feature set.
[0079] Specifically, data cleaning of basic sample features may include cleaning of abnormal feature dimensions and standardization of effective feature dimensions, etc. Among them, cleaning of abnormal feature dimensions includes but is not limited to deleting abnormal feature dimensions that do not meet preset requirements through coverage, change rate, positive and negative ratio, null value rate, etc., and standardization of effective feature dimensions includes but is not limited to normalization, discretization, dummy variable encoding, variable space mapping, data transformation and other processing.
[0080] The server cleans the data of basic sample features, removes abnormal feature dimensions, and standardizes the effective feature dimensions to obtain unified, standardized and effective image sample features, and then forms a feature set with the obtained image sample features.
[0081] In this embodiment, by obtaining image sample data from a preset database, performing feature extraction on the image sample data according to preset model training requirements, and then performing data cleaning on the basic sample features, a feature set including image sample features is obtained, thereby preprocessing the image sample features, so that the image sample features in the feature set are all unified and standardized valid sample features, providing an accurate and effective data basis for subsequent feature dimensionality reduction, and avoiding reducing the accuracy of feature dimensionality reduction due to the non-standardization of image sample features.
[0082] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0083] In one embodiment, a feature selection device for an image sample is provided, and the feature selection device for an image sample corresponds one-to-one to the feature selection method for an image sample in the above embodiment. Figure 6 As shown, the feature selection device of the image sample includes: an acquisition module 10, a first screening module 20, a second screening module 30, a third screening module 40 and a combination module 50. The detailed description of each functional module is as follows:
[0084] An acquisition module 10, used to acquire a feature set including features of image samples;
[0085] The first screening module 20 is used to screen the image sample features in the feature set for redundant features based on a preset filter method, and obtain N redundant feature subsets and non-redundant feature subsets containing non-redundant features, wherein each redundant feature subset contains redundant features that are redundant to each other, and N is a positive integer;
[0086] The second screening module 30 is used to perform Schmidt orthogonalization processing on each redundant feature subset to obtain N orthogonalized feature subsets, and use a preset Wrapper method to perform feature screening on the N orthogonalized feature subsets, and the screened features form a first feature subset;
[0087] The third screening module 40 is used to calculate the correlation between each image sample feature in the feature set and the preset target category feature, and screen out the image sample features related to the target category feature according to the correlation, and form the screened image sample features into a second feature subset;
[0088] The combining module 50 is used to perform a union operation on the non-redundant feature subset, the first feature subset and the second feature subset to obtain a new feature set.
[0089] Furthermore, the first screening module 20 includes:
[0090] A similarity calculation module 201 is used to calculate the feature similarity between every two image sample features in the feature set;
[0091] The redundant feature screening submodule 202 is used to determine redundant features and non-redundant features according to feature similarity, group non-redundant features into non-redundant feature subsets, and group mutually redundant redundant features into redundant feature subsets to obtain N redundant feature subsets.
[0092] Furthermore, the similarity calculation module 201 is also used to calculate the Euclidean distance between every two image sample features in the feature set, and use the value of the Euclidean distance as the feature similarity between every two image sample features.
[0093] Furthermore, the third screening module 40 includes:
[0094] The correlation calculation submodule 401 is used to calculate the covariance matrix between each image sample feature in the feature set and the preset target category feature, and determine the correlation between each image sample feature and the preset target category feature according to the covariance matrix;
[0095] The related feature screening submodule 402 is used to screen out the related degrees that meet the preset related degree conditions from the obtained related degrees, and form the image sample features corresponding to the screened related degrees into a second feature subset.
[0096] Furthermore, the image sample feature is a high-dimensional small sample feature, and the acquisition module 10 includes:
[0097] The sample acquisition submodule 101 is used to acquire image sample data from a preset sample database;
[0098] The feature extraction submodule 102 is used to extract features from the image sample data according to the preset model training requirements to obtain basic sample features;
[0099] The data cleaning submodule 103 is used to perform data cleaning on the basic sample features to obtain image sample features and to form a feature set from the image sample features.
[0100] The specific definition of the feature selection device for image samples can be found in the definition of the feature selection method for image samples above, which will not be repeated here. Each module in the above-mentioned feature selection device for image samples can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0101] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a feature selection method for an image sample is implemented.
[0102] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for selecting features of image samples in the above embodiment are implemented, such as Figure 2 Alternatively, when the processor executes the computer program, the functions of each module / unit of the feature selection device for image samples in the above embodiment are realized, for example Figure 6 The functions of the modules 10 to 50 are shown in Figure 1. To avoid repetition, they will not be described in detail here.
[0103] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the method for selecting features of image samples in the above method embodiment is implemented, or when the computer program is executed by a processor, the functions of each module / unit in the device for selecting features of image samples in the above device embodiment are implemented. To avoid repetition, it will not be described here.
[0104] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0105] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0106] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A feature selection method for an image sample, characterized in that: The feature selection method of the image sample comprises: Get a feature set containing image sample features; Based on a preset filter method, redundant feature screening is performed on the image sample features in the feature set to obtain N redundant feature subsets and non-redundant feature subsets containing non-redundant features, wherein each of the redundant feature subsets contains redundant features that are redundant to each other, and N is a positive integer; Performing Schmidt orthogonalization processing on each of the redundant feature subsets to obtain N orthogonalized feature subsets, and using a preset Wrapper method to perform feature screening on the N orthogonalized feature subsets, and forming the screened features into a first feature subset; Calculating the correlation between each of the image sample features in the feature set and a preset target category feature, and filtering out the image sample features related to the target category feature according to the correlation, and forming the filtered image sample features into a second feature subset; A union operation is performed on the non-redundant feature subset, the first feature subset, and the second feature subset to obtain a new feature set.
2. The feature selection method of image samples according to claim 1, characterized in that: The preset Filter method is used to perform redundant feature screening on the image sample features in the feature set to obtain N redundant feature subsets and a non-redundant feature subset containing non-redundant features, including: Calculating the feature similarity between every two image sample features in the feature set; The redundant features and the non-redundant features are determined according to the feature similarity, the non-redundant features are grouped into the non-redundant feature subset, and the redundant features that are redundant to each other are grouped into the redundant feature subset, so as to obtain N redundant feature subsets.
3. The feature selection method of image samples according to claim 2, characterized in that: The calculating the feature similarity between every two image sample features in the feature set comprises: The Euclidean distance between every two of the image sample features in the feature set is calculated, and the value of the Euclidean distance is used as the feature similarity between every two of the image sample features.
4. The feature selection method of image samples according to claim 1, characterized in that: The calculating the correlation between each of the image sample features in the feature set and a preset target category feature, and filtering out the image sample features related to the target category feature according to the correlation, and forming the filtered image sample features into a second feature subset, comprises: Calculating a covariance matrix between each of the image sample features in the feature set and the preset target category feature, and determining the correlation between each of the image sample features and the preset target category feature according to the covariance matrix; The correlations that meet a preset correlation condition are screened out from the obtained correlations, and the image sample features corresponding to the screened correlations are formed into the second feature subset.
5. The feature selection method of image samples according to claim 1, characterized in that: The image sample feature is a high-dimensional small sample feature, and the step of obtaining a feature set including the image sample feature includes: Obtain image sample data from a preset sample database; According to the preset model training requirements, feature extraction is performed on the image sample data to obtain basic sample features; The basic sample features are cleaned to obtain the image sample features, and the image sample features are combined into the feature set.
6. A feature selection device for an image sample, characterized in that: The feature selection device of the image sample comprises: An acquisition module, used for acquiring a feature set including features of image samples; A first screening module is used to screen the image sample features in the feature set for redundant features based on a preset filter method to obtain N redundant feature subsets and non-redundant feature subsets containing non-redundant features, wherein each of the redundant feature subsets contains the redundant features that are redundant to each other, and N is a positive integer; A second screening module is used to perform Schmidt orthogonalization processing on each of the redundant feature subsets to obtain N orthogonalized feature subsets, and use a preset Wrapper method to perform feature screening on the N orthogonalized feature subsets, and the screened features form a first feature subset; a third screening module, configured to calculate the correlation between each of the image sample features in the feature set and a preset target category feature, and screen out the image sample features related to the target category feature according to the correlation, and form the screened image sample features into a second feature subset; The combination module is used to perform a union operation on the non-redundant feature subset, the first feature subset and the second feature subset to obtain a new feature set.
7. The feature selection device for image samples according to claim 6, characterized in that: The first screening module comprises: A similarity calculation module, used for calculating the feature similarity between every two image sample features in the feature set; The redundant feature screening submodule is used to determine the redundant features and the non-redundant features according to the feature similarity, form the non-redundant features into the non-redundant feature subset, and form the redundant features that are redundant to each other into the redundant feature subset, so as to obtain N redundant feature subsets.
8. The feature selection device for image samples according to claim 6, characterized in that: The third screening module comprises: A correlation calculation submodule, used to calculate a covariance matrix between each of the image sample features in the feature set and the preset target category feature, and determine the correlation between each of the image sample features and the preset target category feature according to the covariance matrix; The related feature screening submodule is used to screen out the related degrees that meet the preset related degree conditions from the obtained related degrees, and form the image sample features corresponding to the screened related degrees into the second feature subset.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for selecting features of an image sample according to any one of claims 1 to 5 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for selecting features of an image sample according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Mutual information group policy embedded dynamic characteristic selection method
CN106991446A
Improved feature evaluation method based on mutual information
CN108564009A