Depth map super-resolution method based on guided attention mechanism
By introducing the guided attention mechanism and the lightweight network HDSRnet-light into the depth map super-resolution, combined with the edge refinement network ERnet, the problems of low operating efficiency and low information utilization efficiency of the depth map super-resolution method in the existing technology are solved. Efficient depth map super-resolution and fine edge reconstruction are achieved.
Patent Information
- Application Number
- CN202111400288.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2024-09-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Due to the large amount of network parameters and low operating efficiency, the existing depth map super-resolution method is difficult to deploy into practical application equipment, and the information utilization efficiency is low, making it difficult to apply in scenarios with high precision requirements.
Using a depth map super-resolution method based on a guided attention mechanism, through the lightweight network HDSRnet-light and the edge refinement network ERnet, combined with bicubic interpolation upsampling and attention modules, the low-resolution depth map and the high-resolution color map are efficiently fused. Characteristics, a two-stage training strategy is designed to improve performance.
Efficient depth map super-resolution is achieved. The network can perform 8-fold super-resolution on a 135×240 depth map at a speed of 360 frames/second. The performance and speed exceed other methods in related fields, and are achieved through edge thinning networks. More refined edge reconstruction.
Smart Images

Figure CN114170079B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of image restoration and relates to a method for super-resolution of depth maps. Background Art
[0002] Depth map, also known as distance image, is an image that uses the distance between the image collector and each point in the scene as the pixel value. Currently, depth map acquisition is mainly achieved using technologies such as structured light illumination and TOF (Time of Flight). However, due to the limitations of the current physical performance of the equipment, the resolution of the depth map captured by the current depth camera is low, making it difficult to apply in scenes with high precision requirements.
[0003] Current depth cameras are usually configured with a depth camera lens and a color camera lens, and the corresponding collected data is a low-resolution depth map and a paired high-resolution color map. In order to obtain a high-resolution depth map, a high-resolution color image is usually used to guide the low-resolution depth image for super-resolution.
[0004] Depth map super-resolution methods based on this guiding idea are mainly divided into two categories:
[0005] (1) Traditional methods, such as super-resolution schemes based on image filters; introducing prior information and using the maximum a posteriori probability theory to transform the super-resolution problem into an optimization problem; and using dictionary learning and other methods.
[0006] (2) Use convolutional neural networks (CNNs) to directly learn the mapping between low-resolution depth images and corresponding high-resolution depth images. This type of method requires a large number of paired low-resolution depth images and high-resolution depth images to train the network. These paired images are the training data set for the network. However, in existing research, most methods simply splice the features of high-resolution color images and depth images, resulting in low efficiency in information utilization. Currently, most networks improve performance by stacking parameters, which results in a large number of network parameters, low operating efficiency, and difficulty in deployment in actual application devices. Therefore, the current development trend of this type of method is to use a more efficient feature fusion method to improve network performance and thereby enhance its practical application value. Summary of the invention
[0007] In order to overcome the shortcomings of the prior art, the present invention aims to provide a depth map super-resolution method with high operating efficiency and superior performance by guiding the attention mechanism. The technical solution is as follows:
[0008] A depth map super-resolution method based on a guided attention mechanism comprises the following steps:
[0009] 1) Analyze the low-resolution depth map features and establish a degradation model in the screen shot image:
[0010] D lr =HD hr +n0
[0011] Where D lr is the low-resolution image captured by the depth camera, D hr is a high-resolution depth image, H is the downsampling matrix, and n0 is the noise.
[0012] 2) Create a dataset
[0013] The high-resolution data of the training set is composed of multiple RGB-D images in the MPI Sintel depth dataset and multiple RGB-D images in the Middlebury dataset randomly cropped. The size of each pair of RGB-D data is increased by introducing random rotation of angles θ∈[0°,90°,180°,270°]. The low-resolution data is obtained by downsampling the high-resolution depth map through bicubic interpolation.
[0014] 3) Design network framework
[0015] 31) The overall network structure consists of a lightweight network HDSRnet-light and an optional edge refinement network ERnet. The low-resolution depth map, the depth map upsampled by bicubic interpolation, and the high-resolution color map are input into HDSRnet-light to obtain a high-resolution depth map. The high-resolution depth map and high-resolution color map are then input into ERnet for further reconstruction, and finally a fine high-resolution output is obtained. The entire network is HDSRnet;
[0016] 32) The lightweight network HDSRnet-light consists of three branches: the main branch; the structure side branch; the detail side branch. The two side branches consist of an upsampling module and a downsampling module. The main branch consists of an upsampling module, a downsampling module-guided attention module, and an attention module. The low-resolution depth map is input to the main branch, the depth map upsampled by bicubic interpolation is input to the structure side branch, and the high-resolution color map is input to the detail side branch.
[0017] 321) Downsampling module structure: convolution layer 1 - pooling layer 1 - convolution layer 2. All convolution layers in the module are followed by ReLu activation function.
[0018] 322) Upsampling module structure: deconvolution layer 1 - convolution layer 1, all convolution layers and deconvolution layers in the module are connected with ReLu activation function.
[0019] 323) Guided attention module structure: convolution layer 1 - convolution layer 2 - multiplication layer - convolution layer 3, where the main branch features enter convolution layer 1, the side branch features enter convolution layer 2, the outputs of convolution layer 1 and convolution layer 2 are element-wise multiplied in the multiplication layer, the output of convolution layer 2 enters convolution layer 3, the output of convolution layer 3 is added to the output of the multiplication layer, and all convolution layers are connected with ReLu activation function.
[0020] 324) Attention module structure: guided attention module 1-guided attention module 2, wherein the main branch features and side branch features enter guided attention module 1, and the output of guided attention module 1 and side branch features enter guided attention module 2.
[0021] 325) Main branch structure: convolution layer 1—fusion layer 1—guided attention module 1—up-sampling module 1—attention module 1—up-sampling module 2—attention module 2—convolution layer 2, wherein fusion layer 1 merges the outputs of main branch convolution layer 1 and structure side branch down-sampling module 2 in the channel dimension, guided attention module 1 fuses the outputs of detail side branch down-sampling module 2 and main branch fusion layer 1, attention module 1 fuses the outputs of structure side branch down-sampling module 1, detail side branch down-sampling module 1 and main branch up-sampling module 1, attention module 2 fuses the outputs of structure side branch convolution layer 1, detail side branch convolution layer 1 and main branch up-sampling module 2. The final output is the output of main branch convolution layer 2 plus the output of bicubic interpolation up-sampling;
[0022] 326) Detail side branch structure: convolution layer 1 - downsampling module 1 - downsampling module 2. This branch is responsible for processing the information of high-resolution color images. The outputs of downsampling module 1 and downsampling module 2 are sent to the attention module of the main branch for feature fusion. Convolution layer 1 is followed by a ReLu activation function.
[0023] 327) Structure Side branch structure: Convolution layer 1 - downsampling module 1 - downsampling module 2. This branch is responsible for processing the depth map information of bicubic interpolation upsampling. The outputs of downsampling module 1 and downsampling module 2 are sent to the attention module of the main branch for feature fusion. Convolution layer 1 is followed by a ReLu activation function.
[0024] 33) The edge refinement network ERnet consists of two branches: the depth main branch and the detail side branch. The output of HDSRnet-light is input to the depth main branch, and the high-resolution color image is input to the detail side branch. Both branches are composed of convolutional layers to achieve fine reconstruction of edges.
[0025] 331) Detail side branch structure: convolution layer C1 - convolution layer C2 - convolution layer C3 - convolution layer C4 - convolution layer C5 - convolution layer C6 - convolution layer C7 - convolution layer C8 - convolution layer C9. This branch is responsible for processing high-resolution color image information. All convolution layers are connected in series and are connected with ReLu activation functions.
[0026] 332) Deep branch structure: convolution layer D1—fusion layer F1—convolution layer D2—fusion layer F2—convolution layer D3—fusion layer F3—convolution layer D4—fusion layer F4—convolution layer D5—fusion layer F5—convolution layer D6—fusion layer F6—convolution layer D7—fusion layer F7—convolution layer D8—fusion layer F8—convolution layer D9—fusion layer F9—convolution layer D 10 This branch is responsible for processing the depth map information and fusing the color branch information. All convolutional layers are connected in series. The fusion layer F i Fuse the deep branch convolutional layer D in the channel dimension i The output and color branch convolution layer C i Output.
[0027] 4) Set the learning rate of the network and the weights of each part of the loss function, and use the deep learning framework Pytorch to train the above convolutional neural network until the loss converges to generate a training model;
[0028] 41) After determining the network structure, input the training data into the network;
[0029] 42) In the first stage of network training, the initial learning rate of the HDSRnet-light network was set to 0.0001. After each epoch, the learning rate was reduced to 0.1 times of the original value. norm as loss function;
[0030] 43) In the second stage of network training, after training HDSRnet-light for 30 epochs, ERnet is connected to HDSRnet-light. norm as loss function;
[0031] 44) is trained to obtain the mapping of low-resolution depth maps to high-resolution depth maps through HDSRnet-light; and the mapping of high-resolution depth maps to fine high-resolution depth maps is obtained through ERnet.
[0032] The method of the present invention is aimed at super-resolution of depth maps. Based on the deep learning method, low-resolution data is generated on the basis of public data sets and trained on the convolutional neural network HDSRnet. The HDSRnet-light part realizes efficient super-resolution of depth maps and achieves superior performance with very few parameters. The ERnet part realizes more refined edge reconstruction. The present invention has the following characteristics:
[0033] 1. We propose an efficient and lightweight depth map super-resolution network HDSRnet-light, in which the attention module can efficiently fuse the features of high-resolution color images and low-resolution depth images. The network can perform 8x super-resolution on 135×240 depth maps at a speed of 360 frames per second, and its performance and speed exceed other methods in related fields.
[0034] 2. An edge refinement network ERnet is proposed to perform more refined repairs based on HDSRnet-light, correct some edge deviations, and achieve better performance.
[0035] 3. According to the characteristics of different loss functions, a two-stage training strategy is proposed, taking into account Norm and The characteristics of the norm accelerate the convergence speed and performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is the algorithm flow chart;
[0037] Figure 2 It is a network framework diagram;
[0038] Figure 3 This is the attention module framework diagram;
[0039] Figure 4 The following are the comparison results of various methods: (a) the original high-resolution depth map, (b) the result after bicubic interpolation upsampling, (c) the result of the deep learning method Depth SR, (d) the result of the deep learning method PMBANet, (e) the result of the deep learning method DEIN, and (f) the super-resolution result of the present invention. DETAILED DESCRIPTION
[0040] In order to overcome the shortcomings of the prior art, the present invention aims to provide a depth map super-resolution method with high operating efficiency and excellent performance by guiding the attention mechanism:
[0041] 1) Analyze the low-resolution depth map features and establish a degradation model in the screen shot image:
[0042] D lr =HD hr +n0
[0043] In the above formula, D lr is the low-resolution image captured by the depth camera, D hr is a high-resolution depth image, H is the downsampling matrix, and n0 is the noise.
[0044] 2) Create a dataset
[0045] The high-resolution data of the training set is composed of 58 RGB-D images from the MPI Sintel depth dataset and 34 RGB-D images from the Middlebury dataset randomly cropped. The size of each pair of RGB-D data is increased by introducing random rotation of angle θ∈[0°,90°,180°,270°]. The low-resolution data is obtained by downsampling the high-resolution depth map through bicubic interpolation.
[0046] The test set is generated in the same way using six images from the Middlebury 2005 dataset.
[0047] 3) Design network framework
[0048] 31) The overall network structure consists of a lightweight network HDSRnet-light and an optional edge refinement network ERnet. The low-resolution depth map, the depth map upsampled by bicubic interpolation, and the high-resolution color map are input into HDSRnet-light to obtain a high-resolution depth map. The high-resolution depth map and high-resolution color map are then input into ERnet for further reconstruction, and finally a fine high-resolution output is obtained.
[0049] The entire network is HDSRnet;
[0050] 32) The lightweight network HDSRnet-light consists of three branches: the main branch; the structure side branch; the detail side branch. The two side branches consist of an upsampling module and a downsampling module. The main branch consists of an upsampling module, a downsampling module-guided attention module, and an attention module. The low-resolution depth map is input to the main branch, the depth map upsampled by bicubic interpolation is input to the structure side branch, and the high-resolution color map is input to the detail side branch.
[0051] 321) Downsampling module structure: convolution layer 1 - pooling layer 1 - convolution layer 2. All convolution layers in the module are followed by ReLu activation function.
[0052] 322) Upsampling module structure: Deconvolution layer 1 - Convolution layer 1. All convolutional layers and deconvolution layers in the module are followed by ReLu activation function.
[0053] 323) Guided attention module structure: convolution layer 1 - convolution layer 2 - multiplication layer - convolution layer 3. Among them, the main branch features enter convolution layer 1, the side branch features enter convolution layer 2, the outputs of convolution layer 1 and convolution layer 2 are element-wise multiplied in the multiplication layer, the output of convolution layer 2 enters convolution layer 3, and the output of convolution layer 3 is added to the output of the multiplication layer. All convolution layers are connected with ReLu activation function.
[0054] 324) Attention module structure: guided attention module 1-guided attention module 2. Among them, the main branch features and side branch features enter the guided attention module 1, and the output of the guided attention module 1 and the side branch features enter the guided attention module 2.
[0055] 325) Main branch structure: convolution layer 1—fusion layer 1—guided attention module 1—up-sampling module 1—attention module 1—up-sampling module 2—attention module 2—convolution layer 2. Among them, fusion layer 1 merges the outputs of main branch convolution layer 1 and structure side branch down-sampling module 2 in the channel dimension, guided attention module 1 fuses the outputs of detail side branch down-sampling module 2 and main branch fusion layer 1, attention module 1 fuses the outputs of structure side branch down-sampling module 1, detail side branch down-sampling module 1 and main branch up-sampling module 1, attention module 2 fuses the outputs of structure side branch convolution layer 1, detail side branch convolution layer 1 and main branch up-sampling module 2. The final output is the output of main branch convolution layer 2 plus the output of bicubic interpolation up-sampling;
[0056] 326) Detail side branch structure: convolution layer 1 - downsampling module 1 - downsampling module 2. This branch is responsible for processing the information of high-resolution color images, where the outputs of downsampling module 1 and downsampling module 2 are sent to the attention module of the main branch for feature fusion. Convolution layer 1 is followed by a ReLu activation function;
[0057] 327) Structure Side branch structure: Convolution layer 1 - downsampling module 1 - downsampling module 2. This branch is responsible for processing the depth map information of bicubic interpolation upsampling, where the outputs of downsampling module 1 and downsampling module 2 are sent to the attention module of the main branch for feature fusion. Convolution layer 1 is followed by a ReLu activation function.
[0058] 33) The edge refinement network ERnet consists of two branches: the depth main branch and the detail side branch. The output of HDSRnet-light is input to the depth main branch, and the high-resolution color image is input to the detail side branch. Both branches are composed of convolutional layers to achieve fine reconstruction of edges.
[0059] 331) Detailed side branch structure: Convolutional layer C1 - Convolutional layer C2 - Convolutional layer C3 - Convolutional layer C4 - Convolutional layer C5 - Convolutional layer C6 - Convolutional layer C7 - Convolutional layer C8 - Convolutional layer C9. This branch is responsible for processing high-resolution color image information. All convolutional layers are connected in series and are connected with ReLu activation functions.
[0060] 332) Deep branch structure: convolution layer D1—fusion layer F1—convolution layer D2—fusion layer F2—convolution layer D3—fusion layer F3—convolution layer D4—fusion layer F4—convolution layer D5—fusion layer F5—convolution layer D6—fusion layer F6—convolution layer D7—fusion layer F7—convolution layer D8—fusion layer F8—convolution layer D9—fusion layer F9—convolution layer D 10 This branch is responsible for processing the depth map information and fusing the color branch information. All convolutional layers are connected in series. The fusion layer F i Fuse the deep branch convolutional layer D in the channel dimension i The output and color branch convolution layer C i Output.
[0061] 4) Set the learning rate of the network and the weights of each part of the loss function, and use the deep learning framework Pytorch to train the above convolutional neural network until the loss converges to generate a training model;
[0062] 41) After determining the network structure, input the training data into the network;
[0063] 42) In the first stage of network training, the initial learning rate of the HDSRnet-light network was set to 0.0001. After each epoch, the learning rate was reduced to 0.1 times of the original value. norm as loss function;
[0064] 43) In the second stage of network training, after training HDSRnet-light for 30 epochs, ERnet is connected to HDSRnet-light. norm as loss function;
[0065] 44) is trained to obtain the mapping of low-resolution depth maps to high-resolution depth maps through HDSRnet-light; and the mapping of high-resolution depth maps to fine high-resolution depth maps is obtained through ERnet.
[0066] 5) Input the RGB-D in the test set into the network and finally obtain the corresponding fine high-resolution depth image.
[0067] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A depth map super-resolution method based on a guided attention mechanism, comprising the following steps: 1) Analyze the low-resolution depth map features and establish a degradation model in the screen shot image: D lr =HD hr +n 0 Where D lr is the low-resolution image captured by the depth camera, D hr is a high-resolution depth image, H is the downsampling matrix, n 0 for noise; 2) Create a dataset The high-resolution data of the training set is composed of multiple RGB-D images in the MPI Sintel depth dataset and multiple RGB-D images in the Middlebury dataset randomly cropped. The size of each pair of RGB-D data is increased by introducing random rotation of angle θ∈[0°,90°,180°,270°] to increase the diversity of the data. The low-resolution data is obtained by downsampling the high-resolution depth map through bicubic interpolation; 3) Design network framework 31) The overall network structure consists of a lightweight network HDSRnet-light and an optional edge refinement network ERnet. The low-resolution depth map, the depth map upsampled by bicubic interpolation, and the high-resolution color map are input into HDSRnet-light to obtain a high-resolution depth map; the high-resolution depth map and high-resolution color map are then input into ERnet for further reconstruction, and finally a fine high-resolution output is obtained. The entire network is HDSRnet; 32) The lightweight network HDSRnet-light consists of three branches: the main branch ; Structure side branch; detail side branch, the two side branches are composed of upsampling modules and downsampling modules, and the main branch is composed of upsampling modules, downsampling modules guided attention modules and attention modules; The low-resolution depth map is input into the main branch, the depth map upsampled by bicubic interpolation is input into the structure side branch, and the high-resolution color map is input into the detail side branch; 321) Downsampling module structure: convolution layer 1 - pooling layer 1 - convolution layer 2, all convolution layers in the module are connected with ReLu activation function; 322) Upsampling module structure: deconvolution layer 1-convolution layer 1, all convolution layers and deconvolution layers in the module are connected with ReLu activation function; 323) The structure of the guided attention module is: convolution layer 1 - convolution layer 2 - multiplication layer - convolution layer 3, where the main branch features enter convolution layer 1, the side branch features enter convolution layer 2, the outputs of convolution layer 1 and convolution layer 2 are element-wise multiplied in the multiplication layer, the output of convolution layer 2 enters convolution layer 3, the output of convolution layer 3 is added to the output of the multiplication layer, and all convolution layers are connected with ReLu activation functions; 324) Attention module structure: guided attention module 1-guided attention module 2, wherein the main branch features and side branch features enter the guided attention module 1, and the output of the guided attention module 1 and the side branch features enter the guided attention module 2; 325) Main branch structure: convolution layer 1—fusion layer 1—guided attention module 1—upsampling module 1—attention module 1—upsampling module 2—attention module 2—convolution layer 2, wherein fusion layer 1 merges the outputs of main branch convolution layer 1 and structure side branch downsampling module 2 in the channel dimension, guided attention module 1 fuses the outputs of detail side branch downsampling module 2 and main branch fusion layer 1, attention module 1 fuses the outputs of structure side branch downsampling module 1, detail side branch downsampling module 1 and main branch upsampling module 1, attention module 2 fuses the outputs of structure side branch convolution layer 1, detail side branch convolution layer 1 and main branch upsampling module 2; the final output is the output of main branch convolution layer 2 plus the output of bicubic interpolation upsampling; 326) Detail side branch structure: convolution layer 1 - downsampling module 1 - downsampling module 2. This branch is responsible for processing the information of high-resolution color images. The outputs of downsampling module 1 and downsampling module 2 are sent to the attention module of the main branch for feature fusion. Convolution layer 1 is followed by a ReLu activation function. 327) Structure of side branch: convolution layer 1 - downsampling module 1 - downsampling module 2. This branch is responsible for processing the depth map information of bicubic interpolation upsampling. The outputs of downsampling module 1 and downsampling module 2 are sent to the attention module of the main branch for feature fusion. Convolution layer 1 is followed by a ReLu activation function. 33) The edge refinement network ERnet consists of two branches: a deep main branch and a detail side branch; the output of HDSRnet-light is input to the deep main branch, and the high-resolution color image is input to the detail side branch; both branches are composed of convolutional layers to achieve fine reconstruction of edges; 331) Detailed side branch structure: convolutional layer C 1 —Convolutional layer C 2 —Convolutional layer C 3 —Convolutional layer C 4 —Convolutional layer C 5 —Convolutional layer C 6 —Convolutional layer C 7 —Convolutional layer C 8 —Convolutional layer C 9 , this branch is responsible for processing high-resolution color image information. All convolutional layers are connected in series and are connected with ReLu activation functions; 332) Deep branch structure: convolutional layer D 1 — Fusion layer F 1 —Convolutional layer D 2 — Fusion layer F 2 —Convolutional layer D 3 — Fusion layer F 3 —Convolutional layer D 4 — Fusion layer F 4 —Convolutional layer D 5 — Fusion layer F 5 —Convolutional layer D 6 — Fusion layer F 6 —Convolutional layer D 7 — Fusion layer F 7 —Convolutional layer D 8 — Fusion layer F 8 —Convolutional layer D 9 — Fusion layer F 9 —Convolutional layer D 10 This branch is responsible for processing the depth map information and fusing the color branch information. All convolutional layers are connected in series. The fusion layer F i Fuse the deep branch convolutional layer D in the channel dimension i The output and color branch convolution layer C i Output: 4) Set the learning rate of the network and the weights of each part of the loss function, and use the deep learning framework Pytorch to train the above convolutional neural network until the loss converges to generate a training model; 41) After determining the network structure, input the training data into the network; 42) In the first stage of network training, the initial learning rate of the HDSRnet-light network was set to 0.0001. After each epoch, the learning rate was reduced to 0.1 times of the original value. norm as loss function; 43) In the second stage of network training, after training HDSRnet-light for 30 epochs, ERnet is connected to HDSRnet-light. norm as loss function; 44) is trained to obtain the mapping of low-resolution depth maps to high-resolution depth maps through HDSRnet-light; and the mapping of high-resolution depth maps to fine high-resolution depth maps is obtained through ERnet.
Citation Information
Patent Citations
Super-resolution reconstruction method for single image from rough to fine
CN111161146A
Super-resolution method of single depth map based on image decomposition
CN112686830A
Image super-resolution method and system
WO2020238558A1
