Depth completion method and system for sparse depth map

Through the fusion of sparse depth maps and grayscale images, the neural network model is used to predict dense depth maps, which solves the low-resolution problem of sparse depth maps, achieves efficient and low-power depth completion on mobile devices, and improves 3D Perceived accuracy and device performance.

CN118628340APending Publication Date: 2024-09-10HIMAX TECH LTD

Patent Information

Application Number
CN202311731144.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-07
Filing Date
2023-12-15
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The low resolution problem of sparse depth maps provided by ToF sensors makes it difficult to achieve efficient dense depth map fusion on mobile devices, affecting the accuracy and power consumption management of 3D perception.

Method used

By obtaining grayscale images and sparse depth maps, using nearest neighbor interpolation and Euclidean distance to transform the image input neural network model, predict the residual map and perform pixel-level addition, combined with bilinear interpolation and model pruning, Clustering and quantization,generating dense depth maps.

Benefits of technology

Implementing efficient, low-power depth completion on mobile devices with limited resources improves the resolution and accuracy of depth maps and improves the performance of tasks such as 3D object detection and semantic segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628340A
    Figure CN118628340A
Patent Text Reader

Abstract

The invention discloses a depth completion method and system for a sparse depth map. The depth completion method of the sparse depth map comprises the following steps: obtaining a gray-scale image and a sparse depth map corresponding to the gray-scale image; obtaining a nearest neighbor interpolation image and a Euclidean distance conversion image based on the sparse depth map; inputting the gray-scale image, the nearest adjacent interpolation image and the Euclidean distance conversion image into a neural network model so as to output a prediction residual image; and generating a predicted dense depth map according to the predicted residual map and the nearest adjacent interpolation image. According to the invention, the gray-scale image is fed into the post-stage neural network model, so that the post-stage neural network model can be realized on a device with limited resources and low power consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a depth completion method, and more particularly to a depth completion method for a sparse depth map and a system thereof. Background Art

[0002] Time-of-flight (ToF) sensors are active depth sensing devices that have the potential to provide more reliable scene understanding through true three-dimensional (3D) perception. Due to their low power consumption and accuracy at real-time frame rates, ToF sensors have recently been integrated into mobile consumer devices. However, ToF sensors rely on active illumination, which accounts for a relevant portion of their power consumption. In addition, ToF sensors can provide accurate 3D information, but their resolution may be much lower than that of color images if a projector with fewer pixels is used to ensure eye safety and low power consumption. To more efficiently utilize the limited power budget of mobile devices, a point pattern light source can be used to illuminate the scene so that its radiation intensity is concentrated on a small number of areas (points). Low-power ToF sensors for indoor 3D perception typically capture 500 to 1500 points per frame. Due to this sparsity, sensor fusion techniques are required to obtain a dense depth map. Summary of the invention

[0003] The present invention aims to provide a depth completion method of a sparse depth map, comprising: obtaining a grayscale image and a sparse depth map corresponding to the grayscale image; obtaining a nearest neighbor interpolation (NNI) image and a Euclidean distance transform (EDT) image based on the sparse depth map; inputting the grayscale image, the nearest neighbor interpolation image and the Euclidean distance transform image into a neural network model to output a prediction residual map; and generating a predicted dense depth map according to the prediction residual map and the nearest neighbor interpolation image.

[0004] In some embodiments, a pixel-level addition method is used to generate a predicted dense depth map according to a prediction residual map and a nearest neighbor interpolated image, wherein the prediction residual map includes residual information of the nearest neighbor interpolated image.

[0005] In some embodiments, a time-of-flight ranging sensor is used to obtain grayscale images and sparse depth maps.

[0006] In some embodiments, the depth completion method of the sparse depth map further includes: performing downsampling on the grayscale image, the nearest neighbor interpolated image, and the Euclidean distance transformed image before inputting the grayscale image, the nearest neighbor interpolated image, and the Euclidean distance transformed image into the neural network model; and performing upsampling on the predicted dense depth map. The downsampling and upsampling are performed by bilinear interpolation with anti-aliasing function.

