Image processing method and electronic device

By establishing a polar coordinate system and transforming feature coordinates in a deep learning model, and training a graph convolutional neural network, the problem of rotation invariance in image recognition models is solved, enabling accurate recognition of images at different angles.

CN116468775BActive Publication Date: 2025-12-16NINGBO SANXING MEDICAL & ELECTRIC CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310459588.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-24
Publication Date
2025-12-16
Estimated Expiration
2043-04-24

AI Technical Summary

Technical Problem

Existing deep learning models cannot support the recognition of invariance for images with angular rotation in image recognition, and cannot achieve rotation invariance of images.

Method used

By extracting feature coordinates from sample images, establishing a polar coordinate system, and converting the feature coordinates to polar coordinates, an initial deep learning model is trained to learn the characteristics of different rotation angles. A graph convolutional neural network is then used to train the model, achieving rotation invariance of the image.

Benefits of technology

It achieves the effect of accurately identifying the same image even after image rotation, improving the rotation invariance of image recognition and avoiding problems such as overfitting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116468775B_ABST
    Figure CN116468775B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides an image processing method and an electronic device, belonging to the field of image processing, for any sample picture extracted from a sample image set, obtaining a target picture corresponding to the sample picture, and determining a plurality of polar coordinate center points and corresponding polar coordinate systems from the target picture, for each polar coordinate system, converting feature coordinates in the target picture falling into the polar coordinate system into polar coordinates, determining all rotation feature coordinates of the target picture through all polar coordinates, so as to convert each feature coordinate of the sample image into a plurality of rotation feature coordinates under different polar coordinate systems, and then performing model training based on all rotation feature coordinates of each sample picture, so that the model learns different rotation angle characteristics of the same picture, and performs image recognition based on the trained model, so that the picture can be recognized as the same picture after being processed by different rotation angles, that is, the rotation invariance of image recognition is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing, in particular to an image processing method and an electronic device. BACKGROUND

[0002] Deep learning technology is a commonly used technology in image processing, which forms more abstract high-level representation attributes or features by combining low-level features to discover distributed feature representation of data. In image processing, the target image may have a rotation angle problem, and the recognition of each rotation angle of the identified image by the deep learning model is an important research direction at present.

[0003] Max pooling is a commonly used pooling operation, which can be understood as follows: the maximum pooling returns the maximum value in the receptive field, and if the maximum value is moved but still in this receptive field, then the pooling layer will still output the same maximum value. At present, by introducing max pooling in deep learning technology, the problem of certain translation invariance is solved. However, max pooling can only support a small angle shift, and the trained model does not support the invariance recognition of pictures with angle rotation, that is, it does not support the rotation invariance of images. SUMMARY

[0004] Therefore, the purpose of the present application is to provide an image processing method and an electronic device, which can improve the problem that the existing image recognition model does not support the invariance recognition of pictures with angle rotation, and realize the rotation invariance of image recognition.

[0005] In order to achieve the above purpose, the technical scheme adopted by the embodiments of the present application is as follows:

[0006] In a first aspect, the embodiments of the present application provide an image processing method, which comprises:

[0007] extracting a sample picture from a sample image set, and processing the sample picture into a target picture;

[0008] determining a plurality of polar coordinate center points from the position covered by the target picture, and establishing a polar coordinate system corresponding to each polar coordinate center point;

[0009] converting the polar coordinates of feature coordinates in the target picture falling into each polar coordinate system for each polar coordinate system; wherein the feature coordinates are the coordinates of each feature point of the target picture in a plane rectangular coordinate system;

[0010] determining all rotation feature coordinates of the target picture through the polar coordinates corresponding to each feature coordinate;

[0011] The initial deep learning model is trained based on all rotation feature coordinates of each sample picture in the sample image set, so as to perform image recognition based on the trained deep learning model.

