Classification method and device based on low rank representation and label fusion, medium and equipment

By using low-rank representation and label fusion, training images are represented in low rank and category labels are fused. The feature matrix is ​​then restored using the Fisher discriminant criterion, which solves the problem of large data volume and computational cost of deep learning models on edge devices and achieves efficient category recognition.

CN116468953BActive Publication Date: 2026-01-23SHANDONG INSPUR SCI RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310465688.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-24
Publication Date
2026-01-23
Estimated Expiration
2043-04-24

AI Technical Summary

Technical Problem

On edge devices with limited computing and hardware resources, the data volume and computational cost of deep learning models are too large to be suitable for deployment.

Method used

We employ a low-rank representation and label fusion method to represent training images in a low-rank manner, incorporate category label information, and reconstruct the feature matrix using the Fisher discrimination criterion to learn the mapping relationship and determine the category.

Benefits of technology

It reduces the amount of data and computation, making it suitable for category recognition on edge devices and improving computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116468953B_ABST
    Figure CN116468953B_ABST
Patent Text Reader

Abstract

The application provides a classification method and device based on low-rank representation and label fusion, a medium and equipment. The method comprises the following steps: performing low-rank representation on training pictures to obtain corresponding first low-rank matrices; fusing category label information of the training pictures into the corresponding first low-rank matrices to obtain second low-rank matrices, and restoring the second low-rank matrices into feature matrices of the training pictures; acquiring a picture to be classified, learning a mapping relationship between a feature matrix of the picture to be classified and second low-rank matrices of various categories; and determining a category of the picture to be classified according to the mapping relationship and the feature matrices of the training pictures of various categories. The data amount related to the embodiments of the application is relatively small, and a deep learning model does not need to be used, and the calculation amount is also relatively small, so the application is suitable for being applied to edge equipment with limited computing resources and hardware resources.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of classification, in particular to a classification method and device based on low-rank representation and label fusion, medium and equipment. BACKGROUND

[0002] At present, when multi-class recognition is performed, a deep learning model is generally used. However, it is not suitable to deploy the deep learning model on an edge device with limited computing resources and hardware resources. Therefore, the data volume and the amount of calculation involved in the deep learning model are relatively large, and it is necessary to provide a multi-class recognition scheme suitable for deployment on an edge device with limited computing resources and hardware resources. SUMMARY

[0003] In view of at least one of the above technical problems, the embodiments of the present application provide a classification method and device based on low-rank representation and label fusion, medium and equipment.

[0004] According to a first aspect, the embodiments of the present application provide a classification method based on low-rank representation and label fusion, which comprises:

[0005] performing low-rank representation on a training picture to obtain a corresponding first low-rank matrix;

[0006] fusing class label information of the training picture into the corresponding first low-rank matrix to obtain a second low-rank matrix, and restoring the second low-rank matrix into a feature matrix of the training picture;

[0007] obtaining a picture to be classified, and learning a mapping relationship between a feature matrix of the picture to be classified and second low-rank matrices of various classes;

[0008] determining a class of the picture to be classified according to the mapping relationship and the feature matrix of the training picture of each class.

[0009] According to a second aspect, the embodiments of the present application provide a classification device based on low-rank representation and label fusion, which comprises:

[0010] a low-rank representation module configured to perform low-rank representation on a training picture to obtain a corresponding first low-rank matrix;

[0011] a label fusion module configured to fuse class label information of the training picture into the corresponding first low-rank matrix to obtain a second low-rank matrix, and restore the second low-rank matrix into a feature matrix of the training picture;

[0012] a mapping determination module configured to obtain a picture to be classified, and learn a mapping relationship between a feature matrix of the picture to be classified and second low-rank matrices of various classes;

[0013] A category determining module is configured to determine the category of the picture to be classified according to the mapping relationship and the feature matrix of the training picture of each category.

[0014] According to a third aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program. When the computer program is executed in a computer, the computer program causes the computer to execute the method provided in the first aspect.

