A multi-scale fusion haze removal method based on a stacked hourglass network

Through the stacked hourglass network and multi-scale jump connection module combined with the layered attention distillation module, the problems of low fog removal efficiency and poor quality in the existing technology are solved, and efficient image defog removal effect is achieved, improving image clarity and detail recovery.

CN115330631BActive Publication Date: 2025-07-25NANJING UNIV OF POSTS & TELECOMM
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211007029.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-22
Publication Date
2025-07-25
Estimated Expiration
2042-08-22

AI Technical Summary

Technical Problem

The existing image defogging method based on deep learning requires many estimation parameters and insufficient features, resulting in low fogging efficiency and poor quality, and it is difficult to capture both local and global features at the same time.

Method used

A stacked hourglass network is used for multi-scale fusion defog removal, combining a multi-scale jump connection module and a layered attention distillation module, features are extracted on multiple scales through a stacked hourglass module, and features are fusion and optimization using a double-layer attention mechanism.

Benefits of technology

It improves the quality and efficiency of image defog removal, can better preserve spatial and context information, improves the clarity and detail recovery ability of the image, and meets the requirements of high-level image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115330631B_ABST
    Figure CN115330631B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-scale fusion dehazing method based on a stacked hourglass network. A foggy image is input into a preset image dehazing network. After being processed by the image dehazing network, a clear image after dehazing is output. The image dehazing network is a 7×7 convolutional layer, a stacked hourglass module, a feature fusion, a multi-scale skip connection module, a 1×1 convolutional layer, a 3×3 convolutional layer, a hierarchical attention distillation module, a 3×3 convolutional layer, and a 1×1 convolutional layer connected in sequence. The present invention can be applied to various computer vision systems, such as image recognition, video surveillance, industrial vision inspection, etc., which can reduce a large amount of labor costs and greatly improve the image quality and service efficiency. The purpose is to ensure better service to customers, so that the final dehazing result can meet the requirements of high-level image processing and conform to human visual requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a multi-scale fusion haze removal method based on a stacked hourglass network, belonging to the technical field of image processing. Background Technique

[0002] Vision is the most intuitive way for humans to obtain information. With the development of artificial intelligence, computer vision has been widely applied to various fields of our lives. However, due to air pollution problems, the clarity of the captured photos will be affected, showing characteristics such as reduced contrast, blurred images, and severely insufficient extractable features. And image and video, as the main sources for people to obtain information, their quality seriously affects the reading and judgment of information, and high-level image processing also has high requirements for the quality of the input image. Therefore, researching high-quality, fast, and general haze removal principles and methods has high theoretical significance and application value.

[0003] The purpose of image haze removal is to eliminate the influence of the haze environment on the image quality and increase the visibility of the image. Its methods can be mainly divided into three types. One is based on image enhancement algorithms, that is, enhancing the degraded image to improve the image quality and highlighting the features and valuable information of the scenery in the image. However, this method does not consider the reasons for image degradation, and may cause loss of some information in the image and distortion phenomena after processing. The second is the method based on the atmospheric degradation model, that is, using the prior knowledge of the haze-free image to estimate the parameters in the model, and then substituting the parameters into the model to restore the haze-free image. The haze-free image obtained by this method is clearer, more natural, and has less detail loss, but different prior knowledges have limitations in their respective application scenarios. The third is the method based on deep learning, that is, estimating the transmittance through the training data set, or directly outputting the haze-removed image by using the input hazy image. The current latest haze removal methods tend to the latter, but this method has limitations such as the need to estimate parameters, many estimated parameters, low haze removal efficiency and poor quality due to insufficient features. Summary of the Invention

[0004] Objective: To overcome the deficiencies in the prior art, the present invention provides a multi-scale fusion haze removal method based on a stacked hourglass network, which completes the learning task by constructing and combining multiple networks. First, use the stacked hourglass network to achieve feature extraction, and then perform feature fusion through a multi-scale module to obtain a generalization performance significantly superior to that of a single network. During the network optimization process, a double-layer attention module is used to enhance the convolutional feature expression ability of the mobile network.

