Image recognition method, device, electronic equipment and medium

Through multi-level cascade extraction and diagonal transformation combined with bilateral two-dimensional whitening reconstruction operation, the problem of low recognition accuracy of color images is solved, and the recognition accuracy and robustness under illumination, expression changes and occlusion are improved.

CN118135250BActive Publication Date: 2024-09-20CETC NEW SMART CITY RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410545950.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-06
Publication Date
2024-09-20
Estimated Expiration
2044-05-06

AI Technical Summary

Technical Problem

Existing image recognition methods are easily affected by illumination changes, occlusions, and expression changes when processing color images, resulting in low recognition accuracy, and image channel information is lost when converting color images into grayscale images.

Method used

A multi-level cascade method is used to extract the target image features of color images in multiple color channels, including local image levels, global image levels and inter-image levels, and the row and column information are fused through diagonal transformation, combined with bilateral two-dimensional Whitening reconstruction operation reduces redundancy between pixels and improves robustness.

Benefits of technology

It improves the recognition accuracy of color images under noise conditions such as illumination, expression changes, and occlusion, enhances the robustness of the image, and retains the intrinsic texture-like characteristics of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118135250B
    Figure CN118135250B
Patent Text Reader

Abstract

The present application is applicable to the field of image processing technology, and provides an image recognition method, device, electronic device and medium, the method comprising: obtaining a set of images to be recognized that include multiple images to be recognized; extracting target image features of each image to be recognized in multiple color channels by means of multiple levels of cascading, the multiple levels comprising at least two of the following: local image level, global image level and inter-image level; performing feature recognition on the target image features of each image to be recognized in multiple color channels, and obtaining the channel recognition results corresponding to each image to be recognized in multiple color channels; determining the target recognition results of each image to be recognized based on the channel recognition results corresponding to each image to be recognized in multiple color channels. The method extracts the target image features of each image to be recognized in multiple color channels by means of multiple levels of cascading, which can reduce image feature redundancy from multiple levels and ensure the accuracy of image recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and in particular relates to an image recognition method, device, electronic equipment and medium. Background Art

[0002] Color images are widely used in image target detection, recognition, and segmentation because they contain rich information.

[0003] On the one hand, current image recognition methods usually use the original pixel values ​​of color images for recognition, which are easily affected by external factors such as lighting changes, occlusions, and expression changes (especially for facial images); on the other hand, color images are usually converted into grayscale images for processing, which loses image channel information, resulting in low image recognition accuracy. Summary of the invention

[0004] The embodiments of the present application provide an image recognition method, device, electronic device and medium, which can improve the image recognition accuracy.

[0005] In a first aspect, an embodiment of the present application provides an image recognition method, comprising:

[0006] Obtaining a set of images to be identified that includes a plurality of images to be identified, each of which includes a plurality of color channels;

[0007] A target image feature of each image to be identified in multiple color channels is extracted by cascading multiple levels, wherein the multiple levels include at least two of the following: a local image level, a global image level, and an inter-image level;

[0008] Performing feature recognition on target image features of each to-be-recognized image in multiple color channels to obtain channel recognition results corresponding to each to-be-recognized image in multiple color channels;

[0009] According to the channel recognition results corresponding to each of the multiple color channels of each image to be recognized, a target recognition result of each image to be recognized is determined.

[0010] In a possible implementation manner of the first aspect, a multi-level cascade method can be used to adjust or add feature extraction levels according to actual needs to obtain target image features of each image to be identified in multiple color channels.

[0011] Exemplarily, features of multiple images to be identified may be extracted in sequence, first at the local image level, then at the global image level, and finally at the inter-image level, to obtain target image features of each image to be identified in multiple color channels; features of multiple images to be identified may also be extracted in sequence, first at the inter-image level, then at the global image level, and finally at the local image level, to obtain target image features of each image to be identified in multiple color channels, and so on.

[0012] In a second aspect, an embodiment of the present application provides an image recognition device, including:

[0013] An acquisition module is used to acquire a set of images to be recognized that includes a plurality of images to be recognized, each of which includes a plurality of color channels;

[0014] A feature extraction module, for extracting target image features of each image to be identified in multiple color channels by using a multi-level cascade method, wherein the multiple levels include at least two of the following: a local image level, a global image level, and an inter-image level;

[0015] A feature recognition module is used to perform feature recognition on target image features of each image to be recognized in multiple color channels, and obtain channel recognition results corresponding to each image to be recognized in multiple color channels;

[0016] The determination module is used to determine the target recognition result of each image to be recognized according to the channel recognition results corresponding to each of the multiple color channels of each image to be recognized.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method described in any one of the first aspects is implemented.

[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspects is implemented.

[0019] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes any one of the methods described in the first aspect.

[0020] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0021] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0022] By incorporating the image diagonal transformation technology, the rows (columns) in the transformed diagonal image integrate the information of the columns and rows in the original image at the same time. The integration of more row and column information makes the local block information of the image richer, which is helpful for the subsequent feature extraction operation to achieve the reduction of redundancy between pixels. At the same time, by adopting the cascaded local image block level, global image level and training sample level bilateral two-dimensional whitening reconstruction operation (Two-Dimensional Whitening Reconstruction, TWR), a three-level progressive pixel redundancy reduction is achieved from a small local area of ​​a single image, to a global area of ​​a single image, and then to images in a sample set. At the same time, the intrinsic texture-like features in the image are retained, making the color image more robust under noise conditions such as lighting, expression changes, and occlusion, further improving the color image recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0024] Figure 1 It is a flowchart of an image recognition method provided by an embodiment of the present application;