[0015] According to a fourth aspect, an embodiment of the present application provides a computing device, which comprises a memory and a processor. The memory stores executable code. When the processor executes the executable code, the method provided in the first aspect is implemented.

[0016] The method and device provided in the embodiment of the present application, the medium and the device based on low-rank representation and label fusion, perform low-rank representation on the training picture to obtain a corresponding first low-rank matrix, fuse the category label information of the training picture into the corresponding first low-rank matrix to obtain a second low-rank matrix, restore the second low-rank matrix into a feature matrix of the training picture, acquire a picture to be classified, learn a mapping relationship between the feature matrix of the picture to be classified and the second low-rank matrix of each category, and determine the category of the picture to be classified according to the mapping relationship and the feature matrix of the training picture of each category. It can be seen that, in the method provided in the embodiment of the present application, the feature matrix is represented as the first low-rank matrix, then the category label information is added into the first low-rank matrix to obtain the second low-rank matrix, and then the category recognition is performed. The data amount involved in this scheme is relatively small, and a deep learning model does not need to be used, and the calculation amount is also relatively small, and therefore the scheme is suitable for being applied to an edge device with limited computing resources and hardware resources. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 FIG. 1 is a flowchart of a classification method based on low-rank representation and label fusion according to an embodiment of the present application. DETAILED DESCRIPTION

[0018] In a first aspect, an embodiment of the present application provides a classification method based on low-rank representation and label fusion. Figure 1 The method comprises the following steps S110-S140:

[0019] S110, performing low-rank representation on a training picture to obtain a corresponding first low-rank matrix;

[0020] It can be understood that there are many training pictures, which include training pictures of multiple categories. For example, some training pictures are of pedestrians, and some training pictures are of vehicles. The categories include pedestrians and vehicles.

[0021] The first low-rank matrix is obtained by performing low-rank representation on a training picture.

[0022] In one embodiment, S110 can specifically include:

[0023] extracting a first feature matrix from the training picture;

[0024] performing low-rank decomposition on the first feature matrix by minimizing a nuclear norm to obtain the first low-rank matrix.

[0025] That is, a feature is extracted from a training picture to obtain a corresponding feature matrix, which is referred to as a first feature matrix, and then low-rank decomposition is performed on the first feature matrix by minimizing a nuclear norm to obtain a first low-rank matrix.

[0026] It can be understood that the rank can measure the correlation, and the correlation of the matrix actually has the structure information of the matrix. If the correlation between the rows of the matrix is strong, it means that the matrix can actually be projected to a lower-dimensional linear subspace, that is, it can be completely expressed by a few vectors, and it is low-rank. Therefore, if the matrix represents structural information, such as an image, a user-recommendation table, etc., there is a certain correlation between the rows of the matrix, and the matrix is generally low-rank. If X is an m-row n-column numerical matrix, rank(X) is the rank of X, and if rank(X) is much smaller than m and n, X is referred to as a low-rank matrix. Each row or column of the low-rank matrix can be linearly expressed by other rows or columns, and it can be seen that it contains a large amount of redundant information. By using the redundant information, missing data can be recovered.

[0027] The nuclear norm refers to the sum of singular values of a matrix, and the English is Nuclear Norm.

[0028] That is, the feature data space of the training picture is converted into a low-rank subspace.

[0029] It can be seen that the first feature matrix with a large amount of data and a large amount of calculation is not used here, but the first feature matrix is converted into a low-rank matrix, that is, a first low-rank matrix. The first low-rank matrix can not only reduce the amount of data, but also reduce the amount of calculation.

[0030] S120, class label information of the training picture is integrated into the corresponding first low-rank matrix to obtain a second low-rank matrix, and the second low-rank matrix is restored to a feature matrix of the training picture;