[0012] Further, the step of determining the plurality of rotation feature coordinates of the target picture through the corresponding coordinates of the feature coordinates on each polar coordinate system comprises:

[0013] For each polar coordinate, the polar coordinate is combined with the polar coordinate center point of the corresponding polar coordinate system to obtain a first rotation feature coordinate.

[0014] Further, the method further comprises:

[0015] For each preset color channel, the color channel is added to the first rotation feature coordinate to obtain a second rotation feature coordinate;

[0016] The second rotation feature coordinate is (x′ i ,y′ i ,ρ i ,θ i ,c), wherein (x′ i ,y′ i ) represents the polar coordinate center point of the i-th polar coordinate system, (ρ i ,θ i ) represents the polar coordinate of the feature coordinate on the i-th polar coordinate system, and c represents the color channel.

[0017] Further, before the step of adding the color channel to the first rotation feature coordinate to obtain the second rotation feature coordinate for each preset color channel, the method further comprises:

[0018] According to the color standard of the target picture, all color channels are determined.

[0019] Further, the step of processing the sample picture into a target picture comprises:

[0020] The sample picture is copied to obtain a plurality of sample pictures;

[0021] The plurality of sample pictures are arranged in a preset conversion mode to obtain a target picture.

[0022] Further, the step of determining a plurality of polar coordinate center points from the covered positions of the target picture comprises:

[0023] According to the arrangement rule of the sample picture in the target picture, the number of polar coordinate center points and the position of each polar coordinate center point are determined.

[0024] Further, the step of establishing the polar coordinate system corresponding to each polar coordinate center point comprises:

[0025] For each polar coordinate center point, half of the height or width of a single sample picture is taken as a polar radius to establish a polar coordinate system.

[0026] Further, the step of arranging the plurality of sample pictures in a preset conversion manner to obtain a target picture comprises:

[0027] The plurality of sample pictures are arranged in a matrix manner, and adjacent sample pictures are arranged as mirror images to obtain a target picture.

[0028] Further, the initial deep learning model comprises an initial graph convolutional neural network model.

[0029] The step of training the initial deep learning model based on all rotation feature coordinates of each sample picture in the sample image set comprises:

[0030] The initial graph convolutional neural network model is trained based on all rotation feature coordinates of each sample picture in the sample image set.

[0031] In a second aspect, the embodiments of the present application provide an image recognition device, comprising a picture acquisition module, a system establishment module, a coordinate conversion module, a coordinate acquisition module and a training and recognition module.

[0032] The picture acquisition module is configured to extract a sample picture from a sample image set, and process the sample picture into a target picture.

[0033] The system establishment module is configured to determine a plurality of polar coordinate center points from a position covered by the target picture, and establish a polar coordinate system corresponding to each polar coordinate center point.

[0034] The coordinate conversion module is configured to convert polar coordinates of feature coordinates in the target picture falling into each polar coordinate system for each polar coordinate system; wherein the feature coordinates are coordinates of each feature point of the target picture in a plane rectangular coordinate system.

[0035] The coordinate acquisition module is configured to determine all rotation feature coordinates of the target picture through polar coordinates corresponding to each feature coordinate.

[0036] The training and recognition module is configured to train an initial deep learning model based on all rotation feature coordinates of each sample picture in the sample image set, and perform image recognition based on a mature deep learning model trained.

[0037] In a third aspect, an electronic device is provided, including a processor and a memory, the memory storing machine executable instructions capable of being executed by the processor, and the processor being capable of executing the machine executable instructions to implement the image processing method according to the first aspect.

[0038] The image processing method and the electronic device provided by the embodiments of the present application can obtain a target picture corresponding to any sample picture extracted from a sample image set, determine a plurality of polar coordinate center points and corresponding polar coordinate systems from positions covered by the target picture, convert feature coordinates in the target picture falling into each polar coordinate system into polar coordinates, determine all rotation feature coordinates of the target picture through all polar coordinates, convert each feature coordinate of the sample image into a plurality of rotation feature coordinates under different polar coordinate systems (different angles), and then perform model training based on all rotation feature coordinates of each sample picture, so that the model learns different rotation angle characteristics of the same picture, and perform image recognition based on the trained model, so that the same picture can be recognized after being processed by different rotation angles, that is, the rotation invariance of image recognition is achieved.