[0025] Figure 2 is a flowchart of an image recognition method provided by another embodiment of the present application;

[0026] Figure 3 is a schematic diagram of a diagonal transformation provided by an embodiment of the present application;

[0027] Figure 4 is a schematic diagram of another diagonal transformation provided by an embodiment of the present application;

[0028] Figure 5 is a schematic diagram of local feature extraction provided by an embodiment of the present application;

[0029] Figure 6 is a schematic diagram of another image recognition method provided by an embodiment of the present application;

[0030] Figure 7 is a structural block diagram of an image recognition device provided by an embodiment of the present application;

[0031] Figure 8 It is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0032] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0033] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0034] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0035] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0036] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0037] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0038] The image recognition method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0039] Figure 1 This is a flowchart of an image recognition method provided in one embodiment of the present application. As an example but not a limitation, the method can be applied to electronic devices.

[0040] It can be considered that when traditional image recognition methods extract image features, they usually only perform two-dimensional whitening reconstruction operations on the global image or local blocks, which easily loses other channel information of the image, resulting in low image recognition accuracy. Therefore, for color images, how to reduce the redundancy between features and improve the robustness and recognition accuracy of color images under noise conditions such as lighting, expression changes, and occlusion is a technical problem that technicians in this field currently need to solve.

[0041] Based on this, the embodiment of the present application provides an image recognition method, which enriches the local block information of the image by fusing more row and column information, which helps the subsequent feature extraction operation to achieve the reduction of redundancy between pixels; at the same time, by adopting the cascaded local image block level, global image level and training sample level bilateral two-dimensional whitening reconstruction operation, it realizes the progressive pixel redundancy reduction from the local small area of ​​a single image, to the global area of ​​a single image, and then to the three levels between the images of the sample set, so that the color image has stronger robustness under the noise conditions such as lighting, expression changes, occlusion, etc., and further improves the color image recognition accuracy. Figure 1 As shown, the method includes:

[0042] S101, obtaining a set of images to be recognized including a plurality of images to be recognized, each of which includes a plurality of color channels.

[0043] The image set to be identified can be considered as an image set that needs to be identified. The image set to be identified includes multiple images to be identified. The images to be identified are images that need to be identified. Each image to be identified can include multiple color channels. In this embodiment, the type and size of the images to be identified are not limited. For example, the images to be identified can be color images and can be represented in formats such as RGB, YUV, or HSV.

[0044] S102, extracting target image features of each image to be identified in multiple color channels by cascading multiple levels, wherein the multiple levels include at least two of the following: a local image level, a global image level, and an inter-image level.

[0045] The process of extracting target image features by cascading multiple levels can be understood as extracting features of the image to be identified in sequence according to different levels to obtain the final target image features. The multiple levels may include, for example, at least two of the following: local image level, global image level, and inter-image level. Feature extraction at the local image level may refer to local feature extraction of the image to be identified, such as performing corresponding operations on the local image blocks of the image to be identified to obtain the local feature image of the image to be identified; feature extraction at the global image level may refer to global feature extraction of the image to be identified, such as performing corresponding operations on the entire image to be identified to obtain the global feature image of the image to be identified; feature extraction at the inter-image level may refer to inter-image feature extraction of multiple images to be identified, such as performing corresponding operations on all images to be identified according to different color channels to obtain the feature images of the corresponding color channels, etc.

[0046] Specifically, a multiple-level cascade method can be used to extract the target image features of each image to be identified in multiple color channels. This embodiment does not limit the specific process of extracting the target image features. Exemplarily, the features of multiple images to be identified can be extracted in sequence according to the method of first local image level, then global image level, and finally inter-image level, to finally obtain the target image features of each image to be identified in multiple color channels; the features of multiple images to be identified can also be extracted in sequence according to the method of first inter-image level, then global image level, and finally local image level to obtain the target image features of each image to be identified in multiple color channels; the level of feature extraction can also be adjusted or reduced according to actual needs to obtain the target image features of each image to be identified in multiple color channels.

[0047] S103, performing feature recognition on target image features of each to-be-recognized image in a plurality of color channels, and obtaining channel recognition results corresponding to each to-be-recognized image in a plurality of color channels.

[0048] The channel recognition result may refer to the result obtained by performing feature recognition on the target image features of each to-be-recognized image in multiple color channels.

[0049] After obtaining the target image features of each image to be identified in multiple color channels, feature recognition can be performed on the target image features of each image to be identified in multiple color channels to obtain the channel recognition results corresponding to each image to be identified in multiple color channels. The specific content of feature recognition can be determined according to actual needs. For example, the content of feature recognition can be identity recognition, such as face recognition can be performed on the target image features corresponding to each color channel to determine that it is a certain person, that is, the channel recognition results of each color channel; the content of feature recognition can also be emotion recognition, for example, emotion recognition can be performed on the target image features corresponding to each color channel to determine whether it is a happy expression, an angry expression or a painful expression; the content of feature recognition can also be target classification, such as target classification recognition can be performed on the target image features corresponding to each color channel to obtain the object represented by the image to be identified, such as identifying a target such as fruit, banana, car or flower. Or the content of feature recognition can be similarity search, such as searching for similar targets or objects from a preset database.

[0050] Taking the example that the image a to be identified contains three color channels and the content of feature recognition is target classification, the feature recognition of the target image features of the image a to be identified in the three color channels can be, for example: target classification recognition is performed on the target image features of the image a to be identified in the first color channel to obtain the channel recognition result corresponding to the first color channel of the image a to be identified, such as apple; target classification recognition is performed on the target image features of the image a to be identified in the second color channel to obtain the channel recognition result corresponding to the second color channel of the image a to be identified, such as apple; target classification recognition is performed on the target image features of the image a to be identified in the third color channel to obtain the channel recognition result corresponding to the third color channel of the image a to be identified, such as orange.

[0051] The specific identification means may be, for example, to use a linear regression classifier to calculate the target image features of the image to be identified a in the first color channel and the image features of the training image set in the first color channel, respectively, to compare and obtain the channel identification result corresponding to the image to be identified a in the first color channel. The training image set may include multiple pre-collected training images, and the type and size of each training image are not limited.

[0052] S104 , determining a target recognition result of each image to be recognized according to the channel recognition results corresponding to each of the multiple color channels of each image to be recognized.

[0053] The target recognition result may refer to the recognition result finally determined by the image to be recognized.

[0054] After obtaining the channel recognition results corresponding to each image to be recognized in multiple color channels through the above steps, this embodiment can further determine the final recognition result of each image to be recognized. For example, after using a linear regression classifier to perform face recognition on the target image features of each image to be recognized in a single color channel to obtain a three-channel recognition result, a voting method can be used for the three-channel recognition results to achieve the final recognition of the image to be recognized. For example, when the channel recognition results of the image to be recognized a in the three color channels are respectively "Zhang San", "Li Si" and "Zhang San", then the target recognition result of the image to be recognized can be obtained as "Zhang San" through the voting method.

[0055] The present embodiment provides an image recognition method, which obtains a set of images to be recognized that includes multiple images to be recognized, each image to be recognized includes multiple color channels; extracts target image features of each image to be recognized in multiple color channels by cascading multiple levels, the multiple levels include at least two of the following: local image level, global image level, and inter-image level; performs feature recognition on the target image features of each image to be recognized in multiple color channels to obtain channel recognition results corresponding to each image to be recognized in multiple color channels; determines the target recognition result of each image to be recognized based on the channel recognition results corresponding to each image to be recognized in multiple color channels. Using this method, by extracting the target image features of each image to be recognized in multiple color channels by cascading multiple levels, the multiple levels include at least two of the following: local image level, global image level, and inter-image level, the redundancy of image features can be reduced from multiple levels, thereby ensuring the accuracy of subsequent image recognition.

[0056] Figure 2 This is a flowchart of an image recognition method provided by another embodiment of the present application. This embodiment further optimizes the extraction of target image features of each image to be recognized in multiple color channels by using a multiple-level cascade method: constructing diagonal images of each image to be recognized in multiple color channels respectively, and the diagonal images are images after diagonal transformation of the channel images of each image to be recognized in multiple color channels; extracting features of the diagonal images of each image to be recognized in multiple color channels by using a multiple-level cascade method, and obtaining target image features of each image to be recognized in multiple color channels, and the target image features include at least: bilateral two-dimensional whitening features. Figure 2 As shown, the method includes:

[0057] S201, obtaining a set of images to be recognized including a plurality of images to be recognized, each of which includes a plurality of color channels.

[0058] S202 , constructing diagonal images of each to-be-recognized image in multiple color channels respectively, where the diagonal images are images obtained by performing diagonal transformation on the channel images of each to-be-recognized image in multiple color channels.

[0059] The diagonal image may be an image obtained by performing a diagonal transformation on the channel images of each to-be-recognized image in multiple color channels. The channel image may be, for example, an image corresponding to the to-be-recognized image in a certain color channel.

[0060] In this embodiment, diagonal images of each image to be identified in multiple color channels can be constructed separately for subsequent feature extraction, wherein the specific steps of constructing the diagonal image are not limited. For example, the diagonal images of the image to be identified in each color channel can be directly obtained by inputting the channel images of the image to be identified in each color channel into the transformation model, and the transformation model can be used to perform a diagonal transformation on the input image; the diagonal image corresponding to the image to be identified can also be obtained by performing corresponding calculations on the channel images of the image to be identified. The specific calculation steps are not further limited here, such as different channel images can correspond to different calculation steps.

[0061] In some embodiments, respectively constructing diagonal images of each to-be-recognized image in multiple color channels includes:

[0062] Each image to be identified is split into channels to obtain multiple channel images corresponding to each image to be identified;

[0063] According to the number of rows and columns in each channel image, each channel image is respectively subjected to diagonal transformation to obtain diagonal images of each image to be identified in multiple color channels.

[0064] In a specific implementation, each image to be identified may be firstly channel-split to obtain a plurality of channel images corresponding to each image to be identified. For example, when the image to be identified is a color image including three color channels, the channel image of the color image in each color channel may be obtained by channel-split, that is, three channel images may be obtained. Then, in the process of constructing the diagonal image, each channel image may be diagonally transformed according to the difference of each channel image, so as to obtain the diagonal images of each image to be identified in multiple color channels.

[0065] In this embodiment, the diagonal transformation of different channel images can be achieved based on the difference in the number of rows and columns. For example, when A is a channel image corresponding to a certain image to be identified, the diagonal image corresponding to the channel image A is represented as B. The specific diagonal transformation process can be illustrated by the following two figures.

[0066] Figure 3is a schematic diagram of a diagonal transformation provided by an embodiment of the present application, such as Figure 3 As shown, when the number of rows of channel image A (i.e. 4) is less than the number of columns (i.e. 5), two identical channel images A can be horizontally connected as shown in the figure, and an image of the same size as channel image A can be taken from the connected matrix with the diagonal line as the boundary to form a diagonal image B corresponding to channel image A.

[0067] Figure 4 is a schematic diagram of another diagonal transformation provided by an embodiment of the present application, such as Figure 4 As shown, when the number of rows of channel image A (i.e. 5) is greater than the number of columns (i.e. 4), two identical channel images A can be vertically connected as shown, and an image of the same size as channel image A can be taken from the connected matrix with the diagonal line as the boundary to form a diagonal image B corresponding to channel image A.

[0068] In some embodiments, the diagonal transformation can be performed multiple times, that is, channel image A can be transformed into image B through diagonal transformation, image B can be transformed into image C through diagonal transformation, and so on. The specific number of operations can be performed according to actual needs. On this basis, more information of adjacent rows and columns can be integrated to provide an information basis for subsequent accurate feature recognition.

[0069] S203, extracting features from the diagonal images of each image to be identified in multiple color channels by using a multi-level cascade method, and obtaining target image features of each image to be identified in multiple color channels, wherein the target image features at least include: bilateral two-dimensional whitening features.

[0070] After constructing the diagonal images of each image to be identified in multiple color channels, this step can use a multi-level cascade method to extract features of the diagonal images of each image to be identified in multiple color channels, so as to obtain the target image features of each image to be identified in multiple color channels, wherein the target image features can at least include bilateral two-dimensional whitening features, such as the target image features can be obtained by performing feature extraction through a bilateral two-dimensional whitening reconstruction operation.

[0071] In some embodiments, the method of extracting features of diagonal images of each image to be identified in multiple color channels in a multi-level cascade manner to obtain target image features of each image to be identified in multiple color channels includes:

[0072] Perform local feature extraction on each diagonal image respectively to obtain a local feature image corresponding to each diagonal image;

[0073] Performing global feature extraction on the local feature image of each diagonal image respectively to obtain a global feature image corresponding to each diagonal image;

[0074] For each color channel, inter-image feature extraction is performed on multiple global feature images corresponding to the color channel to obtain target image features of each image to be identified in the color channel.

[0075] As a feasible implementation method, firstly, local feature extraction can be performed on each diagonal image of each image to be identified in any color channel to obtain a local feature image corresponding to each diagonal image; then, global feature extraction can be performed on the local feature image obtained from each diagonal image according to the global image level, so as to obtain a global feature image corresponding to each diagonal image; finally, features between multiple global feature images can be extracted from the inter-image level, such as inter-image feature extraction can be performed on multiple global feature images corresponding to the same color channel according to different color channels, so as to obtain the target image features of each image to be identified in this color channel; inter-image feature extraction can also be performed on multiple global feature images of the same image to be identified according to different images to be identified, and so on. This embodiment does not further expand on the specific steps of local feature extraction, global feature extraction, and inter-image feature extraction, as long as the corresponding feature extraction can be achieved.

[0076] S204 , performing feature recognition on target image features of each to-be-recognized image in the plurality of color channels to obtain channel recognition results corresponding to each to-be-recognized image in the plurality of color channels.

[0077] S205 , determining a target recognition result of each image to be recognized according to the channel recognition results corresponding to each of the multiple color channels of each image to be recognized.

[0078] The present embodiment provides an image recognition method, which obtains a set of images to be recognized that includes multiple images to be recognized, each image to be recognized includes multiple color channels; constructs diagonal images of each image to be recognized in multiple color channels respectively, and the diagonal images are images after diagonal transformation of the channel images of each image to be recognized in multiple color channels; extracts features of the diagonal images of each image to be recognized in multiple color channels in a multi-level cascade manner to obtain target image features of each image to be recognized in multiple color channels, and the target image features at least include: bilateral two-dimensional whitening features; performs feature recognition on the target image features of each image to be recognized in multiple color channels respectively, and obtains the channel recognition results corresponding to each image to be recognized in multiple color channels respectively; determines the target recognition results of each image to be recognized according to the channel recognition results corresponding to each image to be recognized in multiple color channels respectively. By using this method, by constructing the diagonal images of each image to be recognized in multiple color channels respectively, the diagonal images can simultaneously integrate the image information of the rows and columns of the image to be recognized, enrich the image information of the diagonal images, and provide an image basis for the subsequent feature extraction to achieve pixel redundancy reduction.

