Feature extraction optimization method and system based on convolutional neural network

By extracting anchor features, similar features and differential features in the convolutional neural network, calculating feature vector distances and optimizing classification, the problem of insufficient accuracy of feature classification in the convolutional neural network is solved, and the accuracy of feature classification is improved and efficient processing is achieved.

CN116681985BActive Publication Date: 2025-08-08北京远舢智能科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310658451.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-05
Publication Date
2025-08-08
Estimated Expiration
2043-06-05

AI Technical Summary

Technical Problem

The existing convolutional neural network lacks verification of image data classification results, resulting in insufficient accuracy of feature classification.

Method used

By extracting anchor features, similar features and differential features of image data, calculate the feature vector distance and input it into the Softmax function model, use the cross entropy function to optimize feature classification, and form a closed-loop feedback channel to improve the accuracy of feature classification.

Benefits of technology

It effectively reduces the error rate of feature classification, improves the accuracy of feature classification, and realizes seamless connection and efficient processing of features at different levels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116681985B_ABST
    Figure CN116681985B_ABST
Patent Text Reader

Abstract

The present application relates to a feature extraction optimization method and system based on a convolutional neural network, which belongs to the field of deep learning. The method includes: obtaining multiple image data; extracting features of the multiple image data, and dividing the multiple features into anchor features A, similar features P, and different features N; obtaining m groups of input value sequences (A, P, N) based on the anchor features A, similar features P, and different features N, where m ≥ 2; calculating the distance L between the first combined feature vector AP and the second combined feature vector AN in each group of input value sequences (A, P, N) based on a loss function model; inputting the m distances into a Softmax function model to obtain a probability distribution value y corresponding to each distance L, and inputting the probability distribution value y into a cross entropy function model to obtain a similarity degree K. The present application has the effect of improving the accuracy of feature classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of deep learning, and in particular to a feature extraction optimization method and system based on convolutional neural networks. Background Art

[0002] With the development of the Internet, the amount of images transmitted over the network has increased exponentially. In response to this ever-increasing amount of image data, researchers have proposed convolutional neural networks, which can automatically classify and recognize large amounts of image data.

[0003] A convolutional neural network consists of an input layer, hidden layers, and an output layer. The input layer performs preliminary preparations such as cleaning and normalizing the input image data. The hidden layer includes convolutional layers, pooling layers, Inception modules, and fully connected layers. The convolutional layers extract features from the input image data (including edges, textures, colors, and other features). The pooling layers select and filter the features extracted by the convolutional layers. The Inception module is a hidden layer formed by stacking convolutional and pooling layers. An Inception module simultaneously incorporates multiple different types of convolution and pooling operations, increasing the inter-class differences in the extracted features. The fully connected layers perform nonlinear combinations of the extracted features and output them to the model through the output layer.

[0004] The structure of the convolutional neural network and the tasks performed by each structure above indicate that existing convolutional neural networks for image classification lack verification of their output results, making it impossible to guarantee the accuracy of the classification between the output features. Therefore, it is urgent to develop a new neural network training method that can improve the accuracy of the output feature classification. Summary of the Invention

[0005] This application provides a feature extraction optimization method and system based on convolutional neural network, which has the characteristic of improving feature classification accuracy.

[0006] The first purpose of this application is to provide a feature extraction optimization method based on convolutional neural network.

[0007] The above-mentioned application objective 1 of this application is achieved through the following technical solutions:

[0008] A feature extraction optimization method based on convolutional neural network, comprising:

[0009] Acquire multiple image data;

[0010] Extract features of multiple image data and divide the multiple features into anchor features A, similar features P, and different features N; obtain m sets of input value sequences (A, P, N), where m ≥ 2, based on the anchor features A, similar features P, and different features N; calculate the distance L between the first combined feature vector AP and the second combined feature vector AN in each set of input value sequences (A, P, N) based on the loss function model;

[0011] Input the m distances into the Softmax function model respectively to obtain the probability distribution value y corresponding to each distance L, and input the probability distribution value y into the cross entropy function model to obtain the similarity degree K.

[0012] By adopting the above technical solution, first, the features of multiple image data are extracted in order to obtain enough sample data to facilitate the subsequent training of the model as anchor features A, similar features P and different features N. Then, multiple groups of input value sequences (A, P, N) are formed, and the similarity between similar features P and different features N is determined by calculating the distance L between the first combined feature vector AP and the second combined feature vector AN in each group of input value sequences (A, P, N). Finally, the similarity between similar features P and different features N is used as the input of the Softmax function model, and the cross entropy function model is used to optimize the value output by the Softmax function model, that is, to calculate the similarity between the predicted result and the true value of the sample, so as to facilitate the control of the inter-class distance and intra-class distance of the feature based on the similarity, effectively reducing the feature classification error rate, that is, achieving the purpose of improving the feature classification accuracy.

[0013] In a preferred example, the present application may be further configured as follows: the features of the plurality of image data extracted include:

[0014] Convert image data into a three-dimensional array value;

[0015] Sort multiple filters with the same scanning windows and moving steps;

[0016] The first-ranked filter scans the three-dimensional array value with the scanning window and the moving step to obtain a local array value C1;

[0017] The second-ranked filter scans the local array value C1 with the scanning window and the moving step to obtain the local array value C2; ...;

[0018] The last-order filter scans the local array value Cp-1 using the scanning window and the moving step to obtain the local array value Cp, where p refers to the sequence number of the last-order filter;

[0019] Arrange all local array values in descending order according to the size of the scale;

[0020] In any two adjacent local array values Cq-1 and local array values Cq, q∈N * and 1≤q≤p, expand the local array value Cq to the same scale as the local array value Cq-1, and then merge the expanded local array value with the local array value Cq-1 until the final array value is obtained;

[0021] Map the final array values to the specified one-dimensional vector to obtain the features of the image data.

[0022] By adopting the above technical solution, the present application can fuse early low-level local array values with deep high-level local array values by fusing local array values of different scales, thereby achieving the purpose of feature reuse; secondly, the fusion of early low-level local array values with deep high-level local array values can also achieve seamless connection of structures at different levels, and the processing efficiency is higher.

[0023] In a preferred example, the present application can be further configured as follows: after the local array value Cq is expanded to the same scale as the local array value Cq-1, the expanded local array value is merged with the local array value Cq-1, including: Eq-1=Eq*A+Cq-1, wherein Eq is equal to Cq, A is the magnification factor, and Eq-1 is the new local array value obtained by magnifying the local array value Eq by A times and merging it with the local array value Cq-1.

[0024] In a preferred example, the present application may be further configured as follows: the dividing of the plurality of features into anchor features A, similar features P, and different features N includes:

[0025] For features belonging to the same category, the anchor feature is set first, and the feature farthest from the anchor feature is regarded as the same category feature; the features that do not belong to the same category are regarded as the different category features.

[0026] In a preferred example, the present application can be further configured as follows: the calculation of the distance L between the first combined feature vector AP and the second combined feature vector AN in each set of input value sequences (A, P, N) based on the loss function model includes: L=max(D a,p -D a,n +α, 0), where D a,p is the distance between the anchor feature A and the similar feature P, D a,n is the distance between the anchor feature A and the difference feature N, and α is a preset value.

[0027] In a preferred example, the present application can be further configured as follows: the calculation formula of the Softmax function model is: Among them, L iIt refers to the distance corresponding to the i-th group of input value sequence (A, P, N).

[0028] In a preferred example, the present application can be further configured as follows: the calculation formula of the cross entropy function model is: Where y is the probability distribution value, is the true value of the sample.

[0029] The second purpose of this application is to provide a feature extraction optimization system based on convolutional neural networks.

[0030] The second object of the present application is achieved through the following technical solutions:

[0031] A convolutional neural network-based feature extraction and optimization system, used to execute the above-mentioned convolutional neural network-based feature extraction and optimization method, comprising:

[0032] Data input layer, used to obtain multiple image data;

[0033] A feature extraction layer is used to extract features of multiple image data and divide the multiple features into anchor features A, similar features P and different features N;

[0034] The data processing layer is used to obtain m sets of input value sequences (A, P, N), where m ≥ 2, based on the anchor feature A, the similar feature P, and the different feature N. It is also used to calculate the distance L between the first combined feature vector AP and the second combined feature vector AN in each set of input value sequences (A, P, N) based on the loss function model;

[0035] The data optimization layer is used to input the m distances into the Softmax function model to obtain the probability distribution value y corresponding to each distance L, and input the probability distribution value y into the cross entropy function model to obtain the similarity degree K.