[0039] In order to make the above objectives, characteristics and advantages of the present application more apparent, the following will describe preferred embodiments in detail, and the accompanying drawings will be described as follows. BRIEF DESCRIPTION OF DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments, and it should be understood that the following drawings only show some embodiments of the present application, and should not be regarded as a limitation to the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0041] Figure 1 The flowchart of the image processing method provided by the embodiments of the present application is shown.

[0042] Figure 2 The flowchart of part of the sub-steps of step S11 in the embodiment is shown. Figure 1

[0043] Figure 3 The arrangement manner of the sample pictures in the target picture provided by the embodiments of the present application is shown.

[0044] Figure 4 The schematic diagram of the polar coordinates on the target picture provided by the embodiments of the present application is shown.

[0045] Figure 5 The schematic diagram of the polar coordinates on the target picture provided by the embodiments of the present application is shown.​Figure 1 A flowchart of part of the sub-steps of step S17 is shown.

[0046] Figure 6 A block diagram of an image processing apparatus provided by an embodiment of the present application is shown.

[0047] Figure 7 A block diagram of an electronic device provided by an embodiment of the present application is shown.

[0048] Reference signs: 10 - image processing apparatus; 101 - picture acquisition module; 102 - system building module; 103 - coordinate conversion module; 104 - coordinate acquisition module; 105 - training recognition module; 20 - electronic device. DETAILED DESCRIPTION

[0049] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations.

[0050] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0051] It should be noted that the relational terms such as "first" and "second" and the like are used only to distinguish one entity or operation from another, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus including a list of elements does not only include those elements, but also includes other elements not explicitly listed, or further includes elements inherent in such a process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus including the element.

[0052] Traditional CNN (Convolutional Neural Network) has certain translation invariance, which is caused by convolution and max pooling. Convolution operation can be understood as follows: in a neural network, convolution is defined as a feature detector at different positions. This means that no matter where the target appears in the image, it will detect the same features and output the same response. Max pooling can be understood as follows: max pooling returns the maximum value in the receptive field. If the maximum value is moved, but still in the receptive field, the pooling layer will still output the same maximum value. Therefore, convolution operation and max pooling operation jointly provide translation invariance, that is, even if the image is translated, convolution ensures that the features can still be detected, and pooling keeps the consistent expression as much as possible.

[0053] However, max pooling can only support a small angle shift, and the trained model does not support invariance recognition of pictures with angle rotation, that is, it does not support rotation invariance of images.

[0054] Based on the above considerations, the embodiment of the present application provides an image processing method which can improve the problem that the existing image recognition model does not support invariance recognition of pictures with angle rotation, and realize rotation invariance of image recognition. Hereinafter, the image processing method is introduced.

[0055] In a possible implementation, the embodiment of the present application provides an image processing method, referring to Figure 1 may include the following steps.

[0056] S11, extracting any sample picture from a sample image set, and processing the sample picture into a target picture.

[0057] S13, determining a plurality of polar coordinate center points from the position covered by the target picture, and establishing a polar coordinate system corresponding to each polar coordinate center point.

[0058] S15, converting the polar coordinates of the feature coordinates in the target picture falling into the polar coordinate system for each polar coordinate system.

[0059] In the embodiment, the feature coordinates are the coordinates of each feature point of the target picture in the plane rectangular coordinate system. The feature point refers to a pixel point.

[0060] S17, determining all rotation feature coordinates of the target picture through the polar coordinates corresponding to each feature coordinate.