[0031] It can be understood that the category label information is not included in the first low-rank matrix, and the category label information is included in the second low-rank matrix, and then the second low-rank matrix is restored to the feature matrix, that is, the second low-rank matrix is restored to the original feature data space, at this time, the feature data space not only contains the features of the image, but also contains the features of the category.

[0032] In one embodiment, the category label information of the training picture is integrated into the corresponding first low-rank matrix to obtain a second low-rank matrix, which can specifically include:

[0033] According to the category label information of the training picture, a corresponding label vector is generated; wherein the label vector includes N elements, each element corresponds to a category, N is the number of categories, the corresponding element of the category of the training picture in the label vector is a first value, and the remaining elements in the label vector are a second value;

[0034] The label vector is transposed to obtain a corresponding column vector;

[0035] The first low-rank matrix and the column vector are spliced to obtain the second low-rank matrix.

[0036] The first value can be 1, and the second value can be 0.

[0037] For example, there are a total of 10 categories, that is, N is 10, and the category 1 corresponding to a training image, then the label vector of this training picture can be {1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, and the first element in the label vector is 1, and the remaining elements are 0. If the label vector of a training picture is {0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, then the training picture corresponds to category 10. The label vector is a row vector, the label vector of the training picture is transposed to obtain a column vector, and then the first low-rank matrix and the column vector are spliced to obtain a second low-rank matrix. It can be seen that one column in the second low-rank matrix is specially used to represent the category, and the remaining categories are elements in the first low-rank matrix.

[0038] In one embodiment, the second low-rank matrix is restored to the feature matrix of the training picture, which includes using Fisher discriminant criterion to restore the second low-rank matrix to the feature matrix of the training picture.

[0039] The Fisher discriminant criterion is to project and convert a multi-dimensional problem into a low-dimensional problem for processing. A suitable projection axis is selected, so that the sample points used are projected onto this axis to obtain projection values, so that the distance of the projection values formed by the same class of samples is as small as possible, and the distance of the projection values between different classes is as large as possible.

[0040] It can be seen that the second low-rank matrix of each training picture is restored to the original feature data space by using the Fisher discriminant criterion.

[0041] S130, obtaining a picture to be classified, learning a mapping relationship between a feature matrix of the picture to be classified and the second low-rank matrix of each category;

[0042] Specifically, the mapping relationship between the second low-rank matrix and the first feature matrix of the training picture is learned by using the corresponding relationship between the first feature matrix, the first low-rank matrix, the second low-rank matrix and the second feature matrix of the training picture, and then the mapping relationship between the first feature matrix of the picture to be classified and the second low-rank matrix under different categories is learned.

[0043] Further, in order to further distinguish, the feature matrix directly extracted from the picture can be referred to as the first feature matrix, and the feature matrix restored from the second low-rank matrix can be referred to as the second feature matrix. Therefore, the second low-rank matrix is restored to the feature matrix of the corresponding category, and specifically, the second low-rank matrix can be restored to the second feature matrix of the training picture. Moreover, the mapping relationship between the feature matrix of the picture to be classified and the second low-rank matrix of each category is learned, and specifically, the mapping relationship between the first feature matrix of the picture to be classified and the second low-rank matrix under each category is learned.

[0044] S140, determining the category of the picture to be classified according to the mapping relationship and the feature matrix of the training picture of each category.

[0045] The mapping relationship is a mapping matrix.

[0046] In one embodiment, the category of the picture to be classified is determined according to the mapping relationship and the feature matrix of the training picture of each category, and specifically can include:

[0047] The mapping matrix corresponding to the second low-rank matrix under each category is multiplied by the feature matrix of the picture to be classified to obtain a label vector corresponding to the category of the picture to be classified. Here, the feature matrix is the first feature matrix;

[0048] The label vector whose element corresponding to the category is the first value is selected from the label vectors corresponding to each category of the picture to be classified, and the category corresponding to the label vector is taken as the category of the picture to be classified.

[0049] That is, multiplying the mapping matrix under a category and the first feature matrix of the picture to be classified, the label vector of the picture to be classified corresponding to the category is obtained. The label vector of the category and the element are matched from the label vector of each category corresponding to the picture to be classified, and the category of the label vector is taken as the category of the picture to be classified. For example, the element corresponding to the category in the label vector of a category is not 1, then the label vector is not the category of the picture to be classified. The element corresponding to the category in the label vector of a category is 1, then the label vector is the category of the picture to be classified, and in fact there is only one label vector that meets the condition.

[0050] It can be understood that image recognition is an important research direction in the field of computer vision, and it has wide application in the fields of computer vision, image processing, human-computer interaction, intelligent transportation, etc. At present, the image classification recognition algorithm is mainly divided into supervised learning and unsupervised learning. Among them, the representative methods of unsupervised learning include discriminative clustering algorithm, subspace learning algorithm, principal component analysis method, etc. The main idea of the unsupervised learning method is to use the information of the original data itself to process the image without label, so as to achieve the purpose of extracting image features and recognizing images. Among them, the subspace learning algorithm is a typical method of unsupervised learning, which takes feature extraction and classification problem as the research object, takes sparse representation as the basis, and uses matrix decomposition for feature extraction, that is, uses a small number of basis vectors to represent the data of the image. The advantage of this method is simple calculation and small data amount, and the disadvantage is easy to be disturbed by noise. Low rank representation is proved to have good processing results in multi-class problems and small sample problems, but most of these algorithms are based on linear models, so the method provided by the embodiment of the application is a subspace learning algorithm based on kernel norm minimization, and the category label information is fused in the low rank matrix, so that the multi-class problem can be effectively processed, and the calculation efficiency is greatly improved.

[0051] Among them, the rank of the matrix measures the correlation between the rows or columns of the matrix, and the low rank matrix means that each row or column of the matrix can be represented by a linear combination of other rows or columns. Assuming that the feature matrix is a group of matrix data, there is one or a group of matrices that can recover all the matrix information by using various combination transformations.

[0052] Wherein, the low rank can represent the common characteristics of data to the greatest extent, and is not interfered by abnormal values. It is assumed that data exists a common hidden subspace, i.e. a low rank matrix, and different transformation matrices correspond to different categories. Therefore, the target is the orthogonal basis of the common hidden subspace and the transformation matrix of different categories. The common hidden subspace of different categories is restored to the common hidden subspace through the corresponding transformation matrix of each category. If the data of a category can be restored by the transformation matrix of other categories, it is indicated that the category is similar to other categories or belongs to the same category. Since the low rank subspace in the low rank representation method is generally sparse, it can better preserve the label information of samples.

[0053] Wherein, the Fisher discriminant criterion involves a discriminant fidelity term, a discriminant coefficient term and an orthogonal constraint of the basis. The discriminant fidelity term enables the transformation matrix of each specific category to well represent the samples in the corresponding category and suppress the coefficients of other categories. The discriminant coefficient term is the Fisher discriminant criterion of the coefficients of data. The orthogonal constraint of the basis represents the hidden subspace. The combination of the discriminant fidelity term and the Fisher discriminant criterion enables the reconstruction error and the coefficient to have discriminativeness.

[0054] Wherein, in the application, the low rank representation of the training data cannot be directly applied to solve the problem intuitively, but the mapping relationship of the feature matrix of the picture to be classified to the hidden subspace is learned. Finally, the label vector corresponding to different categories of the picture to be classified is calculated through simple matrix multiplication, so that the classification result is obtained.

[0055] Wherein, as a classic data processing algorithm, the low rank representation can effectively reduce the dimension of the data matrix and is robust to noise and abnormal values. The traditional low rank representation algorithm is based on a matrix decomposition model, and can only process nonlinear data with a single feature, and is difficult to process data with multiple features. In the embodiment of the application, through the low rank representation, on the one hand, the category label information is fused in the low rank matrix, and on the other hand, the problem that the low rank representation is difficult to process data with multiple features is solved. Therefore, it has good application prospect in the field of image recognition.

[0056] In a second aspect, the embodiment of the application provides a classification device based on low rank representation and label fusion, comprising:

[0057] A low rank representation module is configured to perform low rank representation on the training pictures to obtain corresponding first low rank matrices.

[0058] A label fusion module is configured to fuse the category label information of the training pictures into the corresponding first low rank matrices to obtain second low rank matrices, and restore the second low rank matrices to the feature matrices of the training pictures.

[0059] The mapping determining module is configured to obtain a picture to be classified, and learn a mapping relationship between a feature matrix of the picture to be classified and a second low-rank matrix of each category.

[0060] The category determining module is configured to determine a category of the picture to be classified according to the mapping relationship and the feature matrix of the training picture of each category.

[0061] In one embodiment, the low-rank representation module is specifically configured to: extract a first feature matrix from the training picture; and perform low-rank decomposition on the first feature matrix by minimizing a kernel norm, to obtain the first low-rank matrix.

[0062] Correspondingly, the label fusion module is configured to restore the second low-rank matrix to a feature matrix of the corresponding category, including: restoring the second low-rank matrix to a second feature matrix of the training picture.

[0063] Correspondingly, the learning, by the mapping determining module, of the mapping relationship between the feature matrix of the picture to be classified and the second low-rank matrix of each category includes: learning a mapping relationship between a first feature matrix of the picture to be classified and a second low-rank matrix under each category.

[0064] In one embodiment, the label fusion module is specifically configured to: generate a corresponding label vector according to category label information of the training picture; wherein the label vector includes N elements, each element corresponding to a category, N being the number of categories, the category of the training picture corresponding to a first value in the label vector, and the remaining elements in the label vector being a second value; transpose the label vector to obtain a corresponding column vector; and splice the first low-rank matrix and the column vector to obtain the second low-rank matrix.

[0065] In one embodiment, the first value is 1, and the second value is 0.

[0066] In one embodiment, the label fusion module is specifically configured to restore the second low-rank matrix to a feature matrix of the training picture by using Fisher discriminant criteria.

[0067] In one embodiment, the mapping relationship is a mapping matrix; and the category determining module is specifically configured to: multiply the mapping matrix corresponding to the second low-rank matrix under each category and the feature matrix of the picture to be classified, to obtain a label vector of the picture to be classified corresponding to the category; and select, from the label vectors of the picture to be classified corresponding to each category, a label vector whose element corresponding to the category is a first value, and take the category corresponding to the label vector as the category of the picture to be classified.

[0068] It can be understood that the explanations, specific embodiments, advantages, examples and the like of the device provided by the embodiments of the present application can refer to the corresponding parts of the method provided by the first aspect, and will not be described here.

[0069] In a third aspect, the embodiments of the present application provide a computer readable medium, and the computer readable medium stores computer instructions, and the computer instructions make the processor execute the method provided by the first aspect when the processor executes the computer instructions.

[0070] Specifically, a system or device provided with a storage medium can be provided, and the storage medium stores software program codes for implementing the functions of any of the above embodiments, and the computer (or CPU or MPU) of the system or device reads and executes the program codes stored in the storage medium.

[0071] In this case, the program codes read from the storage medium can implement the functions of any of the above embodiments, and therefore the program codes and the storage medium storing the program codes constitute a part of the present application.

[0072] The embodiments of the storage medium for providing the program codes include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards and ROMs. Alternatively, the program codes can be downloaded from a server computer through a communication network.

[0073] In addition, it should be clear that not only the program codes read by the computer can be executed, but also part or all of the actual operations can be completed by the operating system and the like operating on the computer based on the instructions of the program codes, so as to implement the functions of any of the above embodiments.

[0074] In addition, it can be understood that the program codes read from the storage medium can be written into the memory provided in the expansion board inserted into the computer or the memory provided in the expansion module connected to the computer, and then part or all of the actual operations can be executed by the CPU and the like installed on the expansion board or the expansion module based on the instructions of the program codes, so as to implement the functions of any of the above embodiments.

[0075] It can be understood that the explanations, specific embodiments, advantages, examples and the like of the computer readable medium provided by the embodiments of the present application can refer to the corresponding parts of the method provided by the first aspect, and will not be described here.

[0076] In a fourth aspect, an embodiment of the present specification provides a computing device, comprising a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method in any one of the embodiments of the present specification.

[0077] It can be understood that the explanation of the content related to the computing device, the specific implementation, the beneficial effects, the examples and the like provided by the embodiments of the present application can refer to the corresponding parts in the method provided by the first aspect, and will not be repeated here.

[0078] Each of the embodiments in the present specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments mainly describes the difference from other embodiments. In particular, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the related parts can refer to the part of the method embodiments.

[0079] Those skilled in the art should realize that, in one or more examples described above, the functions described by the present application can be realized by hardware, software, a plug-in or any combination thereof. When realized by software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or codes on the computer readable medium.

[0080] The above specific embodiments further explain the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement and the like made on the basis of the technical solutions of the present application should be included in the protection scope of the present application.

Claims

1. A classification method based on low-rank representation and label fusion, characterized in that, include: The training images are represented in a low-rank manner to obtain the corresponding first low-rank matrix. The category label information of the training image is incorporated into the corresponding first low-rank matrix to obtain the second low-rank matrix, and the second low-rank matrix is ​​restored to the feature matrix of the training image. Obtain the image to be classified, and learn the mapping relationship between the feature matrix of the image to be classified and the second low-rank matrix of each category; Based on the mapping relationship and the feature matrix of the training images of each category, the category of the image to be classified is determined; The step of integrating the category label information of the training images into the corresponding first low-rank matrix to obtain the second low-rank matrix includes: Based on the category label information of the training images, a corresponding label vector is generated; wherein, the label vector includes N elements, each element corresponds to a category, N is the number of categories, the element corresponding to the category of the training image in the label vector is the first value, and the remaining elements in the label vector are the second values; Transpose the label vector to obtain the corresponding column vector; The first low-rank matrix and the column vector are concatenated to obtain the second low-rank matrix; the mapping relationship is a mapping matrix; determining the category of the image to be classified based on the mapping relationship and the feature matrices of the training images of each category includes: Multiply the mapping matrix corresponding to the second low-rank matrix under each category with the feature matrix of the image to be classified to obtain the label vector of the image to be classified for that category; From the label vectors of each category corresponding to the image to be classified, select the label vector whose element is the first value corresponding to the category, and take the category corresponding to the label vector as the category of the image to be classified.

2. The method according to claim 1, characterized in that, The step of representing the training images in low rank to obtain the corresponding first low rank matrix includes: The first feature matrix is ​​extracted from the training images; the first feature matrix is ​​then decomposed into a low-rank matrix by minimizing the nuclear norm. Correspondingly, the step of restoring the second low-rank matrix to the feature matrix of the corresponding category includes: restoring the second low-rank matrix to the second feature matrix of the training image; Correspondingly, learning the mapping relationship between the feature matrix of the image to be classified and the second low-rank matrix of each category includes: learning the mapping relationship between the first feature matrix of the image to be classified and the second low-rank matrix of each category.

3. The method according to claim 2, characterized in that, The first value is 1, and the second value is 0.

4. The method according to claim 1, characterized in that, The step of restoring the second low-rank matrix to the feature matrix of the training image includes: Using the Fisher discriminant criterion, the second low-rank matrix is ​​reduced to the feature matrix of the training image.

5. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed in a computer, causes the computer to perform the method described in any one of claims 1 to 4.

6. A computing device, characterized in that, The method includes a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Gene expression data cancer classification method fusing self-learning and low-rank expression

    CN107526946A

  • Face recognition method based on group sparse representation and low-rank matrix recovery

    CN109522841A