Fine-grained image recognition method and system based on adaptive stride convolution

Through adaptive stride convolution technology, dynamic sliding window calculation is performed using the stride vector generated by the attention graph and stride vector generator, which solves the problem of inaccurate and inflexible positioning of rectangular frames in the prior art and improves fine graininess Accuracy and performance of image recognition.

CN114359711BActive Publication Date: 2025-01-10STATE GRID ANHUI ULTRA HIGH VOLTAGE CO +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111508103.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2025-01-10
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

The existing fine-grained image classification method is difficult to generate accurate rectangular frames when positioning the object parts. The number of rectangular frames is fixed and not flexible enough, making it difficult to highlight irregular areas of the object, resulting in limited recognition accuracy.

Method used

Adaptive stride convolution method is adopted to generate an attention map with prominent discriminant areas through the attention map extractor, and a stride vector generator is used to generate a stride vector for convolution kernel scanning. The dynamic stride convolution module performs Sliding window calculation realizes adaptive downsampling of images, enlarges the discriminating area and reduces non-important areas.

Benefits of technology

The accuracy of the model for fine-grained image recognition is significantly improved, and key image areas are focused on processing through non-uniform downsampling, reducing background noise interference, and extracting more discriminant subtle features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114359711B_ABST
    Figure CN114359711B_ABST
Patent Text Reader

Abstract

The present invention provides a fine-grained image recognition method and system with adaptive stride convolution, which belongs to the field of image recognition technology. The recognition method comprises: inputting the image to be classified into an attention map extractor to obtain an attention map with a prominent discrimination area, wherein the attention map extractor comprises a convolutional neural network, a feature map reshaping module and a trilinear product module, the convolutional neural network is used to generate a corresponding feature map according to the image to be classified, the feature map reshaping module is used to reshape the feature map into a matrix, and the trilinear product module is used to generate the attention map according to the matrix; using a stride vector generator to generate a stride vector for representing the convolution kernel scanning along the x-axis and y-axis directions respectively according to the attention map; using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result. The recognition method and system can improve the accuracy of image recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a fine-grained image recognition method and system using adaptive stride convolution. Background Art

[0002] With the surge in image data and the development of deep learning technology, fine-grained image classification technology has received more and more attention. The purpose of fine-grained image classification is to make more detailed sub-class divisions in a coarse category. Different from ordinary image classification, fine-grained images have smaller inter-class differences and larger intra-class differences. This task is more challenging and worth studying.

[0003] In the task of fine-grained image classification, the differences between categories are reflected in the details of specific parts, which requires special processing for these discriminative areas to extract more discriminative features. The current fine-grained classification methods mainly include two methods: one is the traditional strong supervised classification model, which uses the annotation box to learn the detection of discriminative local blocks and then extract discriminative features, but this method is heavily dependent on manual annotation information, which consumes a lot of time and resources. The other is a classification method based on weak supervision, which only relies on the category label of the image to achieve the positioning and feature extraction of informative parts. In the patent "A fine-grained image recognition method and system based on a convolutional neural network with block detectors and feature fusion", local features and global features are first obtained by pooling, and then these features are filtered with a block detector. In addition, a feature fusion flow is constructed to fuse local filtered features and global filtered features to achieve the extraction of more detailed information. However, this method will perform indiscriminate feature extraction on the differences in details without explicitly paying attention to local areas. In the patent "A fine-grained image classification method based on feature fusion", the improved non-maximum suppression optimization region proposal network is used to generate a rectangular frame that can locate the target area, and then the bilinear convolution network is improved through the attention module for fine-grained classification tasks to obtain attention features of different dimensions. In the patent "Weakly supervised fine-grained object classification method", for the input image, a series of rectangular local regions are generated through the region proposal network, and each region is sorted from large to small according to the confidence to obtain the top K local regions, and features are extracted from these regions for the final integrated prediction. However, the above-mentioned method of segmenting the salient parts of an object through a rectangular frame has some common disadvantages:

[0004] (1) It is difficult for the model to generate an accurate rectangular frame to locate the object part;

[0005] (2) The number of rectangular boxes is generally a predefined hyperparameter, which makes the model inflexible;

[0006] (3) The rectangular frame is difficult to highlight the irregular area of ​​the object. Due to the shortcomings of the above methods, the accuracy of the model in fine-grained image recognition is affected. Summary of the invention

[0007] The purpose of the embodiments of the present invention is to provide a fine-grained image recognition method and system with adaptive stride convolution, which can improve the accuracy of image recognition.

[0008] In order to achieve the above object, an embodiment of the present invention provides a fine-grained image recognition method using adaptive stride convolution, comprising:

[0009] Inputting the image to be classified into an attention map extractor to obtain an attention map with a prominent discrimination area, wherein the attention map extractor includes a convolutional neural network, a feature map reshaping module and a trilinear product module, the convolutional neural network is used to generate a corresponding feature map according to the image to be classified, the feature map reshaping module is used to reshape the feature map into a matrix, and the trilinear product module is used to generate the attention map according to the matrix;

[0010] Using a stride vector generator to generate a stride vector representing the scanning of the convolution kernel along the x-axis and y-axis directions according to the attention map;

[0011] A dynamic stride convolution module is used to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result.

[0012] Optionally, using a stride vector generator to generate a stride vector for representing a convolution kernel scanning along the x-axis and y-axis directions according to the attention map includes:

[0013] Performing a bilinear upsampling operation on the attention map to obtain a first attention map with the same spatial size as the attention map;

[0014] The first attention map is integrated in the x-axis direction and the y-axis direction respectively to obtain a wide stride vector for representing the scanning of the convolution kernel along the x-axis direction and a high stride vector for representing the scanning of the convolution kernel along the y-axis direction.

[0015] Optionally, using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result includes:

[0016] The size of the grid area scanned by the dynamic stride convolution module each time is calculated according to formula (1):

[0017] , (1)

[0018] in, is the size of the grid area, is the preset void ratio, is the size of the convolution kernel of the dynamic stride convolution module.

[0019] Optionally, using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result includes:

[0020] The second characteristic map output by the sliding window calculation is determined according to formula (2):

[0021] , (2)

[0022] in, is the second feature map, is the position coordinate in the second feature map, represents an enumeration of all positions in the grid area, is the weight of the convolution kernel, represents the sampling position, Indicates the sampling result.

[0023] Optionally, using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result includes:

[0024] The sampling result is determined according to formula (3):

[0025] , (3)

[0026] in, , Indicates the complete positions of all feature maps output during the sliding window calculation process. is the bilinear interpolation kernel.

[0027] Optionally, using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result includes:

[0028] The bilinear interpolation kernel is determined according to formula (4):

[0029] , (4)

[0030] in, is a sub-kernel of the bilinear interpolation kernel, Indicates the complete positions of all the feature maps output during the sliding window calculation process are enumerated in the x-axis direction. Indicates that all complete positions of all output feature maps in the sliding window calculation process are enumerated in the y-axis direction.

[0031] Optionally, using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result includes:

[0032] The calculation operation of the dynamic stride convolution module is performed according to formula (5),

[0033] , (5).

[0034] Optionally, using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result includes:

[0035] According to formula (6) and formula (7), the weight of the convolution kernel and the gradient of the sampling result are determined.

[0036] , (6)

[0037] , (7).

[0038] On the other hand, the present invention also provides a fine-grained image recognition system with adaptive stride convolution, the recognition system comprising:

[0039] An attention map extractor, configured to receive the image to be classified to obtain an attention map with a prominent discriminative region;

[0040] A stride vector generator, used to generate a stride vector representing the scanning of the convolution kernel along the x-axis and y-axis directions respectively according to the attention map;

[0041] A dynamic stride convolution module is used to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result.

[0042] On the other hand, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, wherein the instructions are used to be read by a machine so that the machine executes any of the above-mentioned identification methods.

