Feature processing method, device, equipment and storage medium
By combining the central difference convolution method of low-resolution and high-resolution feature maps, an accurate upsampling kernel is generated, which solves the problem of difficulty in recovering image details in feature upsampling and significantly improves the clarity of the upsampling results.
Patent Information
- Application Number
- CN202411047398.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-08-01
AI Technical Summary
Existing feature upsampling schemes are difficult to effectively restore image detail information, resulting in blurred upsampling results and inability to obtain relatively fidelity image details.
By obtaining low-resolution feature maps and high-resolution feature maps, the central difference convolution method is used to predict the similarity, generate an accurate upsampling kernel, and then perform upsampling to restore image details.
It improves the clarity of the upsampling results, ensures the fidelity of image detail information, and improves the accuracy of the upsampling kernel.
Smart Images

Figure CN118570573B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, specifically to the field of image processing technology, and in particular to a feature processing method, device, equipment and storage medium. Background Art
[0002] In the field of image processing, feature upsampling is widely used. This feature upsampling aims to restore the spatial resolution of a low-resolution (LR) feature map to obtain a high-resolution (HR) feature map. At present, common feature upsampling schemes include the CARAFE (Content-Aware Reassembly of Features) scheme, the principle of which is as follows: the feature map to be upsampled is input into an upsampling kernel prediction module, so that the upsampling kernel prediction module dynamically generates a pixel-by-pixel upsampling kernel based on the input feature map, and then uses the dynamically generated upsampling kernel to pass the feature map through a content-aware reassembly module to upsample the feature map and obtain the corresponding upsampling result.
[0003] It can be seen that the existing CARAFE scheme generates an upsampling kernel only based on the feature map to be upsampled, and then uses the upsampling kernel to achieve feature upsampling; since the resolution of the feature map to be upsampled is usually low and contains less image detail information, using this scheme to achieve feature map upsampling can easily lead to the inability to obtain relatively fidelity image detail information, which in turn leads to a fuzzy upsampling result. Summary of the invention
[0004] The embodiments of the present application provide a feature processing method, apparatus, device and storage medium, which can restore image details during feature upsampling, thereby improving the clarity of the upsampling results.
[0005] On the one hand, an embodiment of the present application provides a feature processing method, the method comprising:
[0006] Acquire a first feature map to be upsampled, and acquire a second feature map; the first feature map and the second feature map are generated by performing feature extraction processing in different ways on the same image, and the feature data in the second feature map includes image detail information;
[0007] Determine a plurality of first neighborhood pixels of pixel i and feature data of each first neighborhood pixel based on the first feature map, and determine first feature data of pixel i based on the second feature map; i∈[1,I], where I is the number of pixels in the second feature map;
[0008] Based on the feature data of the plurality of first neighborhood pixels, performing a center difference convolution on the first feature data of the pixel i to obtain a target convolution result;
[0009] According to the target convolution result, predict the first similarity between the pixel i and each first neighborhood pixel; and use the predicted first similarities to generate an upsampling kernel corresponding to the pixel i;
[0010] The first feature map is upsampled using an upsampling kernel corresponding to the pixel i.
[0011] On the other hand, an embodiment of the present application provides a feature processing device, the device comprising:
[0012] an acquisition unit, configured to acquire a first feature map to be upsampled, and to acquire a second feature map; the first feature map and the second feature map are generated by performing feature extraction processing in different ways on the same image, and the feature data in the second feature map includes image detail information;
[0013] a processing unit, configured to determine a plurality of first neighborhood pixels of pixel i and feature data of each first neighborhood pixel based on the first feature map, and to determine first feature data of the pixel i based on the second feature map; i∈[1, I], where I is the number of pixels in the second feature map;
[0014] The processing unit is further configured to perform a center difference convolution on the first feature data of the pixel i based on the feature data of the plurality of first neighborhood pixels to obtain a target convolution result;
[0015] The processing unit is further configured to predict a first similarity between the pixel i and each first neighborhood pixel according to the target convolution result; and generate an upsampling kernel corresponding to the pixel i using each predicted first similarity;
[0016] The processing unit is further used to upsample the first feature map using an upsampling kernel corresponding to the pixel i.
[0017] In another aspect, an embodiment of the present application provides a computer device, the computer device comprising an input interface and an output interface, the computer device further comprising:
[0018] processor and computer storage media;
[0019] The processor is suitable for implementing one or more instructions, the computer storage medium stores one or more instructions, and the one or more instructions are suitable for the processor to load and execute the above-mentioned feature processing method.
[0020] On the other hand, an embodiment of the present application provides a computer storage medium, which stores one or more instructions, and the one or more instructions are suitable for being loaded by a processor and executing the above-mentioned feature processing method.
[0021] On the other hand, an embodiment of the present application provides a computer program product, which includes one or more instructions; when one or more instructions in the computer program product are executed by a processor, the above-mentioned feature processing method is implemented.
[0022] In the embodiment of the present application, for the first feature map to be upsampled, a second feature map for guiding the upsampling of the first feature map can be obtained, and the first feature data of the pixel i can be determined based on the second feature map; since the feature data in the second feature map contains image detail information, and the second feature map and the first feature map are generated by performing feature extraction processing in different ways on the same image, by determining the first feature data of the pixel i based on the second feature map, the first feature data can be enriched with fidelity image detail information. Furthermore, by performing central difference convolution on the first feature data rich in image detail information of pixel i based on the feature data of multiple first neighborhood pixels of pixel i determined by the first feature map, the image detail information of pixel i and the similarity between pixel i and each first neighborhood pixel can be captured, so as to obtain a target convolution result containing image detail information and similarity information, thereby more accurately predicting the first similarity between pixel i and each first neighborhood pixel based on the target convolution result, and by using each first similarity to generate an upsampling kernel corresponding to pixel i, the accuracy of the upsampling kernel is improved and the upsampling kernel contains image detail information, and then the first feature map is upsampled by the upsampling kernel that is more accurate and contains image detail information, so as to restore image details in the process of feature upsampling, thereby improving the clarity of the upsampling result. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1It is a schematic diagram of the principle of a feature processing solution provided in an embodiment of the present application;
[0025] Figure 2 It is a flowchart of a feature processing method provided in an embodiment of the present application;
[0026] Figure 3a is a schematic diagram of determining a plurality of first neighborhood pixels provided by an embodiment of the present application;
[0027] Figure 3b is a schematic diagram of a central difference convolution provided in an embodiment of the present application;
[0028] Figure 4 is a flowchart of a feature processing method provided by another embodiment of the present application;
[0029] Figure 5 It is a structural schematic diagram of a channel compressor provided in an embodiment of the present application;
[0030] Figure 6a is a schematic diagram of an image segmentation process provided in an embodiment of the present application;
[0031] Figure 6b It is a schematic diagram of the principle of a feature upsampling method provided in an embodiment of the present application;
[0032] Figure 6c It is a schematic diagram of a process of grouped central difference deformable convolution provided in an embodiment of the present application;
[0033] Figure 6d is a schematic diagram of a feature upsampling method applied in a model reasoning stage provided in an embodiment of the present application;
[0034] Figure 6e This is a schematic diagram for comparing experimental results provided by an embodiment of the present application;
[0035] Figure 7 is a structural schematic diagram of a feature processing device provided in an embodiment of the present application;
[0036] Figure 8 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0038] The embodiment of the present application proposes a feature processing scheme to restore image details during feature upsampling (Upsampling), reduce the blurriness of the upsampling result, and thus improve the clarity of the upsampling result. Feature upsampling refers to the process of increasing the resolution of a low-resolution feature map through a series of operations (such as interpolation operations); the low-resolution feature map mentioned here can be understood as a feature map (Featuremap) with a resolution less than a resolution threshold. The so-called feature map can be referred to as feature, which can be understood as a picture generated by performing at least one feature extraction on an image (such as convolving the image with a filter), which may include feature data of multiple (i.e., at least two) pixels, and any feature map can support the re-execution of feature extraction operations (such as convolving with a filter again) to generate a new feature map. The resolution of a feature map can be used to indicate the number of pixels that the corresponding feature map has in the vertical direction (height direction) and the horizontal direction (width direction). For example, if the resolution of a feature map is 640×480, it means that the feature map has 640 pixels in the vertical direction (height direction) and 480 pixels in the horizontal direction (width direction), that is, the feature map contains a total of 640×480 pixels and feature data for each pixel.
[0039] See also Figure 1 As shown, the general principle of the feature processing scheme proposed in the embodiment of the present application is as follows: obtain a first feature map to be upsampled, the first feature map can be generated by a neural network model after a series of feature extraction processing on a certain image, and the first feature map can be a low-resolution feature map; the neural network model mentioned here refers to a model constructed based on machine learning / deep learning technology in the field of artificial intelligence (AI). The so-called machine learning is a multi-field cross-disciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Deep learning is a technology for machine learning using deep neural networks. In addition, shallow feature extraction can be performed on the same image to obtain a second feature map, which may include shallow features of the corresponding image (such as image detail information); since the second feature map contains image detail information, the resolution of the second feature map is usually high (such as greater than the resolution threshold), that is, the second feature map can be a high-resolution feature map (i.e., a feature map with a resolution greater than the resolution threshold). Furthermore, the second feature map can be used to guide the first feature map to perform upsampling based on the center difference convolution to obtain an upsampling result (i.e., a high-resolution feature map).
[0040] Among them, the general logic of using the second feature map to guide the first feature map to perform upsampling based on the center difference convolution is as follows: determine the feature data of multiple first neighborhood pixels and each first neighborhood pixel of pixel i based on the first feature map, and determine the first feature data of pixel i based on the second feature map, so that the first feature data can be rich in fidelity image detail information; use the feature data of multiple first neighborhood pixels to perform center difference convolution on the first feature data of pixel i, and obtain the target convolution result containing image detail information and similarity information, predict the first similarity between pixel i and each first neighborhood pixel according to the target convolution result, and use each first similarity to generate the upsampling kernel corresponding to pixel i, so as to use the upsampling kernel corresponding to pixel i to upsample the first feature map, and obtain the new feature data of pixel i. It can be understood that i∈[1,I], I is the number of pixels in the second feature map; by sequentially changing i from 1 to I, new feature data of I pixels can be obtained, and the new feature data of these I pixels can constitute the upsampling result corresponding to the first feature map.
[0041] Based on the above description, it can be seen that the feature processing scheme proposed in the embodiment of the present application can use a second feature map rich in image detail information to guide the first feature map to be upsampled for a given first feature map, so that after upsampling the first feature map, a new feature map (i.e., the upsampling result) with the same resolution as the second feature map is obtained, that is, the obtained new feature map and the second feature map contain the same number of pixels. In addition, for pixel i, the feature processing method determines the first feature data of pixel i based on the second feature map, so that the first feature data of pixel i is rich in image detail information, and the image detail information of pixel i and the similarity between pixel i and multiple first neighboring pixels are captured by performing a central difference convolution on pixel i based on the feature data of multiple first neighboring pixels of pixel i, so as to generate an upsampling kernel based on the target convolution result generated by the central difference convolution, which can improve the accuracy of the upsampling kernel and make the upsampling kernel contain image detail information, thereby realizing that in the process of feature upsampling, the image details of pixel i are restored based on the upsampling kernel, the clarity of the new feature data of pixel i is improved, and the clarity of the upsampling result is improved.
[0042] In a specific implementation, the feature processing scheme proposed in the embodiment of the present application can be executed by a computer device, which can be a terminal or a server. Alternatively, the feature processing scheme can also be jointly executed by a terminal and a server, which is not limited in the embodiment of the present application. Among them, the terminal can be a smart phone, a computer (such as a tablet computer, a laptop computer, a desktop computer, etc.), a smart wearable device (such as a smart watch, smart glasses), an intelligent voice interaction device, a smart home appliance (such as a smart TV), a vehicle terminal or an aircraft, etc.; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, etc.
[0043] Based on the description of the above feature processing solution, the present application embodiment proposes a feature processing method. The feature processing method can be executed by the above-mentioned computer device (terminal or server), or by the terminal and the server together; for the sake of convenience, the present application embodiment takes the computer device executing the feature processing method as an example. Please refer to Figure 2 As shown, the feature processing method proposed in the embodiment of the present application may include the following steps S201-S205:
[0044] S201, obtaining a first feature map to be upsampled, and obtaining a second feature map.
[0045] Among them, the first feature map refers to the feature map to be upsampled, and the second feature map is a feature map used to guide the first feature map to be upsampled; the first feature map and the second feature map are generated by performing different methods of feature extraction processing on the same image (such as a target image, which can be any image), and the feature data in the second feature map contains image detail information.
[0046] In a specific implementation, the first feature map may be generated by a neural network model performing deep feature extraction processing on a target image, that is, the feature data in the first feature map includes deep features of the target image. The so-called deep feature extraction processing refers to the processing of extracting deep features, and the deep features may include coarse-grained information such as image semantic information; based on this, it can be seen that the first feature map is in a semantic space. Among them, the neural network model mentioned here may be a model for performing any application task (such as image segmentation tasks, target detection tasks, object recognition tasks, etc.), and its architecture may be a deep neural network (Deep Neural Networks, DNN), or a convolutional neural network (Convolutional Neural Networks, CNN), or other types of neural networks, which are not limited in the embodiments of the present application. It is understandable that deep features are usually extracted through a large number of network layers in a neural network model, and these large number of network layers involve more convolution, downsampling and other operations, and downsampling will reduce the resolution. Therefore, the resolution of the deep features extracted by these large number of network layers is low, so that the first feature map containing deep features can be a low-resolution feature map.
[0047] The second feature map can be generated by calling a shallow feature extractor to perform shallow feature extraction processing on the target image, that is, the feature data in the second feature map includes shallow features of the target image; the so-called shallow feature extraction processing refers to the processing of extracting shallow features, and the shallow features may contain fine-grained information such as image detail information, and the image detail information may include but is not limited to at least one of the following: color, texture, edge and other information; based on this, it can be seen that the second feature map is in the image detail space. Among them, the shallow feature extractor mentioned here is essentially a shallow network, and the so-called shallow network refers to a model containing a small number (such as two or three) of network layers; it can be understood that the shallow features are extracted through a small number of network layers in the shallow network, and these small number of network layers may involve operations such as convolution, activation, normalization, and do not involve downsampling operations, so the resolution of the shallow features extracted by the shallow feature extractor is higher, so that the second feature map containing the shallow features can be a high-resolution feature map; in this case, the resolution of the first feature map is lower than that of the second feature map.
[0048] S202, determining a plurality of first neighborhood pixels of pixel i and feature data of each first neighborhood pixel based on the first feature map, and determining first feature data of pixel i based on the second feature map.
[0049] Among them, pixel i refers to: the i-th pixel in the upsampling result to be generated. Since the principle of the feature processing method proposed in the embodiment of the present application is: for a given first feature map, a second feature map rich in image detail information is used to guide the first feature map to be upsampled, so that after upsampling the first feature map, a new feature map (i.e., the upsampling result) with the same resolution as the second feature map is obtained, the upsampling result to be generated has the same resolution as the second feature map, and since the resolution is the same, it can be indicated that the upsampling result to be generated and the second feature map contain the same number of pixels, so it can be determined that i∈[1, I], I is the number of pixels in the second feature map.
[0050] In a specific implementation, when executing step S202, the computer device may determine multiple first neighborhood pixels of pixel i in the first feature map and feature data of each first neighborhood pixel; and obtain the first feature data of pixel i from the second feature map. It can be seen that in this specific implementation, each first neighborhood pixel is a pixel in the first feature map, and the feature data of each first neighborhood pixel is the feature data of the corresponding pixel contained in the first feature map, and the first feature data of pixel i is the feature data of the i-th pixel in the second feature map. It should be noted that the multiple first neighborhood pixels are used for the subsequent generation of an upsampling kernel, and the size of the upsampling kernel is K×K, that is, the upsampling kernel needs to include K 2 sampling coefficients (K is a positive integer), this K 2 The sampling coefficients are used to adjust the K pixels i in the first feature map during the upsampling process. 2 The feature data of the neighboring pixels are weighted and summed, and a sampling coefficient is used to weight the feature data of a neighboring pixel; based on this, the number of the first neighboring pixels mentioned in the embodiment of the present application is K 2 indivual.
[0051] The specific implementation method of determining the first neighboring pixels of the pixel i in the first feature map may be: mapping the pixel i to the first feature map to obtain a mapping point corresponding to the pixel i; determining a reference area with the mapping point as the center in the first feature map, the reference area including K 2pixels; each pixel in the reference area is used as the first neighborhood pixel of pixel i in the first feature map. It should be noted that the embodiment of the present application does not limit the specific method of mapping pixel i to the first feature map to obtain the mapping point corresponding to pixel i; for example, the ratio between the resolution of the first feature map and the resolution of the second feature map can be calculated, and the position coordinates of pixel i can be scaled using the ratio, and the mapping point corresponding to pixel i can be determined in the first feature map based on the scaled position coordinates. For example, assuming that the position coordinates of pixel i are (4, 8), the resolution of the first feature map is 512×512, the resolution of the second feature map is 1024×1024, and the ratio between the two resolutions is (0.5, 0.5), that is, the height ratio is 0.5 and the width ratio is 0.5, then the position coordinates (4, 8) can be scaled using the ratio to obtain the scaled position coordinates (2, 4), so the pixel at (2, 4) in the first feature map can be used as the mapping point of pixel i; it can be understood that if there is no pixel at (2, 4) in the first feature map, the pixel closest to the position coordinates (2, 4) in the first feature map can be used as the mapping point of pixel i.
[0052] Alternatively, a specific implementation method of determining a plurality of first neighboring pixels of pixel i in the first feature map may also be: mapping pixel i to the first feature map to obtain a mapping point corresponding to pixel i; determining a reference area in the first feature map with the mapping point as the center, the reference area including K 2 pixels; obtain the offset information i corresponding to pixel i, and the offset information i includes K 2 offset; according to the kth offset of the offset information i, the position of the kth pixel in the reference area is offset to obtain the reference position (i.e., the offset position), so that the pixel at the reference position in the first feature map is used as the kth first neighboring pixel of the pixel i in the first feature map; wherein k∈[1, K 2 ]. For example, let K = 3, then see Figure 3a As shown: Projecting pixel i onto the first feature map, a mapping point 30 can be obtained; based on the mapping point 30 as the center, it can be determined that 9 pixels (such as Figure 3a The reference area 31 (the dotted circle in the figure) is shifted based on the offsets in the offset information i to shift the positions of the pixels in the reference area 31. Thus, nine first neighboring pixels (such as Figure 3a It can be seen that by introducing the offset information i of pixel i, the K value of pixel i is selected. 2First neighborhood pixels can increase the flexibility of selecting first neighborhood pixels, thereby increasing the diversity of first neighborhood pixels and corresponding feature data, so as to improve the accuracy of the target convolution result obtained by performing central differential convolution on the first feature data of pixel i based on the feature data of multiple first neighborhood pixels. It is worth noting that when the first neighborhood pixel is selected based on the offset information i of pixel i, the subsequent central differential convolution based on the feature data of the first neighborhood pixels can be called central differential deformation convolution.
[0053] In another specific implementation, considering that the space where the first feature map is located is a semantic space, and the space where the second feature map is located is an image detail space, this will cause the feature data in the first feature map and the feature data in the second feature map to be in two different spaces, and performing central difference convolution based on the feature data in two different spaces may result in failure to capture the true similarity. Based on this, when the computer device executes step S202, it can perform image super-resolution processing on the first feature map to obtain a third feature map, and image super-resolution processing refers to processing to improve resolution, and the resolution of the third feature map obtained based on image super-resolution processing is equal to the resolution of the second feature map; project the second feature map into the semantic space where the first feature map is located to obtain a fourth feature map; in the semantic space, feature alignment is performed on the fourth feature map and the third feature map, so that two pixels at the same position in the fourth feature map and the third feature map are aligned with each other; and after feature alignment, multiple first neighborhood pixels of pixel i in the third feature map and feature data of each first neighborhood pixel are determined, and the feature data of pixel i is obtained from the fourth feature map as the first feature data of pixel i.
[0054] It can be seen that through operations such as image super-resolution processing and feature map mapping, feature alignment is achieved in the semantic space, so that the acquired feature data of multiple first neighborhood pixels and the first feature data of pixel i are in the same space, so that when the central difference convolution is performed on the first feature data of pixel i based on the feature data of multiple first neighborhood pixels, the true similarity between pixel i and each first neighborhood pixel can be captured, thereby improving the accuracy of the target convolution result, thereby improving the accuracy of the first similarity predicted based on the target convolution result, and further improving the accuracy of the upsampling kernel generated based on multiple first similarities.
[0055] S203, based on the feature data of multiple first neighborhood pixels, perform central difference convolution on the first feature data of pixel i to obtain a target convolution result.
[0056] In the specific implementation of step S203, the computer device may perform a center difference convolution on the first feature data of pixel i based on the feature data of multiple first neighborhood pixels to obtain a center difference convolution value (i.e., the result of the center difference convolution), and use the center difference convolution value as the target convolution result. Alternatively, the computer device may also perform L center difference convolutions on the first feature data of pixel i based on the feature data of multiple first neighborhood pixels to obtain L center difference convolution values, where one center difference convolution is used to obtain a center difference convolution value, and L is an integer greater than 1; further, the computer device may use L center difference convolution values to construct the target convolution result, and specifically, the L center difference convolution values may be stacked in the channel direction to obtain the target convolution result, so that the target convolution result is a multi-dimensional data (i.e., including the center difference convolution values of L channels), which can enrich the information content of the target convolution result and improve the information volume of the target convolution result, so that the first similarity can be more accurately predicted based on the target convolution result in the future, thereby improving the accuracy of the upsampling kernel generated based on the first similarity.
[0057] Among them, the central difference convolution is a convolution method that adds a central difference operation on the basis of the standard convolution. Its principle is as follows: take a certain point (such as pixel i) as the center point, perform a central difference operation (i.e., a subtraction operation) on the feature data of other pixels (such as the first neighborhood pixel) and the feature data of the center point, obtain multiple central difference feature data, use each weight coefficient in the convolution kernel to perform convolution processing on the multiple central difference feature data, and obtain the result of the central difference convolution; wherein, the convolution processing includes a dot product summation (i.e., weighted summation) operation, and the dot product summation operation means: use each weight coefficient to perform dot product on the corresponding central difference feature data, and sum each dot product result. For example, see Figure 3b As shown: suppose the feature data of the center point is 5, the center point has 9 neighboring pixels and the feature data of each neighboring pixel are: 8, 9, 4, 5, 5, 6, 2, 3, 8; then the 9 feature data after center difference can be obtained through the center difference operation, which are: 3, 4, -1, 0, 0, 1, -3, -2, 3; if the weight coefficients in the convolution kernel are: 1, 2, 3, 3, 2, 5, 2, 1, 3, then the result of the center difference convolution can be calculated as: 1×3+2×4+3×(-1)+3×0+2×0+5×1+2×(-3)+1×(-2)+3×3=14.
[0058] It is understandable that since the feature data after center difference is the difference between the feature data of other pixels (such as the first neighborhood pixels) and the feature data of the center point (such as pixel i), the difference can reflect the similarity between other pixels and the center point. The larger the difference, the lower the similarity. Therefore, by performing convolution processing on the feature data after multiple center differences, the result of the center difference convolution can include the similarity information between other pixels and the center point. In addition, it should be noted that: here the feature data is described as a numerical value. In actual applications, when the feature data is multi-channel data, that is, the feature data includes feature values under multiple feature channels, it can be based on Figure 3b The principle shown is that, in each feature channel, each eigenvalue in the corresponding feature channel is used to perform central difference convolution, and the results of the central difference convolution obtained in each feature channel are integrated (such as summing up) to obtain the final result of the central difference convolution.
[0059] S204: predicting a first similarity between pixel i and each first neighborhood pixel according to the target convolution result.
[0060] Based on the above description, it can be known that the target convolution result includes a center difference convolution value or L center difference convolution values (L is greater than 1), and each center difference convolution value contains similarity information between pixel i and each first neighboring pixel. Based on this, the specific implementation of step S204 can be:
[0061] (1) When the target convolution result includes a central difference convolution value, the computer device can directly use the target convolution result as the first similarity between pixel i and each first neighborhood pixel, thereby simplifying the similarity prediction process and improving the prediction efficiency. Alternatively, the computer device can input the target convolution result into a similarity prediction model, or input the target convolution result, the first feature data of pixel i, and the feature data of each first neighborhood pixel into the similarity prediction model, so that the similarity prediction model predicts the first similarity between pixel i and each first neighborhood pixel based on the input data, thereby obtaining the first similarity between pixel i and each first neighborhood pixel; in this way, the similarity prediction model can use its own data learning ability to learn the first similarity between pixel i and each first neighborhood pixel from the target convolution result, thereby improving the accuracy of the predicted first similarity.
[0062] (2) When the target convolution result includes the central differential convolution values of L channels, L is greater than 1, and L and K 2 The size relationship between them can exist in the following three situations: L<K 2 , or L=K 2 , or L>K 2 . With L and K2 The specific implementation of step S204 may be different depending on the size relationship between them, as follows:
[0063] ①If L<K 2 , then the computer device can perform channel expansion processing on the target convolution result to obtain K 2 dimensional data, the interpolation algorithm can be used to interpolate the target convolution result to achieve channel expansion processing, and obtain K 2 dimensional data, so that K 2 The k-th dimension data in the dimensional data is used as the first similarity between pixel i and the k-th first neighboring pixel; in this way, a part of the first similarity can be achieved to be the same as the center difference convolution value obtained based on the center difference convolution, so as to ensure the accuracy of the first similarity. Alternatively, the computer device can also use the similarity prediction model to predict the first similarity between pixel i and each first neighboring pixel based on the target convolution result, so as to learn the first similarity between pixel i and each first neighboring pixel from the target convolution result with the help of the data learning ability of the similarity prediction model itself, so as to improve the accuracy of the predicted first similarity.
[0064] ②If L=K 2 , the computer device can directly use the central differential convolution value of the kth channel in the target convolution result as the first similarity between pixel i and the kth first neighborhood pixel, thereby simplifying the similarity prediction process, improving the prediction efficiency, and ensuring the accuracy of the first similarity. Alternatively, the computer device can also use the similarity prediction model to predict the first similarity between pixel i and each first neighborhood pixel based on the target convolution result, so as to learn the first similarity between pixel i and each first neighborhood pixel from the target convolution result with the help of the data learning ability of the similarity prediction model itself, thereby improving the accuracy of the predicted first similarity.
[0065] ③If L>K 2 When , the computer device can obtain a channel compressor (Channel Compressor), which can also be called a multi-layer perceptron, which is a neural network model for performing channel compression processing. The embodiment of the present application does not limit the specific structure of the channel compressor; call the channel compressor to perform channel compression processing on the target convolution result, and obtain K 2 dimensional data, so that K 2The k-th dimension data in the dimensional data is used as the first similarity between pixel i and the k-th first neighborhood pixel. It can be seen that this implementation can support the computer device to obtain each first similarity by performing channel compression processing on the target convolution result containing L channels. As the value of L increases, the target convolution result contains a larger amount of information and its learning ability is stronger, which is conducive to improving the accuracy of the first similarity. Alternatively, the computer device can also use the similarity prediction model to predict the first similarity between pixel i and each first neighborhood pixel based on the target convolution result, so as to learn the first similarity between pixel i and each first neighborhood pixel from the target convolution result with the help of the data learning ability of the similarity prediction model itself, so as to improve the accuracy of the predicted first similarity.
[0066] S205 , using the predicted first similarities to generate an upsampling kernel corresponding to pixel i; and using the upsampling kernel corresponding to pixel i to upsample the first feature map.
[0067] Generally speaking, the new feature data of any pixel generated after upsampling a low-resolution feature map using an upsampling kernel is obtained by weighted summing the feature data of each neighboring pixel of the pixel in the low-resolution feature map; based on this, the upsampling kernel usually includes multiple weighting coefficients, and different weighting coefficients are used to weight the feature data of different neighboring pixels.
[0068] In a specific implementation, when the computer device uses the predicted first similarities to generate the upsampling kernel corresponding to pixel i, it can directly use the predicted first similarities as weighting coefficients to generate the upsampling kernel corresponding to pixel i; in this case, each weighting coefficient in the upsampling kernel corresponding to pixel i is the first similarity. Alternatively, the computer device can use an activation function to activate each predicted first similarity to obtain multiple weighting coefficients, and then use multiple weighting coefficients to construct the upsampling kernel corresponding to pixel i; in this case, the kth weighting coefficient in the upsampling kernel corresponding to pixel i is the value obtained after the kth first similarity is activated. The embodiment of the present application does not limit the activation function, for example, it can be a softmax function (an activation function that can control the value within the range of [0, 1]). By constructing the upsampling kernel by activating the first similarity, the nonlinear characteristics of the first similarity can be increased, thereby improving the expression ability of the upsampling kernel, and then improving the accuracy of the subsequent upsampling of the first feature map using the upsampling kernel.
[0069] In another specific implementation, when the computer device uses the predicted first similarities to generate the upsampling kernel corresponding to the pixel i, it can perform Gaussian blur processing on the second feature map to obtain a reference feature map, and determine the K of the pixel i in the reference feature map.2 second neighborhood pixels; obtain the second similarity between pixel i and each second neighborhood pixel, and integrate the kth second similarity with the predicted kth first similarity to obtain the kth integrated similarity corresponding to pixel i, so as to use the K corresponding to pixel i 2 The similarities are integrated to construct an upsampling kernel corresponding to pixel i. Through this implementation, the similarity information between pixel i and the second neighborhood pixels can be integrated into the upsampling kernel. Since the second neighborhood pixels are the neighborhood pixels of pixel i in the reference feature map, the reference feature map is generated by Gaussian blurring the second feature map, and Gaussian blurring can be used to remove local noise in the second feature map, the similarity information between pixel i and the second neighborhood pixels can reflect the similarity information between pixel i and the surrounding pixels in the feature map where it is located. Then, by integrating this similarity information into the upsampling kernel, when the upsampling kernel is used to upsample the first feature map in the future, the similarity information can be used to help preserve the fidelity of the detail information, thereby improving the accuracy and clarity of the upsampling result.
[0070] In the embodiment of the present application, for the first feature map to be upsampled, a second feature map for guiding the upsampling of the first feature map can be obtained, and the first feature data of the pixel i can be determined based on the second feature map; since the feature data in the second feature map contains image detail information, and the second feature map and the first feature map are generated by performing feature extraction processing in different ways on the same image, by determining the first feature data of the pixel i based on the second feature map, the first feature data can be enriched with fidelity image detail information. Furthermore, by performing central difference convolution on the first feature data rich in image detail information of pixel i based on the feature data of multiple first neighborhood pixels of pixel i determined by the first feature map, the image detail information of pixel i and the similarity between pixel i and each first neighborhood pixel can be captured, so as to obtain a target convolution result containing image detail information and similarity information, thereby more accurately predicting the first similarity between pixel i and each first neighborhood pixel based on the target convolution result, and by using each first similarity to generate an upsampling kernel corresponding to pixel i, the accuracy of the upsampling kernel is improved and the upsampling kernel contains image detail information, and then the first feature map is upsampled by the upsampling kernel that is more accurate and contains image detail information, so as to restore image details in the process of feature upsampling, thereby improving the clarity of the upsampling result.
[0071] Based on the above Figure 2 In the description of the method embodiment shown in the figure, the present application embodiment also proposes another feature processing method; in the present application embodiment, the feature processing method is still described by taking a computer device executing the feature processing method as an example. Figure 4As shown, the feature processing method may include the following steps S401-S410:
[0072] S401, obtaining a first feature map to be upsampled, and obtaining a second feature map.
[0073] Among them, the first feature map is generated by performing deep feature extraction processing on the target image. Since deep feature extraction processing refers to the processing of extracting deep features, and deep features contain image semantic information, the feature data in the first feature map includes image semantic information, which is in the semantic space.
[0074] Based on this, when acquiring the second feature map, the computer device can acquire the target image and perform shallow feature extraction processing on the target image to obtain the second feature map. Since shallow feature extraction processing refers to the processing of extracting shallow features, and shallow features contain image detail information, the feature data in the second feature map contains image detail information, which is in the image detail space, and the resolution of the first feature map is lower than the resolution of the second feature map.
[0075] Furthermore, the specific implementation method of performing shallow feature extraction on the target image to obtain the second feature map may be: calling the third convolutional layer to perform feature extraction on the target image to obtain an initial feature map; performing group normalization processing on the initial feature map to obtain a group-normalized feature map; performing activation processing on the group-normalized feature map to obtain an activated feature map; calling the fourth convolutional layer to perform feature extraction on the activated feature map to obtain a second feature map. Wherein:
[0076] ① The third convolution layer mentioned above may include V1 convolution kernels, and the size of each convolution kernel may be V2×V2; wherein, V1 and V2 are both positive integers and the specific values can be set based on actual needs, for example, V1=64, V2=3, that is, in this case, the third convolution layer includes 64 convolution kernels and the size of each convolution kernel is 3×3. Based on this, calling the third convolution layer to extract the features of the target image is essentially calling each convolution kernel in the third convolution layer to perform convolution processing on the target image respectively, so as to obtain an initial feature map with a feature channel number of V1 (such as 64), that is, the feature data of each pixel in the initial feature map includes the feature values of V1 (such as 64) feature channels.
[0077] ② The group normalization mentioned above means: from the perspective of feature channels, multidimensional data is divided into multiple data groups, and each data in each data group is normalized; for example, mean operation and variance operation are performed in each data group, so that each data contained in the corresponding data group is normalized using the mean and variance corresponding to each data group, or each data contained in the corresponding data group is normalized using the maximum data and minimum data in each data group. Based on the definition of this group normalization, the computer device performs group normalization on the initial feature map, and the specific implementation method of obtaining the group normalized feature map can be: divide the initial feature map into V3 feature data groups, each feature data group includes feature values in V1 / V3 feature channels; each feature value in each feature data group is normalized. By performing group normalization on the initial feature map, the stability of the initial feature map can be improved, thereby improving the stability of the second feature map generated based on the initial feature map, so that the second feature map can better guide the first feature map to perform upsampling, thereby improving the accuracy of the upsampling result.
[0078] ③ The activation process mentioned above can be implemented by a preset activation function, that is, the preset activation function can be called to activate the feature map after group normalization to obtain the activated feature map; the embodiment of the present application does not limit the preset activation function, for example, it can be a ReLU (Rectified linear unit) function, etc. By performing activation processing on the feature map after group normalization, the nonlinear characteristics of the feature map can be increased, thereby improving the expressiveness of the feature map, and then improving the performance (such as expressiveness and accuracy, etc.) of the second feature map generated based on the feature map.
[0079] ④ The fourth convolution layer mentioned above may include V4 convolution kernels, and the size of each convolution kernel may be V5×V5; wherein, V4 and V5 are both positive integers and the specific values can be set based on actual needs, for example, V4=32, V5=3, that is, in this case, the fourth convolution layer includes 32 convolution kernels and the size of each convolution kernel is 3×3. Based on this, calling the fourth convolution layer to extract features from the activated feature map is essentially calling each convolution kernel in the fourth convolution layer to perform convolution processing on the activated feature map respectively, so as to obtain a second feature map with a feature channel number of V4 (such as 32), that is, the feature data of each pixel in the second feature map includes the feature values of V4 (such as 32) feature channels.
[0080] It should be noted that the above is only an exemplary description of a specific implementation method for shallow feature extraction of the target image, and it is not exhaustive. For example, the group normalization process mentioned above can be replaced by standard normalization, and the so-called standard normalization process refers to: directly normalizing each data in the multidimensional data. For another example, the various operations mentioned above can be deleted or the execution order can be adjusted based on actual needs; for example, the computer device can directly activate the initial feature map to obtain the second feature map, or activate the initial feature map, and perform group normalization on the activated initial feature map to obtain the second feature map, or call the third convolution layer to extract features from the target image to obtain the initial feature map, and activate the initial feature map to obtain the second feature map. For another example, after calling the fourth convolution layer to extract features from the activated feature map, the feature map output by the fourth convolution layer can be further convolved at least once to obtain the second feature map, and so on.
[0081] S402, performing image super-resolution processing on the first feature map to obtain a third feature map; and projecting the second feature map into the semantic space where the first feature map is located to obtain a fourth feature map.
[0082] Among them, when the computer device performs image super-resolution processing on the first feature map to obtain the third feature map, it can directly interpolate and upsample the first feature map to obtain the third feature map; the interpolation upsampling mentioned here can be, for example, bilinear interpolation upsampling, bicubic interpolation upsampling, etc., and the resolution of the third feature map is equal to the resolution of the second feature map. Alternatively, the computer device can perform linear projection on the first feature map to obtain the projected first feature map, and then perform interpolation upsampling on the projected first feature map to obtain the third feature map; the linear projection mentioned here is an operation for projecting a feature map from a high-dimensional space (i.e., a space with a number of feature channels greater than a preset value) to a low-dimensional space (i.e., a space with a number of feature channels less than a preset value) without losing key information in the feature map. It can be seen that by linearly projecting the first feature map, the number of feature channels in the first feature map can be reduced and the key information in the first feature map can be retained, thereby reducing the computational complexity of a series of subsequent operations.
[0083] In addition, when the computer device projects the second feature map into the semantic space where the first feature map is located to obtain the fourth feature map, the code toolkit of the guided filter can be obtained, and the third feature map obtained by performing image super-resolution processing on the first feature map can be obtained; wherein, the guided filter (GF) is a filtering method that maps the guided map to the space where the input map is located, and its output is the result of linear change or affine transformation of the guided map. Affine transformation is an image transformation, which may include operations such as scaling, translation, rotation, and reflection. Further, the guided map in the guided filter can be constructed based on the second feature map. Specifically, the second feature map can be directly used as the guided map in the guided filter, or the second feature map can be linearly projected, and the projected second feature map can be used as the guided map in the guided filter, so as to reduce the computational complexity of the guided filter and improve the filtering efficiency. In addition, the input map in the guided filter can be constructed based on the third feature map. Specifically, the third feature map can be directly used as the input map in the guided filter, so that the code toolkit of the guided filter can be used to project the guided map to the semantic space where the input map is located to obtain the fourth feature map, and the fourth feature map has the same resolution as the second feature map.
[0084] S403: Perform feature alignment on the fourth feature map and the third feature map in the semantic space.
[0085] As can be seen from the above, the third feature map and the second feature map have the same resolution, and the fourth feature map and the second feature map have the same resolution, so the resolution of the third feature map is equal to the resolution of the fourth feature map, that is, the third feature map and the fourth feature map contain the same number of pixels. Then, when aligning the fourth feature map and the third feature map, two pixels at the same position in the fourth feature map and the third feature map can be aligned with each other; for example, the pixel with position coordinates (1, 1) in the fourth feature map is aligned with the pixel with position coordinates (1, 1) in the third feature map, and the pixel with position coordinates (3, 5) in the fourth feature map is aligned with the pixel with position coordinates (3, 5) in the third feature map, and so on.
[0086] After feature alignment, the computer device can directly execute step S404. Alternatively, the computer device can normalize the third feature map and the fourth feature map respectively to obtain a normalized third feature map and a normalized fourth feature map; the normalization process mentioned here can be a group normalization process or a standard normalization process, which is not limited to this; in addition, the computer device can also obtain the affine parameters shared between the third feature map and the fourth feature map, and use the obtained affine parameters to perform affine transformation on the normalized third feature map and the normalized fourth feature map respectively, so as to trigger the execution of step S404 after the affine transformation. Affine transformation can be used to calibrate the feature map and maintain the linearity and flatness of the feature map, which is conducive to improving the accuracy of subsequent processing; and using shared affine parameters to perform affine transformation on two feature maps can ensure the consistency between the affine transformation operations of the two feature maps.
[0087] S404, determining a plurality of first neighborhood pixels of the pixel i in the third feature map and feature data of each first neighborhood pixel, and obtaining the feature data of the pixel i from the fourth feature map as first feature data of the pixel i.
[0088] Among them, the size of the upsampling kernel is K×K, and the number of first neighborhood pixels is K 2 The specific implementation method of the computer device determining the multiple first neighboring pixels of the pixel i in the third feature map and the feature data of each first neighboring pixel may be: in the third feature map, a target area is determined with the pixel aligned with the pixel i as the center, and the target area includes K 2 pixels; each pixel in the target area is used as the first neighboring pixel of pixel i in the third feature map, and the feature data of each first neighboring pixel is obtained from the third feature map. For example, assuming K=3, and the position coordinates of pixel i are (5, 5), then the pixel aligned with pixel i in the third feature map is the pixel with the position coordinates of (5, 5) in the third feature map, and the computer device can use the pixel with the position coordinates of (5, 5) in the third feature map as the center point, and determine a 3×3 area in the third feature map as the target area, so as to use each pixel in the target area as the first neighboring pixel.
[0089] Alternatively, the specific implementation method of the computer device determining the plurality of first neighborhood pixels of the pixel i in the third feature map and the feature data of each first neighborhood pixel may be: obtaining the offset information i corresponding to the pixel i, the offset information i including K 2 In the third feature map, a target area is determined with the pixel aligned with pixel i as the center, and the target area includes K 2pixels; according to the kth offset of the offset information i, the position of the kth pixel in the target area is offset to obtain the target position, so that the pixel at the target position in the third feature map is used as the kth first neighboring pixel of pixel i in the third feature map, and the feature data of the kth first neighboring pixel is obtained from the third feature map. This specific implementation selects the K of pixel i by introducing the offset information i of pixel i 2 First neighborhood pixels can increase the flexibility of selecting first neighborhood pixels, thereby increasing the diversity of first neighborhood pixels and corresponding feature data, so as to improve the accuracy of the target convolution result obtained by performing central differential convolution on the first feature data of pixel i based on the feature data of multiple first neighborhood pixels. It is worth noting that when the first neighborhood pixel is selected based on the offset information i of pixel i, the subsequent central differential convolution based on the feature data of the first neighborhood pixels can be called central differential deformation convolution.
[0090] Among them, the offset information i corresponding to pixel i can be the i-th offset information in the target offset information map, and the target offset information map includes I offset information. Furthermore, the target offset information map can be pre-set based on empirical values or actual needs; in this case, the various offset information in the target offset information map can be the same or different, and there is no limitation on this. Alternatively, the target offset information map can be automatically generated by a computer device calling a central difference convolution layer (CDC) based on a first feature map; in this case, before obtaining the offset information i corresponding to pixel i, the computer device can execute the following steps s11-s14:
[0091] s11, traverse each pixel in the first feature map, and determine the neighborhood of the currently traversed pixel j in the first feature map; wherein the neighborhood of pixel j includes K 2 pixels, j is a positive integer and is not greater than the number of pixels in the first feature map.
[0092] S12, based on the feature data of each pixel in the neighborhood of pixel j, perform K 2 Secondary center difference convolution is performed to obtain the offset information of pixel j; the offset information of pixel j includes K 2 offset, and K 2 The t-th offset among the offsets is obtained by the t-th central difference convolution, t∈[1, K 2 ].
[0093] Specifically, the feature data of any pixel in the first feature map includes feature values of C feature channels; according to the feature data of each pixel in the neighborhood of pixel j, the process of performing the t-th central difference convolution on the feature data of pixel j can be as follows: obtaining a convolution parameter t for performing the t-th central difference convolution, the convolution parameter t includes C convolution channels and each convolution channel includes K 2 weight coefficients; for the cth feature channel among the C feature channels, perform a difference operation on the feature values of each pixel in the neighborhood under the cth feature channel and the feature value of pixel j under the cth feature channel to obtain K 2 The difference operation results call the K in the cth convolution channel in the convolution parameter t 2 Weight coefficients for K 2 The difference operation results are weighted summed to obtain the weighted summation result under the c-th feature channel; based on this, the computer device can sum the weighted summation results under the C feature channels to obtain the t-th offset.
[0094] Among them, when performing a difference operation on the eigenvalues of each pixel in the neighborhood under the cth feature channel and the eigenvalue of pixel j under the cth feature channel, the eigenvalues of each pixel in the neighborhood under the cth feature channel can be directly used respectively, minus the eigenvalue of pixel j under the cth feature channel. Alternatively, the eigenvalue of pixel j under the cth feature channel can be scaled using a preset parameter θ to obtain the scaled eigenvalue of pixel j under the cth feature channel, and the eigenvalues of each pixel in the neighborhood under the cth feature channel can be used respectively, minus the scaled eigenvalue of pixel j under the cth feature channel; in this case, the calculation formula of the tth offset of pixel j can be shown in the following formula 1.1:
[0095] Formula 1.1
[0096] In the above formula 1.1, Represents the t-th offset of pixel j in the first feature map, where t ranges from 1 to K 2 ; The value of c ranges from 1 to C, where C represents the total number of feature channels in the feature data of pixel j; Represents the nth weight coefficient in the cth convolution channel included in the convolution parameter t, and the value of n ranges from 1 to K 2 ,and , R is a real number, Represents the convolution parameter set in the CDC layer; θ represents a preset parameter, whose value can be determined according to actual needs or empirical values, for example, θ=0.2; represents the eigenvalue of pixel j under the cth feature channel, represents the eigenvalue of the nth pixel in the neighborhood of pixel j under the cth feature channel, Indicates the result of the nth difference operation.
[0097] s13, after all pixels in the first feature map are traversed, an initial offset information map is obtained, wherein the resolution of the initial offset information map is the same as that of the first feature map, and the initial offset information map includes the offset information of each pixel in the first feature map.
[0098] s14, upsampling the initial offset information map to obtain a target offset information map. The resolution of the target offset information map is the same as the resolution of the second feature map, and it includes I offset information. Specifically, the computer device may perform interpolation upsampling on the initial offset information map to obtain the target offset information map; the interpolation upsampling mentioned here may specifically include but is not limited to: bilinear interpolation upsampling, bicubic interpolation upsampling, etc.
[0099] Based on the relevant description of the above steps s11-s14, it can be known that the embodiment of the present application supports the computer device to input the first feature map into the CDC to call the CDC to perform K based on the first feature map. 2 The above steps s11-s14 are performed again to automatically generate a target offset information map, so that each offset information in the target offset information map can be more adapted to the first feature map, thereby improving the accuracy of the offset information of each pixel.
[0100] S405, based on the feature data of multiple first neighborhood pixels, perform L center difference convolutions on the first feature data of pixel i to obtain L center difference convolution values; and, use the L center difference convolution values to construct a target convolution result.
[0101] Among them, the feature data of each first neighborhood pixel and the first feature data of pixel i both include feature values under D feature channels, where D is a positive integer. Based on the feature data of multiple first neighborhood pixels, a center difference convolution is performed on the first feature data of pixel i to obtain a center difference convolution value, where L is an integer greater than 1, for example, L=128. The L center difference convolution values obtained by L center difference convolutions can be stacked in the channel direction to construct a target convolution result containing L channels, each channel including a center difference convolution value.
[0102] In a specific implementation, the computer device can perform L center difference convolutions according to the strategy of full channel convolution; the so-called full channel convolution means: performing center difference convolution directly on all feature channels (here, D feature channels). Based on this, based on the feature data of multiple first neighborhood pixels, performing L center difference convolutions on the first feature data of pixel i, the specific implementation process of obtaining L center difference convolution values can include the following steps s21-s24:
[0103] s21, obtain the target convolution parameters for performing the mth central difference convolution, the target convolution parameters include D convolution channels and each convolution channel includes K 2 weight coefficients, m∈[1,L].
[0104] s22, traverse D feature channels and use the currently traversed feature channel as the reference feature channel.
[0105] s23, under the reference feature channel, calculate the difference between the feature value of each first neighborhood pixel under the reference feature channel and the feature value of pixel i under the reference feature channel, and obtain K 2 feature differences; and call the K in the dth convolution channel included in the target convolution parameters 2 Weight coefficients for K 2 The feature differences are weighted summed to obtain the weighted summation result under the reference feature channel.
[0106] s24, after all D feature channels are traversed, the weighted summation results under the D feature channels are summed to obtain the mth center difference convolution value. Specifically, the computer device can sum the weighted summation results under the D feature channels to obtain a target summation result, and directly use the target summation result as the mth center difference convolution value; or, obtain the convolution bias parameter corresponding to the mth center difference convolution, and use the convolution bias parameter to bias the target summation result (or called superposition processing) to obtain the mth center difference convolution value.
[0107] Based on the description of steps s21-s24 above, a calculation method for the mth central difference convolution value corresponding to pixel i can be shown in the following formula 1.2:
[0108] Formula 1.2
[0109] In the above formula 1.2, Represents the mth central difference convolution value corresponding to pixel i; represents the kth weight coefficient in the dth convolution channel included in the target convolution parameter, and , which is a learnable parameter; represents the eigenvalue of the kth first neighborhood pixel under the dth feature channel, represents the eigenvalue of pixel i under the dth feature channel, represents the kth feature difference, Represents the convolution bias parameter corresponding to the mth central difference convolution, , Represents L convolution bias parameters, which are learnable parameters.
[0110] In another specific implementation, the computer device can perform L center difference convolutions according to the group convolution strategy; the so-called group convolution means: all feature channels (here D feature channels) are divided into multiple feature channel groups, and center difference convolution is performed on each feature channel group. Based on this, based on the feature data of multiple first neighborhood pixels, L center difference convolutions are performed on the first feature data of pixel i to obtain L center difference convolution values. The specific implementation process may include the following steps s31-s35:
[0111] s31, grouping the D feature channels to obtain G feature channel groups; each feature channel group includes D / G feature channels, and G is a positive integer.
[0112] s32, determine the target feature channel group for performing the mth central difference convolution from the G feature channel groups, m∈[1,L]. Specifically, the target feature channel group is the gth feature channel group, ;in, Indicates that the target value mG / L is rounded down. The so-called rounding down means: finding the largest integer smaller than the target value. For example, if G=2, m=2, L=8, then since mG / L=0.5, rounding down 0.5 will result in a value of 0, that is, , then g=0+1=1, that is, in this case, the first feature channel group among the G feature channel groups can be determined as the target feature channel group for performing the mth central difference convolution.
[0113] s33, traverse each feature channel in the target feature channel group, and use the currently traversed feature channel as the current feature channel. The first feature channel in the target feature channel group (i.e., the g-th feature channel group) is the (g-1)D / G+1-th feature channel among the D feature channels, and the last feature channel in the target feature channel group is the gD / G-th feature channel among the D feature channels. For example, assuming D=8, G=2, then D / G=4, that is, in this case, the 8 feature channels are divided into 2 feature channel groups, each feature channel group includes 4 feature channels; then, if the target feature channel group is the first feature channel group (that is, g=1), since (g-1)D / G+1=1, gD / G=4, it can be determined that the first feature channel in the target feature channel group is the first feature channel among the 8 feature channels, and the last feature channel in the target feature channel group is the fourth feature channel among the 8 feature channels; if the target feature channel group is the second feature channel group (that is, g=2), since (g-1)D / G+1=5, gD / G=8, it can be determined that the first feature channel in the target feature channel group is the fifth feature channel among the 8 feature channels, and the last feature channel in the target feature channel group is the eighth feature channel among the 8 feature channels.
[0114] s34, based on the feature value of each first neighborhood pixel in the current feature channel, perform a center difference convolution on the feature value of pixel i in the current feature channel to obtain a convolution feature value in the current feature channel. Specifically, the computer device may obtain a convolution parameter m for performing the mth center difference convolution, where the convolution parameter m includes D / G convolution channels, each of which includes K 2 weight coefficients; calculate the difference between the eigenvalue of each first neighborhood pixel in the current feature channel and the eigenvalue of pixel i in the current feature channel, and obtain K 2 feature differences; using the K in the rth convolution channel in the convolution parameter m 2 weight coefficient, for K 2 The weighted sum of feature differences is performed to obtain the convolution feature value under the current feature channel. Among them, the value of r is equal to the arrangement order of the current feature channel in the target feature channel group, and the arrangement order is equal to the remainder obtained by taking the channel number of the current feature channel and the number of feature channels in a single feature channel group (i.e., D / G) for the remainder operation; for example, the channel number of the current feature channel is 5 (i.e., the current feature channel is the 5th feature channel among the D feature channels), and D / G=4, then it can be determined that the target feature channel group is the 2nd feature channel group, and the arrangement order of the current feature channel in the target feature channel group is 1, so r=1 can be determined.
[0115] s35, after all feature channels in the target feature channel group are traversed, the convolution feature values under each feature channel in the target feature channel group are summed to obtain the mth center difference convolution value. Specifically, the computer device can sum the convolution feature values under each feature channel in the target feature channel group to obtain an intermediate summation result, and directly use the intermediate summation result as the mth center difference convolution value; or, obtain the convolution bias parameter corresponding to the mth center difference convolution, and use the convolution bias parameter to bias the target summation result (or called superposition processing) to obtain the mth center difference convolution value.
[0116] Based on the description of steps s31-s35 above, a calculation method for the mth central difference convolution value corresponding to pixel i can be shown in the following formula 1.3:
[0117] Formula 1.3
[0118] In the above formula 1.3, Indicates the convolution parameter m includes the The kth weight coefficient in the convolution channel, and ; , % represents the remainder operation; it is understandable that the meanings of other parameters in formula 1.3 can be found in the relevant description of the aforementioned formula 1.2, which will not be repeated here. It can be seen from steps s31-s35 and the relevant description of formula 1.3 that when performing L central difference convolutions according to the strategy of grouped convolution, the process of the mth central difference convolution only involves the operation of the feature values in D / G feature channels, which can reduce the amount of data processing and thus improve the efficiency of the central difference convolution; and, the L central difference convolutions share D / G convolution parameters, which can reduce the use of convolution parameters while ensuring the accuracy of the convolution, thereby further improving the efficiency of the central difference convolution.
[0119] S406, L>K 2 In the case of , the channel compressor is called to perform channel compression on the target convolution result to obtain K 2 dimensional data; K 2 The k-th dimension data in the dimensional data is used as the first similarity between the pixel i and the k-th first neighboring pixel.
[0120] In the embodiment of the present application, the channel compressor includes at least a first convolutional layer, which includes K 2 A first convolution kernel, the size of which may be 1×1. Correspondingly, the computer device calls the channel compressor to perform channel compression processing on the target convolution result to obtain K 2 When the data is K-dimensional, the target convolution result can be used to construct the input data of the first convolution layer, so as to call each first convolution kernel in the first convolution layer respectively, perform convolution on the input data, and obtain K 2 dimensional data; where K 2 The k-th dimension data in the dimensional data is obtained by convolving the input data with the k-th first convolution kernel.
[0121] Furthermore, when the target convolution result is used to construct the input data of the first convolution layer, the computer device can directly use the target convolution result as the input data of the first convolution layer. Alternatively, the channel compressor may also include a second convolution layer and an activation layer; wherein the second convolution layer includes H second convolution kernels, and H is a positive integer; in this case, when the computer device uses the target convolution result to construct the input data of the first convolution layer, it can respectively call each second convolution kernel in the second convolution layer to perform convolution processing on the target convolution result to obtain H-dimensional data, wherein the h-th dimension data in the H-dimensional data is obtained by convolution processing the target convolution result by the h-th second convolution kernel; the activation layer is called to perform activation processing on the H-dimensional data to obtain the activated H-dimensional data, and the activated H-dimensional data is used to construct the input data of the first convolution layer. Since convolution processing can realize feature extraction, and activation processing can increase related nonlinear characteristics, constructing input data through multiple operations such as convolution processing and activation processing can effectively improve the data quality of the input data, thereby improving the K obtained based on the input data. 2 The data quality of dimensional data.
[0122] Furthermore, when the activated H-dimensional data is used to construct the input data of the first convolutional layer, the computer device can directly use the activated H-dimensional data as the input data of the first convolutional layer. Alternatively, the channel compressor may further include a normalization layer, such as Figure 5 As shown; in this case, when the computer device uses the activated H-dimensional data to construct the input data of the first convolutional layer, the normalization layer can be called to perform standard normalization processing on the activated H-dimensional data to obtain the input data of the first convolutional layer, or the normalization layer can be called to perform group normalization processing on the activated H-dimensional data to obtain the input data of the first convolutional layer. By performing group normalization processing on the activated H-dimensional data, the stability of the H-dimensional data can be improved, thereby improving the stability of the input data generated based on the H-dimensional data, and then improving the K obtained based on the stable input data. 2 The data quality of dimensional data.
[0123] It should be noted that the above is only an exemplary description of the specific structure of the channel compressor and does not limit it. For example, in other embodiments, the channel compressor may also include: a second convolutional layer, a normalization layer, an activation layer, and a first convolutional layer in sequence; or, the channel compressor may also include: an activation layer, a normalization layer, and a first convolutional layer in sequence; or, the channel compressor may also include: a second convolutional layer and a first convolutional layer in sequence, and so on.
[0124] S407, performing Gaussian blur processing on the second feature map to obtain a reference feature map; determining the K of pixel i in the reference feature map 2 second neighborhood pixels, and obtain a second similarity between pixel i and each second neighborhood pixel.
[0125] (1) When performing Gaussian blur processing on the second feature map to obtain a reference feature map, the computer device may use a preset Gaussian blur kernel to directly perform Gaussian blur processing on the second feature map to obtain a reference feature map; or, the computer device may perform linear projection on the second feature map to obtain a projected second feature map, and then use a preset Gaussian blur kernel to perform Gaussian blur processing on the projected second feature map to obtain a reference feature map. The size of the Gaussian blur kernel mentioned here can be set based on actual needs or empirical values. For example, the size of the Gaussian blur kernel can be 3×3, and its variance can be 1.
[0126] (2) Determine the K of pixel i in the reference feature map 2 When there are K second neighboring pixels, the computer device can determine a candidate area with the i-th pixel as the center in the reference feature map, and the candidate area includes K 2 pixels; each pixel in the candidate area is used as the second neighboring pixel of pixel i in the reference feature map. Alternatively, the computer device can obtain the offset information i corresponding to pixel i, and the offset information i includes K 2 offset; in the reference feature map, a candidate region is determined with the ith pixel as the center, and the candidate region includes K 2 pixels; according to the kth offset of the offset information i, the position of the kth pixel in the candidate area is offset to obtain the candidate position, so that the pixel at the candidate position in the reference feature map is used as the kth second neighboring pixel of pixel i in the reference feature map; this specific implementation method selects the Kth pixel of pixel i by introducing the offset information i of pixel i 2 The second neighborhood pixels can increase the flexibility of selecting the second neighborhood pixels.
[0127] It should be noted that after the computer device obtains the reference feature map through Gaussian blur processing, it can directly execute the above-mentioned method of determining the K of pixel i in the reference feature map. 2 Alternatively, the computer device may perform normalization processing (specifically, group normalization processing or standard normalization processing) on the second feature map and the reference feature map respectively to obtain the normalized second feature map and the normalized reference feature map, obtain the affine parameters shared between the second feature map and the reference feature map, and use the obtained affine parameters to perform affine transformation on the normalized second feature map and the normalized reference feature map respectively, so as to trigger the execution of determining the K of pixel i in the reference feature map after the affine transformation. 2The affine transformation can be used to calibrate the feature map and maintain its linearity and flatness, which is conducive to improving the accuracy of subsequent processing; and using shared affine parameters to perform affine transformation on two feature maps can ensure the consistency between the affine transformation operations of the two feature maps.
[0128] (3) When obtaining the second similarity between pixel i and each second neighborhood pixel, the computer device may determine the second feature data of pixel i based on the second feature map, and determine the feature data of each second neighborhood pixel. Specifically, the computer device may directly obtain the feature data of the i-th pixel from the second feature map as the second feature data of pixel i, or linearly project the second feature map, and obtain the feature data of the i-th pixel from the projected second feature map as the second feature data of pixel i; in addition, the computer device may obtain the feature data of each second neighborhood pixel from the reference feature map. Furthermore, the computer device may obtain the feature data of each second neighborhood pixel based on K 2 The feature data of the second neighborhood pixels of pixel i are used to perform a central difference convolution on the second feature data of pixel i to obtain a reference convolution result; and based on the reference convolution result, a second similarity between pixel i and each second neighborhood pixel is predicted. It should be noted that the method for generating the reference convolution result can refer to the method for generating the target convolution result mentioned above, and the method for predicting the second similarity can also refer to the method for predicting the first similarity mentioned above, which will not be described in detail in the embodiments of the present application.
[0129] S408 : Integrate the kth second similarity and the kth first similarity to obtain the kth integrated similarity corresponding to the pixel i.
[0130] S409, using the K corresponding to pixel i 2 The similarity is integrated to construct the upsampling kernel corresponding to pixel i.
[0131] In a specific implementation, the computer device can directly convert K 2 The integrated similarity is used as a weighting coefficient to generate the upsampling kernel corresponding to pixel i. Alternatively, the computer device can use an activation function (such as a softmax function) to K 2 The integrated similarities are activated to obtain multiple weighting coefficients, and then multiple weighting coefficients are used to construct the upsampling kernel corresponding to pixel i. 2 The upsampling kernel is constructed by activating the integrated similarities, which can increase the nonlinear characteristics of the integrated similarities, thereby improving the expression ability of the upsampling kernel, and further improving the accuracy of the subsequent upsampling processing of the first feature map using the upsampling kernel.
[0132] S410, upsampling the first feature map using an upsampling kernel corresponding to pixel i.
[0133] In a specific implementation, the computer device may map pixel i to the first feature map to obtain a mapping point corresponding to pixel i; and determine a reference area in the first feature map with the mapping point as the center, the reference area including K 2 pixels; use the upsampling kernel corresponding to pixel i to perform the K 2 The feature data of pixels is upsampled, specifically, K in the upsampling kernel can be used. 2 Weighting coefficients K 2 The feature data of pixels are weighted summed to achieve upsampling and obtain new feature data of pixel i.
[0134] In another specific implementation, the computer device may obtain the offset information i corresponding to the pixel i, and the offset information i includes K 2 offset; and mapping pixel i to the first feature map to obtain a mapping point corresponding to pixel i. Based on the mapping point and K in the offset information i 2 offset, determines the K value of pixel i in the first feature map 2 third neighborhood pixels and feature data of each third neighborhood pixel; specifically, the computer device may determine a reference area with the mapping point as the center in the first feature map, and the reference area includes K 2 pixels, and the position of the kth pixel in the reference area is offset according to the kth offset in the offset information i to obtain the reference position, so that the pixel at the reference position in the first feature map is used as the kth third neighboring pixel of the pixel i in the first feature map, and the feature data of each third neighboring pixel is obtained from the first feature map. Further, the computer device may use the upsampling kernel corresponding to the pixel i to perform K 2 The feature data of the third neighboring pixels are upsampled; specifically, K in the upsampling kernel can be used. 2 Weighting coefficients K 2 The feature data of the third neighborhood pixels are weighted summed to achieve upsampling, thereby obtaining new feature data of pixel i. Through this implementation, the third neighborhood pixels can be flexibly selected for upsampling, which is conducive to selecting a plurality of relatively dispersed third neighborhood pixels, thereby avoiding the mosaic effect in the upsampling result caused by the aggregation of the third neighborhood pixels.
[0135] In the embodiment of the present application, for the first feature map to be upsampled, a second feature map for guiding the upsampling of the first feature map can be obtained, and the first feature data of the pixel i can be determined based on the second feature map; since the feature data in the second feature map contains image detail information, and the second feature map and the first feature map are generated by performing feature extraction processing in different ways on the same image, by determining the first feature data of the pixel i based on the second feature map, the first feature data can be enriched with fidelity image detail information. Furthermore, by performing central difference convolution on the first feature data rich in image detail information of pixel i based on the feature data of multiple first neighborhood pixels of pixel i determined by the first feature map, the image detail information of pixel i and the similarity between pixel i and each first neighborhood pixel can be captured, so as to obtain a target convolution result containing image detail information and similarity information, thereby more accurately predicting the first similarity between pixel i and each first neighborhood pixel based on the target convolution result, and by using each first similarity to generate an upsampling kernel corresponding to pixel i, the accuracy of the upsampling kernel is improved and the upsampling kernel contains image detail information, and then the first feature map is upsampled by the upsampling kernel that is more accurate and contains image detail information, so as to restore image details in the process of feature upsampling, thereby improving the clarity of the upsampling result.
[0136] Based on the above Figure 2 and Figure 4 The relevant description of the method embodiment shown in the figure, the embodiment of the present application proposes a feature upsampling method based on grouped center differential deformation convolution. This method can be integrated in any deep neural network model containing feature upsampling to achieve feature upsampling in the deep neural network model; for example, this method can be integrated in most network models that perform image segmentation tasks or target detection tasks to achieve feature upsampling in the corresponding network model, so as to perform the corresponding tasks (such as image segmentation tasks, target detection tasks, etc.) based on the upsampling results. It can be seen that this method can be applied to any image segmentation application such as face image segmentation and medical image segmentation, and can also be applied to any target detection application such as obstacle detection in autonomous driving and target object detection in game images.
[0137] Take the image segmentation task as an example, see Figure 6aAs shown: The feature upsampling method based on grouped center differential deformable convolution proposed in the embodiment of the present application mainly involves using the HR guided feature map (the feature map obtained by performing shallow feature extraction on the original image to be segmented) to guide the LR feature map output by the main network in the deep neural network model to upsample, and obtain the upsampled result (HR feature map), so as to input the upsampled result into the segmentation head (Segmentation Head) in the deep neural network model, and the segmentation head performs image segmentation processing based on the upsampled result to obtain a more refined segmentation result. Among them, the segmentation head refers to the part of the deep neural network model specifically used to perform image segmentation tasks, which can be a 1x1 convolution kernel; the original image mentioned in the embodiment of the present application can correspond to the target image mentioned above.
[0138] In a specific implementation, the feature upsampling method based on grouped center difference deformable convolution proposed in the embodiment of the present application mainly includes the following aspects:
[0139] 1. Establishing data set and data preprocessing:
[0140] The embodiments of the present application are not limited to image segmentation tasks, but can be applied to any application tasks involving feature upsampling. The corresponding training data set is selected for the actual application task. For example, for the image segmentation task, the ADE20K data set (a data set containing multiple segmented images) can be selected, and the corresponding data processing method in the mmsegmentation code library (a code library containing multiple data processing methods) can be used for data preprocessing. The data preprocessing here refers to converting the data format of each data in the data set into a data format supported by the model input.
[0141] (II) Selecting a deep neural network model:
[0142] The feature upsampling method proposed in the embodiment of the present application is applicable to all deep neural network models with feature upsampling, and the deep neural network model can be selected according to the application task and actual needs. For example, for the image segmentation task, the embodiment of the present application can select a representative deep network (Segmenter) as the main network of the deep neural network model. Figure 6aThe shallow feature extraction operation shown in the embodiment of the present application can be performed using a Conv3×3-GroupNorm-ReLU-Conv3×3 convolution block. Specifically, the original image can be subjected to a convolution kernel containing 64 3x3 sizes for feature extraction to obtain a feature with a channel size of 64. After group normalization and ReLU activation function, it is then subjected to a convolution kernel containing 32 3x3 sizes to obtain a feature map with a channel size of 32, which is used as the HR guided feature map (corresponding to the second feature map mentioned above). In addition, the original image is subjected to the Segmenter main network to obtain the LR feature map (corresponding to the first feature map mentioned above), which is then upsampled 4 times under the guidance of the HR guided feature map to obtain the HR feature. It should be noted that the 4x upsampling mentioned here is because for the Segmenter main network, the resolution of the HR feature map is 4 times the resolution of the LR feature map. In practical applications, the upsampling multiple can be adaptively changed with different main networks, and its value depends on the resolution ratio between the HR feature map and the LR feature map.
[0143] 3. Feature upsampling framework (ReSFU+) and design:
[0144] Among them, the similarity-based feature upsampling framework can be as follows: given an LR feature map , and an HR guided feature map , I hope After upsampling, we get the HR feature map ; where h×w represents the resolution of the LR feature map, H×W represents the resolution of the HR guided feature map and the HR feature map, h×w<H×W, and h, w, H and W are all positive integers, and C represents the number of feature channels. Specifically, for each pixel in the HR feature map , we can perform weighted summation on the feature data of its neighboring pixels in the LR feature map according to the upsampling kernel corresponding to pixel i, thereby estimating the new feature data of pixel i (i.e., the feature data of pixel i in the HR feature map) , specifically, The calculation formula can be found in the following formula 2.1:
[0145] Formula 2.1
[0146] In the above formula 2.1, N(i) is the set of neighboring pixels of pixel i in the LR feature map (corresponding to the third neighboring pixels mentioned above), , which represents the number of neighborhood pixels, K×K is the upsampling kernel size (kernelsize), for example K=3, , which contains K 2 The total similarity score (corresponding to the integrated similarity mentioned above) is obtained after the Softmax operation (s i ) represents the upsampling kernel corresponding to pixel i.
[0147] See also Figure 6b As shown, in order to calculate the similarity s i The feature upsampling method proposed in the embodiment of the present application can perform a linear projection (Group Normalization+1x1 convolution) on the feature map y and the feature map x respectively to obtain the feature map and feature map , the number of feature channels of the two feature maps is D, and the value of D can be set according to actual needs, for example, D=32. Further, the upsampling method proposed in the embodiment of the present application can perform the following operations:
[0148] ①Feature alignment:
[0149] On the one hand, guided filtering can be used to transform the feature map q to controllably project it onto the feature map Specifically, the feature map k can be upsampled by bilinear interpolation to obtain the feature map , using the guided filtering code toolkit, the feature map q and the feature map They are used as the guide map and input map in the guided filtering, and the output filtering result is the feature map Based on this, the mutual similarity score of pixel i in terms of semantic perception can be obtained (corresponding to the first similarity mentioned above), please refer to the following formula 2.2 for details:
[0150] Formula 2.2
[0151] in, Representation feature map The i-th pixel in Indicates that pixel i is in the feature map The pixel set composed of the neighborhood pixels in (corresponding to the first neighborhood pixels mentioned above), the similarity calculation function This will be introduced later.
[0152] On the other hand, in addition to aligning features in the semantic space to calculate the mutual similarity score, the upsampling method proposed in the embodiment of the present application can also use the self-alignment of the feature map q itself to help preserve the fidelity of the detail information. Specifically, Gaussian blur can be used to remove the local tiny noise in the feature map q to obtain the feature map (corresponding to the reference feature graph mentioned above), , where f∈R 3×3 , which represents a Gaussian blur kernel of size 3×3 and variance 1. Based on this, the self-similarity score corresponding to pixel i can be calculated (corresponding to the second similarity mentioned above), please refer to the following formula 2.3 for details:
[0153] Formula 2.3
[0154] Among them, q i represents the i-th pixel in the feature map q, Indicates that pixel i is in the feature map The pixel set composed of the neighborhood pixels in (corresponding to the second neighborhood pixels mentioned above) is similarity calculation function This will be introduced later.
[0155] Combining Formula 2.2 and Formula 2.3, we can get the final total similarity score as shown in Formula 2.4:
[0156] Formula 2.4
[0157] ②Similarity calculation based on grouped center difference deformable convolution module:
[0158] The upsampling method proposed in the embodiment of the present application designs a grouped central difference deformable convolution (GCDDC-Block) to implement the similarity calculation function in formula 2.2 and formula 2.3 The overall process of GCDDC-Block is as follows Figure 6c As shown: the input query graph (Query) and key graph (Key) can be the feature graph q involved in formula 2.2 respectively GF and feature map , or respectively the feature map q and feature map in formula 2.3 ; The query graph and key graph can be group normalized by a group normalization layer (GroupNormalization), and then share affine parameters for affine transformation to obtain feature graph and feature map ; Feature map and feature map Can be used with additional target offset information graph (Offsets) Input them into the GCDDC layer together to obtain the convolution result v (which can correspond to the target convolution result or reference convolution result mentioned above). , where the value of L can be set based on actual needs or empirical values, for example, L=128; further, the convolution result v is passed through a multi-layer perceptron (corresponding to the channel compressor mentioned above), whose structure includes 1x1 convolution (corresponding to the second convolution layer mentioned above), ReLU activation layer (corresponding to the activation layer mentioned above), GroupNorm layer (corresponding to the normalization layer mentioned above) and 1x1 convolution (corresponding to the first convolution layer mentioned above), where the two 1x1 convolutions both use grouped convolutions, and the number of groups can be set based on actual needs or empirical values, for example, set to 4, the number of channels in the middle layer can be set to 128 (of course, it can also be set to other values), and finally the output channel is K 2 The fraction (i.e., the size of the fraction is H×W×K 2 ), as the Or in formula 2.3 , where the value of the kth channel in the score corresponds to the similarity score between pixel i and its kth neighbor pixel.
[0159] The following is a detailed introduction to the specific calculation method of the grouped central difference deformation convolution module (GCDDC module):
[0160] Specifically, a target offset information graph can be generated As one of the inputs of the GCDDC module; The method can be: input the LR feature map x into a central difference convolution layer (Central Difference Convolution, CDC), so as to generate the t-th offset of pixel j in the LR feature map based on the above formula 1.1 , and then get the initial information graph , bilinear upsampling is performed on the initial information graph to obtain the target offset information graph.
[0161] When the number of groups is 1 (that is, the number of feature channel groups is 1), the convolution result v corresponding to pixel i is i The The value in the channel (corresponding to the central difference convolution value mentioned above), can be calculated by the grouped central difference deformable convolution module using the following formula 2.5:
[0162] Formula 2.5
[0163] In the above formula 2.5, the weight coefficient ; represents the kth offset in the offset information i, Represented in the feature map The feature value of the kth neighborhood pixel under the dth feature channel determined based on the kth offset, Indicates that pixel i is in the feature map The eigenvalue under the d-th feature channel in is, , which represents the convolution bias parameter and is a learnable parameter.
[0164] When the number of groups is G (i.e., the number of feature channel groups is G), the convolution result v corresponding to pixel i is i The The value in the channel (corresponding to the central difference convolution value mentioned above), can be calculated by the grouped central difference deformable convolution module using the following formula 2.6:
[0165] Formula 2.6
[0166] In the above formula 2.6, the weight coefficient The meanings of other parameters can be found in the relevant descriptions of the above formulas, which will not be elaborated here. It is understandable that setting the number of groups G greater than 1 helps to reduce the computational complexity and the number of parameters, for example, G=4.
[0167] Based on the above description, we can know that in the implementation of the GCDDC module, a flexible neighborhood pixel selection function with parameters on the HR feature map is also implemented. (like Figure 6b The selected points are shown as solid circles on the key graph and value graph (value) in the figure, which helps to eliminate the mosaic effect.
[0168] (IV) Model training:
[0169] The feature upsampling method proposed in the embodiment of the present application can be applied to the model training stage. Specifically, for different deep neural network models, the bilinear interpolation upsampling method used by default in the neural network model can be replaced with the feature upsampling method proposed in the embodiment of the present application, so that the default training settings (including optimization scheme, learning rate, loss function, number of training iterations, etc.) provided in the mmsegmentation code library are used for model training without changing other training settings.
[0170] (V) Model Reasoning:
[0171] The feature upsampling method proposed in the embodiment of the present application can be applied to the model reasoning stage. Specifically, taking the image segmentation task as an example, see Figure 6dAs shown: front end A receives the image and uploads it to the back end (such as a backend server). After the back end uses a deep neural network model containing the feature upsampling method proposed in an embodiment of the present application to perform feature upsampling, the image is segmented based on the upsampling result, and the segmentation result is output to front end A.
[0172] In summary, the feature upsampling method (ReSFU+) proposed in the embodiment of the present application can use the HR guided feature map to help restore details in the LR feature map upsampling process; the HR guided feature map and the LR feature map can also be controllably aligned, and the new type of grouped central difference deformation convolution is designed to flexibly capture the real local similarities and solve the mosaic effect.
[0173] Furthermore, experiments have shown that the feature upsampling method proposed in the embodiment of the present application can produce at least the following beneficial effects compared with the existing upsampling method:
[0174] 1) Get better visual effects of feature upsampling. Figure 6e As shown in Figure 2, different upsampling methods are applied to the Segmenter network to perform semantic segmentation tasks; Figure 6e The annotation graph in represents the result of segmentation and annotation of the image (or the original image (GT)), Bilinear represents the bilinear interpolation upsampling method, CARAFE represents the method of directly convolving the LR feature map to obtain the upsampling kernel and using the upsampling kernel to upsample the LR feature map, FADE represents the method of directly convolving the LR feature map and the HR guided feature map to obtain the upsampling kernel and using the upsampling kernel to upsample the LR feature map, SAPA represents the method of calculating the similarity through the inner product operation and upsampling based on the similarity, and DySample represents the method of processing the LR feature map to obtain the offset, thereby using the offset to upsample the LR feature map. Figure 6e It can be seen that the upsampled feature results obtained by ReSFU have clear boundaries and do not have the mosaic effect in the comparison methods FADE and SAPA.
[0175] 2) With the help of better feature alignment and semantic and flexible similarity calculation, the deep neural network trained by the feature upsampling method proposed in the embodiment of the present application can achieve better segmentation performance. Specifically, in the image semantic segmentation task, Segmenter-ViT (a deep neural network model) of two sizes S (Small) and L (Large) was used to compare the performance of various upsampling methods on the ADE20K dataset. The comparison results can be seen in Table 1 below:
[0176] Table 1
[0177]
[0178] Among them, mIoU is the average intersection over union index, mAc is the average pixel accuracy index, bIoU is the boundary intersection over union index, and Params represents the size of the parameter quantity. Based on Table 1, it can be seen that the feature upsampling method proposed in the embodiment of the present application can achieve leading performance without a significant increase in the number of parameters.
[0179] Based on the description of the above method embodiments, the present application also discloses a feature processing device; the feature processing device may be a computer program (including one or more instructions) running in a computer device, and the feature processing device may execute each step in any of the above method flows. Figure 7 , the feature processing device can run the following units:
[0180] An acquisition unit 701 is used to acquire a first feature map to be upsampled, and to acquire a second feature map; the first feature map and the second feature map are generated by performing feature extraction processing in different ways on the same image, and the feature data in the second feature map includes image detail information;
[0181] A processing unit 702 is configured to determine a plurality of first neighborhood pixels of pixel i and feature data of each first neighborhood pixel based on the first feature map, and determine first feature data of the pixel i based on the second feature map; i∈[1, I], where I is the number of pixels in the second feature map;
[0182] The processing unit 702 is further configured to perform a center difference convolution on the first feature data of the pixel i based on the feature data of the plurality of first neighborhood pixels to obtain a target convolution result;
[0183] The processing unit is further configured to predict a first similarity between the pixel i and each first neighborhood pixel according to the target convolution result; and generate an upsampling kernel corresponding to the pixel i using each predicted first similarity;
[0184] The processing unit 702 is further configured to upsample the first feature map using an upsampling kernel corresponding to the pixel i.
[0185] In one embodiment, the resolution of the first feature map is lower than the resolution of the second feature map, and the first feature map is in a semantic space;
[0186] Accordingly, when the processing unit 702 is used to determine the feature data of a plurality of first neighborhood pixels of the pixel i and each first neighborhood pixel based on the first feature map, and to determine the first feature data of the pixel i based on the second feature map, it can be specifically used to:
[0187] Performing image super-resolution processing on the first feature map to obtain a third feature map, where a resolution of the third feature map is equal to a resolution of the second feature map;
[0188] Projecting the second feature map into the semantic space where the first feature map is located to obtain a fourth feature map;
[0189] In the semantic space, feature alignment is performed on the fourth feature map and the third feature map, so that two pixels at the same position in the fourth feature map and the third feature map are aligned with each other;
[0190] After feature alignment, multiple first neighborhood pixels of pixel i in the third feature map and feature data of each first neighborhood pixel are determined, and the feature data of pixel i is obtained from the fourth feature map as first feature data of pixel i.
[0191] In another implementation manner, when the processing unit 702 is used to project the second feature map into the semantic space where the first feature map is located to obtain the fourth feature map, it can be specifically used to:
[0192] Obtain a code toolkit for guided filtering, and obtain a third feature map obtained by performing image super-resolution processing on the first feature map;
[0193] constructing a guide map in the guided filtering based on the second feature map, and constructing an input map in the guided filtering based on the third feature map;
[0194] Using the code toolkit for guided filtering, the guided graph is projected into the semantic space where the input graph is located to obtain a fourth feature graph.
[0195] In another implementation manner, after performing feature alignment, the processing unit 702 may also be used to:
[0196] Normalizing the third feature map and the fourth feature map respectively to obtain a normalized third feature map and a normalized fourth feature map;
[0197] Acquire affine parameters shared between the third feature map and the fourth feature map;
[0198] Using the acquired affine parameters, respectively performing affine transformation on the normalized third feature map and the normalized fourth feature map;
[0199] After performing the affine transformation, trigger the step of determining multiple first neighborhood pixels of pixel i in the third feature map and feature data of each first neighborhood pixel, and obtaining the feature data of pixel i from the fourth feature map as the first feature data of pixel i.
[0200] In another embodiment, the size of the upsampling kernel is K×K, and the plurality of first neighborhood pixels is K 2 first neighborhood pixels, K is a positive integer; accordingly, when the processing unit 702 is used to determine the plurality of first neighborhood pixels of the pixel i in the third feature map and the feature data of each first neighborhood pixel, it can be specifically used to:
[0201] Get the offset information i corresponding to the pixel i, the offset information i includes K 2 offset;
[0202] In the third feature map, a target area is determined with the pixel aligned with the pixel i as the center, and the target area includes K 2 pixels;
[0203] According to the kth offset of the offset information i, the position of the kth pixel in the target area is offset to obtain the target position, k∈[1, K 2 ];
[0204] The pixel located at the target position in the third feature map is used as the kth first neighboring pixel of pixel i in the third feature map, and feature data of the kth first neighboring pixel is obtained from the third feature map.
[0205] In another implementation manner, the offset information i corresponding to the pixel i is the i-th offset information in the target offset information map; accordingly, before the processing unit 702 is used to obtain the offset information i corresponding to the pixel i, it can also be used to:
[0206] Traverse each pixel in the first feature map, and determine the neighborhood of the currently traversed pixel j in the first feature map; wherein the neighborhood of the pixel j includes K 2 pixels, j is a positive integer and is not greater than the number of pixels in the first feature map;
[0207] According to the feature data of each pixel in the neighborhood of the pixel j, the feature data of the pixel j is K-processed. 2 Secondary center difference convolution is performed to obtain the offset information of the pixel j; wherein the offset information of the pixel j includes K 2 offset, and the K 2The t-th offset among the offsets is obtained by the t-th central difference convolution, t∈[1, K 2 ];
[0208] After all pixels in the first feature map are traversed, an initial offset information map is obtained; wherein the initial offset information map includes the offset information of each pixel in the first feature map;
[0209] The initial offset information map is upsampled to obtain a target offset information map, where the target offset information map includes I offset information.
[0210] In another implementation manner, when the processing unit 702 is used to perform a central difference convolution on the first feature data of the pixel i based on the feature data of the plurality of first neighborhood pixels to obtain a target convolution result, it may be specifically used to:
[0211] Based on the feature data of the plurality of first neighborhood pixels, performing L center difference convolutions on the first feature data of the pixel i to obtain L center difference convolution values; wherein one center difference convolution is used to obtain one center difference convolution value, and L is an integer greater than 1;
[0212] The L center difference convolution values are used to construct a target convolution result.
[0213] In another embodiment, the feature data of each first neighborhood pixel and the first feature data of the pixel i both include feature values under D feature channels, where D is a positive integer;
[0214] Accordingly, when the processing unit 702 is used to perform L center difference convolutions on the first feature data of the pixel i based on the feature data of the plurality of first neighborhood pixels to obtain L center difference convolution values, it can be specifically used to:
[0215] The D feature channels are grouped to obtain G feature channel groups; each feature channel group includes D / G feature channels, and G is a positive integer;
[0216] Determine a target feature channel group for performing the mth central difference convolution from the G feature channel groups; wherein m∈[1,L];
[0217] Traversing each feature channel in the target feature channel group, and taking the currently traversed feature channel as the current feature channel;
[0218] Based on the eigenvalue of each first neighborhood pixel under the current feature channel, perform a center difference convolution on the eigenvalue of the pixel i under the current feature channel to obtain a convolution eigenvalue under the current feature channel;
[0219] After all feature channels in the target feature channel group are traversed, the convolution feature values under each feature channel in the target feature channel group are summed to obtain the mth center difference convolution value.
[0220] In another embodiment, the size of the upsampling kernel is K×K, and the plurality of first neighborhood pixels is K 2 first neighborhood pixels, K is a positive integer;
[0221] Accordingly, when the processing unit 702 is used to perform a center difference convolution on the eigenvalue of the pixel i under the current feature channel based on the eigenvalue of each first neighborhood pixel under the current feature channel to obtain the convolution eigenvalue under the current feature channel, it can be specifically used to:
[0222] Obtain the convolution parameter m for performing the mth central difference convolution, wherein the convolution parameter m includes D / G convolution channels, each of which includes K 2 Weight coefficients;
[0223] Calculate the difference between the eigenvalue of each first neighborhood pixel under the current feature channel and the eigenvalue of the pixel i under the current feature channel to obtain K 2 feature differences;
[0224] The convolution parameter m includes K in the rth convolution channel 2 weight coefficients, for the K 2 The feature differences are weighted summed to obtain the convolution feature value under the current feature channel; wherein the value of r is equal to the arrangement order of the current feature channel in the target feature channel group.
[0225] In another embodiment, the size of the upsampling kernel is K×K, and the plurality of first neighborhood pixels is K 2 first neighborhood pixels, K is a positive integer; the target convolution result includes the central difference convolution values of L channels, L>K 2 ;
[0226] Accordingly, when the processing unit 702 is used to predict the first similarity between the pixel i and each first neighborhood pixel according to the target convolution result, it can be specifically used to:
[0227] Call the channel compressor to perform channel compression on the target convolution result to obtain K 2 Dimensional data;
[0228] The K 2 The k-th dimension data in the k-th dimension data is used as the first similarity between the pixel i and the k-th first neighboring pixel; wherein k∈[1, K 2].
[0229] In another embodiment, the channel compressor includes at least a first convolutional layer, wherein the first convolutional layer includes K 2 The first convolution kernel;
[0230] Correspondingly, the processing unit 702 is used to call the channel compressor to perform channel compression processing on the target convolution result to obtain K 2 When dimensioning data, it can be used specifically for:
[0231] Constructing input data of the first convolution layer using the target convolution result;
[0232] Call each first convolution kernel in the first convolution layer respectively, perform convolution processing on the input data, and obtain K 2 dimensional data; wherein, the K 2 The k-th dimension data in the dimensional data is obtained by convolving the input data with the k-th first convolution kernel.
[0233] In another implementation, the channel compressor further includes a second convolution layer and an activation layer; wherein the second convolution layer includes H second convolution kernels, where H is a positive integer;
[0234] Accordingly, when the processing unit 702 is used to construct the input data of the first convolution layer using the target convolution result, it can be specifically used to:
[0235] Respectively calling each second convolution kernel in the second convolution layer to perform convolution processing on the target convolution result to obtain H-dimensional data; wherein the h-th dimension data in the H-dimensional data is obtained by performing convolution processing on the target convolution result by the h-th second convolution kernel;
[0236] Calling the activation layer to perform activation processing on the H-dimensional data to obtain activated H-dimensional data;
[0237] The activated H-dimensional data is used to construct input data of the first convolutional layer.
[0238] In another implementation, the channel compressor further includes a normalization layer; accordingly, when the processing unit 702 is used to construct the input data of the first convolutional layer using the activated H-dimensional data, it can be specifically used to:
[0239] The normalization layer is called to perform group normalization processing on the activated H-dimensional data to obtain input data of the first convolutional layer.
[0240] In another embodiment, the size of the upsampling kernel is K×K, and the plurality of first neighborhood pixels is K 2 first neighborhood pixels, K is a positive integer;
[0241] When the processing unit 702 is used to generate the up-sampling kernel corresponding to the pixel i by using the predicted first similarities, it can be specifically used to:
[0242] Perform Gaussian blur processing on the second feature map to obtain a reference feature map, and determine the K of the pixel i in the reference feature map 2 Second neighbor pixels;
[0243] Obtaining a second similarity between the pixel i and each second neighborhood pixel;
[0244] The kth second similarity is integrated with the predicted kth first similarity to obtain the kth integrated similarity corresponding to the pixel i; wherein k∈[1, K 2 ];
[0245] Use the K corresponding to the pixel i 2 The similarities are integrated to construct an upsampling kernel corresponding to the pixel i.
[0246] In another implementation manner, when the processing unit 702 is used to obtain the second similarity between the pixel i and each second neighborhood pixel, it can be specifically used to:
[0247] Determine second feature data of pixel i based on the second feature map, and determine feature data of each second neighborhood pixel;
[0248] Based on the K 2 feature data of second neighborhood pixels, performing central difference convolution on the second feature data of the pixel i to obtain a reference convolution result;
[0249] According to the reference convolution result, a second similarity between the pixel i and each second neighborhood pixel is predicted.
[0250] In another implementation manner, when the processing unit 702 is used to upsample the first feature map using the upsampling kernel corresponding to the pixel i, it may be specifically used to:
[0251] Get the offset information i corresponding to the pixel i, the offset information i includes K 2 offset;
[0252] Mapping the pixel i to the first feature map to obtain a mapping point corresponding to the pixel i;
[0253] Based on the mapping point and K in the offset information i 2 offset, determining the K of the pixel i in the first feature map 2 third neighborhood pixels and feature data of each third neighborhood pixel;
[0254] Use the upsampling kernel corresponding to the pixel i to 2 The feature data of the third neighboring pixels are upsampled.
[0255] In another embodiment, the first feature map is generated by performing a deep feature extraction process on the target image, wherein the deep feature extraction process refers to a process of extracting deep features, and the deep features include image semantic information;
[0256] Accordingly, when the acquisition unit 701 is used to acquire the second feature map, it can be specifically used to:
[0257] Get the target image;
[0258] A shallow feature extraction process is performed on the target image to obtain a second feature map; wherein the shallow feature extraction process refers to a process of extracting shallow features, and the shallow features contain image detail information.
[0259] In another implementation manner, when the acquisition unit 701 is used to perform shallow feature extraction on the target image to obtain the second feature map, it can be specifically used to:
[0260] Calling the third convolutional layer to perform feature extraction on the target image to obtain an initial feature map;
[0261] Performing group normalization processing on the initial feature map to obtain a group-normalized feature map;
[0262] Performing activation processing on the group of normalized feature maps to obtain an activated feature map;
[0263] The fourth convolutional layer is called to perform feature extraction on the activated feature map to obtain a second feature map.
[0264] According to another embodiment of the present application, Figure 7 The various units in the feature processing device shown can be separately or completely combined into one or several other units to form, or one (some) of the units can be further divided into multiple smaller units in function to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, other units can also be included based on the feature processing device. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0265] According to another embodiment of the present application, a computer program (including one or more instructions) capable of executing each step involved in any of the above methods can be constructed by running the computer program (including one or more instructions) on a general computing device such as a computer including a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM) and other processing elements and storage elements. Figure 7 The feature processing device shown in the embodiment of the present application is implemented by the feature processing device. The computer program can be recorded on a computer-readable storage medium, for example, and loaded into the above-mentioned computing device through the computer-readable storage medium and run therein.
[0266] It is worth noting that in the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can contain a part of the overall module or unit of the module or unit function.
[0267] In the embodiment of the present application, for the first feature map to be upsampled, a second feature map for guiding the upsampling of the first feature map can be obtained, and the first feature data of the pixel i can be determined based on the second feature map; since the feature data in the second feature map contains image detail information, and the second feature map and the first feature map are generated by performing feature extraction processing in different ways on the same image, by determining the first feature data of the pixel i based on the second feature map, the first feature data can be enriched with fidelity image detail information. Furthermore, by performing central difference convolution on the first feature data rich in image detail information of pixel i based on the feature data of multiple first neighborhood pixels of pixel i determined by the first feature map, the image detail information of pixel i and the similarity between pixel i and each first neighborhood pixel can be captured, so as to obtain a target convolution result containing image detail information and similarity information, thereby more accurately predicting the first similarity between pixel i and each first neighborhood pixel based on the target convolution result, and by using each first similarity to generate an upsampling kernel corresponding to pixel i, the accuracy of the upsampling kernel is improved and the upsampling kernel contains image detail information, and then the first feature map is upsampled by the upsampling kernel that is more accurate and contains image detail information, so as to restore image details in the process of feature upsampling, thereby improving the clarity of the upsampling result.
[0268] Based on the description of the above method embodiment and device embodiment, the present application embodiment also provides a computer device. Figure 8, the computer device at least includes a processor 801, an input interface 802, an output interface 803 and a computer storage medium 804. The processor 801, the input interface 802, the output interface 803 and the computer storage medium 804 in the computer device can be connected via a bus or other means. The computer storage medium 804 can be stored in the memory of the computer device, the computer storage medium 804 is used to store a computer program, the computer program includes one or more instructions, and the processor 801 is used to execute one or more instructions in the computer program stored in the computer storage medium 804. The processor 801 (or CPU (Central Processing Unit)) is the computing core and control core of the computer device, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding function.
[0269] In one embodiment, the processor 801 described in the embodiment of the present application can be used to perform a series of upsampling processes on any feature map, specifically including: obtaining a first feature map to be upsampled, and obtaining a second feature map; the first feature map and the second feature map are generated by performing feature extraction processes in different ways on the same image, and the feature data in the second feature map contains image detail information; based on the first feature map, multiple first neighborhood pixels of pixel i and feature data of each first neighborhood pixel are determined, and based on the second feature map, the first feature data of pixel i is determined; based on the feature data of multiple first neighborhood pixels, the first feature data of pixel i is centrally differentially convolved to obtain a target convolution result; based on the target convolution result, a first similarity between pixel i and each first neighborhood pixel is predicted; and an upsampling kernel corresponding to pixel i is generated using the predicted first similarities; the first feature map is upsampled using the upsampling kernel corresponding to pixel i, and the like.
[0270] The embodiment of the present application also provides a computer storage medium (Memory), which is a memory device in a computer device for storing computer programs and data. It is understandable that the computer storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer storage medium provides a storage space, which stores the operating system of the computer device. In addition, a computer program is also stored in the storage space, and the computer program includes one or more instructions suitable for being loaded and executed by the processor 801, and these instructions can be one or more program codes. It should be noted that the computer storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage; optionally, it can also be at least one computer storage medium located away from the aforementioned processor.
[0271] In one embodiment, one or more instructions stored in a computer storage medium may be loaded and executed by a processor to implement the corresponding steps in any of the above method embodiments; in a specific implementation, one or more instructions in a computer storage medium may be loaded and executed by a processor as follows:
[0272] Acquire a first feature map to be upsampled, and acquire a second feature map; the first feature map and the second feature map are generated by performing feature extraction processing in different ways on the same image, and the feature data in the second feature map includes image detail information;
[0273] Determine a plurality of first neighborhood pixels of pixel i and feature data of each first neighborhood pixel based on the first feature map, and determine first feature data of pixel i based on the second feature map; i∈[1,I], where I is the number of pixels in the second feature map;
[0274] Based on the feature data of the plurality of first neighborhood pixels, performing a center difference convolution on the first feature data of the pixel i to obtain a target convolution result;
[0275] According to the target convolution result, predict the first similarity between the pixel i and each first neighborhood pixel; and use the predicted first similarities to generate an upsampling kernel corresponding to the pixel i;
[0276] The first feature map is upsampled using an upsampling kernel corresponding to the pixel i.
[0277] In one embodiment, the resolution of the first feature map is lower than the resolution of the second feature map, and the first feature map is in a semantic space;
[0278] Accordingly, when determining multiple first neighborhood pixels of pixel i and feature data of each first neighborhood pixel based on the first feature map, and determining the first feature data of the pixel i based on the second feature map, the one or more instructions may be loaded and specifically executed by the processor:
[0279] Performing image super-resolution processing on the first feature map to obtain a third feature map, where a resolution of the third feature map is equal to a resolution of the second feature map;
[0280] Projecting the second feature map into the semantic space where the first feature map is located to obtain a fourth feature map;
[0281] In the semantic space, feature alignment is performed on the fourth feature map and the third feature map, so that two pixels at the same position in the fourth feature map and the third feature map are aligned with each other;
[0282] After feature alignment, multiple first neighborhood pixels of pixel i in the third feature map and feature data of each first neighborhood pixel are determined, and the feature data of pixel i is obtained from the fourth feature map as first feature data of pixel i.
[0283] In another implementation, when the second feature map is projected into the semantic space where the first feature map is located to obtain a fourth feature map, the one or more instructions may be loaded and specifically executed by the processor:
[0284] Obtain a code toolkit for guided filtering, and obtain a third feature map obtained by performing image super-resolution processing on the first feature map;
[0285] constructing a guide map in the guided filtering based on the second feature map, and constructing an input map in the guided filtering based on the third feature map;
[0286] Using the code toolkit for guided filtering, the guided graph is projected into the semantic space where the input graph is located to obtain a fourth feature graph.
[0287] In another implementation, after feature alignment, the one or more instructions may be loaded and specifically executed by the processor:
[0288] Normalizing the third feature map and the fourth feature map respectively to obtain a normalized third feature map and a normalized fourth feature map;
[0289] Acquire affine parameters shared between the third feature map and the fourth feature map;
[0290] Using the acquired affine parameters, respectively performing affine transformation on the normalized third feature map and the normalized fourth feature map;
[0291] After performing the affine transformation, trigger the step of determining multiple first neighborhood pixels of pixel i in the third feature map and feature data of each first neighborhood pixel, and obtaining the feature data of pixel i from the fourth feature map as the first feature data of pixel i.
[0292] In another embodiment, the size of the upsampling kernel is K×K, and the plurality of first neighborhood pixels is K 2 first neighborhood pixels, K is a positive integer; accordingly, when determining the plurality of first neighborhood pixels of pixel i in the third feature map and the feature data of each first neighborhood pixel, the one or more instructions can be loaded and specifically executed by the processor:
[0293] Get the offset information i corresponding to the pixel i, the offset information i includes K 2 offset;
[0294] In the third feature map, a target area is determined with the pixel aligned with the pixel i as the center, and the target area includes K 2 pixels;
[0295] According to the kth offset of the offset information i, the position of the kth pixel in the target area is offset to obtain the target position, k∈[1, K 2 ];
[0296] The pixel located at the target position in the third feature map is used as the kth first neighboring pixel of pixel i in the third feature map, and feature data of the kth first neighboring pixel is obtained from the third feature map.
[0297] In another implementation manner, the offset information i corresponding to the pixel i is the i-th offset information in the target offset information map; accordingly, before obtaining the offset information i corresponding to the pixel i, the one or more instructions may be loaded and specifically executed by the processor:
[0298] Traverse each pixel in the first feature map, and determine the neighborhood of the currently traversed pixel j in the first feature map; wherein the neighborhood of the pixel j includes K 2 pixels, j is a positive integer and is not greater than the number of pixels in the first feature map;
[0299] According to the feature data of each pixel in the neighborhood of the pixel j, the feature data of the pixel j is K-processed. 2Secondary center difference convolution is performed to obtain the offset information of the pixel j; wherein the offset information of the pixel j includes K 2 offset, and the K 2 The t-th offset among the offsets is obtained by the t-th central difference convolution, t∈[1, K 2 ];
[0300] After all pixels in the first feature map are traversed, an initial offset information map is obtained; wherein the initial offset information map includes the offset information of each pixel in the first feature map;
[0301] The initial offset information map is upsampled to obtain a target offset information map, where the target offset information map includes I offset information.
[0302] In another implementation, when performing central differential convolution on the first feature data of the pixel i based on the feature data of the plurality of first neighborhood pixels to obtain a target convolution result, the one or more instructions may be loaded and specifically executed by the processor:
[0303] Based on the feature data of the plurality of first neighborhood pixels, performing L center difference convolutions on the first feature data of the pixel i to obtain L center difference convolution values; wherein one center difference convolution is used to obtain one center difference convolution value, and L is an integer greater than 1;
[0304] The L center difference convolution values are used to construct a target convolution result.
[0305] In another embodiment, the feature data of each first neighborhood pixel and the first feature data of the pixel i both include feature values under D feature channels, where D is a positive integer;
[0306] Correspondingly, when performing L center difference convolutions on the first feature data of the pixel i based on the feature data of the multiple first neighborhood pixels to obtain L center difference convolution values, the one or more instructions may be loaded and specifically executed by the processor:
[0307] The D feature channels are grouped to obtain G feature channel groups; each feature channel group includes D / G feature channels, and G is a positive integer;
[0308] Determine a target feature channel group for performing the mth central difference convolution from the G feature channel groups; wherein m∈[1,L];
[0309] Traversing each feature channel in the target feature channel group, and taking the currently traversed feature channel as the current feature channel;
[0310] Based on the eigenvalue of each first neighborhood pixel under the current feature channel, perform a center difference convolution on the eigenvalue of the pixel i under the current feature channel to obtain a convolution eigenvalue under the current feature channel;
[0311] After all feature channels in the target feature channel group are traversed, the convolution feature values under each feature channel in the target feature channel group are summed to obtain the mth center difference convolution value.
[0312] In another embodiment, the size of the upsampling kernel is K×K, and the plurality of first neighborhood pixels is K 2 first neighborhood pixels, K is a positive integer;
[0313] Correspondingly, when performing a central difference convolution on the eigenvalue of the pixel i under the current feature channel based on the eigenvalue of each first neighborhood pixel under the current feature channel to obtain the convolution eigenvalue under the current feature channel, the one or more instructions may be loaded and specifically executed by the processor:
[0314] Obtain the convolution parameter m for performing the mth central difference convolution, wherein the convolution parameter m includes D / G convolution channels, each of which includes K 2 Weight coefficients;
[0315] Calculate the difference between the eigenvalue of each first neighborhood pixel under the current feature channel and the eigenvalue of the pixel i under the current feature channel to obtain K 2 feature differences;
[0316] The convolution parameter m includes K in the rth convolution channel 2 weight coefficients, for the K 2 The feature differences are weighted summed to obtain the convolution feature value under the current feature channel; wherein the value of r is equal to the arrangement order of the current feature channel in the target feature channel group.
[0317] In another embodiment, the size of the upsampling kernel is K×K, and the plurality of first neighborhood pixels is K 2 first neighborhood pixels, K is a positive integer; the target convolution result includes the central difference convolution values of L channels, L>K 2 ;
[0318] Correspondingly, when predicting the first similarity between the pixel i and each first neighborhood pixel according to the target convolution result, the one or more instructions may be loaded and specifically executed by the processor:
[0319] Call the channel compressor to perform channel compression on the target convolution result to obtain K2 Dimensional data;
[0320] The K 2 The k-th dimension data in the k-th dimension data is used as the first similarity between the pixel i and the k-th first neighboring pixel; wherein k∈[1, K 2 ].
[0321] In another embodiment, the channel compressor includes at least a first convolutional layer, wherein the first convolutional layer includes K 2 The first convolution kernel;
[0322] Correspondingly, when calling the channel compressor, the channel compression processing is performed on the target convolution result to obtain K 2 When the dimension data is generated, the one or more instructions may be loaded and specifically executed by the processor:
[0323] Constructing input data of the first convolution layer using the target convolution result;
[0324] Call each first convolution kernel in the first convolution layer respectively, perform convolution processing on the input data, and obtain K 2 dimensional data; wherein, the K 2 The k-th dimension data in the dimensional data is obtained by convolving the input data with the k-th first convolution kernel.
[0325] In another implementation, the channel compressor further includes a second convolution layer and an activation layer; wherein the second convolution layer includes H second convolution kernels, where H is a positive integer;
[0326] Correspondingly, when the target convolution result is used to construct the input data of the first convolution layer, the one or more instructions may be loaded and specifically executed by the processor:
[0327] Respectively calling each second convolution kernel in the second convolution layer to perform convolution processing on the target convolution result to obtain H-dimensional data; wherein the h-th dimension data in the H-dimensional data is obtained by performing convolution processing on the target convolution result by the h-th second convolution kernel;
[0328] Calling the activation layer to perform activation processing on the H-dimensional data to obtain activated H-dimensional data;
[0329] The activated H-dimensional data is used to construct input data of the first convolutional layer.
[0330] In another implementation, the channel compressor further includes a normalization layer; accordingly, when the activated H-dimensional data is used to construct the input data of the first convolutional layer, the one or more instructions may be loaded and specifically executed by the processor:
[0331] The normalization layer is called to perform group normalization processing on the activated H-dimensional data to obtain input data of the first convolutional layer.
[0332] In another embodiment, the size of the upsampling kernel is K×K, and the plurality of first neighborhood pixels is K 2 first neighborhood pixels, K is a positive integer;
[0333] When the predicted first similarities are used to generate the upsampling kernel corresponding to the pixel i, the one or more instructions may be loaded and specifically executed by the processor:
[0334] Perform Gaussian blur processing on the second feature map to obtain a reference feature map, and determine the K of the pixel i in the reference feature map 2 Second neighbor pixels;
[0335] Obtaining a second similarity between the pixel i and each second neighborhood pixel;
[0336] The kth second similarity is integrated with the predicted kth first similarity to obtain the kth integrated similarity corresponding to the pixel i; wherein k∈[1, K 2 ];
[0337] Use the K corresponding to the pixel i 2 The similarities are integrated to construct an upsampling kernel corresponding to the pixel i.
[0338] In another implementation, when obtaining the second similarity between the pixel i and each second neighborhood pixel, the one or more instructions may be loaded and specifically executed by the processor:
[0339] Determine second feature data of pixel i based on the second feature map, and determine feature data of each second neighborhood pixel;
[0340] Based on the K 2 feature data of second neighborhood pixels, performing central difference convolution on the second feature data of the pixel i to obtain a reference convolution result;
[0341] According to the reference convolution result, a second similarity between the pixel i and each second neighborhood pixel is predicted.
[0342] In another implementation, when the first feature map is upsampled using the upsampling kernel corresponding to the pixel i, the one or more instructions may be loaded and specifically executed by the processor:
[0343] Get the offset information i corresponding to the pixel i, the offset information i includes K 2 offset;
[0344] Mapping the pixel i to the first feature map to obtain a mapping point corresponding to the pixel i;
[0345] Based on the mapping point and K in the offset information i 2 offset, determining the K of the pixel i in the first feature map 2 third neighborhood pixels and feature data of each third neighborhood pixel;
[0346] Use the upsampling kernel corresponding to the pixel i to 2 The feature data of the third neighboring pixels are upsampled.
[0347] In another embodiment, the first feature map is generated by performing a deep feature extraction process on the target image, wherein the deep feature extraction process refers to a process of extracting deep features, and the deep features include image semantic information;
[0348] Accordingly, when acquiring the second feature map, the one or more instructions may be loaded and specifically executed by the processor:
[0349] Get the target image;
[0350] A shallow feature extraction process is performed on the target image to obtain a second feature map; wherein the shallow feature extraction process refers to a process of extracting shallow features, and the shallow features contain image detail information.
[0351] In another implementation, when shallow feature extraction is performed on the target image to obtain a second feature map, the one or more instructions may be loaded and specifically executed by the processor:
[0352] Calling the third convolutional layer to perform feature extraction on the target image to obtain an initial feature map;
[0353] Performing group normalization processing on the initial feature map to obtain a group-normalized feature map;
[0354] Performing activation processing on the group of normalized feature maps to obtain an activated feature map;
[0355] The fourth convolutional layer is called to perform feature extraction on the activated feature map to obtain a second feature map.
[0356] In the embodiment of the present application, for the first feature map to be upsampled, a second feature map for guiding the upsampling of the first feature map can be obtained, and the first feature data of the pixel i can be determined based on the second feature map; since the feature data in the second feature map contains image detail information, and the second feature map and the first feature map are generated by performing feature extraction processing in different ways on the same image, by determining the first feature data of the pixel i based on the second feature map, the first feature data can be enriched with fidelity image detail information. Furthermore, by performing central difference convolution on the first feature data rich in image detail information of pixel i based on the feature data of multiple first neighborhood pixels of pixel i determined by the first feature map, the image detail information of pixel i and the similarity between pixel i and each first neighborhood pixel can be captured, so as to obtain a target convolution result containing image detail information and similarity information, thereby more accurately predicting the first similarity between pixel i and each first neighborhood pixel based on the target convolution result, and by using each first similarity to generate an upsampling kernel corresponding to pixel i, the accuracy of the upsampling kernel is improved and the upsampling kernel contains image detail information, and then the first feature map is upsampled by the upsampling kernel that is more accurate and contains image detail information, so as to restore image details in the process of feature upsampling, thereby improving the clarity of the upsampling result.
[0357] It should be noted that, according to one aspect of the present application, a computer program product or computer program is also provided, and the computer program product or computer program includes one or more instructions, and the one or more instructions are stored in a computer storage medium. The processor of the computer device reads one or more instructions from the computer storage medium, and the processor executes the one or more instructions, so that the computer device executes the method provided in various optional ways in any of the above-mentioned method embodiments. It should be understood that what is disclosed above is only a preferred embodiment of the present application, and of course it cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A feature processing method, characterized in that: include: Acquire a first feature map to be upsampled, and acquire a second feature map; the first feature map and the second feature map are generated by performing feature extraction processing in different ways on the same image, and the feature data in the second feature map includes image detail information; Determine a plurality of first neighborhood pixels of pixel i and feature data of each first neighborhood pixel based on the first feature map, and determine first feature data of pixel i based on the second feature map; i∈[1,I], I is the number of pixels in the second feature map; Based on the feature data of the plurality of first neighborhood pixels, performing a center difference convolution on the first feature data of the pixel i to obtain a target convolution result; According to the target convolution result, predict the first similarity between the pixel i and each first neighborhood pixel; and use the predicted first similarities to generate an upsampling kernel corresponding to the pixel i; The first feature map is upsampled using an upsampling kernel corresponding to the pixel i.
2. The method according to claim 1, characterized in that A resolution of the first feature map is lower than a resolution of the second feature map, and the first feature map is in a semantic space; The determining of a plurality of first neighborhood pixels of pixel i and feature data of each first neighborhood pixel based on the first feature map, and determining first feature data of pixel i based on the second feature map, includes: Performing image super-resolution processing on the first feature map to obtain a third feature map, where a resolution of the third feature map is equal to a resolution of the second feature map; Projecting the second feature map into the semantic space where the first feature map is located to obtain a fourth feature map; In the semantic space, feature alignment is performed on the fourth feature map and the third feature map, so that two pixels at the same position in the fourth feature map and the third feature map are aligned with each other; After feature alignment, multiple first neighborhood pixels of pixel i in the third feature map and feature data of each first neighborhood pixel are determined, and the feature data of pixel i is obtained from the fourth feature map as first feature data of pixel i.
3. The method according to claim 2, characterized in that The step of projecting the second feature map into the semantic space where the first feature map is located to obtain a fourth feature map includes: Obtain a code toolkit for guided filtering, and obtain a third feature map obtained by performing image super-resolution processing on the first feature map; constructing a guide map in the guided filtering based on the second feature map, and constructing an input map in the guided filtering based on the third feature map; Using the code toolkit for guided filtering, the guided graph is projected into the semantic space where the input graph is located to obtain a fourth feature graph.
4. The method according to claim 2, characterized in that After performing feature alignment, the method further includes: Normalizing the third feature map and the fourth feature map respectively to obtain a normalized third feature map and a normalized fourth feature map; Acquire affine parameters shared between the third feature map and the fourth feature map; Using the acquired affine parameters, respectively performing affine transformation on the normalized third feature map and the normalized fourth feature map; After performing the affine transformation, trigger the step of determining multiple first neighborhood pixels of pixel i in the third feature map and feature data of each first neighborhood pixel, and obtaining the feature data of pixel i from the fourth feature map as the first feature data of pixel i.
5. The method according to any one of claims 2 to 4, characterized in that: The size of the upsampling kernel is K×K, and the number of first neighborhood pixels is K 2 first neighborhood pixels, K is a positive integer, and the determining of the plurality of first neighborhood pixels of the pixel i in the third feature map and the feature data of each first neighborhood pixel includes: Get the offset information i corresponding to the pixel i, the offset information i includes K 2 offset; In the third feature map, a target area is determined with the pixel aligned with the pixel i as the center, and the target area includes K 2 pixels; According to the kth offset of the offset information i, the position of the kth pixel in the target area is offset to obtain the target position, k∈[1, K 2 ]; The pixel located at the target position in the third feature map is used as the kth first neighboring pixel of pixel i in the third feature map, and feature data of the kth first neighboring pixel is obtained from the third feature map.
6. The method according to claim 5, characterized in that The offset information i corresponding to the pixel i is the i-th offset information in the target offset information map. Before obtaining the offset information i corresponding to the pixel i, the method further includes: Traverse each pixel in the first feature map, and determine the neighborhood of the currently traversed pixel j in the first feature map; wherein the neighborhood of the pixel j includes K 2 pixels, j is a positive integer and is not greater than the number of pixels in the first feature map; According to the feature data of each pixel in the neighborhood of the pixel j, the feature data of the pixel j is K-processed. 2 Secondary center difference convolution is performed to obtain the offset information of the pixel j; wherein the offset information of the pixel j includes K 2 offset, and the K 2 The t-th offset among the offsets is obtained by the t-th central difference convolution, t∈[1, K 2 ]; After all pixels in the first feature map are traversed, an initial offset information map is obtained; wherein the initial offset information map includes the offset information of each pixel in the first feature map; The initial offset information map is upsampled to obtain a target offset information map, where the target offset information map includes I offset information.
7. The method according to claim 1, characterized in that The step of performing a center difference convolution on the first feature data of the pixel i based on the feature data of the plurality of first neighborhood pixels to obtain a target convolution result includes: Based on the feature data of the plurality of first neighborhood pixels, performing L center difference convolutions on the first feature data of the pixel i to obtain L center difference convolution values; wherein one center difference convolution is used to obtain one center difference convolution value, and L is an integer greater than 1; The L center difference convolution values are used to construct a target convolution result.
8. The method according to claim 7, characterized in that The feature data of each first neighborhood pixel and the first feature data of the pixel i both include feature values under D feature channels, where D is a positive integer; The step of performing L center difference convolutions on the first feature data of the pixel i based on the feature data of the plurality of first neighborhood pixels to obtain L center difference convolution values includes: The D feature channels are grouped to obtain G feature channel groups; each feature channel group includes D / G feature channels, and G is a positive integer; Determine a target feature channel group for performing the mth central difference convolution from the G feature channel groups; wherein m∈[1,L]; Traversing each feature channel in the target feature channel group, and taking the currently traversed feature channel as the current feature channel; Based on the eigenvalue of each first neighborhood pixel under the current feature channel, perform a center difference convolution on the eigenvalue of the pixel i under the current feature channel to obtain a convolution eigenvalue under the current feature channel; After all feature channels in the target feature channel group are traversed, the convolution feature values under each feature channel in the target feature channel group are summed to obtain the mth center difference convolution value.
9. The method according to claim 8, characterized in that The size of the upsampling kernel is K×K, and the number of first neighborhood pixels is K 2 first neighborhood pixels, K is a positive integer; The performing center difference convolution on the feature value of the pixel i under the current feature channel based on the feature value of each first neighborhood pixel under the current feature channel to obtain the convolution feature value under the current feature channel includes: Obtain the convolution parameter m for performing the mth central difference convolution, wherein the convolution parameter m includes D / G convolution channels, each of which includes K 2 Weight coefficients; Calculate the difference between the eigenvalue of each first neighborhood pixel under the current feature channel and the eigenvalue of the pixel i under the current feature channel to obtain K 2 feature differences; The convolution parameter m includes K in the rth convolution channel 2 weight coefficients, for the K 2 The feature differences are weighted summed to obtain the convolution feature value under the current feature channel; wherein the value of r is equal to the arrangement order of the current feature channel in the target feature channel group.
10. The method according to claim 1, characterized in that The size of the upsampling kernel is K×K, and the number of first neighborhood pixels is K 2 first neighborhood pixels, K is a positive integer; the target convolution result includes the central difference convolution values of L channels, L>K 2 ; The predicting, according to the target convolution result, a first similarity between the pixel i and each first neighborhood pixel comprises: Call the channel compressor to perform channel compression on the target convolution result to obtain K 2 Dimensional data; The K 2 The k-th dimension data in the k-th dimension data is used as the first similarity between the pixel i and the k-th first neighboring pixel; wherein k∈[1, K 2 ].
11. The method according to claim 10, characterized in that The channel compressor includes at least a first convolutional layer, wherein the first convolutional layer includes K 2 The first convolution kernel; The channel compressor is called to perform channel compression processing on the target convolution result to obtain K 2 Dimensional data, including: Constructing input data of the first convolution layer using the target convolution result; Call each first convolution kernel in the first convolution layer respectively, perform convolution processing on the input data, and obtain K 2 dimensional data; wherein, the K 2 The k-th dimension data in the dimensional data is obtained by convolving the input data with the k-th first convolution kernel.
12. The method according to claim 11, characterized in that The channel compressor further includes a second convolution layer and an activation layer; wherein the second convolution layer includes H second convolution kernels, where H is a positive integer; The step of adopting the target convolution result to construct input data of the first convolution layer includes: Respectively calling each second convolution kernel in the second convolution layer to perform convolution processing on the target convolution result to obtain H-dimensional data; wherein the h-th dimension data in the H-dimensional data is obtained by performing convolution processing on the target convolution result by the h-th second convolution kernel; Calling the activation layer to perform activation processing on the H-dimensional data to obtain activated H-dimensional data; The activated H-dimensional data is used to construct input data of the first convolutional layer.
13. The method according to claim 12, characterized in that The channel compressor further includes a normalization layer; and the step of using the activated H-dimensional data to construct the input data of the first convolutional layer includes: The normalization layer is called to perform group normalization processing on the activated H-dimensional data to obtain input data of the first convolutional layer.
14. The method according to claim 1, wherein: The size of the upsampling kernel is K×K, and the number of first neighborhood pixels is K 2 first neighborhood pixels, K is a positive integer; The step of using the predicted first similarities to generate an upsampling kernel corresponding to the pixel i includes: Perform Gaussian blur processing on the second feature map to obtain a reference feature map, and determine the K of the pixel i in the reference feature map 2 Second neighbor pixels; Obtaining a second similarity between the pixel i and each second neighborhood pixel; The kth second similarity is integrated with the predicted kth first similarity to obtain the kth integrated similarity corresponding to the pixel i; wherein k∈[1, K 2 ]; Use the K corresponding to the pixel i 2 The similarities are integrated to construct an upsampling kernel corresponding to the pixel i.
15. The method according to claim 14, characterized in that The obtaining of the second similarity between the pixel i and each second neighborhood pixel comprises: Determine second feature data of pixel i based on the second feature map, and determine feature data of each second neighborhood pixel; Based on the K 2 feature data of second neighborhood pixels, performing central difference convolution on the second feature data of the pixel i to obtain a reference convolution result; According to the reference convolution result, a second similarity between the pixel i and each second neighborhood pixel is predicted.
16. The method according to claim 1, wherein: The adopting the upsampling kernel corresponding to the pixel i to upsample the first feature map includes: Get the offset information i corresponding to the pixel i, the offset information i includes K 2 An offset, K is a positive integer; Mapping the pixel i to the first feature map to obtain a mapping point corresponding to the pixel i; Based on the mapping point and K in the offset information i 2 offset, determining the K of the pixel i in the first feature map 2 third neighborhood pixels and feature data of each third neighborhood pixel; Use the upsampling kernel corresponding to the pixel i to 2 The feature data of the third neighboring pixels are upsampled.
17. The method according to claim 1, wherein: The first feature map is generated by performing deep feature extraction processing on the target image, wherein the deep feature extraction processing refers to the processing of extracting deep features, and the deep features contain image semantic information; The obtaining of the second feature map comprises: Get the target image; A shallow feature extraction process is performed on the target image to obtain a second feature map; wherein the shallow feature extraction process refers to a process of extracting shallow features, and the shallow features contain image detail information.
18. The method according to claim 17, characterized in that The step of performing shallow feature extraction on the target image to obtain a second feature map includes: Calling the third convolutional layer to perform feature extraction on the target image to obtain an initial feature map; Performing group normalization processing on the initial feature map to obtain a group-normalized feature map; Performing activation processing on the group of normalized feature maps to obtain an activated feature map; The fourth convolutional layer is called to perform feature extraction on the activated feature map to obtain a second feature map.
19. A feature processing device, characterized in that: include: an acquisition unit, configured to acquire a first feature map to be upsampled, and to acquire a second feature map; the first feature map and the second feature map are generated by performing feature extraction processing in different ways on the same image, and the feature data in the second feature map includes image detail information; a processing unit, configured to determine a plurality of first neighborhood pixels of pixel i and feature data of each first neighborhood pixel based on the first feature map, and to determine first feature data of the pixel i based on the second feature map; i∈[1,I], I is the number of pixels in the second feature map; The processing unit is further configured to perform a center difference convolution on the first feature data of the pixel i based on the feature data of the plurality of first neighborhood pixels to obtain a target convolution result; The processing unit is further configured to predict a first similarity between the pixel i and each first neighborhood pixel according to the target convolution result; and generate an upsampling kernel corresponding to the pixel i using each predicted first similarity; The processing unit is further used to upsample the first feature map using an upsampling kernel corresponding to the pixel i.
20. A computer device comprising an input interface and an output interface, characterized in that: Also includes: processor and computer storage media; The processor is suitable for implementing one or more instructions, the computer storage medium stores one or more instructions, and the one or more instructions are suitable for being loaded by the processor and executing the feature processing method as described in any one of claims 1-18.
Citation Information
Patent Citations
Target detection loss optimization method based on pixel feature matching
CN114998701A
Upsampling blocks of pixels
GB202214437D0
Image conversion apparatus and method thereof
KR1020120127151A
Model training method, image processing method, computing and processing device and non-transient computer-readable medium
US20240233313A1