[0036] By adopting the above technical solution, the data input layer, feature extraction layer, data processing layer and data optimization layer are used to make the features output by the model in the feature extraction layer more discriminative. At the same time, the intra-class distance and inter-class distance of the features are controlled by calculating the similarity between the prediction results and the true value of the samples, thereby effectively reducing the classification error rate.

[0037] In a preferred example, the present application can be further configured as follows: further comprising a data output layer (500), wherein the data output layer (500) is connected to the feature extraction layer (200), and the data output layer (500) is used to output the features extracted by the feature extraction layer (200).

[0038] In summary, this application includes at least one of the following beneficial technical effects:

[0039] 1. First, the feature extraction layer can extract features of multiple image data, thereby providing data support for obtaining sufficient sample data;

[0040] 2. Secondly, the feature extraction layer, data processing layer and data optimization layer form a closed-loop feedback channel, which can divide the features extracted by the feature extraction layer into anchor features A, similar features P and different features N, and form multiple groups of input value sequences (A, P, N). The similarity between the similar features P and the different features N is determined by calculating the distance L between the first combined feature vector AP and the second combined feature vector AN in each group of input value sequences (A, P, N). Finally, the similarity between the similar features P and the different features N is used as the input of the Softmax function model, and the cross entropy function model is used to optimize the value output by the Softmax function model, that is, to calculate the similarity between the predicted results and the true value of the sample, so as to facilitate the control of the inter-class distance and intra-class distance of the features based on the similarity, effectively reducing the feature classification error rate, that is, achieving the purpose of improving the feature classification accuracy;

[0041] 3. Finally, the present application can also fuse local array values of different scales, fuse early low-level local array values with deep high-level local array values, and achieve the purpose of feature reuse; and because early low-level local array values can be fused with deep high-level local array values, it can also achieve seamless connection of structures at different levels, and the processing efficiency is higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 This is a diagram of a feature extraction optimization system based on a convolutional neural network in an embodiment of the present application.

[0043] Figure 2 This is a flow chart of the feature extraction optimization method based on convolutional neural network in an embodiment of the present application.

[0044] Figure 3 This is a working principle diagram of the improved residual network model in the embodiment of the method of this application.

[0045] Figure 4 This is an example diagram of local array values extracted by the filter in the embodiment of the method of the present application.

[0046] Figure 5 This is an example diagram of the working of the Softmax function model in the embodiment of the method of this application.

[0047] Explanation of reference numerals: 100, data input layer; 200, feature extraction layer; 300, data processing layer; 400, data optimization layer; 500, data output layer. DETAILED DESCRIPTION

[0048] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0049] Figure 1 This is a diagram of a feature extraction optimization system based on a convolutional neural network according to an embodiment of the present application. Figure 1 The system includes a data input layer 100, a feature extraction layer 200, a data processing layer 300, a data optimization layer 400, and a data output layer 500. The data input layer 100, the feature extraction layer 200, and the data output layer 500 are connected in sequence, and the feature extraction layer 200, the data processing layer 300, and the data optimization layer 400 also form a closed-loop feedback channel.

[0050] Specifically, the data input layer 100 is used to receive data to be classified, including data types such as images, videos, text, and voice. This example illustrates the data input layer 100 receiving image data, but this does not limit the functionality of the data input layer 100. For example, the data input layer 100 can also receive video data, text data, voice data, and so on. Therefore, the data input layer 100 can be equipped with one or more devices, such as a camera, microphone, keyboard, and scanner, for receiving data to be classified, as needed.

[0051] The feature extraction layer 200, the data processing layer 300, and the data optimization layer 400 are all set inside a computer, and can be set inside a single computer or separately inside different computers. In a specific embodiment, feature items are set in advance in the feature extraction layer 200. When the feature extraction layer 200 receives image data input by the data input layer 100, the feature extraction layer 200 extracts features from the image data according to the feature items set in advance. For example, if feature items a, b, c, and d are set in the feature extraction layer 200, when the feature extraction layer 200 receives the image data, only feature items a, b, c, and d of the image data are extracted, and other feature items will not be identified and extracted. In another specific embodiment, different feature items are set for each type of data in the feature extraction layer 200. When different data types are input, they will be directly matched to the corresponding feature items. For example, the feature extraction layer 200 is set with feature items a, b and c corresponding to image data, feature items b and d corresponding to video data, feature items c and d corresponding to text data, and feature items a, e, f, and g corresponding to voice data. Then, when the data input layer 100 inputs text data, the feature extraction layer 200 will only extract feature items c and d of the text data.