[0005] Technical Solution: To solve the above technical problems, the technical solution adopted by the present invention is as follows:

[0006] A multi-scale fusion haze removal method based on a stacked hourglass network, comprising the following steps:

[0007] Input the foggy image into a pre-set image defogging network.

[0008] After being processed by the image defogging network, the foggy image outputs a clear image after defogging.

[0009] The image defogging network is a 7×7 convolutional layer, a stacked hourglass module, feature fusion, a multi-scale skip connection module, a 1×1 convolutional layer, a 3×3 convolutional layer, a hierarchical attention distillation module, a 3×3 convolutional layer, and a 1×1 convolutional layer connected in sequence.

[0010] As a preferred solution, the stacked hourglass module is composed of N fourth-order hourglass modules connected in series. The fourth-order hourglass module contains five parallel convolutional streams: the innermost convolutional stream processes the original scale, and the second-to-outermost convolutional streams downsample to 1 / 2, 1 / 4, 1 / 8, and 1 / 16 respectively. The five convolutional streams extract features in different resolution groups, then transfer the features of each resolution through a residual module, and finally restore to the original scale through an upsampling operation layer and fuse them.

[0011] As a preferred solution, the fourth-order hourglass module replaces the middle residual module in the fourth row of the third-order hourglass module with a first-order hourglass module. The third-order hourglass module replaces the middle residual module in the third row of the second-order hourglass module with a first-order hourglass module. The second-order hourglass module replaces the middle residual module in the second row of the first-order hourglass module with a first-order hourglass module. The first-order hourglass module consists of two rows. The first row contains a residual module, and the second row consists of a max pooling layer, three residual modules, and an upsampling operation layer in sequence. After feature fusion between the first row and the second row, the output is obtained.

[0012] As a preferred solution, the residual module consists of two rows. The first row is a skip layer, including a 1×1 convolutional layer. The second row is a convolutional layer, which is a BN layer, a Relu layer, a 1×1 convolutional layer, a BN layer, a Relu layer, a 3×3 convolutional layer, a BN layer, a Relu layer, and a 1×1 convolutional layer in sequence. After feature fusion at the output ends of the skip layer and the convolutional layer, the output is obtained.

[0013] As a preferred solution, N is set to 8.

[0014] As a preferred solution, the multi-scale skip connection module includes: the first row is formed by connecting three 3×3 convolutional layers and a Relu layer in series, the second row is formed by connecting three 5×5 convolutional layers and a Relu layer in series, and the third row is formed by connecting three 7×7 convolutional layers and a Relu layer in series. The outputs of the first 3×3 convolutional layer and the Relu layer in each row are respectively used as the inputs of the second 3×3 convolutional layer and the Relu layer in each row, and the outputs of the second 3×3 convolutional layer and the Relu layer in each row are respectively used as the inputs of the third 3×3 convolutional layer and the Relu layer in each row. The outputs of the third 3×3 convolutional layer and the Relu layer in each row are fused through Contact and then output.

[0015] As a preferred solution, the hierarchical attention distillation module includes a channel attention module and a spatial attention module. The outputs of the channel attention module and the spatial attention module are fused and then output.

[0016] As a preferred solution, the channel attention module respectively passes the input feature map F(H×W×C, where H represents height, W represents width, and C represents the number of channels) through a global max pooling layer in the H dimension and a global average pooling layer in the W dimension to obtain two 1×1×C feature maps; the two feature maps are fed into a two-layer neural network with shared weights to learn the inter-channel dependency relationship, the features output by the MLP are added and fused, and then through a sigmoid activation operation, the final channel weight M is generated.

