Small sample image recognition method and system and storage medium
By using shear robust norms in small sample image recognition, the ASB-2DPCA optimization model is constructed and the projection matrix is adaptively adjusted, which solves the problem of insufficient robustness in small sample image recognition, and significantly improves the recognition performance and accuracy.
Patent Information
- Application Number
- CN202411422571.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional image processing methods lack robustness in small sample image recognition, resulting in a reduced reliability of recognition results.
By introducing shear robust norms as distance measurement criteria, ASB-2DPCA optimization model is constructed, the projection matrix is adaptively adjusted, the weight of the training data matrix is calculated, the weighted covariance matrix is obtained, the eigenvalue decomposition is performed, and the eigenvectors are filtered to construct the optimal The matrix is projected and iteratively updated cyclically until the reconstruction error meets the convergence conditions, and is used for feature extraction and recognition of small sample images.
It significantly improves the performance and reliability of image recognition, suppresses noise interference, improves recognition accuracy, and can extract more accurate and reliable features in small sample images.
Smart Images

Figure CN118942101A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image recognition, and in particular relates to a small sample image recognition method, system and storage medium. Background Art
[0002] With the rapid development of digital technology, the collection and storage of image data has become increasingly convenient. Optical acquisition devices such as cameras and video cameras have enabled large amounts of image data to be accumulated rapidly. However, this trend has also brought new challenges, especially in the field of image recognition. The core of the image recognition task is to extract representative feature information from complex image data, which is a difficult task for computer systems.
[0003] The traditional image processing method (PCA method) projects the original image data into a low-dimensional space through linear transformation to extract key features. However, the traditional image processing method has limitations when processing small sample images. A large number of samples are usually required to ensure the accuracy and robustness of feature extraction. However, the recognition of small sample images often lacks sufficient robustness, resulting in reduced reliability of the recognition results. Summary of the invention
[0004] The present invention provides a small sample image recognition method, system and storage medium, which can extract more accurate and reliable features from small sample images by adaptively adjusting the projection matrix, thereby significantly improving the performance of image recognition.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is: A first aspect of the present invention provides a small sample image recognition method, comprising: Obtain a detection target image to be identified, extract features of the detection target image using a preset optimal projection matrix to obtain a target feature matrix; identify the target feature matrix using a classifier to obtain a target recognition result; The process of constructing the optimal projection matrix includes: Obtain training images and perform preprocessing and centering to obtain a training data matrix; The shear robust norm is introduced as the distance metric to construct the ASB-2DPCA optimization model; the training data matrix is input into the ASB-2DPCA optimization model, and the weight of the training data matrix is calculated by the shear robust norm; the weighted covariance matrix is calculated based on the weight and the training data matrix; Perform eigenvalue decomposition on the weighted covariance matrix to obtain the corresponding eigenvalues and eigenvectors; construct a projection matrix based on the eigenvalues and eigenvectors, and calculate the reconstruction error of the projection matrix for the training image; The projection matrix is updated iteratively until the reconstruction error meets the convergence condition and the optimal projection matrix is output.
[0006] Furthermore, the training images are obtained and preprocessed and centralized to obtain a training data matrix, including: The training image is size-standardized to obtain an intermediate feature map; the intermediate feature map is grayscaled and normalized to obtain a binary image; the binary image is centralized to obtain a training data matrix.
[0007] Furthermore, the shear robust norm is introduced as the distance metric to construct the ASB-2DPCA optimization model, and the training data matrix is input into the ASB-2DPCA optimization model, including: ; In the formula, It is represented by the training data matrix number; j is represented by the matrix row number; Expressed as the row-wise shear parameter, Represented as preset input variable parameters, Expressed as The training data matrix row characteristics; Matrix trace operation, Represented as the optimal projection matrix in the row direction; is a fixed constant; m represents the number of row vectors in the input matrix of the ASB-2DPCA optimization model; N represents the number of training data matrices; The weights are expressed as a matrix of training data.
[0008] Furthermore, the weights of the training data matrix are calculated by clipping the robust norm, including: ; in, It represents the training data matrix number; j represents the matrix row number, Represented as preset input variable parameters; Expressed as The training data matrix row characteristics; Represented as the weights of the training data matrix; Expressed as row-wise shearing parameter.
[0009] Furthermore, the weighted covariance matrix is calculated based on the weights and the training data matrix, and the expression formula is: ; In the formula, It is represented as the weighted covariance matrix in the t-1th iteration; is represented as the weight of the training data matrix in the t-1th iteration.
[0010] Furthermore, the reconstruction error convergence conditions include: ; ; In the formula, is the objective function, Represents the optimal projection matrix in the row direction The minimum reconstruction error is Represents the optimal projection matrix in the row direction The minimum reconstruction error, t represents the number of iterations, is the optimal projection matrix in the row direction of the iterative output of the t-th step, is the optimal projection matrix in the row direction of the iterative output of the t-1th step, To set the threshold.
[0011] Furthermore, the preset optimal projection matrix is used to extract features of the detection target image to obtain a target feature matrix, including: The detection target image is feature extracted to obtain the detection data matrix; the row feature matrix of the detection data matrix is calculated, and the row feature matrix is used as the input data in the column direction. The expression formula is: ; In the formula, Represented as preset input variable parameters, Expressed as The first detection data matrix Row features, It is represented as the optimal projection matrix in the row direction, and m is represented as the number of row vectors in the input matrix in the ASB-2DPCA optimization model; Expressed as the number of detection data matrices; Represented as the matrix row number; Represented as the detection data matrix number; Expressed as row-wise shear parameter; Expressed as columnar shear parameter; is the optimal projection matrix in the column direction; Expressed as The first detection data matrix Column features; It is represented by the number of column vectors in the input matrix of the ASB-2DPCA optimization model; and Represented as the identity matrix; Represented as the matrix column number; Through the optimal projection matrix in the row direction The optimal projection matrix C in the column direction is used to extract the features of the detection data matrix to obtain the target feature matrix; the specific expression is: ; Expressed as the target feature matrix, Represented as detection data matrix features.
[0012] Furthermore, the target feature matrix is identified by a classifier to obtain a target recognition result, including: The feature distance between the target image and the preset sample image is calculated based on the target feature matrix. The expression formula is: ; The formula is, Represented as the detection target image; Represented as a sample image; Represented as the target feature matrix; Represented as the feature matrix of the sample image; Represented as the w-th singular value of the target feature matrix; is the rank of the target feature matrix; when and , output recognition results ; Identifies the category.
[0013] A second aspect of the present invention provides a small sample image recognition system, comprising: The recognition module is used to obtain the detection target image to be recognized, extract the features of the detection target image using the preset optimal projection matrix to obtain the target feature matrix; and recognize the target feature matrix through the classifier to obtain the target recognition result; An acquisition module is used to acquire training images and perform preprocessing and centralization to obtain a training data matrix; The model building module introduces the shear robust norm as the distance metric to build the ASB-2DPCA optimization model; the training data matrix is input into the ASB-2DPCA optimization model, and the weight of the training data matrix is calculated by the shear robust norm; The optimization module is used to calculate the weighted covariance matrix according to the weights and the training data matrix; perform eigenvalue decomposition on the weighted covariance matrix to obtain the corresponding eigenvalues and eigenvectors; construct a projection matrix based on the eigenvalue screening eigenvectors, and calculate the reconstruction error of the projection matrix for the training image; iteratively update the projection matrix until the reconstruction error meets the convergence condition, and output the optimal projection matrix.
[0014] A third aspect of the present invention provides a computer storage medium having a computer program stored thereon, characterized in that the small sample image recognition method described in the first aspect is executed by operating according to the computer program.
[0015] Compared with the prior art, the present invention has the following beneficial effects: The present invention introduces the shear robust norm as a distance metric to construct an ASB-2DPCA optimization model; a training data matrix is input into the ASB-2DPCA optimization model, and the weight of the training data matrix is calculated by the shear robust norm; by using the shear robust norm as the distance metric, noise interference can be effectively suppressed, and the stability and reliability of image recognition can be improved; and the feature extraction process is dynamically adjusted according to the characteristics of the data to better capture the key information in the image.
[0016] The present invention calculates a weighted covariance matrix according to weights and a training data matrix; performs eigenvalue decomposition on the weighted covariance matrix to obtain corresponding eigenvalues and eigenvectors; constructs a projection matrix based on eigenvalue screening eigenvectors, and calculates the reconstruction error of the projection matrix for the training image; iteratively updates the projection matrix until the reconstruction error meets the convergence condition, and outputs the optimal projection matrix; by solving the optimal projection matrix, the image data can be effectively mapped to a low-dimensional space, while retaining the most representative features, and the recognition accuracy of the image can be improved.
[0017] The present invention obtains a detection target image to be identified, uses a preset optimal projection matrix to perform feature extraction on the detection target image to obtain a target feature matrix; identifies the target feature matrix through a classifier to obtain a target recognition result; and by adaptively adjusting the projection matrix, more accurate and reliable features can be extracted from a small sample image, thereby significantly improving the performance of image recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of a small sample image recognition method provided in Example 1 of the present invention; Figure 2 The identification histogram of parameters b and h of ASB-2DPCA in the WildFish image database provided in Example 1 of the present invention at different feature dimensions; Figure 3 The identification histogram of parameters b and h of ASB-2DPCA in different feature dimensions in the MNIST image database provided by Example 1 of the present invention; Figure 4 The identification histogram of parameters b and h of ASB-2DPCA in the GTSRB image database provided in Example 1 of the present invention at different feature dimensions; Figure 5 The identification histogram of parameters b and h of ASB-2DPCA in the Extended Yale B image database provided in Example 1 of the present invention at different feature dimensions; Figure 6This is a visualization comparison diagram of the reconstruction of the original image by different methods in the MNIST database provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0019] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0020] Example 1 like Figure 1 As shown, this implementation provides a method for identifying a water environment target, including: Get the training images and perform preprocessing and centering to obtain the training data matrix, including: The training image is size-standardized to obtain an intermediate feature map; the intermediate feature map is grayscaled and normalized to obtain a binary image; the binary image is centralized to obtain a training data matrix.
[0021] The shear robust norm is introduced as the distance metric to construct the ASB-2DPCA optimization model. The training data matrix is input into the ASB-2DPCA optimization model, including: ; In the formula, It is represented by the training data matrix number; j is represented by the matrix row number; Expressed as the row-wise shear parameter, Represented as preset input variable parameters, Expressed as The training data matrix row characteristics; Matrix trace operation, Represented as the optimal projection matrix in the row direction; is a fixed constant; m represents the number of row vectors in the input matrix of the ASB-2DPCA optimization model; N represents the number of training data matrices; The weights are expressed as a matrix of training data.
[0022] The weights of the training data matrix are calculated by clipping the robust norm, including: ; in, It represents the training data matrix number; j represents the matrix row number, Represented as preset input variable parameters; Expressed as The training data matrix row characteristics; Represented as the weights of the training data matrix; Expressed as row-wise shearing parameter.
[0023] This embodiment calculates the weight of the training data matrix by using the shear robust norm; by using the shear robust norm as the distance metric, noise interference can be effectively suppressed and the stability and reliability of image recognition can be improved.
[0024] According to weight The weighted covariance matrix is calculated with the training data matrix, and the expression formula is: ; In the formula, It is represented as the weighted covariance matrix in the t-1th iteration; is represented as the weight of the training data matrix in the t-1th iteration.
[0025] Perform eigenvalue decomposition on the weighted covariance matrix to obtain the corresponding eigenvalues and eigenvectors; construct a projection matrix based on the eigenvalues and eigenvectors, and calculate the reconstruction error of the projection matrix for the training image; iteratively update the projection matrix until the reconstruction error meets the convergence condition, and output the optimal projection matrix. The reconstruction error convergence condition is: ; ; In the formula, is the objective function, Represents the optimal projection matrix in the row direction The minimum reconstruction error is Represents the optimal projection matrix in the row direction The minimum reconstruction error, t represents the number of iterations, is the optimal projection matrix in the row direction of the iterative output of the t-th step, is the optimal projection matrix in the row direction of the iterative output of the t-1th step, To set the threshold.
[0026] Obtain a detection target image to be identified, and use a preset optimal projection matrix to extract features of the detection target image to obtain a target feature matrix, including: The detection target image is feature extracted to obtain the detection data matrix; the row feature matrix of the detection data matrix is calculated, and the row feature matrix is used as the input data in the column direction. The expression formula is: ; In the formula, Represented as preset input variable parameters, Expressed as The first detection data matrix Row features, It is represented as the optimal projection matrix in the row direction, and m is represented as the number of row vectors in the input matrix in the ASB-2DPCA optimization model; Expressed as the number of detection data matrices; Represented as the matrix row number; Represented as the detection data matrix number; Expressed as row-wise shear parameter; Expressed as columnar shear parameter; is the optimal projection matrix in the column direction; Expressed as The first detection data matrix Column features; It is represented by the number of column vectors in the input matrix of the ASB-2DPCA optimization model; and Represented as the identity matrix; Represented as the matrix column number.
[0027] Calculate the weights of the detection data matrix , according to the weight Calculate the weighted covariance matrix with the detection data matrix , the expression formula is: ; ; The weighted covariance matrix Perform eigenvalue decomposition to obtain the corresponding eigenvalues and eigenvectors; construct the optimal projection matrix C in the column direction using the eigenvectors corresponding to the first c largest eigenvalues; extract the features of the detection data matrix through the optimal projection matrix in the row direction and the optimal projection matrix C in the column direction to obtain the target feature matrix; the specific expression is: ; Expressed as the target feature matrix, Represented as detection data matrix features.
[0028] The target feature matrix is identified by the classifier to obtain the target recognition result, including: The feature distance between the target image and the preset sample image is calculated based on the target feature matrix. The expression formula is: ; The formula is, Represented as the detection target image; Represented as a sample image; Represented as the target feature matrix; Represented as the feature matrix of the sample image; Represented as the w-th singular value of the target feature matrix; is the rank of the target feature matrix; when and , output recognition results ; This embodiment can extract more accurate and reliable features from a small sample image by adaptively adjusting the projection matrix, thereby significantly improving the performance of image recognition.
[0029] In the embodiment of the present invention, the performance of ASB-2DPCA is extensively verified in four image databases: WildFish, MNIST, GTSRB and Extended Yale B, mainly including the selection of optimal parameters, application capability in complex noise environment (selected in two databases: WildFish and MNIST) and subspace clustering (selected in GTSRB database and Extended Yale B database) and other related experiments. In addition, in order to more clearly observe the advantages and disadvantages of the experimental results of the ASB-2DPCA optimization model under the same experimental conditions, it is considered to compare with the N-2DPCA optimization model, the R1-2DPCA optimization model, the (2D) 2PCA optimization model, the RC2DPCA optimization model and the BA2DPCA optimization model; at the same time, from the perspective of experimental convenience, it is stipulated that all methods with bidirectional structures keep the number of row-wise feature dimensions consistent with the number of column-wise feature dimensions. Finally, the experimental processes related to feature recognition, image reconstruction, image and clustering are repeated 10 times, with the aim of avoiding the occurrence of accidental phenomena to the greatest extent.
[0030] First, we select parameters. In the proposed ASB-2DPCA, the shear parameter, as an important indicator to measure its robustness, needs to be reasonably selected. ASB-2DPCA involves two shear parameters: one is the row shear parameter. , and the other is the columnar shear parameter , which respectively control the number of row-wise noise data and column-wise noise data. From the perspective of reducing the search range, the number of row-wise training samples b and the number of column-wise training samples h are usually set to the number of noise data in their respective directions. Therefore, and Can be written as follows: ; ; in, is the row shearing parameter, is the columnar shear parameter, and Respectively represent the number of training samples in row and column directions. At this time, regarding the parameter and The selection problem has been transformed into the optimal determination of b and h.
[0031] Table 1, the average optimal recognition accuracy (%), average minimum reconstruction error and corresponding standard deviation of each method in the WildFish database;
[0032] Table 2, the average optimal recognition accuracy (%), average minimum reconstruction error and corresponding standard deviation of each method in the MNIST database;
[0033] In real application environments, the distribution of data often presents unpredictable characteristics, which makes it impossible to accurately determine the amount of noise data. In order to select more appropriate values for b and h, the present invention selects the "k-fold cross validation technology" to achieve parameter acquisition. Specifically, in the four image databases of WildFish, MNIST, GTSRB and Extended Yale B, the corresponding number of training samples is 420, 400, 1360 and 1140 respectively. Figures 2 to 5 The relationship between the parameter selection of the ASB-2DPCA optimization model and the average recognition accuracy in four image databases is described. Figures 2 to 5 The trend of the change in the middle bar graph shows that when the value range of b and h is less than 0.2 or greater than 0.8, the ASB-2DPCA optimization model cannot obtain satisfactory recognition accuracy and reconstruction error. The main reason for this phenomenon may be that the importance of some data points is too low or too high. On the contrary, when the values of b and h vary between 0.2 and 0.8, the overall expressiveness of the ASB-2DPCA optimization model is significantly improved, which shows that the shearing parameters in this range can relatively appropriately evaluate the importance of each sample point.
[0034] In summary, in this embodiment, for the WildFish database in which occlusion and Gaussian noise are superimposed in the experiment, the values of b and h are uniformly set to 0.4; for the MNIST database in which Gaussian noise and salt and pepper noise are superimposed in the experiment, the values of b and h are uniformly set to 0.3; for the GTSRB database with fog, rain, occlusion and other noises in the experiment, the values of b and h are uniformly set to 0.5; for the Extended Yale B database in which a small black block is used for occlusion in the experiment, the values of b and h are uniformly set to 0.4.
[0035] In order to verify the application ability of the ASB-2DPCA optimization model in complex noise environments, the reconstruction results of clean images in the MNIST database using different methods are visualized. Figure 6 As shown, the visual reconstruction results of the image samples also show that ASB-2DPCA can suppress noise information more effectively than other methods.
[0036] In order to verify from multiple angles that the features extracted by ASB-2DPCA accurately reflect the key information of the original image, it was decided to achieve the above requirements through subspace clustering experiments.
[0037] Table 3, the average recognition accuracy (%) and the corresponding standard deviation of each method in the GTSRB database under different number of categories (f);
[0038] Table 4, the average recognition accuracy (%) and the corresponding standard deviation of each method under different number of categories (f) in the Extended Yale B database;
[0039] Tables 3 and 4 give the clustering results for the GTSRB database with its own noise information and the ExtendedYale B database with small black block occlusion, respectively. From the presented results, it can be clearly observed that the clustering ability of the ASB-2DPCA optimization model method proposed in this implementation is better than other analog methods under the action of different numbers of categories. This is mainly because ASB-2DPCA itself has good robustness and will not be greatly affected by noise information. Once the problem of the real projection matrix deviating from the expected solution caused by noise information can be effectively suppressed, the clustering results will naturally be greatly improved.
[0040] Example 2 This embodiment provides a water environment target recognition system. The water environment target recognition system described in this embodiment can be used to execute the water environment target recognition method described in Example 1. The water environment target recognition system includes: The recognition module is used to obtain the detection target image to be recognized, extract the features of the detection target image using the preset optimal projection matrix to obtain the target feature matrix; and recognize the target feature matrix through the classifier to obtain the target recognition result; An acquisition module is used to acquire training images and perform preprocessing and centralization to obtain a training data matrix; The model building module introduces the shear robust norm as the distance metric to build the ASB-2DPCA optimization model; the training data matrix is input into the ASB-2DPCA optimization model, and the weight of the training data matrix is calculated by the shear robust norm; The optimization module is used to calculate the weighted covariance matrix according to the weights and the training data matrix; perform eigenvalue decomposition on the weighted covariance matrix to obtain the corresponding eigenvalues and eigenvectors; construct a projection matrix based on the eigenvalue screening eigenvectors, and calculate the reconstruction error of the projection matrix for the training image; iteratively update the projection matrix until the reconstruction error meets the convergence condition, and output the optimal projection matrix.
[0041] The recognition module uses a preset optimal projection matrix to extract features from the detection target image to obtain a target feature matrix, including: The detection target image is feature extracted to obtain the detection data matrix; the row feature matrix of the detection data matrix is calculated, and the row feature matrix is used as the input data in the column direction. The expression formula is: ; In the formula, Represented as preset input variable parameters, Expressed as The first detection data matrix Row features, It is represented as the optimal projection matrix in the row direction, and m is represented as the number of row vectors in the input matrix in the ASB-2DPCA optimization model; Expressed as the number of detection data matrices; Represented as the matrix row number; Represented as the detection data matrix number; Expressed as row-wise shear parameter; Expressed as columnar shear parameter; is the optimal projection matrix in the column direction; Expressed as The first detection data matrix Column features; It is represented by the number of column vectors in the input matrix of the ASB-2DPCA optimization model; and Represented as the identity matrix; Represented as the matrix column number.
[0042] The target feature matrix is obtained by extracting the features of the detection data matrix through the optimal projection matrix B in the row direction and the optimal projection matrix C in the column direction; the specific expression is: ; Expressed as the target feature matrix, Represented as detection data matrix features.
[0043] The recognition module recognizes the target feature matrix through a classifier to obtain a target recognition result, including: The feature distance between the target image and the preset sample image is calculated based on the target feature matrix. The expression formula is: ; The formula is, Represented as the detection target image; Represented as a sample image; Represented as target feature matrix; Represented as the feature matrix of the sample image; Represented as the w-th singular value of the target feature matrix; is the rank of the target feature matrix; when and , output recognition results ; Identifies the category.
[0044] Example 3 This embodiment provides a computer storage medium on which a computer program is stored, characterized in that the small sample image recognition method described in Embodiment 1 is executed by operating according to the computer program.
[0045] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, etc.) containing computer-usable program code. M , optical storage, etc.).
[0046] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0047] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0048] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0049] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A small sample image recognition method, characterized in that: include: Acquire a detection target image to be identified, and use a preset optimal projection matrix to extract features of the detection target image to obtain a target feature matrix; The target feature matrix is identified by a classifier to obtain a target recognition result; The process of constructing the optimal projection matrix includes: Obtain training images and perform preprocessing and centering to obtain a training data matrix; The shear robust norm is introduced as the distance metric to construct the ASB-2DPCA optimization model; the training data matrix is input into the ASB-2DPCA optimization model, and the weight of the training data matrix is calculated by the shear robust norm; the weighted covariance matrix is calculated based on the weight and the training data matrix; Perform eigenvalue decomposition on the weighted covariance matrix to obtain the corresponding eigenvalues and eigenvectors; construct a projection matrix based on the eigenvalues and eigenvectors, and calculate the reconstruction error of the projection matrix for the training image; The projection matrix is updated iteratively until the reconstruction error meets the convergence condition and the optimal projection matrix is output.
2. The small sample image recognition method according to claim 1, characterized in that: Get the training images and perform preprocessing and centering to obtain the training data matrix, including: The training image is size-standardized to obtain an intermediate feature map; the intermediate feature map is grayscaled and normalized to obtain a binary image; the binary image is centralized to obtain a training data matrix.
3. The small sample image recognition method according to claim 1, characterized in that: The shear robust norm is introduced as the distance metric to construct the ASB-2DPCA optimization model. The training data matrix is input into the ASB-2DPCA optimization model, including: ; In the formula, It represents the training data matrix number; j represents the matrix row number; Expressed as row-wise shear parameter, Represented as preset input variable parameters, Expressed as The training data matrix row characteristics; Matrix trace operation, Represented as the optimal projection matrix in the row direction; is a fixed constant; m represents the number of row vectors in the input matrix of the ASB-2DPCA optimization model; N represents the number of training data matrices; The weights are expressed as a matrix of training data.
4. The small sample image recognition method according to claim 3, characterized in that: The weights of the training data matrix are calculated by clipping the robust norm, including: ; in, It represents the training data matrix number; j represents the matrix row number, Represented as preset input variable parameters; Expressed as The training data matrix row characteristics; Represented as the weights of the training data matrix; Expressed as row-wise shearing parameter.
5. The small sample image recognition method according to claim 4, characterized in that: The weighted covariance matrix is calculated based on the weights and the training data matrix. The expression formula is: ; In the formula, It is represented as the weighted covariance matrix in the t-1th iteration; is represented as the weight of the training data matrix in the t-1th iteration.
6. The small sample image recognition method according to claim 3, characterized in that: The reconstruction error convergence conditions include: ; ; In the formula, is the objective function, Represents the optimal projection matrix in the row direction The minimum reconstruction error is Represents the optimal projection matrix in the row direction The minimum reconstruction error, t represents the number of iterations, is the optimal projection matrix in the row direction of the iterative output of the t-th step, is the optimal projection matrix in the row direction of the iterative output of the t-1th step, To set the threshold.
7. The small sample image recognition method according to claim 1, characterized in that: The preset optimal projection matrix is used to extract features of the detection target image to obtain the target feature matrix, including: The detection target image is feature extracted to obtain the detection data matrix; the row feature matrix of the detection data matrix is calculated, and the row feature matrix is used as the input data in the column direction. The expression formula is: ; In the formula, Represented as preset input variable parameters, Expressed as The first detection data matrix Row features, It is represented as the optimal projection matrix in the row direction, and m is represented as the number of row vectors in the input matrix in the ASB-2DPCA optimization model; Expressed as the number of detection data matrices; Represented as the matrix row number; Represented as the detection data matrix number; Expressed as row-wise shear parameter; Expressed as columnar shear parameter; is the optimal projection matrix in the column direction; Expressed as The first detection data matrix Column features; It is represented by the number of column vectors in the input matrix of the ASB-2DPCA optimization model; and Represented as the identity matrix; Represented as the matrix column number; Through the optimal projection matrix in the row direction The optimal projection matrix C in the column direction is used to extract the features of the detection data matrix to obtain the target feature matrix; the specific expression is: ; Expressed as the target feature matrix, Represented as detection data matrix features.
8. The small sample image recognition method according to claim 7, characterized in that: The target feature matrix is identified by the classifier to obtain the target recognition result, including: The feature distance between the target image and the preset sample image is calculated based on the target feature matrix. The expression formula is: ; The formula is, Represented as the detection target image; Represented as a sample image; Represented as target feature matrix; Represented as the feature matrix of the sample image; Represented as the w-th singular value of the target feature matrix; is the rank of the target feature matrix; when and , output recognition results ; Identifies the category.
9. A small sample image recognition system, characterized in that: include: The recognition module is used to obtain the detection target image to be recognized, and use the preset optimal projection matrix to extract the features of the detection target image to obtain the target feature matrix; The target feature matrix is identified by a classifier to obtain a target recognition result; An acquisition module is used to acquire training images and perform preprocessing and centralization to obtain a training data matrix; The model building module introduces the shear robust norm as the distance metric to build the ASB-2DPCA optimization model; the training data matrix is input into the ASB-2DPCA optimization model, and the weight of the training data matrix is calculated by the shear robust norm; An optimization module for calculating the weighted covariance matrix based on the weights and the training data matrix; Perform eigenvalue decomposition on the weighted covariance matrix to obtain the corresponding eigenvalues and eigenvectors; based on The eigenvalues are used to select eigenvectors to construct a projection matrix, and the reconstruction error of the projection matrix for the training image is calculated. The projection matrix is updated iteratively until the reconstruction error meets the convergence condition, and the optimal projection matrix is output.
10. A computer storage medium having a computer program stored thereon, characterized in that: The computer program is operated to execute the small sample image recognition method according to any one of claims 1 to 8.