[0061] S19, training the initial deep learning model based on all rotation feature coordinates of each sample picture in the sample image set, and performing image recognition based on the mature deep learning model trained.

[0062] It is emphasized that all the rotated feature coordinates of each sample picture have the same label.

[0063] For any sample picture extracted from the sample image set, the picture is processed as a target picture. A plurality of polar coordinate center points are determined within the coverage of the target picture, and a polar coordinate system is established for each polar coordinate center point. In this way, a plurality of polar coordinate systems are constructed on the target picture.

[0064] For each polar coordinate system, the feature coordinates of the feature points (i.e. pixel points) in the target picture falling into the polar coordinate system are converted into polar coordinates in the polar coordinate system. In this way, each pixel point in the target picture is converted into a plurality of polar coordinates in different polar coordinate systems, which is equivalent to rotating each pixel point at different angles. Further, all the rotated feature coordinates of the target picture are determined through the polar coordinates corresponding to each feature coordinate. At this time, each pixel point of the target picture corresponds to a plurality of rotated feature coordinates at different angles, that is, the sample picture is rotated at different angles by pixel points.

[0065] After obtaining all the rotated feature coordinates of each sample picture in the sample image set, the initial deep learning model is trained for image recognition using all the rotated feature coordinates of each sample picture. The deep learning model of the city can learn the characteristics of different rotation angles of the same picture. Further, when using the trained model for image recognition, the picture can still be recognized as the same picture after being processed at different rotation angles, realizing the rotation invariance of image recognition.

[0066] Compared with the traditional image recognition, in the above image processing method, a plurality of polar coordinate systems are established on the target image of the sample picture, and each pixel point on the target picture is converted into the polar coordinates in the polar coordinate system where it is located based on the plurality of polar coordinate systems, to obtain the rotated feature coordinates, realizing the rotation of the sample picture at different angles by pixel points. Further, based on all the rotated feature coordinates of each sample picture, the image recognition training of the model is performed, so that the model learns the characteristics of different rotation angles of the same picture, thereby realizing the rotation invariance of image recognition based on the trained model.

[0067] In order to make the pixel points at each position of the sample picture be in a plurality of polar coordinates, that is, to make the pixel points rotate at as many angles as possible, so that the model can better transform the rotation invariance of different pixel points, the sample picture conversion and arrangement are introduced. In one possible implementation, with reference to Figure 2 , step S11 can be further implemented as the following steps.

[0068] S111, the sample picture is copied to obtain a plurality of sample pictures.

[0069] S112, arrange the plurality of sample pictures according to a preset conversion mode to obtain a target picture.

[0070] The plurality of sample pictures obtained after copying can be arranged in any manner, for example, can be directly tiled, or the adjacent images in the tiled picture can be flipped. In this embodiment, no specific limitation is made.

[0071] In order to improve the angle rotation diversity of the pixel points of the sample pictures, step 112, i.e., arranging the plurality of sample pictures according to a preset conversion mode to obtain a target picture, can be further implemented as: arranging the plurality of sample pictures in a matrix manner, and the adjacent sample pictures are mirror images of each other, to obtain a target picture.

[0072] In a preferred embodiment, the matrix manner can be an n*n matrix manner, and the length and width of the sample pictures are consistent, so that the target picture is a picture with consistent length and width. For example, Figure 3 (a) and Figure 3 (b) are both 3*3 matrix manners, Figure 3 (a) each sample picture is arranged in a tiled manner to form a target picture, Figure 3 (b) each sample picture is arranged in a manner that the adjacent sample pictures are mirror images of each other to form a target picture. Figure 3

[0073] In step S13, the position and number of the polar coordinate center points can be flexibly set, for example, can be arbitrarily selected, or can be determined according to certain rules. In this embodiment, no specific limitation is made.

[0074] In a possible embodiment, in S13, determining a plurality of polar coordinate center points from the positions covered by the target picture can be further implemented as: determining the number of polar coordinate center points and the position of each polar coordinate center point according to the arrangement rule of the sample pictures in the target picture.