[0052] For image data, the features of the image data may be color features, texture features, shape features, and spatial features.

[0053] After the feature extraction layer 200 identifies and extracts features, it can output the extracted features via the data output layer 500, and can also be input into the data processing layer 300 as sample data of the data processing layer 300. A loss function model is set in the data processing layer 300. The loss function model can calculate the similarity between sample data, thereby facilitating the distinction between different types of sample data. A combination model is set in the data optimization layer 400. The combination model includes a Softmax function model and a cross entropy function model. The Softmax function model is used to receive the data output by the loss function model and generate a prediction result based on the data. The cross entropy function model can calculate the similarity between the prediction result and the true value of the sample and return the similarity to the feature extraction layer 200, so that the feature extraction layer 200 can modify the parameters used when extracting features, or after the feature extraction layer 200 extracts features, the error between the prediction result and the true value of the sample is subtracted based on the similarity, thereby continuously improving the accuracy of feature classification.

[0054] The data output layer 500 is externally connected to a display and a memory. The data output layer 500 is used to transmit the results output by the feature extraction layer 200 to the display, and the display displays the classification results. The data output layer 500 is also used to transmit the results output by the feature extraction layer 200 to the memory, and the memory stores the results output by the feature extraction layer 200 to facilitate subsequent management and maintenance. Therefore, the data output layer 500 can be a wireless communication module, such as a WIFI communication module, a 5G wireless communication module, or a wired communication module, such as a serial interface circuit and a cable, so as to establish a communication link between the feature extraction layer 200 and the external device (display and memory).

[0055] In order to facilitate the description of the process of continuously improving the feature classification accuracy of the feature extraction layer 200, the present application provides a feature extraction optimization method based on a convolutional neural network, which is mainly applied to the closed-loop feedback channel formed by the feature extraction layer 200, the data optimization layer 400, and the data processing layer 300. Figure 2 ,The main process of the feature extraction optimization method based on ,convolutional neural network is described as follows.

[0056] Step S1: Acquire a plurality of image data.

[0057] Image data is sent from the data input layer 100 to the feature extraction layer 200. Specifically, when a camera is provided in the data input layer 100 and the camera sends data to the feature extraction layer 200, the feature extraction layer 200 is considered to have received image data. Similarly, when a microphone is provided in the data input layer 100 and the microphone sends data to the feature extraction layer 200, the feature extraction layer 200 is considered to have received voice data.

[0058] In this method example, the feature extraction layer 200 receives image data as an example for explanation.

[0059] Step S2: extract features of multiple image data and divide the multiple features into anchor features, similar features and difference features.

[0060] After the feature extraction layer 200 receives the image data, it uses the improved residual network model to extract the features of the image data. Specifically, the workflow of the improved residual network model is as follows: Figure 3 shown.

[0061] First, the image data is received and converted into a three-dimensional array of values, also known as pixel values. This conversion process is automatically performed by the computer when it receives the image data. It is a conventional technical means, so it will not be described in detail here. Then, multiple filters with the same scanning window and the same moving step size are sorted and executed:

[0062] The first-ranked filter is used to scan the three-dimensional array value with a pre-set scanning window and a pre-set moving step size to obtain the local array value C1. Specifically, the first-ranked filter scans once to obtain an intermediate array value. After traversing the three-dimensional array value, all the intermediate array values generated during the traversal process are combined to obtain the local array value C1. Continuing:

[0063] The second-ranked filter is used to scan the local array value C1 with a pre-set scanning window and a pre-set moving step to obtain the local array value C2. The specific scanning process is the same as the process of scanning the three-dimensional array value by the first-ranked filter, so it will not be repeated here.

[0064] ...;

[0065] The local array value Cp is obtained by scanning the local array value Cp-1 with the filter that is ranked last with a pre-set scanning window and a pre-set moving step size, where p refers to the serial number of the filter that is ranked last.

[0066] During the scanning process, the first-ranked filter to the last-ranked filter adopt the same scanning window and the same moving step size.