[0007] In some embodiments, the neural network model uses an encoder-decoder approach based on a UNet network architecture to capture multiple features of grayscale images, nearest neighbor interpolated images, and Euclidean distance transformed images.

[0008] In some embodiments, the above-mentioned depth completion method of the sparse depth map also includes: performing a model pruning operation on the neural network model to compress the neural network model.

[0009] In some embodiments, a model pruning operation is performed only on multiple target layers of a neural network model, wherein the weight of each of the multiple target layers is greater than a threshold.

[0010] In some embodiments, the above-mentioned depth completion method of the sparse depth map also includes: after performing the model pruning operation, performing a model grouping operation on the neural network model to further compress the neural network model.

[0011] In some embodiments, the model grouping operation is performed only on multiple target layers of the neural network model, where the weight of each of the multiple target layers is greater than a threshold.

[0012] In some embodiments, the above-mentioned depth completion method of the sparse depth map further includes: quantizing the neural network model from a floating-point model to an integer model.

[0013] The present invention aims to provide a depth completion system for a sparse depth map, including a time-of-flight ranging sensor and a processor. The time-of-flight ranging sensor is used to obtain a grayscale image and a sparse depth map corresponding to the grayscale image. The processor is used to: receive the grayscale image and the sparse depth map from the time-of-flight ranging sensor; obtain a nearest neighbor interpolated image and a Euclidean distance transformed image based on the sparse depth map; input the grayscale image, the nearest neighbor interpolated image and the Euclidean distance transformed image into a neural network model, thereby outputting a predicted residual map; and generate a predicted dense depth map according to the predicted residual map and the nearest neighbor interpolated image.

[0014] In some embodiments, the processor generates a predicted dense depth map according to a predicted residual map and a nearest neighbor interpolated image using a pixel-level addition method, wherein the predicted residual map includes residual information of the nearest neighbor interpolated image.

[0015] In some embodiments, the processor is further configured to: perform downsampling on the grayscale image, the nearest neighbor interpolated image, and the Euclidean distance transformed image before inputting the grayscale image, the nearest neighbor interpolated image, and the Euclidean distance transformed image into the neural network model; and perform upsampling on the predicted dense depth map. The downsampling and upsampling are performed by bilinear interpolation with anti-aliasing function.

[0016] In some embodiments, the neural network model uses an encoder-decoder approach based on a UNet network architecture to capture multiple features of grayscale images, nearest neighbor interpolated images, and Euclidean distance transformed images.

[0017] In some embodiments, the processor is further used to: perform a model pruning operation on the neural network model to compress the neural network model.

[0018] In some embodiments, a model pruning operation is performed only on multiple target layers of a neural network model, wherein the weight of each of the multiple target layers is greater than a threshold.

[0019] In some embodiments, the processor is further used to: after performing a model pruning operation, perform a model grouping operation on the neural network model to further compress the neural network model.

[0020] In some embodiments, the model grouping operation is performed only on multiple target layers of the neural network model, where the weight of each of the multiple target layers is greater than a threshold.

[0021] In some embodiments, the processor is further configured to: quantize the neural network model from a floating point model to an integer model.

[0022] In order to make the above features and advantages of the present invention more clearly understood, embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] A better understanding of the present invention can be obtained from the following detailed description in conjunction with the accompanying drawings. It should be noted that, according to standard industry practice, the features are not drawn to scale. In fact, in order to make the discussion clearer, the size of each feature can be increased or decreased at will.

[0024] Figure 1 is a flowchart of a depth completion method for a sparse depth map according to an embodiment of the present invention;

[0025] Figure 2 is a block diagram of a depth completion system for a sparse depth map according to an embodiment of the present invention;

[0026] Figure 3 According to an embodiment of the present invention Figure 1 The processing flow corresponding to the depth completion method of the sparse depth map;

[0027] Figure 4 is a schematic diagram of an exemplary architecture of a neural network model according to an embodiment of the present invention;

[0028] Figure 5 is a flowchart of a depth completion method for a sparse depth map according to an embodiment of the present invention;

[0029] Figure 6 is an exemplary flow chart of optimizing a neural network model according to an embodiment of the present invention.

[0030]

Explanation of symbols

[0031] 120: Time of flight ranging sensor

[0032] 140: Processor

[0033] P1,P2,Q1,Q2,Q3,S1,S2,S3,S4: Steps DETAILED DESCRIPTION

[0034] The following is a detailed discussion of the embodiments of the present invention. However, it is to be understood that the embodiments provide many applicable concepts that can be implemented in a variety of specific contexts. The embodiments discussed and disclosed are for illustration only and are not intended to limit the scope of the present invention.

[0035] Figure 1 is a flowchart of a depth completion method for a sparse depth map according to an embodiment of the present invention. Figure 2 is a block diagram of a depth completion system for a sparse depth map according to an embodiment of the present invention. Figure 3 According to an embodiment of the present invention Figure 1 The processing flow corresponding to the depth completion method of the sparse depth map.

[0036] like Figure 2 As shown, the depth completion system for sparse depth maps of the present invention includes a TOF sensor 120 and a processor 140 communicatively connected to the TOF sensor 120 .

[0037] like Figures 1 to 3 As shown, the depth completion method of the sparse depth map of the present invention includes steps S1 to S4. In step S1, a grayscale image and a sparse depth map corresponding to the grayscale image are obtained using a time-of-flight ranging sensor 120. In some embodiments of the present invention, the sparse depth map includes 0.1% to 10% (preferably about 1%) of valid pixels with useful information (i.e., the sparsity at the target depth map resolution). Specifically, the present invention uses a single grayscale image frame and a sparse depth map.

[0038] Specifically, the present invention uses a single capture device (i.e., the time-of-flight ranging sensor 120) to obtain grayscale images and sparse depth maps to simplify the depth completion system of the sparse depth map. Specifically, the present invention uses grayscale images (rather than RGB / color images) to feed into the subsequent neural network model, so that the subsequent neural network model can be implemented on a device with limited resources and low power consumption.

[0039] like Figures 1 to 3 As shown, in step S2, the processor 140 receives the grayscale image and the sparse depth map from the TOF sensor 120, and the processor 140 pre-processes the sparse depth map to obtain a nearest neighbor interpolation (NNI) image and a Euclidean distance transform (EDT) image. Specifically, the NNI image is obtained by performing the nearest neighbor interpolation (NNI) process, and the NNI process is to map each coordinate to the closest sparse depth pixel in the Euclidean sense. Specifically, the EDT image is obtained by estimating the Euclidean distance transform (EDT), thereby providing a two-dimensional (2D) distance map to the nearest valid pixel.

[0040] like Figures 1 to 3 As shown, in step S3, the processor 140 inputs the grayscale image, the NNI image and the EDT image into the neural network model, thereby outputting a predicted residual map. The neural network model is constructed by an algorithm based on deep learning. The neural network model can be designed as an encoder-decoder convolutional neural network (CNN). Specifically, the neural network model uses an encoder-decoder fashion based on the UNet network architecture to capture multiple features of the grayscale image, the NNI image and the EDT image.

[0041] Figure 4 is a schematic diagram of an exemplary architecture of a neural network model according to an embodiment of the present invention. Figure 4 As shown in Figure 1, the designed encoder-decoder convolutional neural network is a simple "U-net like" template. For example, Figure 4As shown, the neural network model of the present invention adopts an encoder-decoder method composed of a lite version of EfficientNetV2 (i.e., EfficientNetV2-Lite model) as a feature extractor and regular Conv2D layers with nearest neighbor up-sampling as a decoder. Specifically, the encoder part of the neural network model captures multiple features of grayscale images, NNI images, and EDT images. Specifically, the decoder part of the neural network model fuses the features from the encoder part with addition operations. All skip connections are performed through concatenation.

[0042] Regarding the implementation of the encoder, such as Figure 4 As shown, the architecture of the encoder discards the last few layers (of the EfficientNetV2-Lite model) with a smaller feature map resolution (X / 32), so that the EfficientNetV2-Lite model of the present invention has fewer modules (blocks) to achieve fewer parameters and faster reasoning speed. Specifically, the EfficientNetV2-Lite model of the present invention only includes Add operations, Pad operations, Cov2D operations, DepthwiseConv2D operations, and ReLU6 operations to achieve better quantization. The EfficientNetV2-Lite model is mainly constructed using Conv2D and DepthwiseConv2D, and then ReLU6 with less quantization loss is used. ReLU6 limits the activation value range to [0,6]. Due to poor quantization performance, the attention mechanism (i.e., Squeeze-and-Excitation (SE) block) is not used.