[0043] Through the above technical scheme, the fine-grained image recognition method and system of adaptive stride convolution provided by the present invention explicitly focus on the key areas of the image through non-uniform downsampling, and use dynamic stride convolution instead of uniform stride convolution according to the attention map that can highlight the significant parts of the object to perform adaptive downsampling of the image or feature map. This novel convolution operation slides in small steps in the discriminative areas and in large steps in the unimportant areas, which can achieve the effect of enlarging the discriminative areas and shrinking the unimportant areas, that is, extracting more discriminative subtle features while reducing the interference caused by background noise, thereby improving the model recognition performance.

[0044] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:

[0046] Figure 1 is a flow chart of a fine-grained image recognition method using adaptive stride convolution according to one embodiment of the present invention;

[0047] Figure 2 is a logic block diagram of a fine-grained image recognition method of adaptive stride convolution according to an embodiment of the present invention;

[0048] Figure 3 is an example diagram of a fine-grained image recognition method using adaptive stride convolution according to an embodiment of the present invention;

[0049] Figure 4 is an example diagram of a fine-grained image recognition method using adaptive stride convolution according to an embodiment of the present invention;

[0050] Figure 5 This is an example diagram of a fine-grained image recognition method using adaptive stride convolution according to an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.

[0052] In the embodiments of the present invention, unless otherwise specified, directional words such as "up, down, top, bottom" are usually used with reference to the directions shown in the drawings or are used to describe the relative positional relationships of components in the vertical, perpendicular or gravity direction.

[0053] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0054] like Figure 1 FIG. 1 is a flow chart of a fine-grained image recognition method using adaptive stride convolution according to an embodiment of the present invention. Figure 1 In the example, the identification method may include:

[0055] In step S10, the image to be classified is input into an attention map extractor to obtain an attention map with a prominent discrimination area, wherein the attention map extractor includes a convolutional neural network, a feature map reshaping module and a trilinear product module, the convolutional neural network is used to generate a corresponding feature map according to the image to be classified, the feature map reshaping module is used to reshape the feature map into a matrix, and the trilinear product module is used to generate an attention map according to the matrix;

[0056] In step S11, a stride vector generator is used to generate a stride vector representing the scanning of the convolution kernel along the x-axis and y-axis directions according to the attention map;

[0057] In step S12, a dynamic stride convolution module is used to perform sliding window calculation on the feature map according to the stride vector to obtain a recognition result.

[0058] In step S10, an attention map extractor can be used to extract an attention map with a prominent discrimination area according to the image to be classified. The attention map extractor can be composed of a small convolutional neural network, a feature map reshaping module and a trilinear product module. Among them, the convolutional neural network is used to generate a corresponding feature map according to the image to be classified, the feature map reshaping module is used to reshape the feature map into a matrix, and the trilinear product module is used to generate an attention map according to the matrix. Specifically, the input image to be classified can be represented as an image When the image to be classified is input into a convolutional neural network, the last convolutional layer of the convolutional neural network outputs a feature map .in, Represent the number of channels, height and width of the feature map respectively. After the feature map reshaping module reshapes the matrix according to the feature map, the generated matrix can be expressed as The attention map obtained by the trilinear product module based on this matrix can be expressed as ,Right now The example graph generated can be as follows Figure 3 shown.

[0059] Step S11 can be used to generate a stride vector representing the convolution kernel scanning along the x-axis and y-axis directions, that is, a wide stride vector and high stride vector . Specifically, step S11 may be to first perform a bilinear upsampling operation on the attention map to obtain a first attention map of the same size as the attention map space; then integrate the first attention map in the x-axis direction and the y-axis direction respectively to obtain a wide stride vector for representing the convolution kernel scanning along the x-axis direction and a high stride vector for representing the convolution kernel scanning along the y-axis direction. More specifically, the wide stride vector may be determined by using formulas (1) to (4). and high stride vector ,

[0060] , (1)

[0061] , (2)

[0062] , (3)

[0063] , (4)

[0064] in, For the width stride vectors, For the A high-stride vector, is the first feature map, , is the coordinate number, , is the width of the first feature map, , is the height of the first feature map.

[0065] Step S12 can be used to perform sliding window calculation based on the stride vector determined in step S10, so as to obtain the recognition result of the image to be classified. Sliding window calculation is an algorithm for selecting corresponding pixels from the feature map for calculation based on a preset window size. In this embodiment, the size of the grid area scanned by the sliding window calculation each time can be calculated according to formula (5):

[0066] , (5)

[0067] in, is the size of the grid area, is the preset void ratio, is the size of the convolution kernel of the dynamic stride convolution module.

[0068] The difference between the present invention and the traditional sliding window calculation is that in step S12, the sliding window calculation adopts the dynamic stride convolution method to dynamically adjust the stride size. The input map of the dynamic stride convolution can be the original image (the image to be classified). ) can also be the output feature of the middle layer of the network (Feature map), the convolution kernel slides on the input map with a dynamic step. This sliding window calculation can also be regarded as the convolution kernel in the input map coordinates The sampling is performed on and Indicates the stride of each step in the y-axis and x-axis directions, Represents the coordinates on the output feature map. While sampling, the convolution kernel also resamples the regular grid centered on the sampled element. The elements in are weighted summed, such as Figure 3 shown.

[0069] For the feature map (second feature map) output by the sliding window calculation, it can be expressed by formula (6):

[0070] , (6)

[0071] in, is the second feature map, is the position coordinate in the second feature map, An enumeration representing all positions in a grid area, is the weight of the convolution kernel, represents the sampling position, In this embodiment, considering that the value of the stride vector obtained by the stride generator is generally a decimal, the position of the convolution kernel sampling will be Not on a regular grid. In order to solve this technical problem, in this embodiment, the grid elements adjacent to the sampling position element can be used to accurately represent the value of the sampling position by bilinear interpolation. Specifically, the sampling result can be determined by formula (7):

[0072] , (7)

[0073] in, , Indicates the complete positions of all feature maps output during the sliding window calculation process. is the bilinear interpolation kernel.

[0074] From formula (7), we can see that the bilinear interpolation kernel is two-dimensional, so formula (8) can also be used to express the bilinear interpolation kernel:

[0075] , (8)

[0076] in, is a sub-kernel of the bilinear interpolation kernel, Indicates the complete positions of all the feature maps output during the sliding window calculation process are enumerated in the x-axis direction. Indicates the complete positions of all the feature maps output during the sliding window calculation process in the y-axis direction. Considering , is the input variable in the function, then combining the above formulas (1) to (8), step S12 can also be expressed as formula (9)

[0077] , (9).

[0078] In addition, in order to prove that the process of performing sliding window calculation in step S12 is differentiable, formula (10) and formula (11) can be used to calculate the weight of the convolution kernel and the gradient of the sampling result.

[0079] , (10)

[0080] , (11).

[0081] In the traditional downsampling layer, the sampling kernel is at a fixed step size. and Slide along the y-axis and x-axis on the input feature map, that is, the coordinates of the input map Sampling is performed on Represents the coordinates on the output feature map, which constitutes the corresponding stride vector and is an arithmetic series, such as Figure 3 As shown in c in , the dots at the sampling positions are evenly distributed on the image. Compared with the traditional downsampling operation, the stride vector of the method provided by the present invention is and In satisfying and Under the condition of , it can be any increasing sequence. Figure 3 As shown in the figure, the dots at the sampling positions can be distributed non-uniformly on the image according to the highlighted areas of the attention map. Therefore, in the process of image downsampling, adaptive stride convolution can more flexibly and specifically extract differentiated features from different areas of the image, thereby maximizing the use of discriminative information.

[0082] Regarding how to determine the parameters of the attention map extractor, stride vector generator, and dynamic stride convolution module used in the method provided by the present invention, although there may be many ways known to those skilled in the art, in a preferred example of the present invention, the method may include:

[0083] Step 1: Prepare fine-grained training data sets and test sets, including fine-grained images and corresponding category labels. Change the spatial size of the image by bilinear interpolation so that the image height and width are both 512, and then perform image normalization.

[0084] Step 2: Use a deep learning framework to build an adaptive stride convolutional network model, which consists of a base network Base-Net and an ASC module. The Base-Net can be a neural network commonly known to those skilled in the art, such as ResNet-50, ResNet-101, VGG-16, etc. In this example, ResNet-50 can be used as an exemplary Base-Net. The proposed ASC module is embedded in different positions of the Base-Net, such as Figure 4 As shown. Figure 4 The network structure in the upper middle part a can be used to input the image I Downsampling, Figure 4 The network structure in the middle and lower half b can be used to downsample the intermediate features of the network.

[0085] Step 3: Input image To the small convolutional neural network in the ASC module. In this convolutional neural network, the image is processed by multiple convolutions, batch normalization, nonlinear activation layers and pooling layers to obtain the extracted convolution features. , here the number of channels ,high ,Width Specifically, a ResNet-18 pre-trained on a fine-grained dataset is used as the backbone. In order to obtain high-resolution feature maps for precise positioning, two downsampling processes are removed from the original ResNet-18 by changing the convolution step size. In addition, in order to improve the robustness of the convolution response, the field of view is increased by appending two sets of dilated convolution layers with multiple dilation rates.

[0086] Step 4: Get the feature map Reshape into a matrix , and obtain the attention map through the trilinear product module ,Right now .

[0087] Step 5: Attention map After bilinear upsampling, the image is Or input feature map Same size of space .

[0088] Step 6: Upsample the attention map Input to the stride vector generator to get a high stride vector and width stride vector In this embodiment, it is possible to Figure 4 The case of a in , ,for Figure 4 In the case of b, , .

[0089] Step 7: Select the convolution kernel size , void ratio Adaptive stride convolution based on the stride vector and , stride convolution in the input image Or intermediate feature map Perform sliding window calculation to obtain the output image of the adaptive stride convolution module . Figure 5 Given Figure 4 Figure 1 shows a visualization diagram of the adaptive module output for case a in the figure, where the first line is the input image, the second line is the attention map, and the third line is the output map after adaptive stride convolution.

[0090] Step 8. Base-Net continues to complete the subsequent feature extraction. The feature vector passes through the fully connected layer and softmax classifier to obtain the category to which the image belongs.

[0091] Step 9: The adaptive stride convolutional network minimizes the loss function through the back propagation algorithm and gradient descent strategy, and finally obtains the trained network model.

[0092] Step 10: Input the test data set and calculate the accuracy of the model classification.

[0093] On the other hand, the present invention also provides a fine-grained image recognition system with adaptive stride convolution, wherein the recognition system includes an attention map extractor, a stride vector generator, and a dynamic stride convolution module.

[0094] Among them, the attention map extractor can be used to receive the image to be classified to obtain an attention map with a prominent discrimination area; the stride vector generator can be used to generate a stride vector representing the scanning of the convolution kernel along the x-axis and y-axis directions according to the attention map; the dynamic stride convolution module can be used to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result. Specifically, the recognition system can be used to perform the following steps: Figures 1 to 5 The specific content of the identification method has been described in detail above, so it will not be repeated here.

[0095] On the other hand, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, wherein the instructions are used to be read by a machine so that the machine executes any of the above-mentioned identification methods.

[0096] Through the above technical scheme, the fine-grained image recognition method and system of adaptive stride convolution provided by the present invention explicitly focus on the key areas of the image through non-uniform downsampling, and use dynamic stride convolution instead of uniform stride convolution according to the attention map that can highlight the significant parts of the object to perform adaptive downsampling of the image or feature map. This novel convolution operation slides in small steps in the discriminative areas and in large steps in the unimportant areas, which can achieve the effect of enlarging the discriminative areas and shrinking the unimportant areas, that is, extracting more discriminative subtle features while reducing the interference caused by background noise, thereby improving the model recognition performance.