[0075] The number and position of the polar coordinate center points can be consistent with the arrangement manner of the sample pictures in the target picture. When the sample pictures in the target picture are in an n*n matrix manner, the polar coordinate center points can be on the center sample pictures in the target picture, and the distance between adjacent polar coordinate center points is one-half of the width or length. For example, when the matrix manner is 3*3, the number of center sample images is 1, and at this time, the number of polar coordinate center points is 9. When the matrix manner is 4*4, the number of center sample images is 4, and at this time, the number of polar coordinate center points is 25. For reference Figure 4 is a polar coordinate position diagram when the matrix manner is 3*3. A circle represents a polar coordinate system, and a square represents a sample picture.

[0076] ​In other embodiments, in order to better capture the rotation invariance of different pixels of the sample picture, the polar coordinate center points can be set to be more dense, i.e., more in number and smaller in spacing.

[0077] After the number and positions of the polar coordinate center points are determined, in step S13, the manner of establishing the polar coordinate system can be flexibly set, for example, it can be a polar radius of an arbitrary length, or a polar radius related to the size of the sample picture, which is not specifically limited in the present embodiment.

[0078] In a preferred embodiment, in step S13, establishing the polar coordinate system corresponding to each polar coordinate center point can be further implemented as: for each polar coordinate center point, taking half of the height or width of a single sample picture as the polar radius to establish the polar coordinate system. Preferably, the length and width of the sample picture can be consistent.