[0043] In other words, regarding the implementation of the decoder, Figure 4As shown, all Conv2Ds have kernel_size=3, followed by BatchNormalization and ReLU. A Conv2D module contains two Conv2Ds, followed by an Upsample2D with nearest neighbor interpolation (NNI). There are four modules to upscale the resolution from X / 16 to X. The final output module has three Conv2Ds without Upsample2D, and the last Conv2D has kernel_size=1 with a bias parameter. The decoder is implemented using only Conv2D and ReLU, which is easy to quantize. It should be noted that the neural network model enables the decoder to predict the residual map instead of the entire dense depth map because the residual information has a smaller value range and can be better quantized.

[0044] like Figures 1 to 3 As shown, in step S4, the processor 140 generates a predicted dense depth map according to the predicted residual map and the NNI image. Specifically, a pixel-level addition method is used to generate a predicted dense depth map according to the predicted residual map and the NNI image. The predicted residual map includes residual information of the NNI image.

[0045] Figure 5 is a flowchart of a depth completion method for a sparse depth map according to an embodiment of the present invention. Figure 5 The depth completion method of the sparse depth map shown in Figure 1 The depth completion method of the sparse depth map shown in is similar, the difference between the two is that Figure 5 The depth completion method of the sparse depth map shown further includes step P1 and step P2.

[0046] like Figure 5As shown, in step P1, before the grayscale image, the NNI image and the EDT image are input into the neural network model, the processor 140 also performs down-sampling processing on the grayscale image, the NNI image and the EDT image. In step P2, the processor 140 also performs up-sampling processing on the predicted dense depth map. In some embodiments of the present invention, the down-sampling processing and the up-sampling processing are performed by bilinear interpolation with antialiasing. For example, the resolution of the down-sampling processing may be reduced from 224x304 to 128x160 to reduce the static random access memory (SRAM) usage. For example, the resolution of the sparse depth map is adjusted from 480x640 to 240x320, and then the center crop is 224x304, and then the resolution of the grayscale image, NNI image and EDT image is adjusted to 128x160, and then the grayscale image, NNI image and EDT image with determined size are fed into the neural network model. It should be noted that the above-mentioned downsampling process is optional for the present invention. In addition, corresponding to the downsampling process, the resolution of the predicted dense depth map is also adjusted to 224x304.

[0047] Figure 6 is an exemplary flow chart of optimizing a neural network model according to an embodiment of the present invention. Specifically, the present invention uses the official TensorFlow Model Optimization toolkit (TFMOT) to optimize the neural network model. Figure 6 As shown, in step Q1, the processor 140 performs a model pruning operation on the neural network model to compress the neural network model. Specifically, step Q1 prunes the neural network model to investigate the trade-off between compression size and model performance. It should be noted that the model pruning operation is optional for the present invention.

[0048] Regarding the model pruning operation, the model pruning operation is performed only on multiple target layers of the neural network model, which is also called selective pruning. Before pruning, the weight (n) of each layer of the neural network model is calculated. Then, a threshold is set to find multiple target layers with large weights and potential redundancy. In other words, the weight of each target layer is greater than the threshold. For example, if the threshold is 10000, a specific layer with a weight (n) greater than 10000 is defined as the target layer, and then the target layer is pruned at a sparsity of 50% or 75%, and the other layers of the non-target layer remain unchanged. For example, a target layer pruned at a sparsity of 50% will ensure that 50% of the weight of the layer is zero. For example, if the threshold is 5000, a specific layer with a weight (n) greater than 5000 is defined as the target layer, and then the target layer is pruned at a sparsity of 90%, and the other layers of the non-target layer remain unchanged. Specifically, selective pruning performs a model pruning operation on the target layer, and the other layers remain unchanged.