[0017] As a preferred solution, the spatial attention module respectively passes the input feature map F(H×W×C, H: height, W: width, C: number of channels) through a max pooling layer and an average pooling layer based on the C dimension to obtain two H×W×1 feature maps; the two H×W×1 feature maps are concatenated based on the channel dimension, and the concatenated feature map is then dimension-reduced in channels using a 7×7 convolutional layer. Finally, through a sigmoid activation operation, the weight M in the spatial dimension is generated.

[0018] Beneficial effects: The multi-scale fusion dehazing method based on a stacked hourglass network provided by the present invention solves the problems of low dehazing efficiency and poor quality caused by the need to estimate parameters and a large number of estimated parameters and insufficient features in the existing image dehazing method based on deep learning.

[0019] The present invention belongs to end-to-end dehazing. By inputting a hazy image into the above network, a haze-free image can be directly output. Since the stacked hourglass module and the multi-scale skip connection module are used, the problem that existing neural networks cannot effectively capture local and global features simultaneously can be solved; the hierarchical attention distillation module is introduced to optimize the network structure, retain spatial and context information, and extract more useful hierarchical features. It can make obvious progress in making full use of multi-scale fog features and restoring structural details, and improve the quality of the generated pictures.

[0020] The present invention first uses a stacked hourglass network to repeatedly capture features at various scales from bottom to top and then from top to bottom, and then uses the method of multi-scale skip connection to repeatedly fuse information. Finally, a double-layer attention mechanism is combined to avoid feature disappearance and remove unnecessary features to achieve comprehensive feature aggregation and improve the dehazing performance. The present invention can be applied to various computer vision systems, such as image recognition, video surveillance, industrial vision inspection, etc., which can reduce a large amount of labor costs, greatly improve the image quality and service efficiency, aiming to ensure better service to customers, so that the final dehazing result can meet the requirements of high-level image processing and conform to human visual requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is the overall flowchart of the implementation of the method of the present invention.

[0022] Figure 2 It is a schematic diagram of the network architecture of the fourth-order hourglass module sampling rule.

[0023] Figure 3 It is a schematic diagram of the network architecture of the residual module.

[0024] Figure 4 It is a schematic diagram of the network architecture of the first-order hourglass module.

[0025] Figure 5 It is a schematic diagram of the network architecture of the fourth-order hourglass module.

[0026] Figure 6 It is a schematic diagram of the network architecture of the multi-scale skip connection module.

[0027] Figure 7 It is a schematic diagram of the network architecture of the hierarchical attention distillation module.

[0028] Figure 8 It is the implementation flowchart of the channel attention module.

[0029] Figure 9 It is the implementation flowchart of the spatial attention module. DETAILED DESCRIPTION OF THE INVENTION

[0030] The present invention will be further described in detail below in conjunction with specific embodiments.

[0031] As Figure 1 shown, the present invention discloses a multi-scale fusion defogging method based on a stacked hourglass network. When a foggy image is input, it enters the image defogging network and directly outputs a clear image after defogging.

[0032] The image defogging network successively includes a 7×7 convolutional layer, a stacked hourglass module, feature fusion, a multi-scale skip connection module, a 1×1 convolutional layer, a 3×3 convolutional layer, a hierarchical attention distillation module, a 3×3 convolutional layer, and a 1×1 convolutional layer.

[0033] Among them, the 7×7 convolutional layer is used to perform the first-step processing on the original foggy image to form an initial feature image. The feature fusion is set as an addition operation for feature addition. The 1×1 convolutional layer after the multi-scale skip connection module is used to adjust the number of channels, adjust the number of channels changed after contact, and obtain low-frequency feature information. The 3×3 convolutional layer after the multi-scale skip connection module is used to obtain high-frequency feature information. The 3×3 convolutional layer and the 1×1 convolutional layer after the hierarchical attention distillation module are used to achieve the modification or auxiliary function of features.