[0079] In some embodiments, extracting local features from each diagonal image to obtain a local feature image corresponding to each diagonal image includes:

[0080] Partition each diagonal image locally to obtain multiple image blocks corresponding to each diagonal image, with no overlapping images between each image block;

[0081] Performing a bilateral two-dimensional whitening reconstruction operation on each image block of each diagonal image to obtain a plurality of processed image blocks corresponding to each diagonal image;

[0082] The multiple processed image blocks corresponding to each diagonal image are recombined according to the position distribution before the local block division to obtain the local feature image corresponding to each diagonal image.

[0083] The multiple image blocks can be understood as a number of local images obtained by segmenting the diagonal image. The size of each image block can be the same or different, as long as it can be ensured that there is no overlapping image between each image block.

[0084] In the specific process of extracting local features from each diagonal image, a local feature image corresponding to each diagonal image may be obtained by performing a bilateral two-dimensional whitening reconstruction operation on a plurality of image blocks constituting the diagonal image.

[0085] Figure 5 is a schematic diagram of a local feature extraction provided by an embodiment of the present application, such as Figure 5As shown, for a certain diagonal image, it can be locally blocked to obtain several image blocks, and by performing bilateral TWR operation on each image block respectively, multiple processed image blocks corresponding to the diagonal image can be obtained; finally, the multiple processed image blocks can be reorganized according to the position distribution before local blocking, so as to obtain the local feature image corresponding to the diagonal image.

[0086] In some embodiments, performing global feature extraction on the local feature image of each diagonal image to obtain a global feature image corresponding to each diagonal image includes:

[0087] Performing a bilateral two-dimensional whitening reconstruction operation on the local feature image of each diagonal image to obtain a feature image after operation corresponding to each diagonal image;

[0088] An anti-diagonal transformation operation is performed on the operated feature image corresponding to each diagonal image to obtain a global feature image corresponding to each diagonal image.

[0089] In a specific implementation, global feature extraction can be performed on each local feature image based on local feature extraction to obtain a global feature image corresponding to each diagonal image. For example, a bilateral two-dimensional whitening reconstruction operation can be performed on the local feature image of each diagonal image to obtain a post-operation feature image corresponding to each diagonal image, wherein the post-operation feature image can be understood as a bilateral two-dimensional whitened feature image at the global level, and the pixel number arrangement is the same as that of the diagonal image, so it is necessary to further perform an anti-diagonal transformation operation to obtain a feature image with a normal pixel number arrangement, that is, an anti-diagonal transformation operation can be performed on the post-operation feature image corresponding to each diagonal image to obtain a global feature image corresponding to each diagonal image, wherein the pixel number arrangement of the global feature image is the same as that of the image to be identified. The anti-diagonal transformation operation can be considered as the opposite operation to the above-mentioned diagonal transformation operation.

[0090] In some embodiments, the step of performing inter-image feature extraction on a plurality of global feature images corresponding to color channels to obtain target image features of each image to be identified in the color channel includes:

[0091] Generate a global data matrix corresponding to a color channel based on multiple global feature images corresponding to the color channel, wherein the global data matrix is ​​composed of an image vector formed by each global feature image;

[0092] A bilateral two-dimensional whitening reconstruction operation is performed on the global data matrix to obtain the target image features of each image to be identified in the color channel.

[0093] Among them, the global data matrix can be composed of image vectors formed by each global feature image, and the image vector can refer to a vector formed by the global feature image, such as a vector formed by splicing according to fixed rows or fixed columns, or a vector randomly formed by elements in the global feature image, etc. This embodiment does not limit this.

[0094] In the specific process of extracting features between images, a global data matrix corresponding to each color channel can be generated for each color channel. For example, the image vectors corresponding to each global feature image under a certain color channel can be combined together to generate a global data matrix corresponding to the color channel. Secondly, a bilateral two-dimensional whitening reconstruction operation can be performed on the generated global data matrix to obtain the target image features of each image to be identified in each color channel.

[0095] Taking the recognition of target classification as an example, the image recognition method provided by this embodiment is exemplarily described below.

[0096] First, a standard training image set can be obtained, and a test image set to be classified (i.e., a set of multiple images to be identified) can be constructed, wherein the training image set and the test image set can both be three-channel color images, such as RGB or YUV or HSV formats, and different formats can be converted to each other. For example, the training image set can be represented as , , , is the number of training images, and the test image set can be expressed as , , , is the number of test images, and are the dimensions of rows and columns in the training image or test image respectively. The number of color channels of both the training image and the test image is 3.

[0097] Then, feature extraction can be performed on the standard training image set and the test image set respectively to obtain target image features of each test image and each training image in multiple color channels, and the target image features of each training image in multiple color channels can be used to achieve classification and recognition of each test image.

[0098] Figure 6 is a schematic diagram of another image recognition method provided by an embodiment of the present application, such as Figure 6 As shown, taking the extraction of image features of the test image set as an example, first, we can construct the diagonal image of each test image in each color channel, that is, we can extract the diagonal image of each test image in each color channel. Channel splitting is performed. For example, if the test image is a three-channel color image and is represented by RGB, the test image can be split into three channels: red (R), green (G), and blue (B). Three channel images are obtained respectively. Each channel image can be recorded as ( ) (i.e., each image to be identified is split into color channels to obtain multiple channel images corresponding to each image to be identified); for each channel image, a diagonal transformation can be performed according to the number of rows and columns (for example, according to the size of the number of rows and columns) to obtain a corresponding diagonal image (denoted as B), that is, according to the number of rows and columns in each channel image, a diagonal transformation is performed on each channel image to obtain diagonal images of each image to be identified in multiple color channels.

[0099] Secondly, the bilateral TWR feature image of the local block level of the image can be extracted, that is, each diagonal image B can be locally divided into blocks, and the bilateral TWR operation can be performed on each image block in turn. After completion, all the image blocks after bilateral TWR processing can be reassembled into an image according to the original block position , L is the bilateral two-dimensional whitened image at the local level.

[0100] Specifically, for a diagonal image , the image B can be divided into several non-overlapping Matrix image block ( ) (i.e., each diagonal image is locally divided into blocks to obtain multiple image blocks corresponding to each diagonal image, and there is no overlapping image between each image block); for each matrix image block , a TWR operation can be performed, and the result is transposed, and the TWR operation is performed again, so as to realize the bilateral TWR operation on the matrix image block (that is, a bilateral two-dimensional whitening reconstruction operation is performed on each image block of each diagonal image respectively, and a plurality of processed image blocks corresponding to each diagonal image are obtained); finally, the processing result can be reassembled into image L according to the original block position, and the size of image L is the same as that of image B (that is, a plurality of processed image blocks corresponding to each diagonal image are reassembled according to the position distribution before local block division, and a local feature image corresponding to each diagonal image is obtained).

[0101] Among them, performing a TWR operation on a certain matrix image block Y may include the following steps.

[0102] (1) Perform column-wise centering on the matrix image block Y. Let the matrix image block , calculate the mean vector of the column vector of the matrix image block Q , subtract the mean from each column of the matrix image block Q , get the matrix image block , and then we can get the column data matrix of the re-centering .

[0103] (2) Column data matrix Perform SVD decomposition and get , keep the previous The eigenvector corresponding to the largest non-zero singular value is obtained to obtain a two-dimensional whitened feature image .

[0104] Furthermore, based on the above steps, the bilateral TWR feature image of the global image level can be extracted, that is, the TWR operation can be performed on the bilateral two-dimensional whitened image L of the local level obtained in the above steps respectively, and the result can be transposed, and the TWR operation can be performed again to obtain the bilateral two-dimensional whitened image F of the global level; each image F is anti-diagonal transformed to obtain an anti-diagonalized image Fh, and the anti-diagonalized image Fh is the global feature image corresponding to the diagonal image (that is, the local feature image of each diagonal image is subjected to a bilateral two-dimensional whitening reconstruction operation to obtain the operated feature image corresponding to each diagonal image; the operated feature image corresponding to each diagonal image is subjected to an anti-diagonal transformation operation to obtain the global feature image corresponding to each diagonal image).

[0105] Subsequently, bilateral TWR features at the sample level can be extracted, that is, for each color channel, each de-diagonalized image Fh can be vectorized, such as the de-diagonalized image Fh can be pulled into a vector in a fixed row or column manner. ,in, For vector The dimension of , so that the global image level data matrix can be generated based on the vectors corresponding to multiple test images under each color channel , ( ) is the The vector corresponding to the test image, that is, the global image level data matrix can be obtained for the first color channel , get the global image level data matrix for the second color channel , get the global image level data matrix for the third color channel ; Perform TWR operation on each global image level data matrix respectively, transpose the result, and perform TWR operation again, so as to obtain bilateral TWR features at the sample level. Each column in the bilateral TWR features at the sample level represents the target image feature of each test image in its corresponding color channel (i.e., a global data matrix corresponding to a color channel is generated based on multiple global feature images corresponding to the color channel, and the global data matrix is ​​composed of image vectors formed by each global feature image; perform bilateral two-dimensional whitening reconstruction operation on the global data matrix to obtain the target image feature of each image to be identified in the color channel).

[0106] Finally, a linear regression classifier (LRC) can be used to identify the target classification of a single color channel of each test image based on the target image features of each training image in multiple color channels, and the classification results of the three color channels can be voted to achieve the recognition of the target classification of the test image (that is, feature recognition is performed on the target image features of each image to be identified in multiple color channels to obtain the channel recognition results corresponding to each image to be identified in multiple color channels; according to the channel recognition results corresponding to each image to be identified in multiple color channels, the target recognition result of each image to be identified is determined).

[0107] For example, when specifically classifying the target of the test image b, the following operations can be performed on the test image b to determine the target recognition result of the test image b. For example, the target image features of the test image b in the first color channel can be respectively calculated with the target image features of each training image in the first color channel to determine the channel recognition result of the test image b in the first color channel. At the same time, the target image features of the test image b in the second color channel can be respectively calculated with the target image features of each training image in the second color channel to determine the channel recognition result of the test image b in the second color channel. The target image features of the test image b in the third color channel can be respectively calculated with the target image features of each training image in the third color channel to determine the channel recognition result of the test image b in the third color channel. Thus, the target recognition result of the test image b can be determined based on the channel recognition results of the test image b in multiple color channels by using a voting method. The test image b is any test image in the set of test images to be classified.