[0049] like Figure 6 As shown, in step Q2, after performing the model pruning operation, the processor 140 performs a model clustering operation on the neural network model to further compress the neural network model. Specifically, step Q2 applies sparsity-preserved clustering to further compress the neural network model. It should be noted that the model clustering operation is optional for the present invention.

[0050] Regarding the model clustering operation, the model clustering operation is performed only on multiple target layers of the neural network model, which is also called selective clustering. Before clustering, the weight (n) of each layer of the neural network model is calculated. Then, a threshold is set to find multiple target layers with large weights and potential redundancy. In other words, the weight of each target layer is greater than the threshold. For example, if the threshold is 10000, a specific layer with a weight (n) greater than 10000 is defined as the target layer, and then the target layer is clustered with a sparsity of 50% or 75%, and the other layers of the non-target layer remain unchanged. For example, if the threshold is 5000, a specific layer with a weight (n) greater than 5000 is defined as the target layer, and then the target layer is clustered with a sparsity of 90%, and the other layers of the non-target layer remain unchanged. Specifically, selective clustering performs a model clustering operation on the target layer, and the other layers remain unchanged.

[0051] like Figure 6As shown, in step Q3, the processor 140 performs post-training quantization to quantize the neural network model from a floating point model (i.e., the data format is FLOAT32) to an integer model (i.e., the data format is fully integer (INT8)), thereby compressing the neural network model by four times, and thus the compressed neural network model can be implemented on a resource-limited, low-power device. It should be noted that the post-training quantization is optional for the present invention.

[0052] Specifically, if Figure 6 As shown, the floating point model is further optimized by selective pruning (step Q1), selective clustering (step Q2), and quantization to an INT8 model after training (Q3). The optimized INT8 model is deployed to achieve extremely high energy efficiency, and therefore the optimized INT8 model can be implemented on resource-limited and low-power devices.

[0053] In summary, the present invention uses an efficient and small neural network with multiple optimizations to predict a dense depth map from a sparse depth map and a grayscale image. The efficient and small neural network with a small model size and memory usage can be implemented on a resource-limited and low-power device. A high-precision and high-resolution depth image can be generated by fusing a sparse depth image with a corresponding grayscale image. The fusion result can improve the performance of subsequent tasks (such as 3D object detection, semantic segmentation, etc.).

[0054] The features of several embodiments are summarized above, so that those skilled in the art can better understand the aspects of the present invention. Those skilled in the art should understand that they can easily use the present invention as a basis to design or modify other processes and structures to achieve the same goals and / or achieve the same advantages as the embodiments introduced herein. Those skilled in the art should also understand that these equivalent constructions do not depart from the spirit and scope of the present invention, and they can make various changes, substitutions and modifications without departing from the spirit and scope of the present invention.

Claims

1. A depth completion method for a sparse depth map, characterized in that: include: Obtaining a grayscale image and a sparse depth map corresponding to the grayscale image; Obtaining a nearest neighbor interpolation image and a Euclidean distance transformation image based on the sparse depth map; Inputting the grayscale image, the nearest neighbor interpolated image and the Euclidean distance transformed image into a neural network model to output a prediction residual map; and A predicted dense depth map is generated according to the prediction residual map and the nearest neighbor interpolated image.

2. The depth completion method of a sparse depth map according to claim 1, characterized in that: A pixel-level addition method is used to generate the predicted dense depth map according to the predicted residual map and the nearest neighbor interpolated image, wherein the predicted residual map includes residual information of the nearest neighbor interpolated image.

3. The depth completion method of a sparse depth map according to claim 1, characterized in that: A time-of-flight ranging sensor is used to obtain the grayscale image and the sparse depth map.

4. The depth completion method of a sparse depth map according to claim 1, characterized in that: Also includes: Before inputting the grayscale image, the nearest neighbor interpolated image and the Euclidean distance transformed image into the neural network model, performing a down sampling process on the grayscale image, the nearest neighbor interpolated image and the Euclidean distance transformed image; and Performing an upsampling process on the predicted dense depth map; The down-sampling process and the up-sampling process are performed by bilinear interpolation with an anti-aliasing function.

