Identification feature extraction method, apparatus, and device, and storage medium
By adding convolution and pooling layers in the feature recognition module, the number of output channels is greater than the number of input channels, which solves the problem of insufficient feature dimensions in the existing technology and improves the richness and accuracy of feature information extraction.
Patent Information
- Application Number
- PCT/CN2023/099356
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-21
- Filing Date
- 2023-06-09
- Publication Date
- 2024-10-24
AI Technical Summary
In the existing recognition feature extraction model, the extracted feature dimension information is insufficient, resulting in an insignificant extraction effect and the inability to accurately extract effective information.
By designing a feature recognition module including a first convolutional layer, a first batch normalization layer, a first maximum pooling layer, a second convolutional layer, a second batch normalization layer and a second maximum pooling layer , the initial four-dimensional tensor data is processed, the number of output channels is greater than the number of input channels, and the feature dimension information is increased.
It improves the richness of feature information extraction and helps to accurately extract effective information.
Smart Images

Figure CN2023099356_24102024_PF_FP_ABST
Abstract
Description
Method, device, equipment and storage medium for extracting identification features
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 21, 2023, with application number 202310440247.4 and invention name “A method, device, equipment and storage medium for extracting identification features”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of identification technology, and more specifically, to a method, device, equipment and storage medium for extracting identification features. Background Art
[0003] With the continuous development of information technology, information mining has attracted the interest of many researchers, who are looking to extract useful information from massive amounts of information. Different objects have corresponding unique features, such as human fingerprints and palm prints. Researchers can identify a specific object by extracting feature information from the complex information of finger images or palm images. For recognition and extraction methods that extract features from images, researchers can design algorithms or train feature models so that the algorithms and models can implement the feature extraction function on the image to achieve feature extraction. Usually, before inputting the image into the algorithm / model, the image needs to be processed so that it conforms to the data input format of the algorithm / model, such as the format of four-dimensional tensor data.
[0004] At present, in the extraction model of recognition features, the feature dimension information extracted is too little to accurately extract effective information, and the extraction model effect is not significant.
[0005] Summary of the Invention
[0006] In view of the above problems, the present application is proposed to provide a method, device, equipment and storage medium for extracting identification features to improve the richness of feature information extraction.
[0007] In order to achieve the above objectives, the following specific plans are proposed:
[0008] A method for extracting identification features, characterized by comprising:
[0009] Acquire initial four-dimensional tensor data, wherein the initial four-dimensional tensor data includes information about the number of images, the number of input channels, image width, and image height;
[0010] The initial four-dimensional tensor data is input into a pre-established feature recognition module, and the same number of recognition features as the images is output, where the number of dimensions of each recognition feature is the number of output channels of the feature recognition module, wherein the number of output channels is greater than the number of input channels, and the feature recognition module includes a first convolutional layer, a first batch normalization layer, a first maximum pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum pooling layer.
[0011] Optionally, the image width and image height of the initial four-dimensional tensor data are both 8 pixels;
[0012] The initial four-dimensional tensor data is input into a pre-established feature recognition module, and the same number of recognition features as the image is output, including:
[0013] According to the processing order of first convolution, then normalization, and finally maximum pooling, the initial four-dimensional tensor data is processed twice by a pre-established feature recognition module to obtain intermediate four-dimensional tensor data, where the image width and image height of the intermediate four-dimensional tensor data are both 2 pixels;
[0014] Performing channel transformation convolution, normalization, and maximum pooling processing on the intermediate four-dimensional tensor data through the feature recognition module to obtain target four-dimensional tensor data, wherein the image width and image height of the target four-dimensional tensor data are both single pixels, and the number of dimensions of the target four-dimensional tensor data is the number of output channels;
[0015] The target four-dimensional tensor data is reshaped by the feature recognition module to obtain the same number of recognition features as the image.
[0016] Optionally, the number of input channels of the initial four-dimensional tensor data is 384;
[0017] The initial four-dimensional tensor data is processed twice by a pre-established feature recognition module in the order of convolution, normalization, and maximum pooling to obtain intermediate four-dimensional tensor data, including:
[0018] Performing convolution processing on the initial four-dimensional tensor data through a first convolution layer in a pre-established feature recognition module to obtain first data, wherein the convolution kernel size of the first convolution layer is 3*3, and the first convolution layer is used to receive an input of 384-channel four-dimensional tensor data and output 384-channel data;
[0019] Normalizing the first data using a first batch normalization layer in the feature recognition module to obtain second data;
[0020] Performing maximum pooling processing on the second data through the first maximum pooling layer in the feature recognition module to obtain third data, thereby completing one round of processing of the initial four-dimensional tensor data, where the pooling kernel size of the first maximum pooling layer is 2*2, and the image width and image height of the third data are both 4 pixels;
[0021] Performing convolution processing on the third data through the first convolution layer to obtain fourth data;
[0022] Performing convolution processing on the fourth data through the first batch normalization layer to obtain fifth data;
[0023] The fifth data is subjected to maximum pooling processing through the first maximum pooling layer to obtain intermediate four-dimensional tensor data.
[0024] Optionally, the number of channels of the intermediate four-dimensional tensor data is 384;
[0025] The feature recognition module performs channel transformation convolution, normalization, and maximum pooling on the intermediate four-dimensional tensor data to obtain target four-dimensional tensor data, including:
[0026] Performing channel transformation convolution on the intermediate four-dimensional tensor data through the second convolutional layer in the feature recognition module to obtain sixth data, wherein the convolution kernel size of the first convolutional layer is 3*3, and the first convolutional layer is used to receive input of 384-channel four-dimensional tensor data and output 512-channel data;
[0027] Normalizing the intermediate four-dimensional tensor data through a second batch normalization layer in the feature recognition module to obtain seventh data;
[0028] Performing maximum pooling processing on the seventh data through a second maximum pooling layer in the feature recognition module to obtain eighth data, where the pooling kernel size of the second maximum pooling layer is 2*2;
[0029] The eighth data is normalized by the second batch normalization layer to obtain target four-dimensional tensor data.
[0030] Optionally, both the first maximum pooling layer and the second maximum pooling layer adopt a linear activation function.
[0031] A device for extracting identification features, comprising:
[0032] A tensor data acquisition unit is used to acquire initial four-dimensional tensor data, wherein the initial four-dimensional tensor data includes information about the number of images, the number of input channels, image width, and image height;
[0033] A feature recognition unit is used to input the initial four-dimensional tensor data into a pre-established feature recognition module, output recognition features equal to the number of images, and the number of dimensions of each recognition feature is equal to the number of output channels of the feature recognition module, wherein the number of output channels is greater than the number of input channels, and the feature recognition module includes a first convolutional layer, a first batch normalization layer, a first maximum pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum pooling layer.
[0034] Optionally, the image width and image height of the initial four-dimensional tensor data are both 8 pixels;
[0035] The feature recognition unit includes:
[0036] a two-round processing unit, configured to process the initial four-dimensional tensor data twice using a pre-established feature recognition module in a processing order of first convolution, then normalization, and finally maximum pooling to obtain intermediate four-dimensional tensor data, where the image width and image height of the intermediate four-dimensional tensor data are both 2 pixels;
[0037] a single-round processing unit, configured to perform channel transformation convolution, normalization, and maximum pooling processing on the intermediate four-dimensional tensor data through the feature recognition module to obtain target four-dimensional tensor data, wherein the image width and image height of the target four-dimensional tensor data are both single pixels, and the number of dimensions of the target four-dimensional tensor data is the number of output channels;
[0038] A feature reshaping unit is used to perform feature reshaping on the target four-dimensional tensor data through the feature recognition module to obtain the same number of recognition features as the image.
[0039] Optionally, the number of input channels of the initial four-dimensional tensor data is 384;
[0040] The two-round processing unit includes:
[0041] a first data processing unit, configured to perform convolution processing on the initial four-dimensional tensor data through a first convolution layer in a pre-established feature recognition module to obtain first data, wherein the convolution kernel size of the first convolution layer is 3*3, and the first convolution layer is configured to receive an input of 384-channel four-dimensional tensor data and output 384-channel data;
[0042] a second data processing unit, configured to perform normalization processing on the first data through a first batch normalization layer in the feature recognition module to obtain second data;
[0043] a third data processing unit, configured to perform maximum pooling processing on the second data through the first maximum pooling layer in the feature recognition module to obtain third data, so as to complete one round of processing of the initial four-dimensional tensor data, wherein the pooling kernel size of the first maximum pooling layer is 2*2, and the image width and image height of the third data are both 4 pixels;
[0044] a fourth data processing unit, configured to perform convolution processing on the third data through the first convolution layer to obtain fourth data;
[0045] a fifth data processing unit, configured to perform convolution processing on the fourth data through the first batch normalization layer to obtain fifth data;
[0046] An intermediate data processing unit is used to perform maximum pooling processing on the fifth data through the first maximum pooling layer to obtain intermediate four-dimensional tensor data.
[0047] Optionally, the number of channels of the intermediate four-dimensional tensor data is 384;
[0048] The single-round processing unit comprises:
[0049] a first single-round processing subunit, configured to perform channel transformation convolution on the intermediate four-dimensional tensor data through the second convolutional layer in the feature recognition module to obtain sixth data, wherein the convolution kernel size of the first convolutional layer is 3*3, and the first convolutional layer is configured to receive input of 384-channel four-dimensional tensor data and output 512-channel data;
[0050] a second single-round processing subunit, configured to perform normalization processing on the intermediate four-dimensional tensor data through a second batch normalization layer in the feature recognition module to obtain seventh data;
[0051] a third single-round processing subunit, configured to perform maximum pooling processing on the seventh data through a second maximum pooling layer in the feature recognition module to obtain eighth data, where a pooling kernel size of the second maximum pooling layer is 2*2;
[0052] The fourth single-round processing subunit is used to perform normalization processing on the eighth data through the second batch normalization layer to obtain target four-dimensional tensor data.
[0053] A device for extracting identification features, comprising a memory and a processor;
[0054] The memory is used to store programs;
[0055] The processor is used to execute the program to implement the various steps of the above-mentioned identification feature extraction method.
[0056] A storage medium stores a computer program, which, when executed by a processor, implements the various steps of the above-mentioned identification feature extraction method.
[0057] By means of the above technical solution, the present application obtains initial four-dimensional tensor data, which contains information about the number of images, the number of input channels, the image width, and the image height. Furthermore, the initial four-dimensional tensor data is input into a pre-established feature recognition module, and the recognition features with the same number of images are output. The number of dimensions of each recognition feature is the number of output channels of the feature recognition module, wherein the number of output channels is greater than the number of input channels. The feature recognition module includes a first convolutional layer, a first batch normalization layer, a first maximum pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum pooling layer. It can be seen that since the number of output channels is greater than the number of input channels, the recognition features output by the module can have more feature dimension information, which improves the richness of feature information extraction and helps to accurately extract effective information. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0059] FIG1 is a schematic diagram of a process for extracting identification features provided in an embodiment of the present application;
[0060] FIG2 is a schematic diagram of a process for obtaining intermediate four-dimensional tensor data by a feature recognition module according to an embodiment of the present application;
[0061] FIG3 is a schematic diagram of a process of obtaining target four-dimensional tensor data by a feature recognition module according to an embodiment of the present application;
[0062] FIG4 is a schematic diagram of the structure of a device for extracting identification features provided in an embodiment of the present application;
[0063] FIG5 is a schematic diagram of the structure of a device for extracting identification features provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0065] The present application solution can be implemented based on a terminal with data processing capabilities, which can be a computer, server, cloud, etc.
[0066] Next, in conjunction with FIG1 , the identification feature extraction method of the present application may include the following steps:
[0067] Step S110: Obtain initial four-dimensional tensor data.
[0068] The initial four-dimensional tensor data may include information on the number of images, the number of input channels, the image width, and the image height.
[0069] Specifically, the format of the initial four-dimensional tensor data can be expressed as [A, B, C, D]. A is information about the number of images, which can represent information about image batches, or information about the number of images required to input the feature recognition module of the initial four-dimensional tensor data. The image can specifically be a feature image with biometric information, such as a palm feature image or a finger feature image. The feature image with biometric information can be obtained from an existing biometric information database or obtained by processing an image with biometric information using an image feature algorithm. B is information about the number of input channels, which can represent the number of channels of the initial four-dimensional tensor data input feature recognition module, and each channel can correspond to each feature dimension of the image. C is information about the image width, which can represent the pixel value of the image in the width direction. D is information about the image height, which can represent the pixel value of the image in the height direction.
[0070] It can be understood that the initial four-dimensional tensor data can be generated based on an image A with a width of C and a height of D, and the input channel parameter B of the feature recognition module, so that the initial four-dimensional tensor conforms to the input format of the feature recognition module.
[0071] Step S120: Input the initial four-dimensional tensor data into a pre-established feature recognition module, and output the same number of recognition features as the image.
[0072] Specifically, the number of dimensions of each recognition feature may be the number of output channels of the feature recognition module.
[0073] Among them, the number of output channels can be greater than the number of input channels, and the feature recognition module can include a first convolution layer, a first batch normalization layer, a first maximum pooling layer, a second convolution layer, a second batch normalization layer and a second maximum pooling layer.
[0074] It can be understood that the feature recognition module can expand the feature dimension of the image of the initial four-dimensional tensor data from the number of input channels to the number of output channels through the convolution function of the convolution layer, provide richer image feature information, and provide richer experience values for the feature recognition module.
[0075] The method for extracting identification features provided in this embodiment obtains initial four-dimensional tensor data, which contains information about the number of images, the number of input channels, the image width, and the image height. Furthermore, the initial four-dimensional tensor data is input into a pre-established feature recognition module, and identification features equal to the number of images are output. The number of dimensions of each identification feature is the number of output channels of the feature recognition module, wherein the number of output channels is greater than the number of input channels. The feature recognition module includes a first convolutional layer, a first batch normalization layer, a first maximum pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum pooling layer. It can be seen that since the number of output channels is greater than the number of input channels, the identification features output by the module can have more feature dimension information, thereby improving the richness of feature information extraction and facilitating the accurate extraction of effective information.
[0076] In some embodiments of the present application, taking initial four-dimensional tensor data with an image width of 8 pixels and an image height of 8 pixels as an example, the process of inputting the initial four-dimensional tensor data into a pre-established feature recognition module and outputting the same number of recognition features as the image in step S120 is described. This process may include:
[0077] S1. According to the processing order of convolution, normalization, and maximum pooling, the initial four-dimensional tensor data is processed twice by the pre-established feature recognition module to obtain the intermediate four-dimensional tensor data.
[0078] It can be understood that since the parameter stride in the pooling process is 2, after each round of processing (convolution → normalization → maximum pooling), the image size of the obtained four-dimensional tensor data is halved. Therefore, after two rounds of processing, the image width and image height of the intermediate four-dimensional tensor data are both 2 pixels.
[0079] The number of channels of the intermediate four-dimensional tensor data is the number of input channels, and the number of images remains unchanged.
[0080] Specifically, the two rounds of processing can utilize the first convolutional layer, the first batch normalization layer, and the first maximum pooling layer.
[0081] S2. Perform channel transformation convolution, normalization, and maximum pooling on the intermediate four-dimensional tensor data through the feature recognition module to obtain the target four-dimensional tensor data.
[0082] It is understandable that the target 4D tensor data is obtained by processing the intermediate 4D tensor data through a round of (convolution → normalization → maximum pooling), so the image width and image height of the target 4D tensor data are both single pixels. This round of processing can utilize the second convolution layer, the second batch normalization layer, and the second maximum pooling layer.
[0083] The number of dimensional features of the target 4D tensor data is expanded in this round of processing, so the number of dimensions of the target 4D tensor data is the number of output channels. The number of images in the target 4D tensor data remains unchanged.
[0084] S3. Reshape the target four-dimensional tensor data through the feature recognition module to obtain the same number of recognition features as the image.
[0085] Specifically, the target four-dimensional tensor data is image data of several 1*1 pixels, so the target four-dimensional tensor data can be reshaped into two-dimensional recognition feature data. The format of the two-dimensional recognition feature data can be [E, F], where E can represent the number of images output by the feature recognition module, F can represent the number of channels output by the feature recognition module, or the number of dimensional features of the image output by the feature recognition module.
[0086] The identification feature extraction method provided in this embodiment processes the initial four-dimensional tensor data twice through a pre-established feature recognition module in the order of convolution, normalization, and maximum pooling to obtain intermediate four-dimensional tensor data. The intermediate four-dimensional tensor data is further subjected to channel transformation convolution, normalization, and maximum pooling processing through the feature recognition module to obtain target four-dimensional tensor data. Finally, the target four-dimensional tensor data is feature reshaped through the feature recognition module to obtain the same number of identification features as the image, thereby performing feature recognition on the initial four-dimensional tensor data with a width and height of 8 pixels to obtain feature information of more dimensions, thereby improving the richness of feature information extraction and facilitating the accurate extraction of effective information.
[0087] In some embodiments of the present application, taking the number of input channels of the initial four-dimensional tensor data as 384 as an example, the process of processing the initial four-dimensional tensor data twice by a pre-established feature recognition module in the above embodiment according to the processing order of first convolution, then normalization, and finally maximum pooling to obtain intermediate four-dimensional tensor data is introduced. As shown in FIG2, the process may include:
[0088] Step S210: Perform convolution processing on the initial four-dimensional tensor data through the first convolution layer in the pre-established feature recognition module to obtain first data.
[0089] Specifically, the convolution kernel size of the first convolutional layer is 3*3. The first convolutional layer is used to receive input of 384-channel four-dimensional tensor data and output 384-channel data. The parameter padding is 1.
[0090] Step S220: Normalize the first data through the first batch normalization layer in the feature recognition module to obtain second data.
[0091] Step S230: Perform maximum pooling processing on the second data through the first maximum pooling layer in the feature recognition module to obtain third data, thereby completing one round of processing on the initial four-dimensional tensor data.
[0092] Specifically, the pooling kernel size of the first maximum pooling layer is 2*2, and the parameter stride is 2.
[0093] It can be understood that after the initial four-dimensional tensor data is processed by the first convolution layer, the first batch normalization layer, and the first maximum pooling layer in sequence, the image width and height of the obtained third data are halved, so the image width and image height of the third data are both 4 pixels.
[0094] Step S240: Perform convolution processing on the third data through the first convolution layer to obtain fourth data.
[0095] Step S250: Perform convolution processing on the fourth data through the first batch normalization layer to obtain fifth data.
[0096] Step S260: Perform maximum pooling processing on the fifth data through the first maximum pooling layer to obtain intermediate four-dimensional tensor data.
[0097] It can be understood that step S240 to step S260 is a repeated round of processing of step S210 to step S230, so the image width and height of the obtained intermediate four-dimensional tensor data are half of the width and height of the third data image, so the image width and image height of the intermediate four-dimensional tensor data are both 2 pixels.
[0098] Among them, the number of channels of the intermediate four-dimensional tensor data obtained after two rounds of processing is 384.
[0099] In some embodiments of the present application, taking the case where the number of channels of the intermediate four-dimensional tensor data is 384 as an example, the process of performing channel transformation convolution, normalization processing, and maximum pooling processing on the intermediate four-dimensional tensor data by the feature recognition module to obtain the target four-dimensional tensor data mentioned in the above embodiment is introduced. As shown in FIG3, the process may include:
[0100] Step S310: Perform channel transformation convolution on the intermediate four-dimensional tensor data through the second convolution layer in the feature recognition module to obtain sixth data.
[0101] Among them, the convolution kernel size of the first convolution layer is 3*3, the parameter padding is 1, and the first convolution layer can be used to receive the input of 384-channel four-dimensional tensor data and output 512-channel data.
[0102] Step S320: Normalize the intermediate four-dimensional tensor data through the second batch normalization layer in the feature recognition module to obtain seventh data.
[0103] Step S330: Perform maximum pooling processing on the seventh data through the second maximum pooling layer in the feature recognition module to obtain eighth data.
[0104] Among them, the pooling kernel size of the second maximum pooling layer is 2*2, and the parameter stride is 2.
[0105] Step S340: Normalize the eighth data through a second batch normalization layer to obtain target four-dimensional tensor data.
[0106] It can be understood that since the intermediate four-dimensional tensor data undergoes a round of processing to obtain the target four-dimensional tensor data, the image width and height of the target four-dimensional tensor data are half of the image width and height of the intermediate four-dimensional tensor data, so the data shape of the target four-dimensional tensor data is [A, 512, 1, 1], and the number of output images A is the same as the number of images of the initial four-dimensional tensor data.
[0107] Considering that the feature recognition module needs to be applied to the model for training, in order to avoid introducing more nonlinear transformation operations during the training process and reduce the risk of overfitting in training, the feature recognition module can use a linear activation function, such as the FReLU activation function.
[0108] Specifically, the first maximum pooling layer and the second maximum pooling layer in the feature recognition module can both adopt a linear activation function.
[0109] It can be understood that since the activation functions used in the first maximum pooling layer and the second maximum pooling layer are linear activation functions, after the feature recognition module is applied to the biometric recognition model, the biometric recognition model can align the features of the corresponding positions of the biological object to a certain extent, while avoiding the introduction of more nonlinear transformation operations in the biometric recognition model during the training process, thereby reducing the risk of overfitting in training.
[0110] The following describes an apparatus for extracting identification features provided in an embodiment of the present application. The apparatus for extracting identification features described below and the method for extracting identification features described above can be referenced to each other.
[0111] See FIG4 , which is a schematic diagram of the structure of a device for extracting identification features disclosed in an embodiment of the present application.
[0112] As shown in FIG4 , the apparatus may include:
[0113] A tensor data acquisition unit 11 is used to acquire initial four-dimensional tensor data, wherein the initial four-dimensional tensor data includes information about the number of images, the number of input channels, image width, and image height;
[0114] The feature recognition unit 12 is used to input the initial four-dimensional tensor data into a pre-established feature recognition module, and output the same number of recognition features as the image, where the number of dimensions of each recognition feature is the number of output channels of the feature recognition module, wherein the number of output channels is greater than the number of input channels, and the feature recognition module includes a first convolutional layer, a first batch normalization layer, a first maximum pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum pooling layer.
[0115] Optionally, the image width and image height of the initial four-dimensional tensor data are both 8 pixels;
[0116] The feature recognition unit includes:
[0117] a two-round processing unit, configured to process the initial four-dimensional tensor data twice using a pre-established feature recognition module in a processing order of first convolution, then normalization, and finally maximum pooling to obtain intermediate four-dimensional tensor data, where the image width and image height of the intermediate four-dimensional tensor data are both 2 pixels;
[0118] a single-round processing unit, configured to perform channel transformation convolution, normalization, and maximum pooling processing on the intermediate four-dimensional tensor data through the feature recognition module to obtain target four-dimensional tensor data, wherein the image width and image height of the target four-dimensional tensor data are both single pixels, and the number of dimensions of the target four-dimensional tensor data is the number of output channels;
[0119] A feature reshaping unit is used to perform feature reshaping on the target four-dimensional tensor data through the feature recognition module to obtain the same number of recognition features as the image.
[0120] Optionally, the number of input channels of the initial four-dimensional tensor data is 384;
[0121] The two-round processing unit includes:
[0122] a first data processing unit, configured to perform convolution processing on the initial four-dimensional tensor data through a first convolution layer in a pre-established feature recognition module to obtain first data, wherein the convolution kernel size of the first convolution layer is 3*3, and the first convolution layer is configured to receive an input of 384-channel four-dimensional tensor data and output 384-channel data;
[0123] a second data processing unit, configured to perform normalization processing on the first data through a first batch normalization layer in the feature recognition module to obtain second data;
[0124] a third data processing unit, configured to perform maximum pooling processing on the second data through the first maximum pooling layer in the feature recognition module to obtain third data, so as to complete one round of processing of the initial four-dimensional tensor data, wherein the pooling kernel size of the first maximum pooling layer is 2*2, and the image width and image height of the third data are both 4 pixels;
[0125] a fourth data processing unit, configured to perform convolution processing on the third data through the first convolution layer to obtain fourth data;
[0126] a fifth data processing unit, configured to perform convolution processing on the fourth data through the first batch normalization layer to obtain fifth data;
[0127] An intermediate data processing unit is used to perform maximum pooling processing on the fifth data through the first maximum pooling layer to obtain intermediate four-dimensional tensor data.
[0128] Optionally, the number of channels of the intermediate four-dimensional tensor data is 384;
[0129] The single-round processing unit comprises:
[0130] a first single-round processing subunit, configured to perform channel transformation convolution on the intermediate four-dimensional tensor data through the second convolutional layer in the feature recognition module to obtain sixth data, wherein the convolution kernel size of the first convolutional layer is 3*3, and the first convolutional layer is configured to receive input of 384-channel four-dimensional tensor data and output 512-channel data;
[0131] a second single-round processing subunit, configured to perform normalization processing on the intermediate four-dimensional tensor data through a second batch normalization layer in the feature recognition module to obtain seventh data;
[0132] a third single-round processing subunit, configured to perform maximum pooling processing on the seventh data through a second maximum pooling layer in the feature recognition module to obtain eighth data, where a pooling kernel size of the second maximum pooling layer is 2*2;
[0133] The fourth single-round processing subunit is used to perform normalization processing on the eighth data through the second batch normalization layer to obtain target four-dimensional tensor data.
[0134] The apparatus for extracting identification features provided in the embodiments of the present application can be applied to devices for extracting identification features, such as terminals: mobile phones, computers, etc. Optionally, FIG5 shows a block diagram of the hardware structure of the device for extracting identification features. Referring to FIG5 , the hardware structure of the device for extracting identification features may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4;
[0135] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;
[0136] The processor 1 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention;
[0137] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;
[0138] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:
[0139] Acquire initial four-dimensional tensor data, wherein the initial four-dimensional tensor data includes information about the number of images, the number of input channels, image width, and image height;
[0140] The initial four-dimensional tensor data is input into a pre-established feature recognition module, and the same number of recognition features as the images is output, where the number of dimensions of each recognition feature is the number of output channels of the feature recognition module, wherein the number of output channels is greater than the number of input channels, and the feature recognition module includes a first convolutional layer, a first batch normalization layer, a first maximum pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum pooling layer.
[0141] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0142] An embodiment of the present application further provides a storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:
[0143] Acquire initial four-dimensional tensor data, wherein the initial four-dimensional tensor data includes information about the number of images, the number of input channels, image width, and image height;
[0144] The initial four-dimensional tensor data is input into a pre-established feature recognition module, and the same number of recognition features as the images is output, where the number of dimensions of each recognition feature is the number of output channels of the feature recognition module, wherein the number of output channels is greater than the number of input channels, and the feature recognition module includes a first convolutional layer, a first batch normalization layer, a first maximum pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum pooling layer.
[0145] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0146] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0147] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referenced to each other.
[0148] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for extracting identification features, characterized in that: include: Acquire initial four-dimensional tensor data, wherein the initial four-dimensional tensor data includes information about the number of images, information about the number of input channels, information about image width, and information about image height; The initial four-dimensional tensor data is input into a pre-established feature recognition module, and the same number of recognition features as the image is output, and the number of dimensions of each recognition feature is the number of output channels of the feature recognition module, wherein the number of output channels is greater than the number of input channels, and the feature recognition module includes a first convolutional layer, a first batch normalization layer, a first maximum pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum pooling layer.
2. The method according to claim 1, characterized in that: The image width and image height of the initial four-dimensional tensor data are both 8 pixels; The initial four-dimensional tensor data is input into a pre-established feature recognition module, and the same number of recognition features as the image is output, including: According to the processing order of first convolution, then normalization, and finally maximum pooling, the initial four-dimensional tensor data is processed twice by a pre-established feature recognition module to obtain intermediate four-dimensional tensor data, wherein the image width and image height of the intermediate four-dimensional tensor data are both 2 pixels; The feature recognition module performs channel transformation convolution, normalization and maximum pooling processing on the intermediate four-dimensional tensor data to obtain target four-dimensional tensor data, wherein the image width and image height of the target four-dimensional tensor data are both single pixels, and the number of dimensions of the target four-dimensional tensor data is the number of output channels; The target four-dimensional tensor data is feature reshaped by the feature recognition module to obtain the same number of recognition features as that of the image.
3. The method according to claim 2, characterized in that The number of input channels of the initial four-dimensional tensor data is 384; The initial four-dimensional tensor data is processed twice by a pre-established feature recognition module in the order of convolution, normalization, and maximum pooling to obtain intermediate four-dimensional tensor data, including: The initial four-dimensional tensor data is convolved by a first convolution layer in a pre-established feature recognition module to obtain first data, wherein the convolution kernel size of the first convolution layer is 3*3. The first convolutional layer is used to receive an input of 384-channel four-dimensional tensor data and output 384-channel data; Normalizing the first data through a first batch normalization layer in the feature recognition module to obtain second data; Performing maximum pooling processing on the second data through the first maximum pooling layer in the feature recognition module to obtain third data, so as to complete one round of processing of the initial four-dimensional tensor data, the pooling kernel size of the first maximum pooling layer is 2*2, and the image width and image height of the third data are both 4 pixels; Performing convolution processing on the third data through the first convolution layer to obtain fourth data; Performing convolution processing on the fourth data through the first batch normalization layer to obtain fifth data; The fifth data is subjected to maximum pooling processing through the first maximum pooling layer to obtain intermediate four-dimensional tensor data.
4. The method according to claim 2, characterized in that: The number of channels of the intermediate four-dimensional tensor data is 384; The feature recognition module performs channel transformation convolution, normalization processing and maximum pooling processing on the intermediate four-dimensional tensor data to obtain target four-dimensional tensor data, including: Through the second convolution layer in the feature recognition module, the intermediate four-dimensional tensor data is subjected to channel transformation convolution to obtain sixth data, wherein the convolution kernel size of the first convolution layer is 3*3, and the first convolution layer is used to receive input of 384-channel four-dimensional tensor data and output 512-channel data; Normalizing the intermediate four-dimensional tensor data through a second batch normalization layer in the feature recognition module to obtain seventh data; Performing maximum pooling processing on the seventh data through the second maximum pooling layer in the feature recognition module to obtain eighth data, wherein the pooling kernel size of the second maximum pooling layer is 2*2; The eighth data is normalized by the second batch normalization layer to obtain target four-dimensional tensor data.
5. The method according to any one of claims 1 to 4, characterized in that: The first maximum pooling layer and the second maximum pooling layer both use a linear activation function.
6. A device for extracting identification features, characterized in that: include: A tensor data acquisition unit, used to acquire initial four-dimensional tensor data, wherein the initial four-dimensional tensor data includes information on the number of images, information on the number of input channels, information on image width, and information on image height; A feature recognition unit is used to input the initial four-dimensional tensor data into a pre-established feature recognition module, and output recognition features equal to the number of the images, wherein the number of dimensions of each recognition feature is the number of output channels of the feature recognition module, wherein the number of output channels is greater than the number of input channels, and the feature recognition module comprises a first convolutional layer, a first batch normalization layer, a first maximum pooling layer, a second convolutional layer, a second batch normalization layer, and a second maximum pooling layer.
7. The device according to claim 6, characterized in that The image width and image height of the initial four-dimensional tensor data are both 8 pixels; The feature recognition unit comprises: A two-round processing unit is used to process the initial four-dimensional tensor data for two rounds through a pre-established feature recognition module in a processing order of first convolution, then normalization, and finally maximum pooling to obtain intermediate four-dimensional tensor data, wherein the image width and image height of the intermediate four-dimensional tensor data are both 2 pixels; A single-round processing unit is used to perform channel transformation convolution, normalization processing and maximum pooling processing on the intermediate four-dimensional tensor data through the feature recognition module to obtain target four-dimensional tensor data, wherein the image width and image height of the target four-dimensional tensor data are both single pixels, and the number of dimensions of the target four-dimensional tensor data is the number of output channels; A feature reshaping unit is used to perform feature reshaping on the target four-dimensional tensor data through the feature recognition module to obtain recognition features with the same number as that of the image.
8. The device according to claim 7, characterized in that The number of input channels of the initial four-dimensional tensor data is 384; The two-round processing unit comprises: The first data processing unit is used to perform convolution processing on the initial four-dimensional tensor data through the first convolution layer in the pre-established feature recognition module to obtain first data, wherein the convolution kernel size of the first convolution layer is 3*3, and the first convolution layer is used to receive the four-dimensional tensor of 384 channels. Data input, output 384 channels of data; a second data processing unit, configured to perform normalization processing on the first data through a first batch normalization layer in the feature recognition module to obtain second data; A third data processing unit is used to perform maximum pooling processing on the second data through the first maximum pooling layer in the feature recognition module to obtain third data, so as to complete a round of processing of the initial four-dimensional tensor data, the pooling kernel size of the first maximum pooling layer is 2*2, and the image width and image height of the third data are both 4 pixels; a fourth data processing unit, configured to perform convolution processing on the third data through the first convolution layer to obtain fourth data; a fifth data processing unit, configured to perform convolution processing on the fourth data through the first batch normalization layer to obtain fifth data; An intermediate data processing unit is used to perform maximum pooling processing on the fifth data through the first maximum pooling layer to obtain intermediate four-dimensional tensor data.
9. A device for extracting identification features, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the method for extracting identification features as claimed in any one of claims 1 to 5.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the method for extracting identification features according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Image recognition method and device based on segmentable convolutional network and computer equipment
CN110298346A
Image recognition method and system, computer equipment and storage medium
CN112613581A
Image recognition method and device, storage medium and electronic equipment
CN115909009A
Dynamic gesture recognition method and device
WO2021190296A1