[0108] Corresponding to the image recognition method of the above embodiment, Figure 7 This is a structural block diagram of an image recognition device provided in one embodiment of the present application. For the sake of convenience of explanation, only the parts related to the embodiment of the present application are shown.

[0109] Reference Figure 7 , the device comprises:

[0110] An acquisition module 301 is used to acquire a set of images to be recognized that includes a plurality of images to be recognized, each of which includes a plurality of color channels;

[0111] A feature extraction module 302 is used to extract target image features of each to-be-identified image in multiple color channels by using a multi-level cascade method, wherein the multiple levels include at least two of the following: a local image level, a global image level, and an inter-image level;

[0112] The feature recognition module 303 is used to perform feature recognition on target image features of each to-be-recognized image in multiple color channels to obtain channel recognition results corresponding to each to-be-recognized image in multiple color channels;

[0113] The determination module 304 is used to determine the target recognition result of each image to be recognized according to the channel recognition results corresponding to each of the multiple color channels of each image to be recognized.

[0114] The present embodiment provides an image recognition device, which acquires a set of images to be recognized including multiple images to be recognized through an acquisition module, each image to be recognized includes multiple color channels; extracts target image features of each image to be recognized in multiple color channels through a feature extraction module in a cascaded manner of multiple levels, the multiple levels including at least two of the following: a local image level, a global image level, and an inter-image level; performs feature recognition on the target image features of each image to be recognized in multiple color channels through a feature recognition module, and obtains channel recognition results corresponding to each image to be recognized in multiple color channels; determines the target recognition result of each image to be recognized according to the channel recognition results corresponding to each image to be recognized in multiple color channels through a determination module. By using the device, the target image features of each image to be recognized in multiple color channels are extracted through a cascaded manner of multiple levels, the multiple levels including at least two of the following: a local image level, a global image level, and an inter-image level, which can reduce the redundancy of image features from multiple levels and ensure the accuracy of subsequent image recognition.

[0115] Optionally, the feature extraction module includes:

[0116] A construction unit, used to respectively construct diagonal images of each image to be identified in multiple color channels, wherein the diagonal images are images obtained by performing diagonal transformation on the channel images of each image to be identified in multiple color channels;

[0117] The feature extraction unit is used to extract features from the diagonal images of each image to be identified in multiple color channels in a multi-level cascade manner to obtain target image features of each image to be identified in multiple color channels, and the target image features at least include: bilateral two-dimensional whitening features.

[0118] Optionally, the building block is specifically used for:

[0119] Each image to be identified is split into channels to obtain multiple channel images corresponding to each image to be identified;

[0120] According to the number of rows and columns in each channel image, each channel image is respectively subjected to diagonal transformation to obtain diagonal images of each image to be identified in multiple color channels.

[0121] Optionally, the feature extraction unit includes:

[0122] A first extraction subunit is used to extract local features from each diagonal image to obtain a local feature image corresponding to each diagonal image;

[0123] A second extraction subunit is used to perform global feature extraction on the local feature image of each diagonal image to obtain a global feature image corresponding to each diagonal image;

[0124] The third extraction subunit is used to perform inter-image feature extraction on multiple global feature images corresponding to each color channel to obtain target image features of each image to be identified in the color channel.

[0125] Optionally, the first extraction subunit is specifically used for:

[0126] Partition each diagonal image locally to obtain multiple image blocks corresponding to each diagonal image, with no overlapping images between each image block;

[0127] Performing a bilateral two-dimensional whitening reconstruction operation on each image block of each diagonal image to obtain a plurality of processed image blocks corresponding to each diagonal image;

[0128] The multiple processed image blocks corresponding to each diagonal image are recombined according to the position distribution before the local block division to obtain the local feature image corresponding to each diagonal image.

[0129] Optionally, the second extraction subunit is specifically used for:

[0130] Performing a bilateral two-dimensional whitening reconstruction operation on the local feature image of each diagonal image to obtain a feature image after operation corresponding to each diagonal image;

[0131] An anti-diagonal transformation operation is performed on the operated feature image corresponding to each diagonal image to obtain a global feature image corresponding to each diagonal image.

[0132] Optionally, the third extraction subunit is specifically used for:

[0133] Generate a global data matrix corresponding to a color channel based on multiple global feature images corresponding to the color channel, wherein the global data matrix is ​​composed of an image vector formed by each global feature image;

[0134] A bilateral two-dimensional whitening reconstruction operation is performed on the global data matrix to obtain the target image features of each image to be identified in the color channel.

[0135] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0136] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0137] The embodiment of the present application also provides an electronic device, Figure 8 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application, such as Figure 8 As shown, the electronic device includes: at least one processor 401, a memory 402, an input device 403, an output device 404, and a computer program stored in the memory 402 and executable on at least one processor 401. When the processor 401 executes the computer program, the steps in any of the above-mentioned method embodiments are implemented.

[0138] The input device 403 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 404 may include a display device such as a display screen.

[0139] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by the processor 401, the steps in the above-mentioned method embodiments can be implemented.

[0140] An embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0141] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor 401, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0142] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0143] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0144] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0146] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An image recognition method, characterized in that: include: Acquire a set of images to be recognized comprising a plurality of images to be recognized, each of the images to be recognized comprising a plurality of color channels; A target image feature of each of the to-be-recognized images in the multiple color channels is extracted by cascading multiple levels, wherein the multiple levels include at least two of the following: a local image level, a global image level, and an inter-image level, wherein the target image feature is extracted based on a diagonal image of each of the to-be-recognized images in the multiple color channels, and the diagonal image is an image obtained by performing a diagonal transformation on the channel image of each of the to-be-recognized images in the multiple color channels; Performing feature recognition on target image features of each of the to-be-recognized images in the plurality of color channels to obtain channel recognition results corresponding to each of the to-be-recognized images in the plurality of color channels; According to the channel recognition results corresponding to each of the plurality of color channels of the image to be recognized, a target recognition result of each of the image to be recognized is determined.

2. The image recognition method according to claim 1, characterized in that: The method of extracting target image features of each image to be identified in multiple color channels by using a multi-level cascade method includes: Respectively constructing diagonal images of each of the to-be-recognized images in multiple color channels, wherein the diagonal images are images obtained by performing diagonal transformation on the channel images of each of the to-be-recognized images in multiple color channels; A multi-level cascade method is used to extract features from the diagonal images of each image to be identified in multiple color channels to obtain target image features of each image to be identified in multiple color channels, wherein the target image features at least include: bilateral two-dimensional whitening features.

3. The image recognition method according to claim 2, characterized in that: The step of respectively constructing diagonal images of each of the to-be-recognized images in multiple color channels comprises: Perform channel splitting on each of the to-be-recognized images to obtain a plurality of channel images corresponding to each of the to-be-recognized images; According to the number of rows and columns in each of the channel images, diagonal transformation is performed on each of the channel images to obtain diagonal images of each of the to-be-recognized images in multiple color channels.

4. The image recognition method according to claim 2, characterized in that: The method of extracting features of the diagonal images of each image to be identified in multiple color channels by using a multi-level cascade method to obtain target image features of each image to be identified in multiple color channels includes: Performing local feature extraction on each of the diagonal images respectively to obtain a local feature image corresponding to each of the diagonal images; Performing global feature extraction on the local feature image of each of the diagonal images respectively to obtain a global feature image corresponding to each of the diagonal images; For each color channel, inter-image feature extraction is performed on a plurality of global feature images corresponding to the color channel to obtain target image features of each image to be identified in the color channel.

5. The image recognition method according to claim 4, characterized in that: The extracting local features from each of the diagonal images to obtain a local feature image corresponding to each of the diagonal images comprises: Partially dividing each of the diagonal images to obtain a plurality of image blocks corresponding to each of the diagonal images, wherein there is no overlapping image between each of the image blocks; Performing a bilateral two-dimensional whitening reconstruction operation on each image block of each diagonal image to obtain a plurality of processed image blocks corresponding to each diagonal image; The multiple processed image blocks corresponding to each of the diagonal images are recombined according to the position distribution before local segmentation to obtain a local feature image corresponding to each of the diagonal images.

6. The image recognition method according to claim 4, characterized in that: The extracting global features from the local feature images of each diagonal image to obtain a global feature image corresponding to each diagonal image comprises: Performing a bilateral two-dimensional whitening reconstruction operation on the local feature image of each of the diagonal images to obtain a post-operation feature image corresponding to each of the diagonal images; An anti-diagonal transformation operation is performed on the operated feature image corresponding to each of the diagonal images to obtain a global feature image corresponding to each of the diagonal images.

7. The image recognition method according to claim 4, characterized in that: The performing inter-image feature extraction on the multiple global feature images corresponding to the color channels to obtain the target image features of each image to be identified in the color channel includes: Generate a global data matrix corresponding to the color channel based on a plurality of global feature images corresponding to the color channel, wherein the global data matrix is ​​composed of an image vector formed by each global feature image; A bilateral two-dimensional whitening reconstruction operation is performed on the global data matrix to obtain target image features of each image to be identified in the color channel.

8. An image recognition device, characterized in that: include: An acquisition module, used for acquiring a set of images to be recognized comprising a plurality of images to be recognized, each of the images to be recognized comprising a plurality of color channels; A feature extraction module, configured to extract target image features of each of the to-be-recognized images in the multiple color channels in a cascaded manner of multiple levels, wherein the multiple levels include at least two of the following: a local image level, a global image level, and an inter-image level, wherein the target image features are extracted based on diagonal images of each of the to-be-recognized images in the multiple color channels, and the diagonal images are images obtained by performing diagonal transformation on the channel images of each of the to-be-recognized images in the multiple color channels; A feature recognition module is used to perform feature recognition on target image features of each of the to-be-recognized images in the plurality of color channels, and obtain channel recognition results corresponding to each of the to-be-recognized images in the plurality of color channels; The determination module is used to determine the target recognition result of each of the images to be recognized according to the channel recognition results corresponding to each of the plurality of color channels of each of the images to be recognized.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the image recognition method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the image recognition method according to any one of claims 1 to 7 is implemented.