5. The depth completion method of a sparse depth map according to claim 1, characterized in that: The neural network model uses an encoder-decoder method based on a UNet network architecture to capture multiple features of the grayscale image, the nearest neighbor interpolation image and the Euclidean distance transformation image.

6. The depth completion method of a sparse depth map according to claim 1, characterized in that: Also includes: A model pruning operation is performed on the neural network model to compress the neural network model.

7. The depth completion method of a sparse depth map according to claim 6, characterized in that: The model pruning operation is performed only on multiple target layers of the neural network model, wherein the weight of each of the multiple target layers is greater than a threshold.

8. The depth completion method of a sparse depth map according to claim 6, characterized in that: Also includes: After performing the model pruning operation, a model grouping operation is performed on the neural network model to further compress the neural network model.

9. The depth completion method of a sparse depth map according to claim 8, characterized in that: The model grouping operation is performed only on multiple target layers of the neural network model, wherein the weight of each of the multiple target layers is greater than a threshold.

10. The depth completion method of a sparse depth map according to claim 1, characterized in that: Also includes: The neural network model is quantized from a floating point model to an integer model.

11. A depth completion system for a sparse depth map, characterized in that: include: a time-of-flight ranging sensor for acquiring a grayscale image and a sparse depth map corresponding to the grayscale image; and A processor for: receiving the grayscale image and the sparse depth map from the time-of-flight ranging sensor; Obtaining a nearest neighbor interpolation image and a Euclidean distance transformation image based on the sparse depth map; Inputting the grayscale image, the nearest neighbor interpolated image and the Euclidean distance transformed image into a neural network model to output a prediction residual map; and A predicted dense depth map is generated according to the prediction residual map and the nearest neighbor interpolated image.

12. The depth completion system for sparse depth maps according to claim 11, characterized in that: The processor generates the predicted dense depth map according to the predicted residual map and the nearest neighbor interpolated image using a pixel-level addition method, wherein the predicted residual map includes residual information of the nearest neighbor interpolated image.

13. The depth completion system for sparse depth maps according to claim 11, wherein: The processor is also used to: Before inputting the grayscale image, the nearest neighbor interpolated image and the Euclidean distance transformed image into the neural network model, performing a down sampling process on the grayscale image, the nearest neighbor interpolated image and the Euclidean distance transformed image; and Performing an upsampling process on the predicted dense depth map; The down-sampling process and the up-sampling process are performed by bilinear interpolation with an anti-aliasing function.

14. The depth completion system for sparse depth maps according to claim 11, characterized in that: The neural network model uses an encoder-decoder method based on a UNet network architecture to capture multiple features of the grayscale image, the nearest neighbor interpolation image and the Euclidean distance transformation image.

15. The depth completion system for sparse depth maps according to claim 11, wherein: The processor is also used to: A model pruning operation is performed on the neural network model to compress the neural network model.

16. The depth completion system for sparse depth maps according to claim 15, characterized in that: The model pruning operation is performed only on multiple target layers of the neural network model, wherein the weight of each of the multiple target layers is greater than a threshold.

17. The depth completion system for sparse depth maps according to claim 15, characterized in that: The processor is also used to: After performing the model pruning operation, a model grouping operation is performed on the neural network model to further compress the neural network model.

18. The depth completion system for sparse depth maps according to claim 17, wherein: The model grouping operation is performed only on multiple target layers of the neural network model, wherein the weight of each of the multiple target layers is greater than a threshold.

19. The depth completion system for sparse depth maps according to claim 11, wherein: The processor is also used to: The neural network model is quantized from a floating point model to an integer model.

Citation Information

Patent Citations

  • Deep neural network compression method based on improved clustering

    CN108304928A

  • Compression and acceleration method based on a deep neural network model

    CN109492754A

  • Image processing method, path planning method, device, equipment and storage medium

    CN110992271A

  • Unmanned aerial vehicle distribution network inspection video real-time analysis and identification method and embedded inspection device

    CN112668416A

Cited By

  • Image depth completion method in foggy day scene

    CN119152007A

  • An image depth completion method in a foggy scene

    CN119152007B