[0067] It should be noted that since the scanning basis of the filter is different, even if the scanning window and moving step size of the filter are equal, the scale of the generated local array value will be different. Take a two-dimensional array value as an example, Figure 4 In the image, there is 9*9 image data, and there are two filters L1 and L2. The scanning windows of the two filters are both 1*1, the moving step of L1 is 2, and the moving step of L2 is also 2. Then the filter L1 traverses the 9*9 image data to obtain 25 intermediate array values. The 25 intermediate array values are combined to form the local array value Q1, Q1=5*5. Figure 4 In the figure, dots represent the scanning position of filter L1; filter L2 uses local array value Q1 as the scanning basis. After filter L2 traverses Q1, 9 intermediate array values are obtained. The 9 intermediate array values are combined to form the local array value Q2, Q2=3*3. Figure 4 In the figure, the scanning position of the filter L1 is indicated by a circle. Therefore, the scales of the local array value Q1 and the local array value Q2 are different.

[0068] After all filters generate a local array value, all local array values are sorted in descending order according to the size of the scale. In any two adjacent local array values Cq-1 and local array values Cq, q∈N *And 1≤q≤p, after the local array value Cq-1 is expanded to the same scale as the local array value Cq, the expanded local array value is merged with the local array value Cq until the final array value is obtained. Specifically, Eq-1=Eq*A+Cq-1, where Eq is equal to Cq, A is the magnification factor, and Eq-1 is the new local array value obtained by magnifying the local array value Eq by A times and merging it with the local array value Cq-1, as shown in the following example: Figure 3 In the equation, M2=M3*A+C2, …, Pp-1=Pp*A+Np-1, that is, Pp-1 is the final array value.

[0069] It should be noted that since the final array value is obtained by expanding the scale of Pp by A times and adding the scale of Np-1, and the original sources of Pp and Np-1 are the three-dimensional array values of the image data, the final array value Pp-1 is also three-dimensional. In order to facilitate the comparison of the final array values corresponding to multiple image data, this application maps the final array value to a specified one-dimensional vector, and uses the mapped one-dimensional vector as the feature of the corresponding image data, and then places the image data into different categories according to the size of the feature. For example, when the specified one-dimensional vector is 128, if 0-31 is a category, 32-63 is a category, 64-95 is a category, and 96-128 is a category, then if the feature of the image data is 29, the image data belongs to the category 0-31.

[0070] Based on the size of the features in each category, the features in a category are divided into anchor features and similar features. Specifically, if the accuracy of the feature at the median in a category is closer to that category, the anchor feature refers to the feature at the median, and the similar features in this case refer to the features at the ends of the category. For example, in the 0-31 category mentioned above, 15 can be used as the anchor feature, while 0 and 31 can be used as similar features. If the accuracy of the features at the ends of the category is closer to that category, the features at the ends can be used as anchor features, while the features at the median are similar features. For example, in the 0-31 category mentioned above, 0 and 31 are anchor features, and 15 is a similar feature. Within the same category, determining whether any feature is closer to that category is actually manually set in advance. For example, if a complete, defect-free image data is manually selected, the features obtained after model training can be used as the anchor features in the category to which the image data belongs, and the features farther away from the anchor feature are similar features.

[0071] In addition, there are also difference features, which refer to features that do not belong to the same category. For example, 35 is a difference feature relative to the features in the 0-31 category. In this example, the model for extracting features from image data is improved based on the residual network model. Since the residual network model can be used to train deeper network layers than the original convolutional neural network, and can also alleviate the gradient vanishing problem caused by the increase in network depth, the improved residual network model also has the same functions as the original residual network. At the same time, it can also fuse local array values of different scales, so that the improved residual network model can better process image data of different sizes. Specifically, the improved residual network model has the following advantages:

[0072] 1. Multi-scale processing: The improved residual network model can process local array values at different scales, and different levels of pyramids can process local array values at different scales, making the final array value contain more comprehensive data.

[0073] 2. Feature reuse: The improved residual network model repeatedly fuses early low-level local array values with deep high-level local array values, so that after multiple reuse of deep local array values, a filtered and effective final array value can be obtained.

[0074] 3. Seamless integration of different layers. The pyramid structure in the improved residual network model is structured from shallow to deep, similar to the structure of a convolutional neural network. This makes it more efficient and convenient when combined with other processing tasks without requiring excessive changes to the model structure.

[0075] In general, through multiple multi-scale processing, the role of each pixel information in the image data is maximized. Feature reuse and the natural characteristics of the pyramid structure enable the improved residual network model to have better recognition and positioning capabilities for image data of different scales, ensuring the accuracy of the obtained features.

[0076] Step S3: According to the anchor feature, the same type feature and the difference feature, m groups of input value sequences (A, P, N) are obtained, where m≥2, A is the anchor feature, P is the same type feature, and N is the difference feature.

[0077] Specifically, when the input image data is too much and needs to be divided into s categories, m≥s≥1, at least s groups of input value sequences (A, P, N) need to be formed, and the features in each category need to be extracted, that is, in a set of input value sequences (A, P, N), A and P come from the same category, and N comes from a category other than the category where A and P are located.

[0078] It should be noted that when forming the input value sequence (A, P, N), the more groups there are, the better the optimization effect will be, but the computing power required for the computer will also be higher. Therefore, in practical applications, the number of groups of the input value sequence (A, P, N) can be determined according to actual conditions.

[0079] Step S4: Based on the loss function model, calculate the distance L between the first combined feature vector AP and the second combined feature vector AN in each set of input value sequences (A, P, N).

[0080] First, each of the m groups of input value sequences (A, P, N) is input into the loss function model in turn, and the distance L between the first combined feature vector AP and the second combined feature vector AN in each group of input value sequences (A, P, N) is obtained. In order to facilitate the explanation of the process of the loss function model generating the distance L, the following is an example of the loss function model calculating one of the m groups of input value sequences (A, P, N): First, the first combined feature vector AP is obtained based on the anchor feature A and the same type feature P, and the second combined feature vector AN is obtained based on the anchor feature A and the difference type feature N. For example, if the anchor feature is 100, the same type feature is 120, and the difference type feature is 112, then the first combined feature vector AP = [100, 120] and the second combined feature vector AN = [100, 112]. Then, the distance L = max(D a,p -D a,n +α, 0), where D a,p is the distance between the anchor feature A and the similar feature P, D a,n is the distance between the anchor feature A and the difference feature N, and α is a preset value that is used to increase the distance between the first combined feature vector AP and the second combined feature vector AN. Therefore, by setting α, the gap between different features can be increased, making it easier to effectively distinguish different features and making subsequent feature classification more accurate.

[0081] It should be noted that the loss function model calculates the same process for any of the m input value sequences (A, P, N), so the calculation process for each sequence is not detailed here. When all m input value sequences (A, P, N) are input into the loss function model, the loss function model will generate m distances L corresponding to the m input value sequences (A, P, N).

[0082] Step S5: Input the m distances into the Softmax function model respectively to obtain the probability distribution value y corresponding to each distance L, and input the probability distribution value y into the cross entropy function model to obtain the similarity degree K.

[0083] Specifically, the calculation formula of the Softmax function model is: Among them, L i Refers to the distance corresponding to the i-th group of input value sequence (A, P, N). Therefore, inputting m distances L into the Softmax function model will obtain the probability distribution value y corresponding to each distance L, such as Figure 4 As shown, L1=3, L2=1, L3=-3, then y1=0.88, y2=0.12, y3≈0.

[0084] The calculation formula of the cross entropy function model is: Among them, y is the probability distribution value, also called the prediction result, and The true sample value is pre-stored in the cross-entropy function model. Prediction results for different categories correspond to different true sample values, and K refers to the degree of similarity between the prediction result and the true sample value. A smaller K indicates a closer prediction result to the true sample value, which also indicates a higher prediction accuracy. Therefore, the parameters of the improved residual network model used to extract features from image data can be improved based on the similarity K. After the improved residual network model extracts features, the error value can be automatically subtracted based on the error between the prediction result and the true sample value, thereby continuously bringing the prediction result closer to the true sample value, thereby improving the accuracy of feature classification.

[0085] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the aforementioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. A feature extraction optimization method based on convolutional neural network, characterized in that: include: Acquire multiple image data; Extract features of multiple image data and divide the features into anchor features A, similar features P and different features N; The anchor feature A, the same feature P and the different feature N obtain m sets of input value sequences (A, P, N), m ≥ 2; Based on the loss function model, calculate the distance L between the first combined feature vector AP and the second combined feature vector AN in each set of input value sequences (A, P, N); The m distances are respectively input into the Softmax function model to obtain the probability distribution value y corresponding to each distance L, and the probability distribution value y is input into the cross entropy function model to obtain the similarity degree K; the calculation formula of the cross entropy function model is: Among them, y is the probability distribution value, that is, the prediction result, is the true value of the sample; Modify the parameters of the model when extracting image features according to the similarity degree k; or after the model extracts the features, automatically subtract the error value based on the error between the predicted result and the true value of the sample.