[0097] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0098] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0099] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0100] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0101] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0102] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0103] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0104] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0105] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A fine-grained image recognition method based on adaptive stride convolution, characterized in that: The identification method comprises: Inputting the image to be classified into an attention map extractor to obtain an attention map with a prominent discrimination area, wherein the attention map extractor includes a convolutional neural network, a feature map reshaping module and a trilinear product module, the convolutional neural network is used to generate a corresponding feature map according to the image to be classified, the feature map reshaping module is used to reshape the feature map into a matrix, and the trilinear product module is used to generate the attention map according to the matrix; Using a stride vector generator to generate a stride vector representing the scanning of the convolution kernel along the x-axis and y-axis directions according to the attention map; Using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result; Using a stride vector generator to generate a stride vector for representing the convolution kernel scanning along the x-axis and y-axis directions according to the attention map includes: Performing a bilinear upsampling operation on the attention map to obtain a first attention map with the same spatial size as the attention map; The first attention map is integrated in the x-axis direction and the y-axis direction respectively to obtain a wide stride vector for representing the scanning of the convolution kernel along the x-axis direction and a high stride vector for representing the scanning of the convolution kernel along the y-axis direction.

2. The identification method according to claim 1, characterized in that: Using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result includes: The size of the grid area scanned by the dynamic stride convolution module each time is calculated according to formula (1): ,(1) in, is the size of the grid area, is the preset void ratio, is the size of the convolution kernel of the dynamic stride convolution module.

3. The identification method according to claim 2, characterized in that: Using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result includes: The second characteristic map output by the sliding window calculation is determined according to formula (2): ,(2) in, is the second feature map, is the position coordinate in the second feature map, An enumeration representing all positions in a grid area, is the weight of the convolution kernel, represents the sampling position, Indicates the sampling result.

4. The identification method according to claim 3, characterized in that: Using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result includes: The sampling result is determined according to formula (3): ,(3) in, , Indicates the complete positions of all feature maps output during the sliding window calculation process. is the bilinear interpolation kernel.

5. The identification method according to claim 4, characterized in that: Using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result includes: The bilinear interpolation kernel is determined according to formula (4): ,(4) in, is a sub-kernel of the bilinear interpolation kernel, Indicates the complete positions of all the feature maps output during the sliding window calculation process are enumerated in the x-axis direction. Indicates that all complete positions of all output feature maps in the sliding window calculation process are enumerated in the y-axis direction.

6. The identification method according to claim 5, characterized in that: Using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result includes: The calculation operation of the dynamic stride convolution module is performed according to formula (5), ,(5)。 7. The identification method according to claim 6, characterized in that: Using a dynamic stride convolution module to perform sliding window calculation on the feature map according to the stride vector to obtain the recognition result includes: According to formula (6) and formula (7), the weight of the convolution kernel and the gradient of the sampling result are determined. ,(6) ,(7)。 8. A fine-grained image recognition system with adaptive stride convolution, characterized in that: The identification system comprises: An attention map extractor, used for receiving an image to be classified to obtain an attention map with a prominent discrimination area, wherein the attention map extractor comprises a convolutional neural network, a feature map reshaping module and a trilinear product module, the convolutional neural network is used to generate a corresponding feature map according to the image to be classified, the feature map reshaping module is used to reshape the feature map into a matrix, and the trilinear product module is used to generate the attention map according to the matrix; A stride vector generator, used to generate a stride vector representing the scanning of the convolution kernel along the x-axis and y-axis directions respectively according to the attention map; A dynamic stride convolution module, used for performing sliding window calculation on the feature map according to the stride vector to obtain the recognition result; The stride vector generator is used to: Performing a bilinear upsampling operation on the attention map to obtain a first attention map with the same spatial size as the attention map; The first attention map is integrated in the x-axis direction and the y-axis direction respectively to obtain a wide stride vector for representing the scanning of the convolution kernel along the x-axis direction and a high stride vector for representing the scanning of the convolution kernel along the y-axis direction.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and the instructions are used to be read by a machine so that the machine executes the identification method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Fine-grained image recognition method and system based on block detector and feature fusion convolutional neural network

    CN110363233A

  • Multi-feature cyclic convolution saliency target detection method based on attention mechanism

    CN110648334A