[0034] The stacked hourglass module is composed of N fourth-order hourglass modules connected in series. In the present invention, when N = 4, 6, 8, 10, PSNR (peak signal-to-noise ratio) = 27.28, 27.96, 28.35, 28.37, and SSIM (structural similarity) = 0.9122, 0.9180, 0.9217, 0.9214. The larger these two indicators are, the better. However, when N changes from 4 to 8, the change is obvious. When N changes from 8 to 10, the increase in PSNR is not obvious and SSIM decreases. Therefore, the optimal value of N selected in the present invention is 8.

[0035] As Figure 2 shown, the fourth-order hourglass module integrates tightly connected residual block modules, a max pooling layer, an upsampling operation layer, and residual fusion through a parallel structure to form a symmetric topological structure. Each scale first goes from top to bottom and then has a corresponding bottom-up layer, so as to achieve the purpose of repeatedly extracting features from top to bottom and bottom to top. The size of the square represents the size of the feature map. The square becoming smaller represents downsampling, the square becoming larger represents upsampling, and the plus sign represents element-wise addition.

[0036] The specific process is as follows: The four - order hourglass module contains five parallel convolutional streams: The innermost convolutional stream processes the original scale, and the second - innermost to the outermost convolutional streams are downsampled to 1 / 2, 1 / 4, 1 / 8, and 1 / 16 respectively. The five convolutional streams perform feature extraction in different resolution groups, and then transfer the features of each resolution through the residual module. Finally, it is restored to the original scale through the up - sampling operation layer and fused, that is, the features of different resolutions are added element - by - element. Therefore, it can extract and retain feature information at multiple scales, achieving the effect of simultaneously retaining local features and global features.

[0037] The residual module is the basic building block of the first - order hourglass module. The specific network architecture is shown in Figure 3 . The residual module consists of two rows. The first row is the skip layer, including a 1×1 convolutional layer (Conv) for retaining the information of the original layer. The second row is the convolutional layer for feature extraction, which are, in sequence, a BN layer, a Relu layer, a 1×1 convolutional layer, a BN layer, a Relu layer, a 3×3 convolutional layer, a BN layer, a Relu layer, and a 1×1 convolutional layer. After the feature fusion at the output ends of the skip layer and the convolutional layer, the output is obtained.

[0038] For the convolutional layer in the second row, the BN layer first normalizes the signal. After passing through the Relu layer, the main path adds non - linearity. Then, passing through the 1×1 convolutional layer plays a role in dimensionality reduction, and after dimensionality reduction, data training and feature extraction can be carried out more effectively and intuitively. Then, it passes through the BN layer and the Relu layer again, and then through the 3×3 convolutional layer for relatively low - dimensional calculations, improving the network depth and efficiency. Then, it passes through the BN layer and the Relu layer for the third time, and passes through the 1×1 convolutional layer again to play a role in dimensionality increase. Finally, it performs feature fusion with the skip layer, only increasing the data depth without changing the data size.

[0039] The first - order hourglass module consists of two rows. The specific network architecture is shown in Figure 4 . The first row contains only one residual module. The second row consists of, in sequence, a max - pooling layer (Max Pool) for downsampling the feature map to obtain a feature map with a lower resolution, reducing the computational complexity, three residual modules, and an up - sampling operation layer (Up Sample) for upsampling the feature map using the nearest - neighbor interpolation method to increase the resolution of the image features, with the aim of keeping the same size as the input image. After the feature fusion between the first row and the second row, the output is obtained, so that the output result contains both the features of the original resolution and the features with the resolution reduced to 1 / 2 after downsampling.

[0040] The second-order hourglass module replaces the residual module in the middle of the second row of the first-order hourglass module with the first-order hourglass module. The third-order hourglass module replaces the residual module in the middle of the third row of the second-order hourglass module with the first-order hourglass module. The fourth-order hourglass module replaces the residual module in the middle of the fourth row of the third-order hourglass module with the first-order hourglass module, and so on, forming a recursive structure, as Figure 5 shown.

[0041] As Figure 6 shown, the multi-scale skip connection module includes: convolution operations with three different sizes of convolutional kernels combined with activation functions. The first row is composed of three 3×3 convolutional layers and Relu layers connected in series. The second row is composed of three 5×5 convolutional layers and Relu layers connected in series. The third row is composed of three 7×7 convolutional layers and Relu layers connected in series. The outputs of the first 3×3 convolutional layer and Relu layer in each row are respectively used as the inputs of the second 3×3 convolutional layer and Relu layer in each row. The outputs of the second 3×3 convolutional layer and Relu layer in each row are respectively used as the inputs of the third 3×3 convolutional layer and Relu layer in each row. The outputs of the third 3×3 convolutional layer and Relu layer in each row are fused through Contact.

[0042] Using convolutional kernels of different sizes can extract features at different scales and obtain deep detailed information. In addition, in order to ensure that the size of the feature map after convolution does not change compared with the original fog image, zero-padding is used for the convolution operation. An activation function is introduced after the convolution operation to perform a non-linear operation on the output result of the convolutional layer, enabling the convolutional neural network to solve complex problems and improving the robustness of the convolutional neural network to non-linear factors. When selecting the activation function, the leaky rectified linear unit Leaky ReLU is adopted. Its function image is a linear function in the segmented interval, non-linear as a whole, and the value range is the entire real number set, which can improve the network convergence speed.

[0043] However, the present invention has an innovation in the connection method. Instead of simply performing parallel convolution operations on three groups of convolutional kernels with different sizes, a skip connection method is adopted. The result output by the previous 3×3 convolutional layer and Relu layer in this row is not only output to the next 3×3 convolutional layer and Relu layer connected in series, but also output to the next 3×3 convolutional layer and Relu layer in the other two rows. Therefore, the input of the next 3×3 convolutional layer and Relu layer in each row is the sum of the outputs of the previous 3×3 convolutional layer and Relu layer with different sizes of convolutional kernels, so as to achieve multi-scale information fusion.

[0044] After each line of convolution kernel operations, 3 feature maps are obtained. The three feature maps output by the third 3×3 convolutional layer and the ReLU layer are fused through Contact, that is, the number of channels of the three feature maps is added, and the information under each channel is not added. By increasing the number of channels, the features obtained previously are combined, and the features extracted by convolutional kernels of different scales are retained to achieve better performance.

[0045] The output of each convolution in the multi-scale skip connection module is:

[0046] F a n×n The output of the first convolutional layer with a convolution size of n×n, which can be expressed as:

[0047] F a 3×3 = Conv 3×3 (F in ; θ a 3×3 );

[0048] F a 5×5 = Conv 5×5 (F in ; θ a 5×5 );

[0049] F a 7×7 = Conv 7×7 (F in ; θ a 7×7 );

[0050] Where: F in is the original image input to the multi-scale skip connection module, Conv n×n (·) is the convolution operation, and θ a n×n represents the hyperparameter formed by the first multi-scale convolution with a convolution kernel size of n×n.

[0051] F b n×n The output of the second convolutional layer with a convolution size of n×n, which can be expressed as:

[0052] F b 3×3 = Conv 3×3 ((F a 3×3 +F a 5×5 +F a 7×7 ); θ b3×3 );

[0053] F b 5×5 = Conv 5×5 ((F a 3×3 + F a 5×5 + F a 7×7 ); θ b 5×5 );

[0054] F b 7×7 = Conv 7×7 ((F a 3×3 + F a 5×5 + F a 7×7 ) ; θ b 7×7 );

[0055] F c n×n is the output of the third convolutional layer with a convolutional size of n×n and can be expressed as:

[0056] F c 3×3 = Conv 3×3 ((F b 3×3 + F b 5×5 + F b 7×7 ); θ c 3×3 );

[0057] F c 5×5 = Conv 5×5 ((F b 3×3 + F b 5×5 + F b 7×7 ); θ c 5×5 );

[0058] F c 7×7 = Conv 7×7 ((F b 3×3 + F b 5×5 + F b7×7 ) ; θ c 7×7 );