2. The feature extraction optimization method based on convolutional neural network according to claim 1, characterized in that: The features of the plurality of image data extracted include: Convert image data into a three-dimensional array value; Sort multiple filters with the same scanning windows and moving steps; The first-ranked filter scans the three-dimensional array value with the scanning window and the moving step to obtain a local array value C1; The second-ranked filter scans the local array value C1 with the scanning window and the moving step to obtain the local array value C2; ...; The last-order filter scans the local array value Cp-1 using the scanning window and the moving step to obtain the local array value Cp, where p refers to the sequence number of the last-order filter; Arrange all local array values in descending order according to the size of the scale; In any two adjacent local array values Cq-1 and local array values Cq, q∈N * and 1≤q≤p, expand the local array value Cq to the same scale as the local array value Cq-1, and then merge the expanded local array value with the local array value Cq-1 until the final array value is obtained; Map the final array values to the specified one-dimensional vector to obtain the features of the image data.

3. The feature extraction optimization method based on convolutional neural network according to claim 2, characterized in that: After the local array value Cq is expanded to the same scale as the local array value Cq-1, the expanded local array value and the local array value Cq-1 are merged, including: Eq-1=Eq*A+Cq-1, wherein Eq is equal to Cq, A is the magnification factor, and Eq-1 is the new local array value obtained by magnifying the local array value Eq by A times and merging it with the local array value Cq-1.

4. The feature extraction optimization method based on convolutional neural network according to claim 1, characterized in that: The dividing of the plurality of features into anchor features A, similar features P and different features N comprises: For features belonging to the same category, first set the anchor feature, and take the feature farthest from the anchor feature as the same category feature; Features that do not belong to the same category are regarded as differential features.

5. The feature extraction optimization method based on convolutional neural network according to claim 1, characterized in that: The method of calculating the distance L between the first combined feature vector AP and the second combined feature vector AN in each set of input value sequences (A, P, N) based on the loss function model includes: L=max(D a,p -D a,n +α, 0), where D a,p is the distance between the anchor feature A and the similar feature P, D a,n is the distance between the anchor feature A and the difference feature N, and α is a preset value.

6. The feature extraction optimization method based on convolutional neural network according to claim 1, characterized in that: The calculation formula of the Softmax function model is: i≤m, where L i It refers to the distance corresponding to the i-th group of input value sequence (A, P, N).

7. A feature extraction and optimization system based on convolutional neural network, used to execute the method according to any one of claims 1 to 6, characterized in that: include: A data input layer (100), for acquiring a plurality of image data; A feature extraction layer (200) is used to extract features of a plurality of image data and divide the plurality of features into anchor features A, similar features P and different features N; The data processing layer (300) is used to obtain m groups of input value sequences (A, P, N), m≥2, based on the anchor feature A, the similar feature P, and the different feature N; and is also used to calculate the distance L between the first combined feature vector AP and the second combined feature vector AN in each group of input value sequences (A, P, N) based on the loss function model; The data optimization layer (400) is used to input the m distances into the Softmax function model to obtain the probability distribution value y corresponding to each distance L, and input the probability distribution value y into the cross entropy function model to obtain the similarity degree K; the calculation formula of the cross entropy function model is: Among them, y is the probability distribution value, that is, the prediction result, is the true value of the sample; the parameters of the model when extracting image features are modified according to the similarity degree k; or after the model extracts the features, the error value is automatically subtracted according to the error between the prediction result and the true value of the sample.

8. The feature extraction and optimization system based on convolutional neural network according to claim 7, characterized in that: The invention also includes a data output layer (500), wherein the data output layer (500) is connected to the feature extraction layer (200), and the data output layer (500) is used to output the features extracted by the feature extraction layer (200).

Citation Information

Patent Citations

  • Personnel reidentification method based on deep learning and distance metric learning

    CN108345860A

  • Image retrieval method and device, equipment and medium

    CN111522986A