[0079] After all the polar coordinate systems are established, for each polar coordinate system, the feature coordinates in the target picture falling into the coordinate system are determined, and then each feature coordinate is converted into the polar coordinate under the polar coordinate system. For example, the feature coordinates are (x, y), and the polar coordinate system is the polar coordinate system with the polar coordinate center point (x' i ,y′ i ), then the polar coordinate of (x, y) in the polar coordinate system can be represented as ((p i , q i ).

[0080] In order to enable the coordinates used in the final training to carry the information of the polar coordinate system, achieve information completeness, and improve the learning effect of the model on the rotation invariance of each pixel, the polar coordinate information is introduced into the rotated feature coordinates. Referring to Figure 5 , step S17 can be further implemented as the following steps.

[0081] S171, for each polar coordinate, the polar coordinate is combined with the polar coordinate center point of the corresponding polar coordinate system to obtain a first rotated feature coordinate.

[0082] At this time, the first rotated feature coordinate can be represented as (x' i ,y′ i , p i , q i ), (x' i ,y′ i ) represents the polar coordinate center point of the i-th polar coordinate system, and (p i , q i ) represents the polar coordinate of the feature coordinate on the i-th polar coordinate system.

[0083] In order to further improve the information completeness, the color channel information is introduced into the rotated feature coordinates, and step S172 can also be included.

[0084] S172, for each preset color channel, adding the color channel in the first rotation feature coordinate to obtain a second rotation feature coordinate.

[0085] The second rotation feature coordinate can be (x' i ,y′ i ,ρ i ,θ i ,c), and c represents the color channel.

[0086] In a possible implementation, the color channel can be determined by determining all color channels according to the color standard of the target picture. For example, if the target picture (i.e., the sample picture) is in RGB mode, there are three color channels R, G, and B. If the target picture (i.e., the sample picture) is in CMYK mode, there are four color channels C, M, Y, and K.

[0087] Through the above steps S11-S17 and sub-steps, after the coordinate conversion processing, one feature point P of the sample picture corresponds to a set of feature rotation coordinates of different polar coordinate systems (different rotation angles), realizing the rotation processing of the sample picture on the unit of the pixel point.

[0088] In order to make the model trained based on all rotation feature coordinates of each sample picture have rotation invariance, in a possible implementation, the initial deep learning model is a graph convolutional neural network model. Step S19 can be further implemented as: training the initial graph convolutional neural network model based on all rotation feature coordinates of each sample picture in the sample image set.

[0089] Mathematically, convolution is a function f and a weight function g, so that the value of each point of the new function is the weighted sum (integral in the continuous case) of f on g.

[0090] The convolution in the continuous case can be expressed as:

[0091]

[0092] Where g represents the convolution kernel, f is the function to be convolved, ω is the domain of g and f, which is generally R n , where R is the real number set, and n is the dimension.

[0093] Convolution has translational invariance. In fact, suppose a translation is made to function f, that is,

[0094] Then the convolution of f' and g is as follows:

[0095] In engineering, especially in digital applications, space becomes finite and discrete, and convolution is generally used to look at local conditions, and the weight of the far distance is mostly 0.

[0096] For example, a discrete two-dimensional function is represented by a matrix as follows:

[0097]

[0098] The matrix represents f(0, 0) = 1, f(1, 0) = 2, f(2, 0) = 3, f(3, 0) = 4, f(4, 0) = 5, f(0, 1) = 6, f(1, 1) = 7, …, f(4, 4) = 7.

[0099] The convolution kernel, that is, the weight function g, is represented by a matrix as follows:

[0100] Then, the convolution mainly considers the positions of 7, 8, 9, 12, 13, 14, 17, 18, and 19 in the first matrix. Because they can cover the 3x3 convolution kernel as the center.

[0101] Each calculates the weighted sum to obtain

[0102] Where 411 = 1*1 + 2*2 + 3*3 + 6*4 + 7*5 + 8*6 + 11*7 + 12*8 + 13*9. The calculation method of other numbers is the same.

[0103] The discrete convolution on n dimensions is also similar, but it is an n-dimensional tensor, not a two-order tensor (that is, a matrix).

[0104] Based on the above convolution principle, during training of the model, through the graph convolutional neural network, the convolution in the polar coordinate is used to use the information in all the rotated feature coordinates of the sample picture, so that the convolution in the finally trained model has rotation invariance.

[0105] The image processing method provided by the embodiment of the application solves the rotation invariance problem of image recognition by directly using an operator in model training after obtaining all the rotated feature coordinates of each feature point by processing the sample picture through steps S11-S17, instead of constantly rotating the picture during training, so that the image recognition is more accurate, and the overfitting problem caused by repeated training of the constantly rotated picture can also be solved.

[0106] Based on the same inventive concept as the above image processing method, the embodiment of the application also provides an image processing device 10. Referring to Figure 6The image processing apparatus 10 can include a picture acquisition module 101, a system establishment module 102, a coordinate conversion module 103, a coordinate acquisition module 104, and a training recognition module 105.

[0107] The picture acquisition module 101 is configured to extract any sample picture from the sample image set, and process the sample picture into a target picture.

[0108] The system establishment module 102 is configured to determine a plurality of polar coordinate center points from a position covered by the target picture, and establish a polar coordinate system corresponding to each polar coordinate center point.

[0109] The coordinate conversion module 103 is configured to convert polar coordinates of feature coordinates in the target picture falling into each polar coordinate system, for each polar coordinate system. The feature coordinates are coordinates of feature points of the target picture in a plane rectangular coordinate system.

[0110] The coordinate acquisition module 104 is configured to determine all rotation feature coordinates of the target picture through the polar coordinates corresponding to each feature coordinate.

[0111] The training recognition module 105 is configured to train an initial deep learning model based on all rotation feature coordinates of each sample picture in the sample image set, and perform image recognition based on the trained deep learning model. The all rotation feature coordinates of each sample picture have the same label.

[0112] In the above image processing apparatus 10, through the cooperative action of the picture acquisition module 101, the system establishment module 102, the coordinate conversion module 103, the coordinate acquisition module 104, and the training recognition module 105, each feature coordinate of the sample image is converted into a plurality of rotation feature coordinates under different polar coordinate systems (different angles), and then model training is performed based on all rotation feature coordinates of each sample picture, so that the model learns the different rotation angle characteristics of the same picture, and image recognition is performed based on the trained model, so that the same picture can be recognized after being processed by different rotation angles, that is, the rotation invariance of image recognition is realized.

[0113] The specific limitations of the image processing apparatus 10 can be referred to the limitations of the image processing method in the above, which will not be repeated here. Each module in the above image processing apparatus 10 can be realized by software, hardware, and a combination thereof, in whole or in part. The above modules can be embedded in or independent of the processor in the electronic device in hardware form, or can be stored in the memory of the electronic device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.

[0114] In an embodiment, an electronic device 20 is provided, which can be a server, and the internal structure diagram thereof can be as shown in Figure 7The electronic device 20 includes a processor, a memory, a communication interface and an input device connected through a system bus. The processor of the electronic device 20 is configured to provide computing and control capabilities. The memory of the electronic device 20 includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the electronic device 20 is configured to perform wired or wireless communication with an external terminal. The wireless communication can be achieved through WIFI, a carrier network, near field communication (NFC) or other technologies. The computer program is executed by the processor to implement the image processing method provided in the above embodiments.

[0115] Figure 7 The structure shown in FIG. 1 is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the electronic device 20 to which the scheme of the present application is applied. The specific electronic device 20 can include more or fewer components than those shown in FIG. 1, or combine certain components, or have a different arrangement of components. Figure 7

[0116] In an embodiment, the image processing apparatus 10 provided by the present application can be implemented in the form of a computer program, which can run on an electronic device 20 as shown in FIG. 1. The memory of the electronic device 20 can store various program modules constituting the image processing apparatus 10, such as the picture acquisition module 101, the system building module 102, the coordinate conversion module 103, the coordinate acquisition module 104 and the training recognition module 105 shown in FIG. 1. The computer program constituted by the various program modules enables the processor to perform the steps of the image processing method described in the specification. Figure 7 Figure 6 For example, the electronic device 20 as shown in FIG. 1 can perform step S11 through the picture acquisition module 101 in the image processing apparatus 10 as shown in FIG. 1. The electronic device 20 can perform step S13 through the system building module 102. The electronic device 20 can perform step S15 through the coordinate conversion module 103. The electronic device 20 can perform S17 through the coordinate acquisition module 104. The electronic device 20 can perform S19 through the training recognition module 105.

[0117] For example, the electronic device 20 as shown in FIG. 1 can perform step S11 through the picture acquisition module 101 in the image processing apparatus 10 as shown in FIG. 1. The electronic device 20 can perform step S13 through the system building module 102. The electronic device 20 can perform step S15 through the coordinate conversion module 103. The electronic device 20 can perform S17 through the coordinate acquisition module 104. The electronic device 20 can perform S19 through the training recognition module 105. Figure 7 Figure 6

[0118] ​​​​In an embodiment, an electronic device 20 is provided, comprising a memory and a processor, the memory storing machine executable instructions, the processor implementing the following steps when executing the machine executable instructions: extracting a sample picture from a sample image set, processing the sample picture into a target picture; determining a plurality of polar coordinate center points from a position covered by the target picture, and establishing a polar coordinate system corresponding to each polar coordinate center point; converting polar coordinates of feature coordinates falling into the polar coordinate system in the target picture for each polar coordinate system; determining all rotation feature coordinates of the target picture through the polar coordinates corresponding to each feature coordinate; training an initial deep learning model based on all rotation feature coordinates of each sample picture in the sample image set, to perform image recognition based on the trained deep learning model.

[0119] In an embodiment, a storage medium is provided, storing a computer program, the computer program implementing the following steps when executed by a processor: extracting a sample picture from a sample image set, processing the sample picture into a target picture; determining a plurality of polar coordinate center points from a position covered by the target picture, and establishing a polar coordinate system corresponding to each polar coordinate center point; converting polar coordinates of feature coordinates falling into the polar coordinate system in the target picture for each polar coordinate system; determining all rotation feature coordinates of the target picture through the polar coordinates corresponding to each feature coordinate; training an initial deep learning model based on all rotation feature coordinates of each sample picture in the sample image set, to perform image recognition based on the trained deep learning model.

[0120] In several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can also be implemented by other manners. The apparatus embodiments described above are merely illustrative, for example, the flowcharts and block diagrams in the drawings show the possible implementation architectures, functions and operations of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logic function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders from those noted in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and the combination of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system for executing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0121] In addition, each functional module in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0122] If the functions are implemented in the form of software functional modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0123] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. An image processing method, characterized in that, The method includes: Extract any sample image from the sample image set and process the sample image into a target image; From the location covered by the target image, determine multiple polar coordinate center points and establish a polar coordinate system corresponding to each polar coordinate center point; For each of the polar coordinate systems, the polar coordinates of the feature coordinates in the target image that fall within the polar coordinate system are transformed; wherein, the feature coordinates are the coordinates of each feature point of the target image in a Cartesian coordinate system; All rotation feature coordinates of the target image are determined by using the polar coordinates corresponding to each of the feature coordinates; Based on all rotation feature coordinates of each sample image in the sample image set, an initial deep learning model is trained to perform image recognition based on the trained deep learning model; wherein, all rotation feature coordinates of each sample image have the same label.

2. The image processing method according to claim 1, characterized in that, The step of determining all rotation feature coordinates of the target image using the polar coordinates corresponding to each feature coordinate includes: For each polar coordinate, the polar coordinate is combined with the polar coordinate center point of the corresponding polar coordinate system to obtain the first rotational feature coordinates.

3. The image processing method according to claim 2, characterized in that, The method further includes: For each preset color channel, the color channel is added to the first rotation feature coordinates to obtain the second rotation feature coordinates; The second rotational feature coordinates are ,in,( ) represents the polar coordinate center point of the i-th polar coordinate system, ( The characteristic coordinates are represented in the first place. Polar coordinates in a polar coordinate system Characterizes color channels.

4. The image processing method according to claim 3, characterized in that, Before the step of adding the color channel to the first rotation feature coordinates for each preset color channel to obtain the second rotation feature coordinates, the method further includes: Based on the color standard of the target image, determine all color channels.

5. The image processing method according to any one of claims 1 to 4, characterized in that, The step of processing the sample image into a target image includes: The sample image is copied to obtain multiple sample images; The multiple sample images are arranged according to a preset conversion method to obtain the target image.

6. The image processing method according to claim 5, characterized in that, The step of determining multiple polar coordinate center points from the area covered by the target image includes: According to the arrangement rules of the sample images in the target image, determine the number of polar coordinate center points and the position of each polar coordinate center point.

7. The image processing method according to claim 5, characterized in that, The step of establishing the polar coordinate system corresponding to each polar coordinate center point includes: For each of the polar coordinate center points, a polar coordinate system is established using half the height or width of a single sample image as the polar radius.

8. The image processing method according to claim 5, characterized in that, The step of arranging the multiple sample images according to a preset conversion method to obtain the target image includes: The multiple sample images are arranged in a matrix, with adjacent sample images being mirror images of each other, to obtain the target image.

9. The image processing method according to any one of claims 1 to 4, characterized in that, The initial deep learning model includes an initial graph convolutional neural network model; The step of training the initial deep learning model based on all rotation feature coordinates of each sample image in the sample image set includes: The initial graph convolutional neural network model is trained based on all rotation feature coordinates of each sample image in the sample image set.

10. An electronic device, characterized in that, It includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor to implement the image processing method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Local feature description method, system and device for rotation invariant multi-source images

    CN108764249A

  • Picture identification method and device, storage medium and apparatus

    CN110135512A