[0059] For the dehazing problem, the key is to make full use of the characteristics of fog and transfer them to the final dehazing process. As the network depth increases, the spatial expression ability gradually decreases during the transmission process, and a large number of redundant features are generated aimlessly, directly affecting the dehazing quality. The hierarchical attention distillation module is composed of a spatial attention module and a channel attention module in parallel. Its structure is shown in Figure 7 , using dual attention units to learn the importance of space and channels respectively, adding the output results, which not only retains space and context information, but also reduces unnecessary features by using hierarchical attention fusion, only allowing information features to be further transmitted, eliminating redundant features, achieving feature distillation, and being easily embedded into the framework.

[0060] The structure of the channel attention module is as shown in Figure 8 . The specific operations are as follows: First, the input feature map F (H×W×C, where H represents height, W represents width, and C represents the number of channels) passes through the global maximum pooling layer (MaxPool) and the global average pooling layer (AvgPool) based on the two dimensions of H and W respectively, obtaining two feature maps of 1×1×C; then the two feature maps are fed into a two-layer neural network (MLP) with shared weights to learn the inter-channel dependence relationship, and dimensionality reduction is achieved through the compression ratio r between the two neural layers. Finally, the features output by the MLP are added and fused, and then passed through the sigmoid activation operation to generate the final channel weight M, mining the relationship between the feature context information and the hierarchical features.

[0061] The calculation formula of the channel attention module is:

[0062] M(F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F))), where σ represents sigmoid.

[0063] The structure of the spatial attention module is as shown in Figure 9 . The specific operations are as follows: First, the input feature map F (H×W×C, H: height, W: width, C: number of channels) passes through the maximum pooling layer (MaxPool) and the average pooling layer (AvgPool) based on the C dimension respectively, obtaining two feature maps of H×W×1; then the two feature maps of H×W×1 are concatenated based on the channel dimension, and the concatenated feature map is then reduced in channels using a 7×7 convolutional layer. Finally, after passing through the sigmoid activation operation, the weight M in the spatial dimension is generated, learning the dependence relationship between different spatial elements.

[0064] The calculation formula of the spatial attention module is:

[0065] M(F) = σ(f 7×7 ([AvgPool(F); MaxPool(F)]))), where σ represents sigmoid and f 7×7 represents a 7×7 convolutional layer.

[0066] The present invention discloses a multi-scale fusion dehazing method based on a stacked hourglass network in the field of image processing. This method uses a stacked hourglass network to extract features from different scales to generate a heat map; then a new multi-scale fusion dehazing module is constructed by using skip connections; finally, a hierarchical distillation structure with an attention mechanism is added to remove redundant information to obtain a dehazed image.

[0067] The purpose of the present invention is to solve the problem that existing neural networks cannot effectively capture local and global features simultaneously. Although existing models have made great progress in dehazing effects, they are insufficient in making full use of multi-scale fog features and restoring structural details, and few people have tried to preserve spatial features and eliminate redundant information. The hourglass network in the present invention has multiple parallel prediction branches, which are stacked and combined with a multi-scale fusion module, and finally the useless features are reduced through a hierarchical distillation structure. Therefore, it can better mix global and local information, has high flexibility. In addition, the spatial continuity it causes has better analysis ability for thick fog images and real scenes, can also perform excellently in describing complex structures, preserves texture details as completely as possible, greatly improves the quality of image dehazing, makes the visual effect of dehazing more realistic and natural, and effectively improves the network performance.

[0068] The above is only the preferred embodiment of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A multi-scale fusion defogging method based on a stacked hourglass network, characterized in that: It includes the following steps: Input the foggy image into a pre-set image defogging network; After the foggy image is processed by the image defogging network, an output clear image after defogging is obtained; The image defogging network is a 7×7 convolutional layer, a stacked hourglass module, feature fusion, a multi-scale skip connection module, a 1×1 convolutional layer, a 3×3 convolutional layer, a hierarchical attention distillation module, a 3×3 convolutional layer, and a 1×1 convolutional layer connected in sequence; The stacked hourglass module is composed of N fourth-order hourglass modules connected in series. The fourth-order hourglass module contains five parallel convolutional streams: the innermost convolutional stream processes the original scale, and the second-to-outermost convolutional streams downsample to 1 / 2, 1 / 4, 1 / 8, and 1 / 16 respectively. The five convolutional streams perform feature extraction in different resolution groups, then transfer the features of each resolution through a residual module, and finally restore and fuse them to the original scale through an upsampling operation layer; The fourth-order hourglass module replaces the middle residual module in the fourth row of the third-order hourglass module with a first-order hourglass module. The third-order hourglass module replaces the middle residual module in the third row of the second-order hourglass module with a first-order hourglass module. The second-order hourglass module replaces the middle residual module in the second row of the first-order hourglass module with a first-order hourglass module. The first-order hourglass module consists of two rows. The first row contains a residual module, and the second row consists of a max pooling layer, three residual modules, and an upsampling operation layer in sequence; after the feature fusion of the first row and the second row, the output is obtained.

2. A multi-scale fusion defogging method based on a stacked hourglass network according to claim 1, characterized in that: The residual module consists of two rows. The first row is a skip layer, including a 1×1 convolutional layer; the second row is a convolutional layer, which is a BN layer, a Relu layer, a 1×1 convolutional layer, a BN layer, a Relu layer, a 3×3 convolutional layer, a BN layer, a Relu layer, and a 1×1 convolutional layer in sequence; after the feature fusion of the output ends of the skip layer and the convolutional layer, the output is obtained.

3. A multi-scale fusion defogging method based on a stacked hourglass network according to claim 1, characterized in that: The N is set to 8.

4. A multi-scale fusion defogging method based on a stacked hourglass network according to claim 1, characterized in that: The multi-scale skip connection module includes: the first row is composed of three 3×3 convolutional layers and Relu layers connected in series, the second row is composed of three 5×5 convolutional layers and Relu layers connected in series, and the third row is composed of three 7×7 convolutional layers and Relu layers connected in series; the outputs of the first 3×3 convolutional layer and Relu layer in each row are respectively used as the inputs of the second 3×3 convolutional layer and Relu layer in each row, and the outputs of the second 3×3 convolutional layer and Relu layer in each row are respectively used as the inputs of the third 3×3 convolutional layer and Relu layer in each row. The outputs of the third 3×3 convolutional layer and Relu layer in each row are fused through Contact and then output.

5. A multi-scale fusion defogging method based on a stacked hourglass network according to claim 1, characterized in that: The hierarchical attention distillation module includes a channel attention module and a spatial attention module. The outputs of the channel attention module and the spatial attention module are fused and then output.

6. A multi-scale fusion dehazing method based on a stacked hourglass network according to claim 5, characterized in that: The channel attention module respectively passes the input feature map F through a global max pooling layer in the H dimension and a global average pooling layer in the W dimension to obtain two feature maps of 1×1×C, where the size of the feature map F is H×W×C, H represents height, W represents width, and C represents the number of channels; the two feature maps are fed into a two-layer neural network with shared weights to learn the inter-channel dependency relationship, the features output by the MLP are added and fused, and then through a sigmoid activation operation, the final channel weight M is generated.

7. A multi-scale fusion dehazing method based on a stacked hourglass network according to claim 5, characterized in that: The spatial attention module respectively passes the input feature map F through a max pooling layer and an average pooling layer based on the C dimension to obtain two feature maps of H×W×1, where the size of the feature map F is H×W×C, H represents height, W represents width, and C represents the number of channels; the two feature maps of H×W×1 are concatenated based on the channel dimension, the concatenated feature map is then dimension-reduced in channels using a 7×7 convolutional layer, and finally through a sigmoid activation operation, the weight M in the spatial dimension is generated.

Citation Information

Patent Citations

  • Rainwater removing method and system based on multi-scale hourglass dense connection network and medium

    CN113673590A