WO2023125522A1 - 一种图像处理方法及装置 - Google Patents
一种图像处理方法及装置 Download PDFInfo
- Publication number
- WO2023125522A1 WO2023125522A1 PCT/CN2022/142286 CN2022142286W WO2023125522A1 WO 2023125522 A1 WO2023125522 A1 WO 2023125522A1 CN 2022142286 W CN2022142286 W CN 2022142286W WO 2023125522 A1 WO2023125522 A1 WO 2023125522A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- feature
- fused
- features
- fusion
- sampling
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 55
- 238000012545 processing Methods 0.000 claims abstract description 105
- 238000000034 method Methods 0.000 claims abstract description 80
- 238000000605 extraction Methods 0.000 claims abstract description 25
- 230000004927 fusion Effects 0.000 claims description 227
- 238000005070 sampling Methods 0.000 claims description 159
- 230000008569 process Effects 0.000 claims description 42
- 238000004590 computer program Methods 0.000 claims description 19
- 208000037170 Delayed Emergence from Anesthesia Diseases 0.000 claims description 6
- 238000000354 decomposition reaction Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 13
- 230000000694 effects Effects 0.000 description 7
- 230000010354 integration Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000008602 contraction Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 238000004800 variational method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/77—Retouching; Inpainting; Scratch removal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/80—Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
Definitions
- the present invention relates to the technical field of image processing, in particular to an image processing method and device.
- Image restoration refers to the restoration and reconstruction of damaged images or the removal of redundant objects in images.
- the present invention provides an image processing method and device, and the technical solution is as follows:
- an embodiment of the present invention provides an image processing method, including:
- Feature extraction is performed on images to be processed from a plurality of different spatial scales respectively, and target features and at least one feature to be fused are obtained;
- the image to be processed is processed based on the fusion feature.
- the extracting the high-frequency features and low-frequency features in the target features includes:
- the method further includes:
- the high-frequency features and the low-frequency features are respectively processed through a convolutional layer, so as to reduce the number of channels of the high-frequency features and the low-frequency features to a preset value.
- the merging the low-frequency feature and the at least one feature to be fused to obtain a third feature includes:
- a fusion feature corresponding to the last feature to be fused in the first ranking result is determined as the third feature.
- the merging the first feature to be fused and the low-frequency feature to obtain the fused feature corresponding to the first feature to be fused includes:
- the first sampling feature has the same spatial scale as the first feature to be fused
- the second sampling feature has the same spatial scale as the low-frequency feature
- the fusion of other features to be fused in the first sorting result and the fusion feature corresponding to the previous feature to be fused one by one, and obtaining other features in the first sorting result Fusion features corresponding to features to be fused including:
- the fourth sampling feature has the same spatial scale as the fusion feature corresponding to the m-1th feature to be fused;
- the merging the target feature and the at least one feature to be fused to obtain the first feature includes:
- the merging the sixth feature and the at least one feature to be fused to obtain an eighth feature includes:
- the second feature to be fused is the first feature to be fused in the second sorting result
- the merging the second feature to be fused with the sixth feature, and obtaining the fused feature corresponding to the second feature to be fused includes:
- the sixth sampling feature is sampled by the third difference feature, and the sixth sampling feature has the same spatial scale as the sixth feature;
- Addition and fusion are performed on the sixth feature and the sixth sampling feature to generate a fusion feature corresponding to the second feature to be fused.
- the fusion of other features to be fused in the second sorting result and the fusion feature corresponding to the previous feature to be fused one by one, and obtaining other features in the second sorting result Fusion features corresponding to features to be fused including:
- n is an integer greater than 1;
- the dividing the target feature into a fifth feature and a sixth feature includes:
- the target feature is divided into a fifth feature and a sixth feature based on the feature channel of the target feature.
- an embodiment of the present invention provides an image processing method, including:
- the encoding module includes L cascaded encoders with different spatial scales, and the i-th encoder is used for feature extraction of the image to be processed Obtaining the image features on the i-th encoder, and acquiring the fusion features output by all encoders before the i-th encoder, and obtaining the image features according to any one of claims 1-11.
- the decoding module includes L cascaded decoders with different spatial scales
- the jth decoder is used for fusing the image features of the encoding module on the jth encoder with the fusion results output by all decoders before the jth decoder to generate the fusion result of the jth decoder, and combining the The fusion result of the jth decoder is output to all decoders after the jth decoder.
- the processing the restoration feature by the decoding module to obtain the processing result image of the image to be processed includes:
- an image processing device including:
- the feature extraction unit is used to perform feature extraction from images to be processed on multiple different spatial scales, and obtain target features and at least one feature to be fused;
- a first processing unit configured to fuse the target feature and the at least one feature to be fused to obtain a first feature
- the second processing unit is configured to extract high-frequency features and low-frequency features in the target features, process the high-frequency features based on the residual dense block RDB, obtain second features, and process the low-frequency features and the At least one feature to be fused is fused to obtain a third feature;
- a fusion unit configured to combine the first feature, the second feature and the third feature to obtain a fusion feature
- the third processing unit is configured to process the image to be processed based on the fusion feature.
- the second processing unit is specifically configured to perform discrete wavelet decomposition on the target feature to obtain a fourth feature
- the second processing unit is further configured to separately process the high-frequency features and the low-frequency features through a convolutional layer, so as to combine the high-frequency features and The number of channels of the low frequency feature is reduced to a preset value.
- the second processing unit is specifically configured to perform descending order on the at least one feature to be fused according to the spatial scale difference between the at least one feature to be fused and the low-frequency feature Sorting, obtaining the first sorting result; fusing the first feature to be fused and the low-frequency feature to obtain the fusion feature corresponding to the first feature to be fused, the first feature to be fused is the first in the first sorting result A feature to be fused; merging other features to be fused in the first sorting result and fusion features corresponding to the previous feature to be fused one by one, obtaining fusion features corresponding to other features to be fused in the first sorting result; A fusion feature corresponding to the last feature to be fused in the first ranking result is determined as the third feature.
- the second processing unit is specifically configured to sample the low-frequency feature as a first sampling feature; the first sampling feature and the first feature to be fused
- the spatial scale is the same; calculating the difference between the first sampling feature and the first feature to be fused to obtain the first difference feature; sampling the first difference feature as a second sampling feature; the second sampling The feature has the same spatial scale as the low-frequency feature; the low-frequency feature and the second sampling feature are added and fused to generate a fused feature corresponding to the first feature to be fused.
- the second processing unit is specifically configured to sample the fusion feature corresponding to the m-1th feature to be fused in the first sorting result as the third sampling feature ;
- the third sampling feature has the same spatial scale as the mth feature to be fused in the first sorting result, and m is an integer greater than 1; calculate the mth feature to be fused and the third sampling feature The difference of the second difference feature is obtained; the second difference feature is sampled as a fourth sampling feature; the fourth sampling feature is the spatial scale of the fusion feature corresponding to the m-1th feature to be fused The same; the fusion feature corresponding to the m-1th feature to be fused and the fourth sampling feature are added and fused to generate the fusion feature corresponding to the mth feature to be fused.
- the first processing unit is specifically configured to divide the target feature into a fifth feature and a sixth feature; based on the residual dense block RDB, the fifth feature performing processing to obtain a seventh feature; fusing the sixth feature and the at least one feature to be fused to obtain an eighth feature; merging the seventh feature and the eighth feature to generate the first feature.
- the first processing unit is specifically configured to perform the at least one feature to be fused according to the spatial scale difference between the at least one feature to be fused and the sixth feature Sorting in descending order to obtain the second sorting result; fusing the second feature to be fused with the sixth feature to obtain the fusion feature corresponding to the second feature to be fused, the second feature to be fused is in the second sorting result
- the first feature to be fused; the other features to be fused in the second sorting result and the fusion features corresponding to the previous feature to be fused are fused one by one, and the fusion features corresponding to other features to be fused in the second sorting result are obtained ; Determining the fused feature corresponding to the last feature to be fused in the second sorting result as the eighth feature.
- the first processing unit is specifically configured to sample the sixth feature as a fifth sampling feature, and the fifth sampling feature and the second feature to be fused
- the spatial scales are the same; calculate the difference between the fifth sampling feature and the first feature to be fused in the second sorting result, and obtain the third difference feature; sample the third difference feature for the first Six sampling features, the sixth sampling feature has the same spatial scale as the sixth feature; add and fuse the sixth feature and the sixth sampling feature to generate a fusion corresponding to the second feature to be fused feature.
- the first processing unit is specifically configured to sample the fusion feature corresponding to the n-1th feature to be fused in the second sorting result as the seventh sampling feature ;
- the seventh sampling feature has the same spatial scale as the nth feature to be fused in the second sorting result, and n is an integer greater than 1; calculate the nth feature to be fused and the seventh sampling feature The difference of the fourth difference feature is obtained; the fourth difference feature is sampled as the eighth sampling feature, and the eighth sampling feature is the spatial scale of the fusion feature corresponding to the n-1th feature to be fused The same; the fusion feature corresponding to the n-1th feature to be fused and the eighth sampling feature are added and fused to generate the fusion feature corresponding to the nth feature to be fused.
- the first processing unit is specifically configured to divide the target feature into a fifth feature and a sixth feature based on a feature channel of the target feature.
- an image processing device including:
- the feature extraction unit is used to process the image to be processed through the encoding module to obtain encoding features; wherein, the encoding module includes L cascaded encoders with different spatial scales, and the i-th encoder is used for the Perform feature extraction on the image to be processed to obtain image features on the i-th encoder, and obtain fusion features output by all encoders before the i-th encoder, and obtain any one of claims 1-11.
- the image processing method obtains the fusion feature of the i-th encoder, and outputs the fusion feature of the i-th encoder to all encoders after the i-th encoder, L and i are positive integers , and i ⁇ L;
- a feature processing unit configured to process the encoded features through a feature restoration module composed of at least one residual block RDB to obtain restored features;
- An image generating unit configured to process the restored features through a decoding module, and obtain a processing result image of the image to be processed; wherein, the decoding module includes L cascaded decoders with different spatial scales,
- the jth decoder is used to fuse the image features of the encoding module on the jth encoder and the fusion results of all decoder outputs before the jth decoder to generate the jth decoder. Fusion results, and output the fusion results of the jth decoder to all decoders after the jth decoder.
- the image generation unit is specifically configured to divide the image features on the jth decoder into ninth features and tenth features;
- the ninth feature is processed to obtain the eleventh feature;
- the fusion results of the tenth feature and the output of all decoders before the jth decoder are fused to obtain the twelfth feature;
- the tenth feature is merged A feature and the twelfth feature, generating a fusion result of the jth decoder.
- an embodiment of the present invention provides an electronic device, including: a memory and a processor, the memory is used to store a computer program; the processor is used to enable the electronic device to implement any of the above when calling the computer program An image processing method.
- an embodiment of the present invention provides a computer-readable storage medium.
- the computing device When the computer program is executed by a computing device, the computing device is enabled to implement any one of the above-mentioned image processing methods.
- an embodiment of the present invention provides a computer program product, which enables the computer to implement any one of the above image processing methods when the computer program product is run on a computer.
- the target feature and the at least one feature to be fused are The features are fused to obtain the first feature; on the other hand, the high-frequency features and low-frequency features in the target feature are extracted, and the high-frequency features are processed based on the residual dense block RDB to obtain the second feature, and the low-frequency
- the feature and the at least one feature to be fused are fused to obtain a third feature; finally, the first feature, the second feature and the third feature are combined to obtain a fusion feature, and the to-be-processed feature is processed based on the fusion feature
- the image is processed.
- the processing of features based on RDB can perform feature update and generation of redundant features
- the fusion of low-frequency features and features to be fused can realize the introduction of effective information in features of other spatial scales, and realize multi-scale feature fusion. Therefore, the embodiment of the present invention
- the image processing method provided can ensure the generation of new high-frequency features when realizing multi-scale feature fusion of low-frequency features, and the fusion of the target feature and the at least one feature to be fused can further realize the integration of features of other spatial scales Effective information is introduced, so the image processing method provided by the embodiment of the present invention can improve the effect of image processing.
- Fig. 1 is one of the flow charts of the steps of the image processing method provided by the embodiment of the present invention.
- Fig. 2 is one of the schematic structural diagrams of the feature fusion network provided by the embodiment of the present invention.
- Fig. 3 is one of the data flow schematic diagrams of the image processing method provided by the embodiment of the present invention.
- Fig. 4 is the second schematic diagram of the data flow of the image processing method provided by the embodiment of the present invention.
- FIG. 5 is the second flowchart of the steps of the image processing method provided by the embodiment of the present invention.
- Fig. 6 is the second schematic structural diagram of the feature fusion network provided by the embodiment of the present invention.
- FIG. 7 is a flowchart of steps of an image processing method provided by an embodiment of the present invention.
- FIG. 8 is a schematic structural diagram of an image processing network provided by an embodiment of the present invention.
- FIG. 9 is a schematic structural diagram of an image processing device provided by an embodiment of the present invention.
- FIG. 10 is a schematic structural diagram of an image processing device provided by an embodiment of the present invention.
- FIG. 11 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present invention.
- words such as “exemplary” or “for example” are used as examples, illustrations or illustrations. Any embodiment or design solution described as “exemplary” or “for example” in the embodiments of the present invention shall not be construed as being more preferred or more advantageous than other embodiments or design solutions. Rather, the use of words such as “exemplary” or “such as” is intended to present related concepts in a concrete manner.
- the meaning of "plurality” refers to two or more.
- Image restoration refers to the restoration and reconstruction of damaged images or the removal of redundant objects in images.
- Traditional image processing methods include: image processing methods based on partial differential equations, restoration methods based on global variational methods, restoration methods based on texture synthesis, etc.
- the efficiency of these image processing methods is generally low, and the prior information in the image is easily fail.
- the method based on deep learning has been widely used in various computer vision tasks, which also includes image restoration.
- the performance of current deep learning-based image inpainting network models in terms of detail generation needs to be improved.
- an embodiment of the present invention provides an image processing method. Referring to the flow chart of the steps of the image processing method shown in FIG. 1 and the structural diagram of the feature fusion network shown in FIG. 2, the image processing method includes:
- the target feature in the embodiment of the present invention refers to a feature that needs to be fused and enhanced
- the feature to be fused refers to a feature used to perform fusion and enhancement on the target feature.
- feature extraction may be performed on the image to be processed based on feature extraction functions or feature extraction networks of different spatial scales, so as to obtain the target feature and the at least one feature to be fused.
- Embodiments of the present invention do not limit the implementation manner of merging the target feature and the at least one feature to be fused, and the target feature and the at least one feature to be fused may be fused in any feature fusion manner.
- step S13 extracting high-frequency features and low-frequency features in the target features.
- the channel of the feature in the embodiment of the present invention refers to the feature map (feature map) contained in the feature.
- a channel of the feature is the feature map obtained by extracting the feature based on a certain dimension. Therefore, the channel of the feature is is a feature map in a specific sense.
- the size of the target feature is 16*H*W
- the size of the fourth feature is 64*H/2*W/2
- the feature of the 1-16th channel can be determined as the low-frequency feature
- the 17th feature The characteristics of -48 channels are determined as the high frequency characteristics.
- the image processing method provided in the embodiment of the present invention further includes:
- the high-frequency features and the low-frequency features are respectively processed through a convolutional layer, so as to reduce the number of channels of the high-frequency features and the low-frequency features to a preset value.
- the preset value may be 8. That is, the channel numbers of the high-frequency features and the low-frequency features are respectively compressed to 8 through two convolutional layers.
- the convolution kernel (kerne_size) of the convolution layer used to process the high-frequency features and the low-frequency features is 3*3
- the stride (stride) is 2.
- Reducing the number of channels of the high-frequency feature and the low-frequency feature to a preset value can reduce the amount of data processing in the process of feature fusion, thereby improving the efficiency of feature fusion.
- the residual dense block in the embodiment of the present invention includes three main parts, the three parts are: Contiguous Memory (CM), Local Feature Fusion (Local Feature Fusion, LFF) and Local Residual Learning (Local Residual Learning, LRL).
- CM Contiguous Memory
- LFF Local Feature Fusion
- LRL Local Residual Learning
- CM is mainly used to send the output of the previous RDB to each convolutional layer of the current RDB
- LFF is mainly used to fuse the output of the previous RDB with the output of all convolutional layers of the current RDB
- LRL is mainly used It is to add and fuse the output of the previous RDB and the output of the LFF of the current RDB, and use the result of the addition and fusion as the output of the current RDB.
- RDB can perform feature update and redundant feature generation
- processing high-frequency features based on residual dense blocks can increase the diversity of high-frequency features, thereby enriching the details in the effect image.
- step S15 (fusing the low-frequency feature and the at least one feature to be fused to obtain the third feature) includes the following steps a to d:
- Step a sort the at least one feature to be fused in descending order according to the spatial scale difference between the at least one feature to be fused and the low-frequency feature, and obtain a first sorting result.
- the spatial scale difference between the feature to be fused and the low-frequency feature refers to a difference between the spatial scale of the feature to be fused and the low-frequency feature.
- the spatial scale of a feature to be fused in the at least one feature to be fused is greater than the spatial scale of the low-frequency feature, the higher the position of the feature to be fused in the first sorting result is, and if The smaller the difference between the spatial scale of a feature to be fused and the low-frequency feature is, the lower the position of the feature to be fused is in the first ranking result.
- Step b Fuse the first feature to be fused with the low-frequency feature, and obtain a fused feature corresponding to the first feature to be fused.
- the first feature to be fused is the first feature to be fused in the first ranking result.
- the first feature to be fused (the first feature to be fused) in the first sorting result is J 0
- the low-frequency feature is j n2 to illustrate the above step b.
- the implementation of the above step b may include the following steps 1 to 4:
- Step 1 Sampling the low-frequency feature j n2 as the first sampling feature
- the first sampling feature is the same as the spatial scale of the first feature to be fused J 0 .
- sampling in the above steps can be up-sampling or down-sampling, which is specifically determined by the spatial scale of the first to-be-fused J 0 and the spatial scale of the low-frequency feature j n2 in the first sorting result.
- Step 2 calculating the first sampling feature The difference with the first feature to be fused J 0 in the first sorting result to obtain the first difference feature
- step 2 The process of the above step 2 can be described as:
- Step 3 the first difference feature Sampling is the second sampling feature
- the second sampling feature It is the same as the spatial scale of the low-frequency feature j n2 .
- sampling in the above steps can be up-sampling or down-sampling, specifically determined by the first difference feature
- the spatial scale of is determined by the spatial scale of the low-frequency feature j n2 .
- Step 4 for the low frequency feature j n2 and the second sampling feature Addition and fusion are performed to generate the fused feature J 0 n corresponding to the first feature to be fused J 0 .
- step 4 The process of the above step 4 can be described as:
- Step c Fusing other features to be fused in the first sorting result with fusion features corresponding to the previous feature to be fused one by one, and obtaining fusion features corresponding to other features to be fused in the first sorting result.
- the fusion feature corresponding to the mth (a positive integer greater than 1) feature to be fused and the previous feature to be fused (the m-1th feature to be fused) in the first sorting result is fused
- the implementation method includes the following steps I to VI:
- Step 1 Sampling the fused feature corresponding to the m-1th feature to be fused in the first ranking result as the third sampled feature.
- the spatial scale of the third sampling feature is the same as that of the mth feature to be fused in the first sorting result.
- Step II calculating the difference between the mth feature to be fused and the third sampling feature to obtain a second difference feature.
- Step III Sampling the second difference feature as a fourth sampling feature.
- the spatial scale of the fusion feature corresponding to the fourth sampling feature is the same as the fusion feature corresponding to the m-1th feature to be fusion.
- Step VI Add and fuse the fused feature corresponding to the m-1 th feature to be fused and the fourth sampling feature to generate a fused feature corresponding to the m th feature to be fused.
- the difference between the fusion result of the mth feature to be fused in the first sorting result obtained in steps I to VI and the fusion result of the first feature to be fused in the first sorting result obtained in steps 1 to 4 is only that :
- the input is the third feature and the first feature to be fused, and when obtaining the fusion result of the mth feature to be fused, the input is corresponding to the m-1th feature to be fused
- the fused feature and the mth feature to be fused, and the rest of the calculation methods are the same.
- the first sorting result sequentially includes: the feature to be fused J 0 , the feature to be fused J 1 , the feature to be fused J 2 , ..., the feature to be fused J t as an example.
- the above step c will be described.
- obtain the fusion feature J0n corresponding to the first feature to be fused in the first sorting result obtain the fusion feature corresponding to other features to be fused in the first sorting result
- the process includes:
- the difference feature corresponding to the second feature to be fused J 1 Sampling is a feature with the same spatial scale as the fusion result J 0 n of the first feature to be fused J 0 , and obtains the second sampling feature corresponding to the second feature to be fused J 1
- the fusion result J 1 n of the second feature to be fused J 1 is sampled as a feature with the same spatial scale as the third feature to be fused J 2 , and the first sampling feature corresponding to the third feature to be fused is generated
- the difference feature corresponding to the third feature to be fused J 2 Sampling is a feature with the same spatial scale as the fusion result J 1 n of the second feature to be fused J 1 , and obtains the second sampling feature corresponding to the third feature to be fused J 2
- the fourth feature to be fused J 3 , the fifth feature to be fused J 4 , ..., the t-th feature to be fused J t-1 and the t+1 th feature to be fused in the first ranking result are obtained one by one Fusion result J t n of feature J t .
- Step d Determine the fused feature corresponding to the last feature to be fused in the first ranking result as the third feature.
- the first sorting result sequentially includes: the feature to be fused J 0 , the feature to be fused J 1 , the feature to be fused J 2 , ..., the feature to be fused J t , so the first sorting result
- the fusion result J t n of the last feature to be fused J t among the results is determined as the third feature.
- the embodiment of the present invention divides two feature processing branches into feature processing, wherein one feature processing branch performs the feature processing steps of the above-mentioned step S12, and the other feature processing branch performs the above-mentioned feature processing steps of the steps S13 to S15 .
- Steps S13 to S15 can be executed first, and then step S12 can be executed, or step S12 can be executed first, and then executed Steps S13 to S15 may also be executed simultaneously.
- combining the second feature, the third feature, and the first feature may include: connecting the second feature, the third feature, and the first feature in series in a channel dimension.
- An embodiment of the present invention provides an image processing method that can be used in any image processing scene.
- the image processing method provided by the embodiment of the present invention may be an image defogging method; for another example: the image processing method provided by the embodiment of the present invention may also be an image enhancement method.
- the image processing method provided in the embodiment of the present invention may also be an image super-resolution method.
- the target feature and the at least one feature to be fused are The features are fused to obtain the first feature; on the other hand, the high-frequency features and low-frequency features in the target feature are extracted, and the high-frequency features are processed based on the residual dense block RDB to obtain the second feature, and the low-frequency
- the feature and the at least one feature to be fused are fused to obtain a third feature; finally, the first feature, the second feature and the third feature are combined to obtain a fusion feature, and based on the fusion feature, the to-be-processed The image is processed.
- the processing of features based on RDB can perform feature update and generation of redundant features
- the fusion of low-frequency features and features to be fused can realize the introduction of effective information in features of other spatial scales, and realize multi-scale feature fusion. Therefore, the embodiment of the present invention
- the image processing method provided can ensure the generation of new high-frequency features when realizing the multi-scale feature fusion of low-frequency features, and the fusion of the target feature and the at least one feature to be fused can further realize the integration of features of other spatial scales Effective information is introduced, so the image processing method provided by the embodiment of the present invention can improve the effect of image processing.
- an embodiment of the present invention provides another image processing method. Referring to the flowchart of the steps of the image processing method shown in FIG. 5 and the structural diagram of the feature fusion network shown in FIG. 6, The image processing method comprises the steps of:
- S51 Perform feature extraction from multiple different spatial scales of the image to be processed, and acquire target features and at least one feature to be fused.
- the dividing the target feature into fifth feature and sixth feature includes:
- the target feature is divided into a fifth feature and a sixth feature based on the feature channel of the target feature.
- the ratio of the fifth feature and the sixth feature is not limited in the embodiment of the present invention.
- the ratio of the fifth feature to the sixth feature is determined based on the amount of effective information of the features of the spatial scale and the amount of new features that need to be generated.
- the ratio of the fifth feature to the sixth feature may be 1:1.
- step S54 (merging the sixth feature and the at least one feature to be fused to obtain an eighth feature) includes:
- Fusing the second feature to be fused with the sixth feature obtaining the fusion feature corresponding to the second feature to be fused, the second feature to be fused is the first feature to be fused in the second sorting result;
- the merging the second feature to be fused with the sixth feature, and obtaining the fused feature corresponding to the second feature to be fused includes:
- Addition and fusion are performed on the sixth feature and the sixth sampling feature to generate a fusion feature corresponding to the second feature to be fused.
- the merging of the other features to be fused in the second sorting result and the fusion features corresponding to the last feature to be fused one by one, and obtaining the fusion features corresponding to the other features to be fused in the second sorting result include:
- n is an integer greater than 1;
- step S54 in the example, reference may be made to the implementation of step S14 above, which will not be repeated here.
- the first feature is generated by first combining the seventh feature and the eighth feature, and then combining the second feature, the third feature and the first feature,
- the generation of the target feature and the fusion feature is shown as an example, but in the actual execution process, the second feature, the third feature, the seventh feature and the eighth feature can also be synthesized and merged through the same step, Generate the fused features.
- the target feature and the at least one feature to be fused are The features are fused to obtain the first feature; on the other hand, the high-frequency features and low-frequency features in the target feature are extracted, and the high-frequency features are processed based on the residual dense block RDB to obtain the second feature, and the low-frequency
- the feature and the at least one feature to be fused are fused to obtain a third feature; finally, the first feature, the second feature and the third feature are combined to obtain a fusion feature, and based on the fusion feature, the to-be-processed The image is processed.
- the processing of features based on RDB can perform feature update and generation of redundant features
- the fusion of low-frequency features and features to be fused can realize the introduction of effective information in features of other spatial scales, and realize multi-scale feature fusion. Therefore, the embodiment of the present invention
- the image processing method provided can ensure the generation of new high-frequency features when realizing the multi-scale feature fusion of low-frequency features, and the fusion of the target feature and the at least one feature to be fused can further realize the integration of features of other spatial scales Effective information is introduced, so the image processing method provided by the embodiment of the present invention can improve the effect of image processing.
- the above embodiment divides the target feature into the fifth feature and the sixth feature, and only makes the sixth feature participate in the multi-spatial scale feature fusion, so the above embodiment can also reduce the number of features that need to be fused (the feature of the sixth feature The number of features is less than the number of target features), thereby reducing the calculation amount of feature fusion and improving the efficiency of feature fusion.
- an embodiment of the present invention further provides an image processing method.
- the image processing method provided by the embodiment of the present invention includes the following steps S71 to S73:
- the encoding module includes L cascaded encoders with different spatial scales
- the mth encoder is used to perform feature extraction on the image to be processed to obtain image features on the ith encoder, and obtaining the fusion features of all encoder outputs before the i-th encoder, and obtaining the fusion features of the i-th encoder through the image processing method described in any one of claims 1-11, and converting the The fusion feature of the i-th encoder is output to all encoders after the i-th encoder, L and i are both positive integers, and i ⁇ L.
- the decoding module includes L cascaded decoders with different spatial scales
- the jth decoder is used to fuse the image features of the encoding module on the jth encoder with the jth
- the encoding module, feature restoration module, and decoding module used to implement the embodiment shown in FIG. 7 above form a U-Net.
- the U-Net is a special convolutional neural network.
- the U-Net neural network mainly includes: an encoding module (also known as a contraction path), a feature restoration module, and a decoding module (also known as an expansion path. ).
- the encoding module is mainly used to capture the context information in the original image, and the corresponding decoding module is used to accurately localize the part that needs to be segmented in the original image, and then generate the processed image. Image.
- the improvement of U-Net is that in order to accurately locate the parts that need to be segmented in the original image, the features extracted from the encoding module will be in the U-Net.
- the upsampling process is combined with a new feature map to preserve the important information in the feature to the greatest extent, thereby reducing the number of training samples and the demand for computing resources.
- the processing the restoration feature by the decoding module to obtain the processing result image of the image to be processed includes:
- the network model used to implement the embodiment shown in FIG. 7 includes: an encoding module 81 forming a U-shaped network, a feature restoration module 82 and a decoding module 83 .
- the encoding module 81 includes L cascaded encoders with different spatial scales, which are used to process the image I to be processed and obtain the encoding feature i L .
- the jth decoder is used to fuse the image features of the encoding module on the jth encoder with the fusion results output by all decoders before the jth decoder to generate the jth decoding The fusion result of the decoder, and output the fusion result of the jth decoder to all decoders after the jth decoder.
- the feature restoration module 82 includes at least one RDB for receiving the encoded feature i L output by the encoding module 81, and processing the encoded feature i L through the at least one RDB to obtain the restored feature j L .
- the decoding module 83 includes L cascaded decoders with different spatial scales, and the jth decoder is used to fuse the image features of the encoding module on the jth encoder with the jth
- the fusion result output by all decoders before the decoder, generating the fusion result of the jth decoder, and outputting the fusion result of the jth decoder to all decoders after the jth decoder ; and according to the fusion result j 1 output by the last decoder, acquire the processing result image J of the image I to be processed.
- the mth encoder in the encoding module 81 fuses the image features of the encoding module on the mth encoder with all encoders before the mth encoder (the first The operation of the fusion result output from the first encoder to the m-1th encoder) can be described as:
- i m i m1 +i m2
- i m i GF +i LF
- i m represents the feature of the encoding module 81 on the m-th encoder
- i GF represents the high-frequency feature extracted from i m
- f((7) represents the operation of processing the feature based on RDB
- i LF represents the low-frequency features extracted from i m
- i m1 represents the fifth feature obtained by dividing i m
- i m2 represents the sixth feature obtained by dividing im , means for i m2 and The fusion result obtained by fusion
- the mth decoder in the decoding module 83 fuses the image features of the decoding module on the mth decoder and all decoders before the mth decoder (the Lth
- the operation of the fusion result output from the first decoder to the m+1th decoder can be described as:
- j m represents the feature of the decoding module 83 in the m-th decoder
- j m1 represents the ninth feature obtained by dividing j m
- f((7) represents the operation of processing the feature based on RDB
- j m2 represents the tenth feature obtained by dividing j m
- L is the total number of decoders in the decoding module 83
- Represents the fusion result output from the L-th decoder to the m+1-th decoder means that for j m2 and perform the fusion operation
- means that for j m2 and The fusion result obtained by fusion Indicates the fusion result output by the mth decoder of the decoding module 83 .
- the image processing method provided in the embodiment of the present invention can perform feature fusion through the image processing method provided in the above embodiment, the image processing method provided in the embodiment of the present invention can ensure new high-frequency Therefore, the image processing method provided by the embodiment of the present invention can improve the effect of image processing.
- the embodiment of the present invention also provides an image processing device, the device embodiment corresponds to the aforementioned method embodiment, for the sake of easy reading, this device embodiment does not implement the aforementioned method
- the image processing apparatus in this embodiment can correspondingly implement all the content in the foregoing method embodiments.
- FIG. 9 is a schematic structural diagram of the image processing device. As shown in FIG. 9, the image processing device 900 includes:
- a feature extraction unit 91 configured to perform feature extraction from a plurality of different spatial scales of images to be processed, and obtain target features and at least one feature to be fused;
- the first processing unit 92 is configured to fuse the target feature and the at least one feature to be fused to obtain a first feature
- the second processing unit 93 is configured to extract high-frequency features and low-frequency features in the target features, process the high-frequency features based on the residual dense block RDB, obtain second features, and process the low-frequency features and the low-frequency features
- the at least one feature to be fused is fused to obtain a third feature
- a fusion unit 94 configured to combine the first feature, the second feature and the third feature to obtain a fusion feature
- the third processing unit 95 is configured to process the image to be processed based on the fusion feature.
- the second processing unit 93 is specifically configured to perform discrete wavelet decomposition on the target feature to obtain a fourth feature
- the second processing unit 93 is further configured to process the high-frequency features and the low-frequency features through convolutional layers, so that the high-frequency features and the number of channels of the low frequency feature is reduced to a preset value.
- the second processing unit 93 is specifically configured to perform the at least one feature to be fused according to the spatial scale difference between the at least one feature to be fused and the low-frequency feature Sorting in descending order to obtain the first sorting result; fusing the first feature to be fused and the low-frequency feature to obtain the fusion feature corresponding to the first feature to be fused, the first feature to be fused is the first sorting result The first feature to be fused; merging the other features to be fused in the first sorting result and the fusion features corresponding to the previous feature to be fused one by one, and obtaining the fusion features corresponding to the other features to be fused in the first sorting result; A fusion feature corresponding to the last feature to be fused in the first ranking result is determined as the third feature.
- the second processing unit 93 is specifically configured to sample the low-frequency feature as a first sampling feature; the first sampling feature and the first feature to be fused
- the spatial scales are the same; calculate the difference between the first sampling feature and the first feature to be fused, and obtain the first difference feature; sample the first difference feature as the second sampling feature; the second The sampling feature has the same spatial scale as the low-frequency feature; the low-frequency feature and the second sampling feature are added and fused to generate a fused feature corresponding to the first feature to be fused.
- the second processing unit 93 is specifically configured to sample the fused feature corresponding to the m-1th feature to be fused in the first sorting result as the third sample feature; the third sampling feature has the same spatial scale as the mth feature to be fused in the first sorting result, and m is an integer greater than 1; calculate the mth feature to be fused and the third sampling The difference of the feature, obtaining the second difference feature; sampling the second difference feature as the fourth sampling feature; the space of the fusion feature corresponding to the fourth sampling feature and the m-1th feature to be fused The scales are the same; the fused feature corresponding to the m-1 th feature to be fused and the fourth sampling feature are added and fused to generate the fused feature corresponding to the m th feature to be fused.
- the first processing unit 92 is specifically configured to divide the target feature into a fifth feature and a sixth feature; based on the residual dense block RDB, the fifth Processing the features to obtain the seventh feature; fusing the sixth feature and the at least one feature to be fused to obtain the eighth feature; merging the seventh feature and the eighth feature to generate the first feature .
- the first processing unit 92 is specifically configured to process the at least one feature to be fused according to the spatial scale difference between the at least one feature to be fused and the sixth feature Sorting in descending order to obtain a second sorting result; fusing the second feature to be fused with the sixth feature to obtain a fusion feature corresponding to the second feature to be fused, the second feature to be fused is the second sorting result
- the first feature to be fused in the second sorting result; the other features to be fused in the second sorting result and the fusion feature corresponding to the previous feature to be fused are fused one by one, and the fusion features corresponding to the other features to be fused in the second sorting result are obtained feature; determining the fused feature corresponding to the last feature to be fused in the second sorting result as the eighth feature.
- the first processing unit 92 is specifically configured to sample the sixth feature into a fifth sampling feature, and the fifth sampling feature is combined with the second to-be-fused feature.
- the spatial scale of the features is the same; calculate the difference between the fifth sampling feature and the first feature to be fused in the second sorting result, and obtain the third difference feature; sample the third difference feature A sixth sampling feature, where the sixth sampling feature has the same spatial scale as the sixth feature; adding and fusing the sixth feature and the sixth sampling feature to generate a corresponding to the second feature to be fused Fusion features.
- the first processing unit 92 is specifically configured to sample the fused feature corresponding to the n-1 th feature to be fused in the second sorting result as the seventh sample feature; the seventh sampling feature has the same spatial scale as the nth feature to be fused in the second sorting result, and n is an integer greater than 1; calculate the nth feature to be fused and the seventh sampling The difference of the feature, obtaining the fourth difference feature; sampling the fourth difference feature as the eighth sampling feature, the space of the fusion feature corresponding to the eighth sampling feature and the n-1th feature to be fused The scales are the same; the fused feature corresponding to the n-1 th feature to be fused and the eighth sampling feature are added and fused to generate the fused feature corresponding to the n th feature to be fused.
- the first processing unit 92 is specifically configured to divide the target feature into a fifth feature and a sixth feature based on a feature channel of the target feature.
- the image processing apparatus provided in this embodiment can execute the image processing method provided in the foregoing method embodiment, and its implementation principle and technical effect are similar, and details are not repeated here.
- the embodiment of the present invention also provides an image processing device, the device embodiment corresponds to the aforementioned method embodiment, for the sake of easy reading, this device embodiment does not implement the aforementioned method
- the image processing apparatus in this embodiment can correspondingly implement all the content in the foregoing method embodiments.
- FIG. 10 is a schematic structural diagram of the image processing device. As shown in FIG. 10, the image processing device 100 includes:
- the feature extraction unit 101 is configured to process the image to be processed through the encoding module to obtain encoding features; wherein, the encoding module includes L cascaded encoders with different spatial scales, and the i-th encoder is used for all Perform feature extraction on the image to be processed to obtain image features on the i-th encoder, and obtain fusion features output by all encoders before the i-th encoder, and through any one of claims 1-11
- the image processing method described above obtains the fusion feature of the i-th encoder, and outputs the fusion feature of the i-th encoder to all encoders after the i-th encoder, and L and i are both positive Integer, and i ⁇ L;
- a feature processing unit 102 configured to process the encoded features through a feature restoration module composed of at least one residual block RDB to obtain restored features;
- the image generation unit 103 is configured to process the restoration feature through a decoding module, and obtain a processing result image of the image to be processed; wherein, the decoding module includes L cascaded decoders with different spatial scales , the jth decoder is used to fuse the image features of the encoding module on the jth encoder with the fusion results of all decoder outputs before the jth decoder, to generate the jth decoder , and output the fusion result of the jth decoder to all decoders after the jth decoder.
- the image generation unit 103 is specifically configured to divide the image features on the jth decoder into ninth features and tenth features; based on the residual dense block RDB pair Processing the ninth feature to obtain an eleventh feature; fusing the tenth feature with fusion results output by all decoders before the j-th decoder to obtain a twelfth feature; merging the twelfth feature The eleventh feature and the twelfth feature are used to generate a fusion result of the jth decoder.
- the image processing apparatus provided in this embodiment can execute the image processing method provided in the foregoing method embodiment, and its implementation principle and technical effect are similar, and details are not repeated here.
- FIG. 11 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
- the electronic device provided by this embodiment includes: a memory 111 and a processor 112, and the memory 111 is used to store computer programs; the processing The device 112 is configured to execute the image processing method provided by the above-mentioned embodiments when calling a computer program.
- an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computing device implements the above-mentioned embodiment provided image processing methods.
- an embodiment of the present invention further provides a computer program product, which enables the computing device to implement the image processing method provided in the above-mentioned embodiments when the computer program product is run on a computer.
- the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein.
- the processor can be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
- a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
- Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read only memory (ROM) or flash RAM.
- RAM random access memory
- ROM read only memory
- flash RAM flash random access memory
- Computer-readable media includes both volatile and non-volatile, removable and non-removable storage media.
- the storage medium may store information by any method or technology, and the information may be computer-readable instructions, data structures, program modules, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, A magnetic tape cartridge, disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
- computer readable media does not include transitory computer readable media, such as modulated data signals and carrier waves.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Evolutionary Computation (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Mathematical Physics (AREA)
- Biophysics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Multimedia (AREA)
- Image Processing (AREA)
Abstract
本发明实施例提供了一种图像处理方法及装置,涉及图像处理技术领域。该方法包括:分别从多个不同的空间尺度对待处理图像进行特征提取,获取目标特征和至少一个待融合特征;对所述目标特征和所述至少一个待融合特征进行融合,获取第一特征;提取所述目标特征中的高频特征和低频特征;基于残差稠密块RDB对所述高频特征进行处理,获取第二特征;对所述低频特征和所述至少一个待融合特征进行融合,获取第三特征;合并所述第一特征、所述第二特征和所述第三特征,获取融合特征;基于所述融合特征对所述待处理图像进行处理。
Description
本申请是以中国申请号为202111628721.3申请日为2021年12月28日的申请为基础,并主张其优先权,该中国申请的公开内容再次作为整体引入本申请中。
本发明涉及图像处理技术领域,尤其涉及一种图像处理方法及装置。
图像修复是指对受到损坏的图像进行修复重建或者去除图像中的多余物体。
发明内容
有鉴于此,本发明提供了一种图像处理方法及装置,技术方案如下:
第一方面,本发明的实施例提供了一种图像处理方法,包括:
分别从多个不同的空间尺度对待处理图像进行特征提取,获取目标特征和至少一个待融合特征;
对所述目标特征和所述至少一个待融合特征进行融合,获取第一特征;
提取所述目标特征中的高频特征和低频特征;
基于残差稠密块RDB对所述高频特征进行处理,获取第二特征;
对所述低频特征和所述至少一个待融合特征进行融合,获取第三特征;
合并所述第一特征、所述第二特征和所述第三特征,获取融合特征;
基于所述融合特征对所述待处理图像进行处理。
作为本发明实施例一种可选的实施方式,所述提取所述目标特征中的高频特征和低频特征,包括:
对所述目标特征进行离散小波分解,获取第四特征;
将所述第四特征的前预设数量个通道的特征确定为所述低频特征,将所述第四特征中除所述低频特征以外的其它通道的特征确定所述高频特征。
作为本发明实施例一种可选的实施方式,在提取所述目标特征中的高频特征 和低频特征之后,所述方法还包括:
分别通过卷积层对所述高频特征和所述低频特征进行处理,以将所述高频特征和所述低频特征的通道数减少为预设值。
作为本发明实施例一种可选的实施方式,所述对所述低频特征和所述至少一个待融合特征进行融合,获取第三特征,包括:
按照所述至少一个待融合特征与所述低频特征的空间尺度差对所述至少一个待融合特征进行降序排序,获取第一排序结果;
融合第一待融合特征和所述低频特征,获取所述第一待融合特征对应的融合特征,所述第一待融合特征为所述第一排序结果中的第一个待融合特征;
逐一融合所述第一排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第一排序结果中的其它待融合特征对应的融合特征;
将所述第一排序结果中的最后一个待融合特征的对应的融合特征确定为所述第三特征。
作为本发明实施例一种可选的实施方式,所述融合第一待融合特征和所述低频特征,获取所述第一待融合特征对应的融合特征,包括:
将所述低频特征采样为第一采样特征;所述第一采样特征与所述第一待融合特征的空间尺度相同;
计算所述第一采样特征和所述第一待融合特征的差值,获取第一差值特征;
将所述第一差值特征采样为第二采样特征;所述第二采样特征与所述低频特征的空间尺度相同;
对所述低频特征和所述第二采样特征进行相加融合,生成所述第一待融合特征对应的融合特征。
作为本发明实施例一种可选的实施方式,所述逐一融合所述第一排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第一排序结果中的其它待融合特征对应的融合特征,包括:
将所述第一排序结果中的第m-1个待融合特征对应的融合特征采样为第三采样特征;所述第三采样特征与所述第一排序结果中的第m个待融合特征的空间尺度相同,m为大于1的整数;
计算所述第m个待融合特征与所述第三采样特征的差值,获取第二差值特征;
将所述第二差值特征采样为第四采样特征;所述第四采样特征与所述第m-1个待融合特征对应的融合特征的空间尺度相同;
对所述第m-1个待融合特征对应的融合特征和所述第四采样特征进行相加融合,生成所述第m个待融合特征对应的融合特征。
作为本发明实施例一种可选的实施方式,所述对所述目标特征和所述至少一个待融合特征进行融合,获取第一特征,包括:
将所述目标特征划分为第五特征和第六特征;
基于残差稠密块RDB对所述第五特征进行处理,获取第七特征;
对所述第六特征和所述至少一个待融合特征进行融合,获取第八特征;
合并所述第七特征和所述第八特征,生成所述第一特征。
作为本发明实施例一种可选的实施方式,所述对所述第六特征和所述至少一个待融合特征进行融合,获取第八特征,包括:
按照所述至少一个待融合特征与所述第六特征的空间尺度差对所述至少一个待融合特征进行降序排序,获取第二排序结果;
融合第二待融合特征和所述第六特征,获取所述第二待融合特征对应的融合特征,所述第二待融合特征为所述第二排序结果中的第一个待融合特征;
逐一融合所述第二排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第二排序结果中的其它待融合特征对应的融合特征;
将所述第二排序结果中的最后一个待融合特征对应的融合特征确定为所述第八特征。
作为本发明实施例一种可选的实施方式,所述融合第二待融合特征和所述第六特征,获取所述第二待融合特征对应的融合特征,包括:
将所述第六特征采样为第五采样特征,所述第五采样特征与所述第二待融合特征的空间尺度相同;
计算所述第五采样特征和所述第二排序结果中的第一个待融合特征的差值,获取所述第三差值特征;
将所述第三差值特征采样第六采样特征,所述第六采样特征与所述第六特征 的空间尺度相同;
对所述第六特征和所述第六采样特征进行相加融合,生成所述第二待融合特征对应的融合特征。
作为本发明实施例一种可选的实施方式,所述逐一融合所述第二排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第二排序结果中的其它待融合特征对应的融合特征,包括:
将所述第二排序结果中的第n-1个待融合特征对应的融合特征采样为第七采样特征;所述第七采样特征与所述第二排序结果中的第n个待融合特征的空间尺度相同,n为大于1的整数;
计算所述第n个待融合特征与所述第七采样特征的差值,获取第四差值特征;
将所述第四差值特征采样为第八采样特征,所述第八采样特征与所述第n-1个待融合特征对应的融合特征的空间尺度相同;
对所述第n-1个待融合特征对应的融合特征和所述第八采样特征进行相加融合,生成所述第n个待融合特征对应的融合特征。
作为本发明实施例一种可选的实施方式,所述将所述目标特征划分为第五特征和第六特征,包括:
基于所述目标特征的特征通道将所述目标特征划分为第五特征和第六特征。
第二方面,本发明的实施例提供了一种图像处理方法,包括:
通过编码模块对待处理图像进行处理,获取编码特征;其中,所述编码模块包括L个级联的且空间尺度均不相同的编码器,第i个编码器用于对所述待处理图像进行特征提取获取所述第i个编码器上的图像特征,以及获取所述第i个编码器之前的所有编码器输出的融合特征,并通过权利要求1-11任一项所述的图像处理方法获取所述第i个编码器的融合特征,以及将所述第i个编码器的融合特征输出至所述第i个编码器之后的所有编码器,L、i均为正整数,且i≤L;
通过由至少一个残差块RDB构成的特征复原模块对所述编码特征进行处理,获取复原特征;
通过解码模块对所述复原特征进行处理,获取所述待处理图像的处理结果图像;其中,所述解码模块包括L个级联的且空间尺度均不相同的解码器,第j个解 码器用于融合所述编码模块在所述第j个编码器上的图像特征和所述第j个解码器之前的所有解码器输出的融合结果,生成所述第j个解码器的融合结果,并将所述第j个解码器的融合结果输出至所述第j个解码器之后的所有解码器。
作为本发明实施例一种可选的实施方式,所述通过解码模块对所述复原特征进行处理,获取所述待处理图像的处理结果图像,包括:
将第j个解码器上的图像特征划分为第九特征和第十特征;
基于残差稠密块RDB对所述第九特征进行处理,获取第十一特征;
对所述第十特征和所述第j个解码器之前的所有解码器输出的融合结果进行融合,获取第十二特征;
合并所述第十一特征和所述第十二特征,生成所述第j个解码器的融合结果。
第三方面,本发明的实施例提供了一种图像处理装置,包括:
特征提取单元,用于分别从多个不同的空间尺度对待处理图像进行特征提取,获取目标特征和至少一个待融合特征;
第一处理单元,用于对所述目标特征和所述至少一个待融合特征进行融合,获取第一特征;
第二处理单元,用于提取所述目标特征中的高频特征和低频特征,基于残差稠密块RDB对所述高频特征进行处理,获取第二特征,以及对所述低频特征和所述至少一个待融合特征进行融合,获取第三特征;
融合单元,用于合并所述第一特征、所述第二特征和所述第三特征,获取融合特征;
第三处理单元,基于所述融合特征对所述待处理图像进行处理。
作为本发明实施例一种可选的实施方式,所述第二处理单元,具体用于对所述目标特征进行离散小波分解,获取第四特征;
将所述第四特征的前预设数量个通道的特征确定为所述低频特征,将所述第四特征中除所述低频特征以外的其它通道的特征确定所述高频特征。
作为本发明实施例一种可选的实施方式,所述第二处理单元,还用于分别通过卷积层对所述高频特征和所述低频特征进行处理,以将所述高频特征和所述低频特征的通道数减少为预设值。
作为本发明实施例一种可选的实施方式,所述第二处理单元,具体用于按照所述至少一个待融合特征与所述低频特征的空间尺度差对所述至少一个待融合特征进行降序排序,获取第一排序结果;融合第一待融合特征和所述低频特征,获取所述第一待融合特征对应的融合特征,所述第一待融合特征为所述第一排序结果中的第一个待融合特征;逐一融合所述第一排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第一排序结果中的其它待融合特征对应的融合特征;将所述第一排序结果中的最后一个待融合特征的对应的融合特征确定为所述第三特征。
作为本发明实施例一种可选的实施方式,所述第二处理单元,具体用于将所述低频特征采样为第一采样特征;所述第一采样特征与所述第一待融合特征的空间尺度相同;计算所述第一采样特征和所述第一待融合特征的差值,获取第一差值特征;将所述第一差值特征采样为第二采样特征;所述第二采样特征与所述低频特征的空间尺度相同;对所述低频特征和所述第二采样特征进行相加融合,生成所述第一待融合特征对应的融合特征。
作为本发明实施例一种可选的实施方式,所述第二处理单元,具体用于将所述第一排序结果中的第m-1个待融合特征对应的融合特征采样为第三采样特征;所述第三采样特征与所述第一排序结果中的第m个待融合特征的空间尺度相同,m为大于1的整数;计算所述第m个待融合特征与所述第三采样特征的差值,获取第二差值特征;将所述第二差值特征采样为第四采样特征;所述第四采样特征与所述第m-1个待融合特征对应的融合特征的空间尺度相同;对所述第m-1个待融合特征对应的融合特征和所述第四采样特征进行相加融合,生成所述第m个待融合特征对应的融合特征。
作为本发明实施例一种可选的实施方式,所述第一处理单元,具体用于将所述目标特征划分为第五特征和第六特征;基于残差稠密块RDB对所述第五特征进行处理,获取第七特征;对所述第六特征和所述至少一个待融合特征进行融合,获取第八特征;合并所述第七特征和所述第八特征,生成所述第一特征。
作为本发明实施例一种可选的实施方式,所述第一处理单元,具体用于按照所述至少一个待融合特征与所述第六特征的空间尺度差对所述至少一个待融合特征 进行降序排序,获取第二排序结果;融合第二待融合特征和所述第六特征,获取所述第二待融合特征对应的融合特征,所述第二待融合特征为所述第二排序结果中的第一个待融合特征;逐一融合所述第二排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第二排序结果中的其它待融合特征对应的融合特征;将所述第二排序结果中的最后一个待融合特征对应的融合特征确定为所述第八特征。
作为本发明实施例一种可选的实施方式,所述第一处理单元,具体用于将所述第六特征采样为第五采样特征,所述第五采样特征与所述第二待融合特征的空间尺度相同;计算所述第五采样特征和所述第二排序结果中的第一个待融合特征的差值,获取所述第三差值特征;将所述第三差值特征采样第六采样特征,所述第六采样特征与所述第六特征的空间尺度相同;对所述第六特征和所述第六采样特征进行相加融合,生成所述第二待融合特征对应的融合特征。
作为本发明实施例一种可选的实施方式,所述第一处理单元,具体用于将所述第二排序结果中的第n-1个待融合特征对应的融合特征采样为第七采样特征;所述第七采样特征与所述第二排序结果中的第n个待融合特征的空间尺度相同,n为大于1的整数;计算所述第n个待融合特征与所述第七采样特征的差值,获取第四差值特征;将所述第四差值特征采样为第八采样特征,所述第八采样特征与所述第n-1个待融合特征对应的融合特征的空间尺度相同;对所述第n-1个待融合特征对应的融合特征和所述第八采样特征进行相加融合,生成所述第n个待融合特征对应的融合特征。
作为本发明实施例一种可选的实施方式,所述第一处理单元,具体用于基于所述目标特征的特征通道将所述目标特征划分为第五特征和第六特征。
第四方面,本发明实施例提供了一种图像处理装置,包括:
特征提取单元,用于通过编码模块对待处理图像进行处理,获取编码特征;其中,所述编码模块包括L个级联的且空间尺度均不相同的编码器,第i个编码器用于对所述待处理图像进行特征提取获取所述第i个编码器上的图像特征,以及获取所述第i个编码器之前的所有编码器输出的融合特征,并通过权利要求1-11任一项所述的图像处理方法获取所述第i个编码器的融合特征,以及将所述第i个编码 器的融合特征输出至所述第i个编码器之后的所有编码器,L、i均为正整数,且i≤L;
特征处理单元,用于通过由至少一个残差块RDB构成的特征复原模块对所述编码特征进行处理,获取复原特征;
图像生成单元,用于通过解码模块对所述复原特征进行处理,获取所述待处理图像的处理结果图像;其中,所述解码模块包括L个级联的且空间尺度均不相同的解码器,第j个解码器用于融合所述编码模块在所述第j个编码器上的图像特征和所述第j个解码器之前的所有解码器输出的融合结果,生成所述第j个解码器的融合结果,并将所述第j个解码器的融合结果输出至所述第j个解码器之后的所有解码器。
作为本发明实施例一种可选的实施方式,所述图像生成单元,具体用于将第j个解码器上的图像特征划分为第九特征和第十特征;基于残差稠密块RDB对所述第九特征进行处理,获取第十一特征;对所述第十特征和所述第j个解码器之前的所有解码器输出的融合结果进行融合,获取第十二特征;合并所述第十一特征和所述第十二特征,生成所述第j个解码器的融合结果。
第五方面,本发明实施例提供了一种电子设备,包括:存储器和处理器,所述存储器用于存储计算机程序;所述处理器用于在调用计算机程序时,使得所述电子设备实现上述任一种图像处理方法。
第六方面,本发明实施例提供一种计算机可读存储介质,当所述计算机程序被计算设备执行时,使得所述计算设备实现上述任一种图像处理方法。
第七方面,本发明实施例提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机实现上述任一种图像处理方法。
本发明实施例提供的图像处理方法在分别从多个不同的空间尺度对待处理图像进行特征提取获取目标特征和至少一个待融合特征后,一方面,对所述目标特征和所述至少一个待融合特征进行融合,获取第一特征;另一方面提取所述目标特征中的高频特征和低频特征,并基于残差稠密块RDB对所述高频特征进行处理获取第二特征,对所述低频特征和所述至少一个待融合特征进行融合获取第三特征;最后合并所述第一特征、所述第二特征和所述第三特征获取融合特征,以及基于所述 融合特征对所述待处理图像进行处理。由于基于RDB对特征进行处理可以进行特征更新和冗余特征的生成,融合低频特征和待融合特征可以实现将其它空间尺度的特征中的有效信息引入,实现多尺度特征融合,因此本发明实施例提供的图像处理方法可以在实现低频特征多尺度特征融合时,保证新的高频特征的生成,对所述目标特征和所述至少一个待融合特征进行融合可以进一步实现将其它空间尺度的特征中的有效信息引入,因此本发明实施例提供的图像处理方法可以提升图像处理的效果。
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的图像处理方法的步骤流程图之一;
图2为本发明实施例提供的特征融合网络的结构示意图之一;
图3为本发明实施例提供的图像处理方法的数据流示意图之一;
图4为本发明实施例提供的图像处理方法的数据流示意图之二;
图5为本发明实施例提供的图像处理方法的步骤流程图之二;
图6为本发明实施例提供的特征融合网络的结构示意图之二;
图7为本发明实施例提供的图像处理方法的步骤流程图;
图8为本发明实施例提供的图像处理网络的结构示意图;
图9为本发明实施例提供的图像处理装置的结构示意图;
图10为本发明实施例提供的图像处理装置的结构示意图;
图11为本发明实施例提供的电子设备的硬件结构示意图。
为了能够更清楚地理解本发明的上述目的、特征和优点,下面将对本发明的方 案进行进一步描述。需要说明的是,在不冲突的情况下,本发明的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本发明,但本发明还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本发明的一部分实施例,而不是全部的实施例。
在本发明实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本发明实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。此外,在本发明实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。
图像修复是指对受到损坏的图像进行修复重建或者去除图像中的多余物体。
传统图像处理方法包括:基于偏微分方程的图像处理方法、基于整体变分方的修复方法、基于纹理合成的修复方法等,然而这些图像处理方法效率普遍较低,且图像中的先验信息容易失效。为了解决传统图像处理方法中图像中的先验信息容易失效和运算效率较低的问题,基于深度学习的方法已经被广泛的应用于各种计算机视觉的任务中,这也包括图像修复问题。然而,由于图像中的高频信息未被有效利用,因此目前的基于深度学习的图像修复网络模型在细节生成方面的性能还有待提升。
为了实现上述目的,本发明实施例提供了一种图像处理方法,参照图1所示的图像处理方法的步骤流程图和图2所示的特征融合网络的结构图,该图像处理方法包括:
S11、分别从多个不同的空间尺度对待处理图像进行特征提取,获取目标特征和至少一个待融合特征。
具体的,本发明实施例中的目标特征是指需要进行融合增强的特征,待融合特征是指用于对目标特征进行融合增强的特征。具体的,可以基于不同空间尺度的特征提取函数或特征提取网络分别对待处理图像进行特征提取,以获取所述目标特征和所述至少一个待融合特征。
S12、对所述目标特征和所述至少一个待融合特征进行融合,获取第一特征。
本发明实施例中不限定对所述目标特征和所述至少一个待融合特征进行融合的实现方式,可以通过任一种特征融合方式对所述目标特征和所述至少一个待融合特征进行融合。
S13、提取所述目标特征中的(High Freq)和低频特征(Low Freq)。
可选的,上步骤S13(提取所述目标特征中的高频特征和低频特征)的实现方式可以包括:
对所述目标特征进行离散小波分解,获取第四特征;
将所述第四特征的前预设数量个通道的特征确定为所述低频特征,将所述第四特征中除所述低频特征以外的其它通道的特征确定所述高频特征。
即,首先对目标特征(C*H*W)进行离散小波分解,从而将目标特征转换为低分辨特征(4C*1/2H*1/2W),然后将第1至第K个通道的特征确定为所述低频特征,将第K+1至第4C个通道的特征确定为所述高频特征。
本发明实施例中特征的通道(channel)是指特征所包含的特征图(feature map),特征的一个通道即为基于某一维度对特征进行特征提取所得到的特征图,因此特征的通道即为特定意义上的特征图。
例如:目标特征的尺寸为16*H*W,第四特征的尺寸为64*H/2*W/2,则可以将第1-16个通道的特征确定为所述低频特征,将第17-48个通道的特征确定为所述高频特征。
作为本发明实施例一种可选的实施方式,本发明实施例提供的图像处理方法还包括:
分别通过卷积层对所述高频特征和所述低频特征进行处理,以将所述高频特征和所述低频特征的通道数减少为预设值。
示例性的,预设值可以为8。即,通过两个卷积层分别将所述高频特征和所述低频特征的通道数压缩为8。
可选的,用于对所述高频特征和所述低频特征进行处理的卷积层的卷积核(kerne_size)为3*3、步长(stride)为2。
将所述高频特征和所述低频特征的通道数减少为预设值可以减少特征融合过程中的数据处理量,进而提高特征融合的效率。
S14、基于残差稠密块(Residual Dense Block,RDB)对所述高频特征进行处理,获取第二特征。
具体的,本发明实施例中的残差稠密块包括主要三部分,该三部分分别为:近邻记忆(Contiguous Memory,CM)、局部特征融合(Local Feature Fusion,LFF)以及局部残差学习(Local Residual Learning,LRL)。其中,CM主要用于将前一个RDB的输出发送到当前RDB的每一个卷积层;LFF主要用于将前一个RDB的输出与当前RDB的所有卷积层的输出融合在一起;LRL主要用于将前一个RDB的输出与当前RDB的LFF的输出相加融合,并将相加融合结果作为当前RDB的输出。
由于RDB可以进行特征更新和冗余特征的生成,因此基于残差稠密块对高频特征进行处理可以增加高频特征的多样性,进而使效果图像中的细节更加丰富。
S15、对所述低频特征和所述至少一个待融合特征进行融合,获取第三特征。
作为本发明实施例一种可选的实施方式,上述步骤S15(对所述低频特征和所述至少一个待融合特征进行融合,获取第三特征)包括如下步骤a至步骤d:
步骤a、按照所述至少一个待融合特征与所述低频特征的空间尺度差对所述至少一个待融合特征进行降序排序,获取第一排序结果。
其中,所述待融合特征与所述低频特征的空间尺度差是指所述待融合特征的空间尺度与所述低频特征的空间尺度的差值。
即,若所述至少一个待融合特征中某一待融合特征的空间尺度与所述低频特征的空间尺度相差越大,则该待融合特征在第一排序结果中的位置越靠前,而若某一待融合特征的空间尺度与所述低频特征的空间尺度相差越小,则该待融合特征在第一排序结果中的位置越靠后。
步骤b、融合第一待融合特征和所述低频特征,获取所述第一待融合特征对应的融合特征。
其中,所述第一待融合特征为所述第一排序结果中的第一个待融合特征。
参照图3所示,图3中以第一排序结果中的第一个待融合特征(第一待融合特征)为J
0,低频特征为j
n2对上述步骤b进行说明。上述步骤b的实现方式可以包括如下步骤1至步骤4:
需要说明的是,上述步骤中的采样可以为上采样也可以为下采样,具体由第一排序结果中的第一个待融合J
0的空间尺度与低频特征j
n2的空间尺度决定。
上述步骤2的过程可以描述为:
上述步骤4的过程可以描述为:
步骤c、逐一融合所述第一排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第一排序结果中的其它待融合特征对应的融合特征。
可选的,上述步骤c中对第一排序结果中的第m(大于1的正整数)个待融合特征和上一个待融合特征(第m-1个待融合特征)对应的融合特征进行融合的实现方式包括如下步骤Ⅰ至Ⅵ:
步骤Ⅰ、将所述第一排序结果中的第m-1个待融合特征对应的融合特征采样为第三采样特征。
其中,所述第三采样特征与所述第一排序结果中的第m个待融合特征的空间尺度相同。
步骤Ⅱ、计算所述第m个待融合特征与所述第三采样特征的差值,获取第二差值特征。
步骤Ⅲ、将所述第二差值特征采样为第四采样特征。
其中,所述第四采样特征与所述第m-1个待融合特征对应的融合特征的空间尺度相同。
步骤Ⅵ、对所述第m-1个待融合特征对应的融合特征和所述第四采样特征进行相加融合,生成所述第m个待融合特征对应的融合特征。
步骤Ⅰ至Ⅵ中获取第一排序结果中的第m个待融合特征的融合结果与步骤1至4中获取第一排序结果中的第1个待融合特征的融合结果的不同之处仅在在于:获取第一个待融合特征的融合结果时,输入为第三特征和第一个待融合特征,而获取第m个待融合特征的融合结果时,输入为第m-1个待融合特征对应的融合特征和第m个待融合特征,其余计算方式相同。
示例性的,参照图4所示,图4中以第一排序结果依次包括:待融合特征J
0、待融合特征J
1、待融合特征J
2、……、待融合特征J
t为例对上述步骤c进行说明。在图3所示实施例的基础上,获取第一排序结果中的第一个待融合特征对应的融合特征J
0
n后,获取所述第一排序结果中的其它待融合特征对应的融合特征的过程包括:
基于上述方式逐一获取第一排序结果中的第4个待融合特征J
3、第5个待融合特征J
4、……、第t个待融合特征J
t-1以及第t+1个待融合特征J
t的融合结果J
t
n。
步骤d、将所述第一排序结果中的最后一个待融合特征对应的融合特征确定为所述第三特征。
承上图4所示实施例,第一排序结果依次包括:待融合特征J
0、待融合特征J
1、待融合特征J
2、……、待融合特征J
t,因此将所述第一排序结果中的最后一个待融合特征J
t的融合结果J
t
n确定为所述第三特征。
即,本发明实施例分两个特征处理支路进行特征处理,其中一个特征处理支路执行上述步骤S12的特征处理步骤,而另一个特征处理支路执行上述步骤S13至步骤S15的特征处理步骤。
需要说明的是,本发明实施例不限定执行两个特征处理支路所执行的特征处理步骤的先后顺序,可以先执行步骤S13至S15,再执行步骤S12,也可以先执行步骤S12,再执行步骤S13至S15,还可以同时执行。
S16、合并所述第二特征、所述第三特征和所述第一特征,获取融合特征。
具体的,合并所述第二特征、所述第三特征和所述第一特征可以包括:将所述第二特征、所述第三特征和所述第一特征在通道维度上串联。
S17、基于所述融合特征对所述待处理图像进行处理。
本发明实施例提供了一种图像处理方法可以用于任意图像处理场景中的图像处理方法。例如:本发明实施例提供的图像处理方法可以为图像去雾方法;再例如:本发明实施例提供的图像处理方法也可以为图像增强方法。再例如:本发明实施例提供的图像处理方法还可以为图像超分方法。
本发明实施例提供的图像处理方法在分别从多个不同的空间尺度对待处理图像进行特征提取获取目标特征和至少一个待融合特征后,一方面,对所述目标特征和所述至少一个待融合特征进行融合,获取第一特征;另一方面提取所述目标特征中的高频特征和低频特征,并基于残差稠密块RDB对所述高频特征进行处理获取第二特征,对所述低频特征和所述至少一个待融合特征进行融合获取第三特征;最 后合并所述第一特征、所述第二特征和所述第三特征获取融合特征,以及基于所述融合特征对所述待处理图像进行处理。由于基于RDB对特征进行处理可以进行特征更新和冗余特征的生成,融合低频特征和待融合特征可以实现将其它空间尺度的特征中的有效信息引入,实现多尺度特征融合,因此本发明实施例提供的图像处理方法可以在实现低频特征多尺度特征融合时,保证新的高频特征的生成,对所述目标特征和所述至少一个待融合特征进行融合可以进一步实现将其它空间尺度的特征中的有效信息引入,因此本发明实施例提供的图像处理方法可以提升图像处理的效果。
作为对上述实施例的扩展和细化,本发明实施例提供了另一种图像处理方法,参照图5所示的图像处理方法的步骤流程图和图6所示的特征融合网络的结构图,该图像处理方法包括如下步骤:
S51、分别从多个不同的空间尺度对待处理图像进行特征提取,获取目标特征和至少一个待融合特征。
S52、将所述目标特征划分为第五特征和第六特征。
可选的,所述将所述目标特征划分为第五特征和第六特征,包括:
基于所述目标特征的特征通道将所述目标特征划分为第五特征和第六特征。
本发明实施例中不限定第五特征和第六特征的比例。第五特征的比例越高,则可以更多的生成新特征,第六特征的比例越高,则可以更多引入的其它空间尺度的特征的有效信息,因此实际应用中可以根据需要引入的其它空间尺度的特征的有效信息的量以及需要生成的新特征的量来确定第五特征和第六特征的比例。示例性的,第五特征和第六特征的比例可以1:1。
S53、基于残差稠密块对所述第五特征进行处理,获取第七特征。
S54、对所述第六特征和所述至少一个待融合特征进行融合,获取第八特征。
作为本发明实施例一种可选的实施方式,上述步骤S54(对所述第六特征和所述至少一个待融合特征进行融合,获取第八特征)包括:
按照所述至少一个待融合特征与所述第六特征的空间尺度差对所述至少一个待融合特征进行降序排序,获取第二排序结果;
融合第二待融合特征和所述第六特征,获取所述第二待融合特征对应的融合 特征,所述第二待融合特征为所述第二排序结果中的第一个待融合特征;
逐一融合所述第二排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第二排序结果中的其它待融合特征对应的融合特征;
将所述第二排序结果中的最后一个待融合特征对应的融合特征确定为所述第八特征。
进一步的,所所述融合第二待融合特征和所述第六特征,获取所述第二待融合特征对应的融合特征,包括:
将所述第六特征采样为第五采样特征,所述第五采样特征与所述第二待融合特征的空间尺度相同;
计算所述第五采样特征和所述第二排序结果中的第一个待融合特征的差值,获取所述第三差值特征;
将所述第三差值特征采样第六采样特征,所述第六采样特征与所述第六特征的空间尺度相同;
对所述第六特征和所述第六采样特征进行相加融合,生成所述第二待融合特征对应的融合特征。
进一步的,所述逐一融合所述第二排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第二排序结果中的其它待融合特征对应的融合特征,包括:
将所述第二排序结果中的第n-1个待融合特征对应的融合特征采样为第七采样特征;所述第七采样特征与所述第二排序结果中的第n个待融合特征的空间尺度相同,n为大于1的整数;
计算所述第n个待融合特征与所述第七采样特征的差值,获取第四差值特征;
将所述第四差值特征采样为第八采样特征,所述第八采样特征与所述第n-1个待融合特征对应的融合特征的空间尺度相同;
对所述第n-1个待融合特征对应的融合特征和所述第八采样特征进行相加融合,生成所述第n个待融合特征对应的融合特征。
对第六特征和至少一个待融合特征进行融合获取第八特征的实现方式与图1所示实施例中对低频特征和至少一个待融合特征进行融合获取第三特征的实现方 式类似,因此上述实施例中的步骤S54的实现方式可以参照上述步骤S14的实现方式,在此不再赘述。
S55、合并所述第七特征和所述第八特征,生成所述第一特征。
S56、提取所述目标特征中的高频特征和低频特征。
S57、基于残差稠密块对所述高频特征进行处理,获取第二特征。
S58、对所述低频特征和所述至少一个待融合特征进行融合,获取第三特征。
S59、合并所述第一特征、所述第二特征和所述第三特征,获取融合特征。
需要说明的是,上述实施例中以先合并所述第七特征和所述第八特征生成所述第一特征,再合并所述第二特征、所述第三特征和所述第一特征,生成所述目标特征和所述融合特征为例示出,但实际执行过程中也可以通过同一步骤合成合并所述第二特征、所述第三特征、所述第七特征和所述第八特征,生成所述融合特征。
本发明实施例提供的图像处理方法在分别从多个不同的空间尺度对待处理图像进行特征提取获取目标特征和至少一个待融合特征后,一方面,对所述目标特征和所述至少一个待融合特征进行融合,获取第一特征;另一方面提取所述目标特征中的高频特征和低频特征,并基于残差稠密块RDB对所述高频特征进行处理获取第二特征,对所述低频特征和所述至少一个待融合特征进行融合获取第三特征;最后合并所述第一特征、所述第二特征和所述第三特征获取融合特征,以及基于所述融合特征对所述待处理图像进行处理。由于基于RDB对特征进行处理可以进行特征更新和冗余特征的生成,融合低频特征和待融合特征可以实现将其它空间尺度的特征中的有效信息引入,实现多尺度特征融合,因此本发明实施例提供的图像处理方法可以在实现低频特征多尺度特征融合时,保证新的高频特征的生成,对所述目标特征和所述至少一个待融合特征进行融合可以进一步实现将其它空间尺度的特征中的有效信息引入,因此本发明实施例提供的图像处理方法可以提升图像处理的效果。
还需要说明的是,多个空间尺度的特征进行融合时,一般需要进行上采样/下采样的卷积和反卷积,而上采样/下采样的卷积和反卷积需要大量的计算资源,因此性能开销比较大。上述实施例通过将目标特征划分为第五特征和第六特征,且仅会使第六特征参与多空间尺度特征融合,因此上述实施例还可以减少需要融合的 特征的数量(第六特征的特征数少于目标特征的特征数),进而减少特征融合的计算量,提升特征融合的效率。
在上述实施例的基础上,本发明实施例还提供了一种图像处理方法。参照图7所示,本发明实施例提供的图像处理方法包括如下步骤S71至S73:
S71、通过编码模块对待处理图像进行处理,获取编码特征。
其中,所述编码模块包括L个级联的且空间尺度均不相同的编码器,第m个编码器用于对所述待处理图像进行特征提取获取所述第i个编码器上的图像特征,以及获取所述第i个编码器之前的所有编码器输出的融合特征,并通过权利要求1-11任一项所述的图像处理方法获取所述第i个编码器的融合特征,以及将所述第i个编码器的融合特征输出至所述第i个编码器之后的所有编码器,L、i均为正整数,且i≤L。
S72、通过由至少一个残差块RDB构成的特征复原模块对所述编码特征进行处理,获取复原特征。
S73、通过解码模块对所述复原特征进行处理,获取所述待处理图像的处理结果图像。
其中,所述解码模块包括L个级联的且空间尺度均不相同的解码器,第j个解码器用于融合所述编码模块在所述第j个编码器上的图像特征和所述第j个解码器之前的所有解码器输出的融合结果,生成所述第j个解码器的融合结果,并将所述第j个解码器的融合结果输出至所述第j个解码器之后的所有解码器。
即,用于执行上述图7所示实施例的编码模块、特征复原模块以及解码模块形成U型网络(U-Net)。
具体的,U型网络(U-Net)一种特殊的卷积神经网络,U型网络神经网络主要包括:编码模块(又称为收缩路径)、特征复原模块以及解码模块(又称为扩展路径)。编码模块主要是用来捕捉原始图像中的上下文信息(context information),而与之相对称的解码模块则是为了对原始图像中所需要分割出来的部分进行精准定位(localization),进而生成处理后的图像。相比于全卷积神经网络(Fully Convolutional Neural,FCN)U型网络的改进之处在于,U-Net为了能精准的定位原始图像中需要分割出来的部分,编码模块上提取出来的特征会在升采样 (upsampling)过程中与新的特征图(feature map)进行结合,以最大程度的保留特征中的重要信息,进而减少对训练样本数量和计算资源的需求。
作为本发明实施例一种可选的实施方式,所述通过解码模块对所述复原特征进行处理,获取所述待处理图像的处理结果图像,包括:
将第j个解码器上的图像特征划分为第九特征和第十特征;
基于残差稠密块RDB对所述第九特征进行处理,获取第十一特征;
对所述第十特征和所述第j个解码器之前的所有解码器输出的融合结果进行融合,获取第十二特征;
合并所述第十一特征和所述第十二特征,生成所述第j个解码器的融合结果。
参照图8所示,用于执行上述图7所示实施例的网络模型包括:形成U型网络的编码模块81、特征复原模块82以及解码模块83。
所述编码模块81包括L个级联的且空间尺度均不相同的编码器,用于对待处理图像I进行处理,获取编码特征i
L。其中,第j个解码器用于融合所述编码模块在所述第j个编码器上的图像特征和所述第j个解码器之前的所有解码器输出的融合结果,生成所述第j个解码器的融合结果,并将所述第j个解码器的融合结果输出至所述第j个解码器之后的所有解码器。
所述特征复原模块82包括至少一个RDB,用于接收所述编码模块81输出的编码特征i
L,以及通过所述至少一个RDB对编码特征i
L进行处理,获取复原特征j
L。
所述解码模块83包括L个级联的且空间尺度均不相同的解码器,第j个解码器用于融合所述编码模块在所述第j个编码器上的图像特征和所述第j个解码器之前的所有解码器输出的融合结果,生成所述第j个解码器的融合结果,并将所述第j个解码器的融合结果输出至所述第j个解码器之后的所有解码器;以及根据最后一个解码器的输出的融合结果j
1,获取所述待处理图像I处理结果图像J。
编码模块81中的第m个编码器通过上述实施例提供的图像处理方法融合所述编码模块在第m个编码器上的图像特征和所述第m个编码器之前的所有编码器(第1个编码器至第m-1个编码器)输出的融合结果的操作可以描述为:
i
m=i
m1+i
m2
i
m=i
GF+i
LF
其中,i
m表示编码模块81在第m个编码器上的特征,i
GF表示从i
m中提取的高频特征,f(…)表示基于RDB对特征进行处理的操作,
表示基于RDB对i
GF进行处理得到的特征,i
LF表示从i
m中提取的低频特征,
表示第1个编码器至第m-1个编码器输出的融合结果,
表示特征融合的操作,
表示对i
LF和
进行融合得到的融合结果,i
m1表示对i
m进行划分得到的第五特征,
表示基于RDB对i
m1进行处理得到的第七特征,i
m2表示对i
m进行划分得到的第六特征,
表示对i
m2和
进行融合得到的融合结果,
编码模块81的第m个编码器输出的融合结果。
解码模块83中的第m个解码器通过上述实施例提供的图像处理方法融合所述解码模块在第m个解码器上的图像特征和所述第m个解码器之前的所有解码器(第L个解码器至第m+1个解码器)输出的融合结果的操作可以描述为:
j
m=j
m1+j
m2
其中,j
m表示对解码模块83在第m个解码器中的特征,j
m1表示对j
m进行划分得到的第九特征,f(…)表示基于RDB对特征进行处理的操作,
表示基于RDB对j
m1进行处理得到的十一特征,j
m2表示对j
m进行划分得到的第十特征,L为解码模块83中解码器的总数量,
表示第L个解码器至第m+1个解码器输出的融合结果,
表示对j
m2和
进行融合的操作,
表示对j
m2和
进行融合得到的融合结果,
表示解码模块83的第m个解码器输出的融合结果。
由于本发明实施例提供的图像处理方法可以通过上述实施例提供的图像处理方法进行特征融合,因此本发明实施例提供的图像处理方法可以在实现低频特征多尺度特征融合时,保证新的高频特征的生成,因此本发明实施例提供的图像处理方法可以提升图像处理的效果。
基于同一发明构思,作为对上述方法的实现,本发明实施例还提供了一种图像处理装置,该装置实施例与前述方法实施例对应,为便于阅读,本装置实施例不再对前述方法实施例中的细节内容进行逐一赘述,但应当明确,本实施例中的图像处理装置能够对应实现前述方法实施例中的全部内容。
本发明实施例提供了一种图像处理装置,图9为该图像处理装置的结构示意图,如图9所示,该图像处理装置900包括:
特征提取单元91,用于分别从多个不同的空间尺度对待处理图像进行特征提取,获取目标特征和至少一个待融合特征;
第一处理单元92,用于对所述目标特征和所述至少一个待融合特征进行融合,获取第一特征;
第二处理单元93,用于提取所述目标特征中的高频特征和低频特征,基于残差稠密块RDB对所述高频特征进行处理,获取第二特征,以及对所述低频特征和所述至少一个待融合特征进行融合,获取第三特征;
融合单元94,用于合并所述第一特征、所述第二特征和所述第三特征,获取融合特征;
第三处理单元95,基于所述融合特征对所述待处理图像进行处理。
作为本发明实施例一种可选的实施方式,所述第二处理单元93,具体用于对所述目标特征进行离散小波分解,获取第四特征;
将所述第四特征的前预设数量个通道的特征确定为所述低频特征,将所述第四特征中除所述低频特征以外的其它通道的特征确定所述高频特征。
作为本发明实施例一种可选的实施方式,所述第二处理单元93,还用于分别通过卷积层对所述高频特征和所述低频特征进行处理,以将所述高频特征和所述低频特征的通道数减少为预设值。
作为本发明实施例一种可选的实施方式,所述第二处理单元93,具体用于按 照所述至少一个待融合特征与所述低频特征的空间尺度差对所述至少一个待融合特征进行降序排序,获取第一排序结果;融合第一待融合特征和所述低频特征,获取所述第一待融合特征对应的融合特征,所述第一待融合特征为所述第一排序结果中的第一个待融合特征;逐一融合所述第一排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第一排序结果中的其它待融合特征对应的融合特征;将所述第一排序结果中的最后一个待融合特征的对应的融合特征确定为所述第三特征。
作为本发明实施例一种可选的实施方式,所述第二处理单元93,具体用于将所述低频特征采样为第一采样特征;所述第一采样特征与所述第一待融合特征的空间尺度相同;计算所述第一采样特征和所述第一待融合特征的差值,获取第一差值特征;将所述第一差值特征采样为第二采样特征;所述第二采样特征与所述低频特征的空间尺度相同;对所述低频特征和所述第二采样特征进行相加融合,生成所述第一待融合特征对应的融合特征。
作为本发明实施例一种可选的实施方式,所述第二处理单元93,具体用于将所述第一排序结果中的第m-1个待融合特征对应的融合特征采样为第三采样特征;所述第三采样特征与所述第一排序结果中的第m个待融合特征的空间尺度相同,m为大于1的整数;计算所述第m个待融合特征与所述第三采样特征的差值,获取第二差值特征;将所述第二差值特征采样为第四采样特征;所述第四采样特征与所述第m-1个待融合特征对应的融合特征的空间尺度相同;对所述第m-1个待融合特征对应的融合特征和所述第四采样特征进行相加融合,生成所述第m个待融合特征对应的融合特征。
作为本发明实施例一种可选的实施方式,所述第一处理单元92,具体用于将所述目标特征划分为第五特征和第六特征;基于残差稠密块RDB对所述第五特征进行处理,获取第七特征;对所述第六特征和所述至少一个待融合特征进行融合,获取第八特征;合并所述第七特征和所述第八特征,生成所述第一特征。
作为本发明实施例一种可选的实施方式,所述第一处理单元92,具体用于按照所述至少一个待融合特征与所述第六特征的空间尺度差对所述至少一个待融合特征进行降序排序,获取第二排序结果;融合第二待融合特征和所述第六特征,获 取所述第二待融合特征对应的融合特征,所述第二待融合特征为所述第二排序结果中的第一个待融合特征;逐一融合所述第二排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第二排序结果中的其它待融合特征对应的融合特征;将所述第二排序结果中的最后一个待融合特征对应的融合特征确定为所述第八特征。
作为本发明实施例一种可选的实施方式,所述第一处理单元92,具体用于将所述第六特征采样为第五采样特征,所述第五采样特征与所述第二待融合特征的空间尺度相同;计算所述第五采样特征和所述第二排序结果中的第一个待融合特征的差值,获取所述第三差值特征;将所述第三差值特征采样第六采样特征,所述第六采样特征与所述第六特征的空间尺度相同;对所述第六特征和所述第六采样特征进行相加融合,生成所述第二待融合特征对应的融合特征。
作为本发明实施例一种可选的实施方式,所述第一处理单元92,具体用于将所述第二排序结果中的第n-1个待融合特征对应的融合特征采样为第七采样特征;所述第七采样特征与所述第二排序结果中的第n个待融合特征的空间尺度相同,n为大于1的整数;计算所述第n个待融合特征与所述第七采样特征的差值,获取第四差值特征;将所述第四差值特征采样为第八采样特征,所述第八采样特征与所述第n-1个待融合特征对应的融合特征的空间尺度相同;对所述第n-1个待融合特征对应的融合特征和所述第八采样特征进行相加融合,生成所述第n个待融合特征对应的融合特征。
作为本发明实施例一种可选的实施方式,所述第一处理单元92,具体用于基于所述目标特征的特征通道将所述目标特征划分为第五特征和第六特征。
本实施例提供的图像处理装置可以执行上述方法实施例提供的图像处理方法,其实现原理与技术效果类似,此处不再赘述。
基于同一发明构思,作为对上述方法的实现,本发明实施例还提供了一种图像处理装置,该装置实施例与前述方法实施例对应,为便于阅读,本装置实施例不再对前述方法实施例中的细节内容进行逐一赘述,但应当明确,本实施例中的图像处理装置能够对应实现前述方法实施例中的全部内容。
本发明实施例提供了一种图像处理装置,图10为该图像处理装置的结构示意 图,如图10所示,该图像处理装置100包括:
特征提取单元101,用于通过编码模块对待处理图像进行处理,获取编码特征;其中,所述编码模块包括L个级联的且空间尺度均不相同的编码器,第i个编码器用于对所述待处理图像进行特征提取获取所述第i个编码器上的图像特征,以及获取所述第i个编码器之前的所有编码器输出的融合特征,并通过权利要求1-11任一项所述的图像处理方法获取所述第i个编码器的融合特征,以及将所述第i个编码器的融合特征输出至所述第i个编码器之后的所有编码器,L、i均为正整数,且i≤L;
特征处理单元102,用于通过由至少一个残差块RDB构成的特征复原模块对所述编码特征进行处理,获取复原特征;
图像生成单元103,用于通过解码模块对所述复原特征进行处理,获取所述待处理图像的处理结果图像;其中,所述解码模块包括L个级联的且空间尺度均不相同的解码器,第j个解码器用于融合所述编码模块在所述第j个编码器上的图像特征和所述第j个解码器之前的所有解码器输出的融合结果,生成所述第j个解码器的融合结果,并将所述第j个解码器的融合结果输出至所述第j个解码器之后的所有解码器。
作为本发明实施例一种可选的实施方式,所述图像生成单元103,具体用于将第j个解码器上的图像特征划分为第九特征和第十特征;基于残差稠密块RDB对所述第九特征进行处理,获取第十一特征;对所述第十特征和所述第j个解码器之前的所有解码器输出的融合结果进行融合,获取第十二特征;合并所述第十一特征和所述第十二特征,生成所述第j个解码器的融合结果。
本实施例提供的图像处理装置可以执行上述方法实施例提供的图像处理方法,其实现原理与技术效果类似,此处不再赘述。
基于同一发明构思,本发明实施例还提供了一种电子设备。图11为本发明实施例提供的电子设备的结构示意图,如图11所示,本实施例提供的电子设备包括:存储器111和处理器112,所述存储器111用于存储计算机程序;所述处理器112用于在调用计算机程序时执行上述实施例提供的图像处理方法。
基于同一发明构思,本发明实施例还提供了一种计算机可读存储介质,该计算 机可读存储介质上存储有计算机程序,当计算机程序被处理器执行时,使得所述计算设备实现上述实施例提供的图像处理方法。
基于同一发明构思,本发明实施例还提供了一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算设备实现上述实施例提供的图像处理方法。
本领域技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质上实施的计算机程序产品的形式。
处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。存储器是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动存储介质。存储介质可以由任何方法或技术来实现信息存储,信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。根据本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。
Claims (18)
- 一种图像处理方法,包括:分别从多个不同的空间尺度对待处理图像进行特征提取,获取目标特征和至少一个待融合特征;对所述目标特征和所述至少一个待融合特征进行融合,获取第一特征;提取所述目标特征中的高频特征和低频特征;基于残差稠密块RDB对所述高频特征进行处理,获取第二特征;对所述低频特征和所述至少一个待融合特征进行融合,获取第三特征;合并所述第一特征、所述第二特征和所述第三特征,获取融合特征;基于所述融合特征对所述待处理图像进行处理。
- 根据权利要求1所述的方法,所述提取所述目标特征中的高频特征和低频特征,包括:对所述目标特征进行离散小波分解,获取第四特征;将所述第四特征的前预设数量个通道的特征确定为所述低频特征,将所述第四特征中除所述低频特征以外的其它通道的特征确定所述高频特征。
- 根据权利要求2所述的方法,在提取所述目标特征中的高频特征和低频特征之后,所述方法还包括:分别通过卷积层对所述高频特征和所述低频特征进行处理,以将所述高频特征和所述低频特征的通道数减少为预设值。
- 根据权利要求1所述的方法,所述对所述低频特征和所述至少一个待融合特征进行融合,获取第三特征,包括:按照所述至少一个待融合特征与所述低频特征的空间尺度差对所述至少一个待融合特征进行降序排序,获取第一排序结果;融合第一待融合特征和所述低频特征,获取所述第一待融合特征对应的融合特征,所述第一待融合特征为所述第一排序结果中的第一个待融合特征;逐一融合所述第一排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第一排序结果中的其它待融合特征对应的融合特征;将所述第一排序结果中的最后一个待融合特征的对应的融合特征确定为所述 第三特征。
- 根据权利要求4所述的方法,所述融合第一待融合特征和所述低频特征,获取所述第一待融合特征对应的融合特征,包括:将所述低频特征采样为第一采样特征;所述第一采样特征与所述第一待融合特征的空间尺度相同;计算所述第一采样特征和所述第一待融合特征的差值,获取第一差值特征;将所述第一差值特征采样为第二采样特征;所述第二采样特征与所述低频特征的空间尺度相同;对所述低频特征和所述第二采样特征进行相加融合,生成所述第一待融合特征对应的融合特征。
- 根据权利要求4所述的方法,所述逐一融合所述第一排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第一排序结果中的其它待融合特征对应的融合特征,包括:将所述第一排序结果中的第m-1个待融合特征对应的融合特征采样为第三采样特征;所述第三采样特征与所述第一排序结果中的第m个待融合特征的空间尺度相同,m为大于1的整数;计算所述第m个待融合特征与所述第三采样特征的差值,获取第二差值特征;将所述第二差值特征采样为第四采样特征;所述第四采样特征与所述第m-1个待融合特征对应的融合特征的空间尺度相同;对所述第m-1个待融合特征对应的融合特征和所述第四采样特征进行相加融合,生成所述第m个待融合特征对应的融合特征。
- 根据权利要求1-6任一项所述的方法,所述对所述目标特征和所述至少一个待融合特征进行融合,获取第一特征,包括:将所述目标特征划分为第五特征和第六特征;基于残差稠密块RDB对所述第五特征进行处理,获取第七特征;对所述第六特征和所述至少一个待融合特征进行融合,获取第八特征;合并所述第七特征和所述第八特征,生成所述第一特征。
- 根据权利要求7所述的方法,所述对所述第六特征和所述至少一个待融合 特征进行融合,获取第八特征,包括:按照所述至少一个待融合特征与所述第六特征的空间尺度差对所述至少一个待融合特征进行降序排序,获取第二排序结果;融合第二待融合特征和所述第六特征,获取所述第二待融合特征对应的融合特征,所述第二待融合特征为所述第二排序结果中的第一个待融合特征;逐一融合所述第二排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第二排序结果中的其它待融合特征对应的融合特征;将所述第二排序结果中的最后一个待融合特征对应的融合特征确定为所述第八特征。
- 根据权利要求8所述的方法,所述融合第二待融合特征和所述第六特征,获取所述第二待融合特征对应的融合特征,包括:将所述第六特征采样为第五采样特征,所述第五采样特征与所述第二待融合特征的空间尺度相同;计算所述第五采样特征和所述第二排序结果中的第一个待融合特征的差值,获取第三差值特征;将所述第三差值特征采样第六采样特征,所述第六采样特征与所述第六特征的空间尺度相同;对所述第六特征和所述第六采样特征进行相加融合,生成所述第二待融合特征对应的融合特征。
- 根据权利要求8所述的方法,所述逐一融合所述第二排序结果中的其它待融合特征和上一个待融合特征对应的融合特征,获取所述第二排序结果中的其它待融合特征对应的融合特征,包括:将所述第二排序结果中的第n-1个待融合特征对应的融合特征采样为第七采样特征;所述第七采样特征与所述第二排序结果中的第n个待融合特征的空间尺度相同,n为大于1的整数;计算所述第n个待融合特征与所述第七采样特征的差值,获取第四差值特征;将所述第四差值特征采样为第八采样特征,所述第八采样特征与所述第n-1个待融合特征对应的融合特征的空间尺度相同;对所述第n-1个待融合特征对应的融合特征和所述第八采样特征进行相加融合,生成所述第n个待融合特征对应的融合特征。
- 根据权利要求7所述的方法,所述将所述目标特征划分为第五特征和第六特征,包括:基于所述目标特征的特征通道将所述目标特征划分为第五特征和第六特征。
- 一种图像处理方法,包括:通过编码模块对待处理图像进行处理,获取编码特征;其中,所述编码模块包括L个级联的且空间尺度均不相同的编码器,第i个编码器用于对所述待处理图像进行特征提取获取所述第i个编码器上的图像特征,以及获取所述第i个编码器之前的所有编码器输出的融合特征,并通过权利要求1-11任一项所述的图像处理方法获取所述第i个编码器的融合特征,以及将所述第i个编码器的融合特征输出至所述第i个编码器之后的所有编码器,L、i均为正整数,且i≤L;通过由至少一个残差块RDB构成的特征复原模块对所述编码特征进行处理,获取复原特征;通过解码模块对所述复原特征进行处理,获取所述待处理图像的处理结果图像;其中,所述解码模块包括L个级联的且空间尺度均不相同的解码器,第j个解码器用于融合所述编码模块在所述第j个编码器上的图像特征和所述第j个解码器之前的所有解码器输出的融合结果,生成所述第j个解码器的融合结果,并将所述第j个解码器的融合结果输出至所述第j个解码器之后的所有解码器。
- 根据权利要求12所述的方法,所述通过解码模块对所述复原特征进行处理,获取所述待处理图像的处理结果图像,包括:将第j个解码器上的图像特征划分为第九特征和第十特征;基于残差稠密块RDB对所述第九特征进行处理,获取第十一特征;对所述第十特征和所述第j个解码器之前的所有解码器输出的融合结果进行融合,获取第十二特征;合并所述第十一特征和所述第十二特征,生成所述第j个解码器的融合结果。
- 一种图像处理装置,包括:特征提取单元,被配置为分别从多个不同的空间尺度对待处理图像进行特征 提取,获取目标特征和至少一个待融合特征;第一处理单元,被配置为对所述目标特征和所述至少一个待融合特征进行融合,获取第一特征;第二处理单元,被配置为提取所述目标特征中的高频特征和低频特征,基于残差稠密块RDB对所述高频特征进行处理,获取第二特征,以及对所述低频特征和所述至少一个待融合特征进行融合,获取第三特征;融合单元,被配置为合并所述第一特征、所述第二特征和所述第三特征,获取融合特征;第三处理单元,被配置为基于所述融合特征对所述待处理图像进行处理。
- 一种图像处理装置,包括:特征提取单元,被配置为通过编码模块对待处理图像进行处理,获取编码特征;其中,所述编码模块包括L个级联的且空间尺度均不相同的编码器,第i个编码器用于对所述待处理图像进行特征提取获取所述第i个编码器上的图像特征,以及获取所述第i个编码器之前的所有编码器输出的融合特征,并通过权利要求1-11任一项所述的图像处理方法获取所述第i个编码器的融合特征,以及将所述第i个编码器的融合特征输出至所述第i个编码器之后的所有编码器,L、i均为正整数,且i≤L;特征处理单元,被配置为通过由至少一个残差块RDB构成的特征复原模块对所述编码特征进行处理,获取复原特征;图像生成单元,被配置为通过解码模块对所述复原特征进行处理,获取所述待处理图像的处理结果图像;其中,所述解码模块包括L个级联的且空间尺度均不相同的解码器,第j个解码器用于融合所述编码模块在所述第j个编码器上的图像特征和所述第j个解码器之前的所有解码器输出的融合结果,生成所述第j个解码器的融合结果,并将所述第j个解码器的融合结果输出至所述第j个解码器之后的所有解码器。
- 一种电子设备,包括:存储器和处理器,所述存储器用于存储计算机程序;所述处理器用于在调用计算机程序时,使得所述电子设备实现权利要求1-13任一项所述的方法。
- 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,当所述计算机程序被计算设备执行时,使得所述计算设备实现权利要求1-13任一项所述的方法。
- 一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机实现如权利要求1-13任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111628721.3 | 2021-12-28 | ||
CN202111628721.3A CN116416140A (zh) | 2021-12-28 | 2021-12-28 | 一种图像处理方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023125522A1 true WO2023125522A1 (zh) | 2023-07-06 |
Family
ID=86997940
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/142286 WO2023125522A1 (zh) | 2021-12-28 | 2022-12-27 | 一种图像处理方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116416140A (zh) |
WO (1) | WO2023125522A1 (zh) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180061091A1 (en) * | 2016-08-31 | 2018-03-01 | International Business Machines Corporation | Anatomy segmentation through low-resolution multi-atlas label fusion and corrective learning |
CN110263732A (zh) * | 2019-06-24 | 2019-09-20 | 京东方科技集团股份有限公司 | 多尺度目标检测方法及装置 |
CN112507997A (zh) * | 2021-02-08 | 2021-03-16 | 之江实验室 | 一种基于多尺度卷积和感受野特征融合的人脸超分辨系统 |
-
2021
- 2021-12-28 CN CN202111628721.3A patent/CN116416140A/zh active Pending
-
2022
- 2022-12-27 WO PCT/CN2022/142286 patent/WO2023125522A1/zh unknown
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180061091A1 (en) * | 2016-08-31 | 2018-03-01 | International Business Machines Corporation | Anatomy segmentation through low-resolution multi-atlas label fusion and corrective learning |
CN110263732A (zh) * | 2019-06-24 | 2019-09-20 | 京东方科技集团股份有限公司 | 多尺度目标检测方法及装置 |
CN112507997A (zh) * | 2021-02-08 | 2021-03-16 | 之江实验室 | 一种基于多尺度卷积和感受野特征融合的人脸超分辨系统 |
Non-Patent Citations (1)
Title |
---|
DONG HANG; PAN JINSHAN; XIANG LEI; HU ZHE; ZHANG XINYI; WANG FEI; YANG MING-HSUAN: "Multi-Scale Boosted Dehazing Network With Dense Feature Fusion", 2020 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), IEEE, 13 June 2020 (2020-06-13), pages 2154 - 2164, XP033805188, DOI: 10.1109/CVPR42600.2020.00223 * |
Also Published As
Publication number | Publication date |
---|---|
CN116416140A (zh) | 2023-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Lan et al. | MADNet: A fast and lightweight network for single-image super resolution | |
JP7491041B2 (ja) | 画像コーディング装置、確率モデル生成装置及び画像デコーディング装置 | |
CN113392960B (zh) | 一种基于混合空洞卷积金字塔的目标检测网络及方法 | |
CN110490082B (zh) | 一种有效融合神经网络特征的道路场景语义分割方法 | |
CN109886330B (zh) | 文本检测方法、装置、计算机可读存储介质和计算机设备 | |
CN109816659B (zh) | 图像分割方法、装置及系统 | |
CN111369567B (zh) | 三维图像中目标对象的分割方法、装置及电子设备 | |
CN112270366B (zh) | 基于自适应多特征融合的微小目标检测方法 | |
CN109766918B (zh) | 基于多层次上下文信息融合的显著性物体检测方法 | |
CN111932480A (zh) | 去模糊视频恢复方法、装置、终端设备以及存储介质 | |
CN113962861A (zh) | 图像重建方法、装置、电子设备和计算机可读介质 | |
CN113052187B (zh) | 一种基于多尺度特征融合的全局特征对齐目标检测方法 | |
CN114202457A (zh) | 低分辨率图像的处理方法、电子设备及计算机程序产品 | |
CN113705575A (zh) | 一种图像分割方法、装置、设备及存储介质 | |
WO2023125522A1 (zh) | 一种图像处理方法及装置 | |
CN116433686A (zh) | 基于Transformer上下文信息融合的医学图像分割方法及相关设备 | |
CN116645513A (zh) | 水印提取方法、模型训练方法、装置、电子设备及介质 | |
WO2023046136A1 (zh) | 一种特征融合方法、图像去雾方法及装置 | |
CN115909088A (zh) | 基于超分辨特征聚合的光学遥感图像目标检测方法 | |
WO2023072176A1 (zh) | 一种视频的超分辨率方法及装置 | |
CN117808857B (zh) | 一种自监督360°深度估计方法、装置、设备及介质 | |
WO2024140109A1 (zh) | 一种图像超分方法及装置 | |
WO2023174355A1 (zh) | 视频的超分辨率方法及装置 | |
CN118071602B (zh) | 基于多尺度网络的遥感图像超分辨重建方法、系统及介质 | |
CN116645524B (zh) | 边缘检测方法及图像分割方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22914775 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |