Depth estimation model and method, training system, and i-TOF depth camera
By designing the depth estimation model and training system, the problem of low depth estimation accuracy of the i-TOF depth engine in special scenes is solved, and high-precision depth measurement is achieved in scenes such as inner right-angle areas.
Patent Information
- Application Number
- PCT/CN2023/139246
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-29
- Filing Date
- 2023-12-15
- Publication Date
- 2024-10-03
AI Technical Summary
The existing i-TOF depth engine has low depth estimation accuracy in special scenarios, especially in inner right-angle areas where multipath errors are prone to occur, making it difficult to obtain ideal depth estimation results.
A depth estimation model is designed, which includes a feature map extraction module, a distance map generation module, a first distance map optimization module and a second distance map optimization module. The optimal full resolution is directly obtained from the rawphase map through a step-by-step optimization strategy. Distance map, combined with training systems and methods to train i-TOF depth cameras to improve depth estimation accuracy.
Depth estimation results that are better than traditional solutions can be obtained in both regular and special scenarios, improving the accuracy of depth estimation. Especially in the multi-path error scenario in the inner right-angle area, the accuracy of depth measurement is significantly improved.
Smart Images

Figure CN2023139246_03102024_PF_FP_ABST
Abstract
Description
Depth estimation model and method, training system and i-TOF depth camera Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to a depth estimation model and method, a training system, and an i-TOF depth camera. Background Art
[0002] A depth camera refers to an electronic product that can obtain depth information of a target object and generate a corresponding depth image based on it. Its core components include a transmitter, a receiver, and a processor. The 3D (3-Dimension) sensing technologies it uses to achieve depth detection mainly include structured light, monocular / binocular, and TOF (Time Of Flight). TOF is further divided into d-TOF (direct Time-of-Flight) and i-TOF (indirect Time-of-Flight). When the 3D sensing technology carried by the depth camera is different, the principles and processes of its depth detection are also different.
[0003] In related technologies, for depth cameras using i-TOF, the principle is as follows: the transmitter emits a laser in the direction of the object being measured, the receiver receives the laser reflected by the object and generates a corresponding rawphase image based on it, and the processor processes the rawphase image generated by the receiver through its own i-TOF depth engine to obtain the depth information of the object being measured. However, existing i-TOF depth engines still have many drawbacks, such as: they cannot be accelerated on NPUs (Neural-network Processing Units); the depth estimation solution does not belong to deep learning solutions; and in some special scenarios (such as inner right-angle areas prone to multipath errors), the depth estimation accuracy is low, and the results are very unsatisfactory.
[0004] Therefore, it is necessary to design a depth estimation scheme based on deep learning. Technical issues
[0005] This application provides a depth estimation model and method, a training system and an i-TOF depth camera, aiming to solve the problem of low depth estimation accuracy of the i-TOF depth engine for some special scenes in related technologies. Technical Solutions
[0006] In order to solve the above-mentioned technical problems existing in the related art, the first aspect of the embodiment of the present application provides a depth estimation model, which is applied to the i-TOF depth camera and is used to process the rawphase image of the object under test collected by the i-TOF depth camera to obtain a distance map. The depth estimation model includes: a feature map extraction module, which is used to extract features from the rawphase image of the object under test to obtain a 1 / 4 resolution feature map and a 1 / 2 resolution feature map; a distance map generation module, which is used to perform a convolution operation on the 1 / 4 resolution feature map to obtain a 1 / 4 resolution distance map, and a 1 / 4 resolution feature map. The distance map is upsampled to obtain a 1 / 2 resolution distance map; a first distance map optimization module is used to generate a first feedback feature based on the 1 / 2 resolution distance map and the 1 / 2 resolution feature map, and use the first feedback feature to iteratively optimize the 1 / 2 resolution distance map to obtain an optimal 1 / 2 resolution distance map, and upsample the optimal 1 / 2 resolution distance map to obtain a full-resolution distance map; a second distance map optimization module is used to generate a second feedback feature based on the full-resolution distance map and the rawphase map, and use the second feedback feature to iteratively optimize the full-resolution distance map to obtain the optimal full-resolution distance map.
[0007] A second aspect of an embodiment of the present application provides a depth estimation method, including: obtaining a rawphase map of the object to be measured, and performing feature extraction on the rawphase map to obtain a 1 / 4 resolution feature map and a 1 / 2 resolution feature map; performing a convolution operation on the 1 / 4 resolution feature map to obtain a 1 / 4 resolution distance map, and upsampling the 1 / 4 resolution distance map to obtain a 1 / 2 resolution distance map; generating a first feedback feature based on the 1 / 2 resolution distance map and the 1 / 2 resolution feature map, and using the first feedback feature to iteratively optimize the 1 / 2 resolution distance map to obtain an optimal 1 / 2 resolution distance map, and upsampling the optimal 1 / 2 resolution distance map to obtain a full-resolution distance map; generating a second feedback feature based on the full-resolution distance map and the rawphase map, and using the second feedback feature to iteratively optimize the full-resolution distance map to obtain an optimal full-resolution distance map.
[0008] A third aspect of an embodiment of the present application provides a training system for a depth estimation model, the training system including a calibration plate, an i-TOF depth camera, and a control and processor, wherein: the i-TOF depth camera is used to emit a line laser to the calibration plate, and receive the line laser reflected by the calibration plate and generate a corresponding rawphase map based on this; the control and processor is used to: process the rawphase map to obtain a line laser intensity map, and generate the three-dimensional coordinates of the calibration plate according to the line laser scanning principle and the line laser intensity map, wherein the coordinate value corresponding to the target coordinate axis in the three-dimensional coordinates is the true depth value, the target coordinate axis is the coordinate axis pointing from the i-TOF depth camera to the direction of the calibration plate, and the true depth value and the corresponding rawphase map together constitute a set of training data; and, adjust the posture of the calibration plate to obtain multiple sets of training data, and train the depth estimation model through the multiple sets of training data, wherein the rawphase map in each set of training data is used as the input of the depth estimation model, and the true depth value in each set of training data is used as the output of the depth estimation model.
[0009] The fourth aspect of an embodiment of the present application provides a training method for a depth estimation model, including: controlling an i-TOF depth camera to emit a line laser to a calibration plate, and receiving the line laser reflected by the calibration plate and generating a corresponding rawphase map based on the same; processing the rawphase map to obtain a line laser intensity map, and generating three-dimensional coordinates of the calibration plate according to the line laser scanning principle and the line laser intensity map, wherein the coordinate value corresponding to the target coordinate axis in the three-dimensional coordinates is the true depth value, the target coordinate axis is the coordinate axis pointing from the i-TOF depth camera to the direction of the calibration plate, and the true depth value and the corresponding rawphase map together constitute a set of training data; adjusting the posture of the calibration plate to obtain multiple sets of training data, and training the depth estimation model through the multiple sets of training data, wherein the rawphase map in each set of training data is used as the input of the depth estimation model, and the true depth value in each set of training data is used as the output of the depth estimation model.
[0010] In a fifth aspect, an embodiment of the present application provides another training system for a depth estimation model, including a calibration plate, a conventional imaging device, an i-TOF depth camera, and a control and processor, wherein: the conventional imaging device includes a laser projector and an image sensor, the laser projector is used to emit a first line of laser light to the calibration plate, the image sensor is used to receive the first line of laser light reflected by the calibration plate and generate a corresponding measurement map accordingly; the i-TOF depth camera is used to emit a second line of laser light to the calibration plate, and receive the second line of laser light reflected by the calibration plate and generate a corresponding rawphase map accordingly; the control and processor is used to: according to The three-dimensional coordinates of the calibration plate are calculated based on the line laser scanning principle and the measurement map, wherein the coordinate value corresponding to the target coordinate axis in the three-dimensional coordinates is the true depth value, the target coordinate axis is the coordinate axis pointing from the ordinary imaging device to the direction of the calibration plate, and the true depth value and the corresponding rawphase map together constitute a set of training data; and, the position and posture of the calibration plate are adjusted to obtain multiple sets of training data, and the depth estimation model is trained with the multiple sets of training data, wherein the rawphase map in each set of training data is used as the input of the depth estimation model, and the true depth value in each set of training data is used as the output of the depth estimation model.
[0011] The sixth aspect of an embodiment of the present application provides another method for training a depth estimation model, including: controlling a laser projector in an ordinary imaging device to emit a first line of laser toward a calibration plate, and controlling an image sensor in the ordinary imaging device to receive the first line of laser reflected by the calibration plate and generate a corresponding measurement map accordingly; controlling an i-TOF depth camera to emit a second line of laser toward the calibration plate and receiving the second line of laser reflected by the calibration plate to generate a corresponding rawphase map accordingly; calculating the three-dimensional coordinates of the calibration plate according to the line laser scanning principle and the measurement map, wherein the coordinate value corresponding to the target coordinate axis in the three-dimensional coordinates is the true depth value, the target coordinate axis is the coordinate axis pointing from the ordinary imaging device to the direction of the calibration plate, and the true depth value and the corresponding rawphase map together constitute a set of training data; adjusting the posture of the calibration plate to obtain multiple sets of training data, and training the depth estimation model through the multiple sets of training data, wherein the rawphase map in each set of training data is used as the input of the depth estimation model, and the true depth value in each set of training data is used as the output of the depth estimation model.
[0012] In a seventh aspect, an embodiment of the present application provides an i-TOF depth camera, comprising: a transmitting end, for transmitting a modulated light beam to an object to be measured; a receiving end, for receiving the modulated light beam reflected by the object to be measured and generating a corresponding rawphase map based on it; a processing end, for using the depth estimation model described in the first aspect of the embodiment of the present application to perform depth estimation on the rawphase map to obtain a corresponding optimal full-resolution distance map, and generate a corresponding depth map based on the depth camera internal parameters and the optimal full-resolution distance map.
[0013] An eighth aspect of an embodiment of the present application provides another i-TOF depth camera, comprising: a transmitting end, for transmitting a modulated light beam with different modulation frequencies to the object to be measured; a receiving end, comprising an image sensor, the image sensor comprising at least one pixel, and each pixel comprising at least three taps, for receiving the modulated light beam with different modulation frequencies reflected by the object to be measured by rotating the taps according to different demodulation frequencies, and generating rawphase maps at different modulation and demodulation frequencies based on this, wherein different demodulation frequencies correspond to different modulation frequencies, respectively; a processing end, for using the depth estimation model described in the first aspect of the embodiment of the present application to perform depth estimation on the rawphase maps at different modulation and demodulation frequencies to obtain a corresponding optimal full-resolution distance map, and generate a corresponding depth map based on the depth camera internal parameters and the optimal full-resolution distance map. Beneficial effects
[0014] From the above description, it can be seen that compared with the related art, the beneficial effect of the present application is that: a depth estimation model is formed by a feature map extraction module, a distance map generation module, a first distance map optimization module and a second distance map optimization module, and the depth of the object to be measured is estimated by this depth estimation model. In practical applications, the rawphase map of the object to be measured is first obtained, and the rawphase map is subjected to feature extraction by the feature map extraction module to obtain a 1 / 4 resolution feature map and a 1 / 2 resolution feature map; thereafter, the 1 / 4 resolution feature map is subjected to a convolution operation by the distance map generation module to obtain a 1 / 4 resolution distance map, and the 1 / The 4-resolution distance map is upsampled to obtain a 1 / 2-resolution distance map; then, the first distance map optimization module generates a first feedback feature based on the 1 / 2-resolution distance map and the 1 / 2-resolution feature map, and the first feedback feature is used to iteratively optimize the 1 / 2-resolution distance map to obtain the optimal 1 / 2-resolution distance map, and the optimal 1 / 2-resolution distance map is upsampled to obtain a full-resolution distance map; then, the second distance map optimization module generates a second feedback feature based on the full-resolution distance map and the rawphase map, and the second feedback feature is used to iteratively optimize the full-resolution distance map to obtain the optimal full-resolution distance map. It can be seen that the depth estimation model provided in this application is essentially an end-to-end deep learning model, which can directly obtain the depth data of the object under test (i.e., the optimal full-resolution distance map) from the original image data of the object under test (i.e., the rawphase map). Its depth estimation process adopts a step-by-step optimization strategy, that is, the 1 / 2 resolution distance map is first iteratively optimized to obtain the optimal 1 / 2 resolution distance map, and then the full-resolution distance map obtained by upsampling the optimal 1 / 2 resolution distance map is iteratively optimized to obtain the optimal full-resolution distance map. It can not only obtain the same depth estimation results as the traditional scheme in conventional scenarios, but also obtain depth estimation results that are better than the traditional scheme in special scenarios (such as inner right-angle areas that are prone to multi-path errors, etc.), which is conducive to ensuring the accuracy of depth estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the relevant technologies or the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the relevant technologies or the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application, not all embodiments. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0016] FIG1 is a schematic diagram of an i-TOF depth camera according to an embodiment of the present application;
[0017] FIG2 is a schematic diagram of a depth estimation model training system provided in an embodiment of the present application;
[0018] FIG3 is a flow chart of a method for training a depth estimation model provided in an embodiment of the present application;
[0019] FIG4 is a schematic diagram of another depth estimation model training system provided in an embodiment of the present application;
[0020] FIG5 is a flowchart of another method for training a depth estimation model provided in an embodiment of the present application;
[0021] FIG6 is a block diagram of a first module of a depth estimation model provided in an embodiment of the present application;
[0022] FIG7 is a block diagram of a second module of a depth estimation model provided in an embodiment of the present application;
[0023] FIG8 is an example diagram of iterative optimization of the first distance map optimization module provided in an embodiment of the present application;
[0024] FIG9 is a block diagram of a third module of a depth estimation model provided in an embodiment of the present application;
[0025] FIG10 is a flowchart of a depth estimation method provided in an embodiment of the present application. Modes for Carrying Out the Invention
[0026] In order to make the purpose, technical solutions and advantages of the present application more obvious and easy to understand, the present application will be clearly and completely described below in conjunction with the embodiments of the present application and the corresponding drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. It should be understood that the various embodiments of the present application described below are only used to explain the present application and are not used to limit the present application, that is, based on the various embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. In addition, the technical features involved in the various embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.
[0027] FIG1 is a schematic diagram of an i-TOF depth camera provided in an embodiment of the present application. The i-TOF depth camera includes a transmitter 101, a receiver 102, and a processor 103. The transmitter 101 is used to transmit a laser beam to the object being measured, the receiver 102 is used to receive the laser beam reflected by the object being measured and generate a corresponding rawphase map based on the laser beam, and the processor 103 is used to process the rawphase map generated by the receiver 102 using its own i-TOF depth engine to obtain a corresponding depth map. In related technologies, the i-TOF depth engine carried by the processor 103 still has many drawbacks, such as: it cannot be accelerated on the NPU; the depth estimation solution does not belong to the deep learning solution; for some special scenarios (such as inner right-angle areas prone to multipath errors), the depth estimation accuracy is low, and the results are very unsatisfactory. In order to solve these problems, an embodiment of the present application designs a depth estimation model, which is essentially an end-to-end deep learning model, which can directly obtain the optimal full-resolution distance map of the object under test from the original image data of the object under test (i.e., the rawphase map). Therefore, in the process of producing and manufacturing the i-TOF depth camera, the depth estimation model can be mounted on the processing end 103 of the i-TOF depth camera, so that the processing end 103 can use the depth estimation model to perform depth estimation on the rawphase map generated by the receiving end 102 to obtain the optimal full-resolution distance map of the object under test, and then generate the depth map of the object under test based on the obtained optimal full-resolution distance map and the internal parameters of the i-TOF depth camera.
[0028] In some embodiments, the transmitting end 101 includes a light source, a beam modulator, and a light source driver. The light source may be a light emitting diode (LED), an edge emitting laser (EEL), a vertical cavity surface emitting laser (VCSEL), or a light source array consisting of multiple light sources. The light beam emitted by the light source may be visible light, infrared light, ultraviolet light, or the like. The light source emits the light beam under the control of the light source driver (which may be further controlled by the processing end 103). In one embodiment, the amplitude of the light beam emitted by the light source is modulated under control to emit a pulsed beam, a square wave beam, a sine wave beam, or the like. The beam modulator receives the light beam from the light source and emits a modulated line laser beam toward the object being measured. It is understood that a portion of the processing end 103 or a subcircuit existing independently of the processing circuit may be used to control the light source to emit the relevant light beam, such as a pulse signal generator.
[0029] In some embodiments, the receiving end 102 includes a TOF sensor comprising at least one pixel. Compared to conventional image sensors used only for photographing, each pixel in the TOF sensor includes three or more taps (used to store and read or discharge charge signals generated by reflected light pulses under the control of corresponding electrodes). When each pixel includes multiple taps, the taps are switched sequentially in a certain order within a single frame period T (or a single exposure time) to collect electrons generated by the pixel receiving the light signal reflected from the target object, thereby forming a charge signal and obtaining a rawphase diagram. In one embodiment, the receiving end 102 also includes a lens and a filter, wherein the lens is used to receive the light beam reflected from the object to be measured and focus it on the pixel of the TOF sensor, and the filter is used to limit the reflected light within a preset wavelength band from entering the image sensor to avoid stray light interference. Optionally, the lens can be a single focusing lens or a focusing lens group, which is not limited here.
[0030] In some embodiments, the processing end 103 can be an independent dedicated circuit, such as a dedicated SOC chip, FPGA chip, ASIC chip, NPU chip, etc. composed of a CPU, memory, bus, etc., or it can include a general-purpose processing circuit. For example, when the i-TOF depth camera is integrated into smart terminals such as mobile phones, TVs, and computers, the processing circuits in these smart terminals can serve as at least part of the processing end 103.
[0031] In some embodiments, the transmitting end 101 transmits a modulated light beam to the object under test, and the modulated light beam has a single modulation frequency. The receiving end 102 controls each tap in a rotating acquisition manner according to a single demodulation frequency corresponding to the single modulation frequency of the transmitting end 101 within a single frame period to receive the modulated light beam reflected back by the object under test and generates a corresponding rawphase map accordingly. The processing end 103 uses the above-mentioned depth estimation model to perform depth estimation on the rawphase map to obtain the optimal full-resolution distance map of the object under test, and generates a depth map of the object under test based on the internal parameters of the i-TOF depth camera and the optimal full-resolution distance map. It can be understood that these embodiments all belong to single-frequency depth estimation schemes, that is, the modulated light beam emitted by the transmitting end 101 has a single modulation frequency, and the rawphase map generated by the receiving end 102 is also single-frequency image data.
[0032] In other embodiments, the transmitting end 101 transmits modulated light beams of different modulation frequencies to the object to be measured, and the receiving end 102 controls each tap according to different demodulation frequencies in different frame periods to receive modulated light beams of different modulation frequencies reflected by the object to be measured in a rotating acquisition manner, and generates rawphase maps at different modulation and demodulation frequencies accordingly. The processing end 103 uses the above-mentioned depth estimation model to perform depth estimation on the rawphase maps at different modulation and demodulation frequencies to obtain the corresponding optimal full-resolution distance map, and generates a corresponding depth map based on the internal parameters of the i-TOF depth camera and the optimal full-resolution distance map. It can be understood that these embodiments all belong to multi-frequency depth estimation schemes, that is, the transmitting end 101 transmits modulated light beams of different modulation frequencies, and the receiving end 102 generates rawphase maps at different modulation and demodulation frequencies, wherein different demodulation frequencies correspond to different modulation frequencies.
[0033] It should be noted that those skilled in the art should note that the above-mentioned embodiments are only preferred implementations of the embodiments of the present application and are not the only limitations of the described content. In this regard, those skilled in the art can flexibly set them based on the embodiments of the present application according to the actual application scenario. In addition, the processing end 103 in the above-mentioned embodiments can use a conventional processor or an NPU. However, when the processing end 103 uses an NPU, the i-TOF depth camera does not need to be equipped with a memory, wherein the memory is used to store some computer programs and related data necessary for the depth estimation process.
[0034] As mentioned above, the depth estimation model designed in the embodiment of the present application is essentially an end-to-end deep learning model. This means that the depth estimation model requires extensive training during the production and manufacturing process of the depth camera before it can be installed on the processing end 103, so that the processing end 103 can use the depth estimation model to perform depth estimation on the rawphase image generated by the receiving end 102. To this end, the embodiment of the present application also provides two training systems with different structures and principles to complete the training of the depth estimation model. The following will explain these two training systems in terms of structure, principle, training method, etc.
[0035] FIG2 is a schematic diagram of a training system for a depth estimation model provided in an embodiment of the present application. The training system (hereinafter referred to as the first training system) includes a calibration plate 201, an i-TOF depth camera 202, a driving device (not shown in the figure), and a control and processor 203. The calibration plate 201 is arranged opposite the i-TOF depth camera 202, the driving device is connected to the calibration plate 201, and the control and processor 203 is electrically connected to the driving device and the i-TOF depth camera 202. Specifically, the i-TOF depth camera 202 is used to emit a line laser toward the calibration plate 201 and receive the line laser reflected back by the calibration plate 201 to generate a corresponding rawphase map. The control and processor 203 is used to: process the rawphase image to obtain a line laser intensity image, and generate three-dimensional coordinates of the calibration plate 201 based on the line laser scanning principle and the line laser intensity image, wherein the coordinate value corresponding to the target coordinate axis in the three-dimensional coordinates is the true depth value, and the target coordinate axis is the coordinate axis pointing from the i-TOF depth camera 202 to the calibration plate 201 (that is, the direction of the line between the i-TOF depth camera 202 and the calibration plate 201), and the true depth value and the corresponding rawphase image together constitute a set of training data; and, adjust the position of the calibration plate 201 by controlling the driving device to drive the calibration plate 201 to rotate and / or translate (preferably translate on the target coordinate axis) to obtain multiple sets of training data, and train the depth estimation model through the multiple sets of training data, wherein the rawphase image in each set of training data is used as the input of the depth estimation model, and the true depth value in each set of training data is used as the output of the depth estimation model.
[0036] In the embodiment of the present application, the process of the control and processor 203 generating the three-dimensional coordinates of the calibration plate 201 needs to be based on the line laser scanning principle. The line laser scanning principle is now explained by taking the i-TOF depth camera including a transmitter and a receiver as an example: a laser line emitted by the transmitter to the calibration plate 201 can form a light plane, and each light plane corresponds to a light plane equation, which can be obtained through calibration; the receiver collects the laser line reflected by the calibration plate 201 to form a rawphase map on the imaging plane and transmits it to the control and processor 203; the control and processor 203 processes the rawphase map to obtain a line laser intensity map containing the laser line, and at the same time obtains the intersection of the target ray (the ray starting from any pixel (denoted as P) receiving the laser line in the receiver, passing through the optical center of the receiver and emitting to the calibration plate 201) with the corresponding light plane to determine the three-dimensional coordinates of P. Then, all pixels in the receiver are traversed to obtain the three-dimensional coordinates of the calibration plate 201.
[0037] The above-mentioned line laser scanning principle mentioned that the light plane equation corresponding to any light plane can be obtained through calibration. Now, the calibration process of the light plane equation is explained by taking the i-TOF depth camera including the transmitter and the receiver as an example: turn off the transmitter and only turn on the receiver to take an image of the calibration plate without the laser line (hereinafter referred to as the first image); turn on the transmitter and control the receiver to take an image of the calibration plate with the laser line (hereinafter referred to as the second image), wherein the first image and the corresponding second image together constitute a set of light plane equation calibration images; adjust the posture of the calibration plate and perform the above-mentioned calibration under different postures. The purpose of the steps of taking the first image and the second image is to obtain multiple sets of light plane equation calibration images; in each set of light plane equation calibration images, the first image is used to calculate the plane equation of the calibration plate, the second image is used to calculate the light equation corresponding to each pixel point in the receiving end (the equation of the ray starting from any pixel receiving the laser line in the receiving end, passing through the optical center of the receiving end and emitting to the calibration plate), and the line-plane intersection method is used to calculate the three-dimensional point coordinates on the light plane equation; all the three-dimensional point coordinates calculated in each set of light plane equation calibration images are fitted with a least squares plane, and the fitting result is the light plane equation.
[0038] It should be noted that the i-TOF depth camera in this embodiment may also include a processing terminal. However, during the training process, the processing terminal in the i-TOF depth camera is only used to transmit image data to the control and processor 203 in the training system, without processing the image data. In addition, the control and processor 203 in this training system is a host computer with greater computing power than the processing terminal in the i-TOF depth camera.
[0039] FIG3 is a flowchart of a method for training a depth estimation model provided in an embodiment of the present application. The training method is actually a method for training the depth estimation model by the above-mentioned first training system. The training method includes the following steps 301 to 303 .
[0040] Step 301: Control the transmitter in the i-TOF depth camera to transmit a line laser toward the calibration plate, and control the receiver in the i-TOF depth camera to receive the line laser reflected back by the calibration plate and generate a corresponding rawphase diagram accordingly.
[0041] In an embodiment of the present application, when the depth estimation model is trained using the first training system, it is necessary to control the processor 203 to control the transmitting end in the i-TOF depth camera 202 to emit a line laser to the calibration plate 201, and to control the receiving end in the i-TOF depth camera 202 to receive the line laser reflected back by the calibration plate 201 and generate a corresponding rawphase map based on this.
[0042] Step 302: Process the rawphase map to obtain a line laser intensity map, and generate the three-dimensional coordinates of the calibration plate based on the line laser scanning principle and the line laser intensity map to obtain the true depth value. The true depth value and the corresponding rawphase map are used as a set of training data.
[0043] In an embodiment of the present application, after obtaining the rawphase map of the calibration plate 201, the control and processor 203 processes the rawphase map to obtain a line laser intensity map containing a line laser, and generates the three-dimensional coordinates of the calibration plate 201 according to the line laser scanning principle and the line laser intensity map, wherein the coordinate value corresponding to the target coordinate axis in the three-dimensional coordinates is the true depth value, and the target coordinate axis is the coordinate axis pointing from the i-TOF depth camera 202 to the direction of the calibration plate 201, and the true depth value and the corresponding rawphase map together constitute a set of training data.
[0044] Step 303: Adjust the position and posture of the calibration plate to obtain multiple sets of training data, and train the depth estimation model using the multiple sets of training data.
[0045] In an embodiment of the present application, after obtaining a set of training data, it is necessary to repeat steps 301 and 302 at different postures of the calibration plate 201 to obtain additional multiple sets of training data. Specifically, the control and processor 203 adjusts the posture of the calibration plate 201 by controlling the driving device to drive the calibration plate 201 to rotate and / or translate, and obtains different depth true values and corresponding rawphase maps through steps 301 and 302 at different postures, and finally obtains multiple sets of training data. Thereafter, the depth estimation model can be trained with these multiple sets of training data, wherein the rawphase maps in each set of training data are used as the input of the depth estimation model, and the depth true values in each set of training data are used as the output of the depth estimation model.
[0046] FIG4 is a schematic diagram of another depth estimation model training system provided by an embodiment of the present application. This training system (hereinafter referred to as the second training system) includes, in addition to the calibration plate 201, i-TOF depth camera 202, drive device (not shown), and control and processor 203 of the first training system, a conventional imaging device 204, also positioned opposite the calibration plate 201 and electrically connected to the control and processor 203. Specifically, conventional imaging device 204 includes a laser projector and an image sensor (e.g., a CMOS sensor). The laser projector is configured to emit a first laser line toward the calibration plate 201, and the image sensor is configured to receive the first laser line reflected from the calibration plate 201 and generate a corresponding measurement map based on the reflected laser line. The i-TOF depth camera 202 performs the same function as the first training system, emitting a second laser line toward the calibration plate 201 and receiving the reflected laser line from the calibration plate 201 to generate a corresponding rawphase map for transmission to the control and processor 203. The control and processor 203 is used to: calculate the three-dimensional coordinates of the calibration plate 201 according to the line laser scanning principle and the measurement map, wherein the coordinate value corresponding to the target coordinate axis in the three-dimensional coordinates is the true depth value, and the target coordinate axis is the coordinate axis pointing from the ordinary imaging device 204 to the calibration plate 201 (that is, the direction of the line between the ordinary imaging device 204 and the calibration plate 201), and the true depth value and the corresponding rawphase map together constitute a set of training data; and, adjust the position of the calibration plate 201 by controlling the driving device to drive the calibration plate 201 to rotate and / or translate (preferably translate on the target coordinate axis) to obtain multiple sets of training data, and then the depth estimation model can be trained with the multiple sets of training data, wherein the rawphase map in each set of training data is used as the input of the depth estimation model, and the true depth value in each set of training data is used as the output of the depth estimation model.
[0047] It is understandable that the difference between the second training system and the first training system is that the first training system only includes the i-TOF depth camera 202, while the second training system includes not only the i-TOF depth camera 202 but also the ordinary imaging device 204. When the training system includes both the i-TOF depth camera 202 and the ordinary imaging device 204, the i-TOF depth camera 202 and the ordinary imaging device 204 need to be calibrated before training the depth estimation model. The result of the calibration is the relative transformation matrix between the two. In this case, the i-TOF depth camera 202 performs depth estimation on the rawphase image, and the depth map finally obtained can be converted to the same coordinate system as the true depth value through the relative transformation matrix. The purpose is to facilitate comparison with the true depth value to verify the accuracy of the depth estimation.
[0048] FIG5 is a flowchart of another method for training a depth estimation model provided in an embodiment of the present application. The training method is actually a method for training a depth estimation model by the second training system described above. The training method includes the following steps 501 to 504 .
[0049] Step 501: Control a laser projector in a common imaging device to emit a first line of laser light toward a calibration plate, and control an image sensor in the common imaging device to receive the first line of laser light reflected by the calibration plate and generate a corresponding measurement map accordingly.
[0050] In an embodiment of the present application, when the depth estimation model is trained using the second training system, the control and processor 203 controls the laser projector in the ordinary imaging device 204 to emit a first line of laser toward the calibration plate 201, and controls the image sensor in the ordinary imaging device 204 to receive the first line of laser reflected back by the calibration plate 201 and generate a corresponding measurement map based on it.
[0051] Step 502: Control the transmitter in the i-TOF depth camera to transmit a second line of laser toward the calibration plate, and control the receiver in the i-TOF depth camera to receive the second line of laser reflected by the calibration plate and generate a corresponding rawphase diagram accordingly.
[0052] In the embodiment of the present application, it is necessary not only to obtain the measurement map of the calibration plate 201, but also to obtain the rawphase map of the calibration plate 201, that is, the control and processor 203 controls the transmitting end in the i-TOF depth camera 202 to emit a second line of laser to the calibration plate 201, and controls the receiving end in the i-TOF depth camera 202 to receive the second line of laser reflected back by the calibration plate 201 and generate a corresponding rawphase map based on this.
[0053] Step 503: Calculate the three-dimensional coordinates of the calibration plate according to the line laser scanning principle and the measurement map to obtain the true depth value, and use the true depth value and the corresponding rawphase map as a set of training data.
[0054] In an embodiment of the present application, after obtaining the measurement map and rawphase map of the calibration plate 201, the control and processor 203 calculates the three-dimensional coordinates of the calibration plate 201 according to the line laser scanning principle and the measurement map, wherein the coordinate value corresponding to the target coordinate axis in the three-dimensional coordinates is the true depth value, and the target coordinate axis is the coordinate axis pointing from the ordinary imaging device 204 to the direction of the calibration plate 201, and the true depth value and the corresponding rawphase map together constitute a set of training data.
[0055] Step 504: Adjust the position and posture of the calibration plate to obtain multiple sets of training data, and train the depth estimation model using the multiple sets of training data.
[0056] In an embodiment of the present application, after obtaining a set of training data, it is necessary to repeat steps 501 to 503 at different postures of the calibration plate 201 to obtain additional multiple sets of training data. Specifically, the control and processor 203 adjusts the posture of the calibration plate 201 by controlling the driving device to drive the calibration plate 201 to rotate and / or translate, and obtains different depth true values and corresponding rawphase maps through steps 501 to 503 at different postures, and finally obtains multiple sets of training data. Thereafter, the depth estimation model can be trained with these multiple sets of training data, wherein the rawphase maps in each set of training data are used as the input of the depth estimation model, and the depth true values in each set of training data are used as the output of the depth estimation model.
[0057] In summary, the embodiment of the present application designs a depth estimation model, which is essentially an end-to-end deep learning model that can directly obtain the optimal full-resolution distance map of the object under test from the original image data of the object under test (i.e., the rawphase map). In the process of producing and manufacturing the depth camera, the depth estimation model can be trained using the rawphase map collected by the i-TOF depth camera through the first training system or the second training system, and then the depth estimation model is mounted on the processing end 103 of the i-TOF depth camera, so that the i-TOF depth camera can directly use the depth estimation model to perform depth estimation on the generated rawphase map after leaving the factory to obtain the optimal full-resolution distance map of the object under test, and then generate the depth map of the object under test based on the obtained optimal full-resolution distance map and the depth camera internal parameters. Below, the depth estimation model is explained in detail.
[0058] Figure 6 is a first module block diagram of a depth estimation model provided in an embodiment of the present application, which includes a feature map extraction module 610, a distance map generation module 620, a first distance map optimization module 630, and a second distance map optimization module 640, wherein the feature map extraction module 610 takes the rawphase map of the object under test as input and is connected to the distance map generation module 620, the distance map generation module 620 is connected to the first distance map optimization module 630, the first distance map optimization module 630 is connected to the second distance map optimization module 640, and the second distance map optimization module 640 takes the optimal full-resolution distance map of the object under test as output. Specifically, the feature map extraction module 610 is used to extract features from the rawphase map of the object under test to obtain a 1 / 4 resolution feature map and a 1 / 2 resolution feature map; the distance map generation module 620 is used to perform a convolution operation on the 1 / 4 resolution feature map to obtain a 1 / 4 resolution distance map, and upsample the 1 / 4 resolution distance map to obtain a 1 / 2 resolution distance map; the first distance map optimization module 630 is used to generate a first feedback feature based on the 1 / 2 resolution distance map and the 1 / 2 resolution feature map, and use the first feedback feature to iteratively optimize the 1 / 2 resolution distance map to obtain an optimal 1 / 2 resolution distance map, and upsample the optimal 1 / 2 resolution distance map to obtain a full resolution distance map; the second distance map optimization module 640 is used to generate a second feedback feature based on the full resolution distance map and the rawphase map, and use the second feedback feature to iteratively optimize the full resolution distance map to obtain an optimal full resolution distance map.
[0059] In some embodiments, please refer to Figure 7, which is a second module block diagram of the depth estimation model provided in an embodiment of the present application. The first distance map optimization module 630 includes an upsampling unit 632 and multiple first feedback units 631, wherein the multiple first feedback units 631 are connected in sequence, and the last first feedback unit 631 is connected to the upsampling unit 632. Specifically, the first first feedback unit 631 is used to perform a difference comparison between the 1 / 2 resolution distance map and the 1 / 2 resolution feature map to obtain a first first feedback feature; the second first feedback unit 631 is used to optimize the 1 / 2 resolution distance map using the first first feedback feature to obtain a first optimized 1 / 2 resolution distance map, and perform a difference comparison between the first optimized 1 / 2 resolution distance map and the 1 / 2 resolution feature map to obtain a second first feedback feature; the third first feedback unit 631 is used to optimize the first optimized 1 / 2 resolution distance map using the second first feedback feature to obtain a second optimized 1 / 2 resolution distance map, and perform a difference comparison between the second optimized 1 / 2 resolution distance map and the 1 / 2 resolution feature map to obtain a third first feedback feature; and so on, when the first feedback feature stops within a preset range or reaches a preset number of iterations, the last first feedback unit 631 outputs an optimal 1 / 2 resolution distance map; the upsampling unit 632 is used to upsample the optimal 1 / 2 resolution distance map to obtain a full-resolution distance map. Preferably, the upsampling unit 632 performs bilinear interpolation upsampling on the optimal 1 / 2 resolution distance map.
[0060] As one of the implementation methods, please refer to Figure 8, which is an iterative optimization example diagram of the first distance map optimization module 630 provided in an embodiment of the present application. The first feedback units 631 include a total of four. In the actual optimization iteration process, the first first feedback unit 631 performs a difference comparison on the 1 / 2 resolution distance map and the 1 / 2 resolution feature map to obtain a first feedback feature A; the second first feedback unit 631 optimizes the 1 / 2 resolution distance map using the first feedback feature A to obtain a 1 / 2 resolution distance map after the first optimization, and performs a difference comparison on the 1 / 2 resolution distance map after the first optimization and the 1 / 2 resolution feature map to obtain a first feedback feature B; the third first feedback unit 631 performs a difference comparison on the 1 / 2 resolution distance map after the first optimization and the 1 / 2 resolution feature map to obtain a first feedback feature B; Element 631 uses the first feedback feature B to optimize the 1 / 2 resolution distance map after the first optimization to obtain the 1 / 2 resolution distance map after the second optimization, and compares the difference between the 1 / 2 resolution distance map after the second optimization and the 1 / 2 resolution feature map to obtain the first feedback feature C; the fourth first feedback unit 631 uses the first feedback feature C to optimize the 1 / 2 resolution distance map after the second optimization to obtain the optimal 1 / 2 resolution distance map. At this time, the preset number of iterations has been reached or the first feedback feature C has stopped within the preset range; the upsampling unit 632 upsamples the optimal 1 / 2 resolution distance map output by the fourth first feedback unit 631 to obtain a full-resolution distance map.
[0061] Furthermore, the second distance map optimization module 640 includes a plurality of second feedback units 641, wherein the plurality of second feedback units 641 are connected in sequence. Specifically, the first second feedback unit 641 is used to perform a difference comparison between the full-resolution distance map and the rawphase map to obtain a first second feedback feature; the second second feedback unit 641 is used to optimize the full-resolution distance map using the first second feedback feature to obtain a first optimized full-resolution distance map, and perform a difference comparison between the first optimized full-resolution distance map and the rawphase map to obtain a second second feedback feature; the third second feedback unit 641 is used to optimize the first optimized full-resolution distance map using the second second feedback feature to obtain a second optimized full-resolution distance map, and perform a difference comparison between the second optimized full-resolution distance map and the rawphase map to obtain a third second feedback feature; and so on. When the second feedback feature stops within a preset range or reaches a preset number of iterations, the last second feedback unit 641 outputs the optimal full-resolution distance map. It is understandable that the principle of iterative optimization of the full-resolution distance map by the second distance map optimization module 640 is similar to the iterative optimization of the first distance map optimization module 630 , and will not be described in detail here.
[0062] In some embodiments, please refer to Figure 9, which is a third module block diagram of the depth estimation model provided in an embodiment of the present application. The rawphase map as the input of the feature map extraction module 610 can be single-frequency or multi-frequency. When the rawphase map is a multi-frequency rawphase map, the multi-frequency rawphase map needs to be normalized before being input into the feature map extraction module 610 so that the numerical range of the multi-frequency rawphase map remains consistent. Therefore, in addition to including the feature map extraction module 610, the distance map generation module 620, the first distance map optimization module 630 and the second distance map optimization module 640, the depth estimation model also needs to include a preprocessing module 650 connected to the feature map extraction module 610. The preprocessing module 650 is used to normalize the multi-frequency rawphase map so that the numerical range of the multi-frequency rawphase map remains consistent. Preferably, the normalization process performed on the multi-frequency rawphase map is a process of normalizing to 0~1.
[0063] As can be seen from the above, the embodiment of the present application uses a feature map extraction module 610, a distance map generation module 620, a first distance map optimization module 630 and a second distance map optimization module 640 to form a depth estimation model, and uses this depth estimation model to perform depth estimation on the object to be measured. In the actual application process, the rawphase map of the object to be measured is first obtained, and the rawphase map is subjected to feature extraction by the feature map extraction module 610 to obtain a 1 / 4 resolution feature map and a 1 / 2 resolution feature map; thereafter, the 1 / 4 resolution feature map is subjected to a convolution operation by the distance map generation module 620 to obtain a 1 / 4 resolution distance map, and a 1 / 4 resolution feature map is subjected to a convolution operation by the distance map generation module 620 to obtain a 1 / 4 resolution distance map. The 1 / 2 resolution distance map is upsampled to obtain a 1 / 2 resolution distance map; then, a first feedback feature is generated according to the 1 / 2 resolution distance map and the 1 / 2 resolution feature map by the first distance map optimization module 630, and the 1 / 2 resolution distance map is iteratively optimized using the first feedback feature to obtain an optimal 1 / 2 resolution distance map, and the optimal 1 / 2 resolution distance map is upsampled to obtain a full-resolution distance map; then, a second feedback feature is generated according to the full-resolution distance map and the rawphase map by the second distance map optimization module 640, and the full-resolution distance map is iteratively optimized using the second feedback feature to obtain an optimal full-resolution distance map. It can be understood that the depth estimation model provided in the embodiment of the present application is essentially an end-to-end deep learning model, which can directly obtain the depth data of the object under test (i.e., the optimal full-resolution distance map) from the original image data of the object under test (i.e., the rawphase map). Its depth estimation process adopts a step-by-step optimization strategy, i.e., first iteratively optimize the 1 / 2 resolution distance map to obtain the optimal 1 / 2 resolution distance map, and then iteratively optimize the full-resolution distance map obtained by upsampling the optimal 1 / 2 resolution distance map to obtain the optimal full-resolution distance map. It can not only obtain the same depth estimation results as the traditional scheme in conventional scenarios, but also obtain depth estimation results that are better than the traditional scheme in special scenarios (such as inner right-angle areas that are prone to multipath errors, etc.), which is beneficial to ensuring the accuracy of depth estimation.
[0064] It should be noted that those skilled in the art should note that the above-mentioned embodiment is only a preferred implementation of the embodiment of the present application, and is not the only limitation of the described content; in this regard, those skilled in the art can flexibly set it according to the actual application scenario based on the embodiment of the present application. In addition, although the depth estimation model adopts a step-by-step optimization strategy, it can actually adopt a multiple (such as 4-fold) optimization strategy, that is, the single first feedback unit 631 in the first distance map optimization module 630 directly optimizes the input 1 / 2 resolution distance map multiple times, and correspondingly, the single second feedback unit 641 in the second distance map optimization module 640 also directly optimizes the input full-resolution distance map multiple times.
[0065] Figure 10 is a flowchart of the depth estimation method provided in an embodiment of the present application. The depth estimation method is actually a method for performing depth estimation on the rawphase image of the object under test using the above-mentioned depth estimation model. The depth estimation method includes the following steps 1001 to 1004.
[0066] Step 1001: Obtain a rawphase image of the object under test, and perform feature extraction on the rawphase image to obtain a 1 / 4 resolution feature image and a 1 / 2 resolution feature image.
[0067] In an embodiment of the present application, when the depth estimation model is used to perform depth estimation on the object under test, the feature map extraction module 610 needs to obtain the rawphase map of the object under test and perform feature extraction on the obtained rawphase map to obtain a 1 / 4 resolution feature map and a 1 / 2 resolution feature map.
[0068] Step 1002: Perform a convolution operation on the 1 / 4 resolution feature map to obtain a 1 / 4 resolution distance map, and upsample the 1 / 4 resolution distance map to obtain a 1 / 2 resolution distance map.
[0069] In an embodiment of the present application, after obtaining a 1 / 4 resolution feature map and a 1 / 2 resolution feature map through the feature map extraction module 610, the distance map generation module 620 needs to perform a convolution operation on the 1 / 4 resolution feature map to obtain a 1 / 4 resolution distance map, and upsample the 1 / 4 resolution distance map to obtain a 1 / 2 resolution distance map.
[0070] Step 1003: Generate a first feedback feature based on the 1 / 2 resolution distance map and the 1 / 2 resolution feature map, iteratively optimize the 1 / 2 resolution distance map using the first feedback feature to obtain an optimal 1 / 2 resolution distance map, and upsample the optimal 1 / 2 resolution distance map to obtain a full-resolution distance map.
[0071] In an embodiment of the present application, after obtaining the 1 / 2 resolution distance map through the distance map generation module 620, the first distance map optimization module 630 needs to generate a first feedback feature based on the 1 / 2 resolution distance map and the previously obtained 1 / 2 resolution feature map, and use the first feedback feature to iteratively optimize the 1 / 2 resolution distance map to obtain the optimal 1 / 2 resolution distance map, and upsample the optimal 1 / 2 resolution distance map to obtain a full-resolution distance map.
[0072] In some embodiments, the process of the first distance map optimization module 630 iteratively optimizing the 1 / 2 resolution distance map to obtain the optimal 1 / 2 resolution distance map can be: performing a difference comparison between the 1 / 2 resolution distance map and the 1 / 2 resolution feature map to obtain a first first feedback feature; optimizing the 1 / 2 resolution distance map using the first first feedback feature to obtain the 1 / 2 resolution distance map after the first optimization, and performing a difference comparison between the 1 / 2 resolution distance map after the first optimization and the 1 / 2 resolution feature map to obtain a second first feedback feature; optimizing the 1 / 2 resolution distance map after the first optimization using the second first feedback feature to obtain the 1 / 2 resolution distance map after the second optimization, and performing a difference comparison between the 1 / 2 resolution distance map after the second optimization and the 1 / 2 resolution feature map to obtain a third first feedback feature; and so on, until the first feedback feature stops within a preset range or reaches a preset number of iterations, at which time the output 1 / 2 resolution distance map is optimal.
[0073] Step 1004: Generate a second feedback feature based on the full-resolution distance map and the rawphase map, and iteratively optimize the full-resolution distance map using the second feedback feature to obtain an optimal full-resolution distance map.
[0074] In an embodiment of the present application, after obtaining the full-resolution distance map of the measured object through the first distance map optimization module 630, the second distance map optimization module 640 needs to generate a second feedback feature based on the full-resolution distance map and the previously obtained rawphase map, and use the second feedback feature to iteratively optimize the full-resolution distance map to obtain the optimal full-resolution distance map.
[0075] In some embodiments, the process of the second distance map optimization module 640 iteratively optimizing the full-resolution distance map to obtain the optimal full-resolution distance map may be: performing a difference comparison between the full-resolution distance map and the rawphase map to obtain a first second feedback feature; optimizing the full-resolution distance map using the first second feedback feature to obtain a first-optimized full-resolution distance map, and performing a difference comparison between the first-optimized full-resolution distance map and the rawphase map to obtain a second second feedback feature; optimizing the first-optimized full-resolution distance map using the second second feedback feature to obtain a second-optimized full-resolution distance map, and performing a difference comparison between the second-optimized full-resolution distance map and the rawphase map to obtain a third second feedback feature; and so on, until the second feedback feature stops within a preset range or reaches a preset number of iterations, at which time the output full-resolution distance map is optimal.
[0076] Furthermore, the rawphase diagram of the object under test obtained in step 1001 can be single-frequency or multi-frequency. When the rawphase diagram is a multi-frequency rawphase diagram, the multi-frequency rawphase diagram needs to be normalized before feature extraction to ensure that the numerical range of the multi-frequency rawphase diagram remains consistent. Therefore, when the rawphase diagram is a multi-frequency rawphase diagram, step 1001 also includes: normalizing the multi-frequency rawphase diagram to ensure that the numerical range of the multi-frequency rawphase diagram remains consistent. Preferably, the normalization performed on the multi-frequency rawphase diagram is normalization to 0-1.
[0077] It should be noted that the above embodiments are merely preferred implementations of the present invention and are not intended to be the sole limitation of the present invention. Those skilled in the art may flexibly adjust the above embodiments based on the present invention and actual application scenarios. Furthermore, the upsampling involved in steps 1001 to 1004 may all employ bilinear interpolation upsampling.
[0078] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0079] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive (SSD)).
[0080] It should be noted that the various embodiments in this application are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similarities between the various embodiments can be referred to in conjunction with each other. For product-related embodiments, since they are similar to method-related embodiments, their description is relatively simple. For relevant details, refer to the description of the method-related embodiments.
[0081] It should also be noted that, in the present application, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article, or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0082] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not limited to the embodiments shown herein but is intended to be applied in the broadest manner consistent with the principles and novel features disclosed herein.
Claims
1. A depth estimation model, It is characterized in that Applied to the i-TOF depth camera, the depth estimation model is used to process the rawphase image of the object under test collected by the i-TOF depth camera to obtain a corresponding distance image, and the depth estimation model includes: A feature map extraction module, used to extract features from the rawphase map to obtain a 1 / 4 resolution feature map and a 1 / 2 resolution feature map; A distance map generation module, configured to perform a convolution operation on the 1 / 4 resolution feature map to obtain a 1 / 4 resolution distance map, and upsample the 1 / 4 resolution distance map to obtain a 1 / 2 resolution distance map; A first distance map optimization module, configured to generate a first feedback feature according to the 1 / 2 resolution distance map and the 1 / 2 resolution feature map, and iteratively optimize the 1 / 2 resolution distance map using the first feedback feature to obtain an optimal 1 / 2 resolution distance map, and upsample the optimal 1 / 2 resolution distance map to obtain a full resolution distance map; The second distance map optimization module is used to generate a second feedback feature according to the full-resolution distance map and the rawphase map, and use the second feedback feature to iteratively optimize the full-resolution distance map to obtain an optimal full-resolution distance map.
2. The depth estimation model according to claim 1, It is characterized in that The first distance map optimization module includes an upsampling unit and a plurality of first feedback units, wherein: The first first feedback unit is used to perform a difference comparison between the 1 / 2 resolution distance map and the 1 / 2 resolution feature map to obtain a first first feedback feature; The second first feedback unit is used to optimize the 1 / 2 resolution distance map using the first first feedback feature to obtain the 1 / 2 resolution distance map after the first optimization, and perform a difference comparison between the 1 / 2 resolution distance map after the first optimization and the 1 / 2 resolution feature map to obtain a second first feedback feature; The third first feedback unit is used to optimize the 1 / 2 resolution distance map after the first optimization by using the second first feedback feature to obtain the 1 / 2 resolution distance map after the second optimization, and perform a difference comparison between the 1 / 2 resolution distance map after the second optimization and the 1 / 2 resolution feature map to obtain the third first feedback feature; and so on, when the first feedback feature stops within a preset range or reaches a preset number of iterations, the last first feedback unit outputs an optimal 1 / 2 resolution distance map; The up-sampling unit is used to up-sample the optimal 1 / 2 resolution distance map to obtain a full-resolution distance map.
3. The depth estimation model according to claim 1, It is characterized in that The second distance map optimization module includes a plurality of second feedback units, wherein: The first of the second feedback units is used to compare the difference between the full-resolution distance map and the rawphase map to obtain a first second feedback feature; The second second feedback unit is used to optimize the full-resolution distance map using the first second feedback feature to obtain the full-resolution distance map after the first optimization, and to compare the difference between the full-resolution distance map after the first optimization and the rawphase map to obtain a second second feedback feature; The third second feedback unit is used to optimize the full-resolution distance map after the first optimization by using the second second feedback feature to obtain the full-resolution distance map after the second optimization, and compare the difference between the full-resolution distance map after the second optimization and the rawphase map to obtain the third second feedback feature; and so on, when the second feedback feature stops within a preset range or reaches a preset number of iterations, the last second feedback unit outputs an optimal full-resolution distance map.
4. The depth estimation model according to claim 1, It is characterized in that The rawphase diagram includes any one of a single-frequency rawphase diagram and a multi-frequency rawphase diagram, and when the rawphase diagram is the multi-frequency rawphase diagram, the depth estimation model also includes a preprocessing module, and the preprocessing module is used to normalize the multi-frequency rawphase diagram, and the numerical range of the multi-frequency rawphase diagram remains consistent after normalization.
5. A depth estimation method, It is characterized in that include: Obtaining a rawphase image of the object under test, and performing feature extraction on the rawphase image to obtain a 1 / 4 resolution feature image and a 1 / 2 resolution feature image; Performing a convolution operation on the 1 / 4 resolution feature map to obtain a 1 / 4 resolution distance map, and upsampling the 1 / 4 resolution distance map to obtain a 1 / 2 resolution distance map; Generate a first feedback feature according to the 1 / 2 resolution distance map and the 1 / 2 resolution feature map, iteratively optimize the 1 / 2 resolution distance map using the first feedback feature to obtain an optimal 1 / 2 resolution distance map, and upsample the optimal 1 / 2 resolution distance map to obtain a full resolution distance map; A second feedback feature is generated according to the full-resolution distance map and the rawphase map, and the full-resolution distance map is iteratively optimized using the second feedback feature to obtain an optimal full-resolution distance map.
6. The depth estimation method according to claim 5, It is characterized in that The step of generating a first feedback feature according to the 1 / 2 resolution distance map and the 1 / 2 resolution feature map, and iteratively optimizing the 1 / 2 resolution distance map using the first feedback feature to obtain an optimal 1 / 2 resolution distance map includes: Performing a difference comparison between the 1 / 2 resolution distance map and the 1 / 2 resolution feature map to obtain a first first feedback feature; Optimizing the 1 / 2 resolution distance map using the first first feedback feature to obtain a first optimized 1 / 2 resolution distance map, and performing a difference comparison between the first optimized 1 / 2 resolution distance map and the 1 / 2 resolution feature map to obtain a second first feedback feature; The second first feedback feature is used to optimize the 1 / 2 resolution distance map after the first optimization to obtain the 1 / 2 resolution distance map after the second optimization, and the difference between the 1 / 2 resolution distance map after the second optimization and the 1 / 2 resolution feature map is compared to obtain the third first feedback feature; and so on, when the first feedback feature stops within a preset range or reaches a preset number of iterations, the optimal 1 / 2 resolution distance map is obtained.
7. The depth estimation method according to claim 5, It is characterized in that The step of generating a second feedback feature according to the full-resolution distance map and the rawphase map, and iteratively optimizing the full-resolution distance map using the second feedback feature to obtain an optimal full-resolution distance map includes: Performing a difference comparison between the full-resolution distance map and the rawphase map to obtain a first second feedback feature; Optimizing the full-resolution distance map using the first second feedback feature to obtain a first optimized full-resolution distance map, and performing a difference comparison between the first optimized full-resolution distance map and the rawphase map to obtain a second second feedback feature; The full-resolution distance map after the first optimization is optimized using the second second feedback feature to obtain a full-resolution distance map after the second optimization, and the full-resolution distance map after the second optimization is compared with the rawphase map to obtain a third second feedback feature; and so on, when the second feedback feature stops within a preset range or reaches a preset number of iterations, the optimal full-resolution distance map is obtained.
8. The depth estimation method according to claim 5, It is characterized in that The rawphase graph includes any one of a single-frequency rawphase graph and a multi-frequency rawphase graph, and when the rawphase graph is the multi-frequency rawphase graph, before extracting features from the rawphase graph, the process further includes: The multi-frequency rawphase graph is normalized, and the value range of the multi-frequency rawphase graph remains consistent after the normalization.
9. A training system for a depth estimation model, It is characterized in that Includes calibration board, i-TOF depth camera and control and processor, including: The i-TOF depth camera is used to emit a line laser to the calibration plate, and receive the line laser reflected by the calibration plate and generate a corresponding rawphase map; The control and processor are used to: The rawphase map is processed to obtain a line laser intensity map, and the three-dimensional coordinates of the calibration plate are generated according to the line laser scanning principle and the line laser intensity map; wherein the coordinate value corresponding to the target coordinate axis in the three-dimensional coordinates is the depth true value, the target coordinate axis is the coordinate axis pointing from the i-TOF depth camera to the calibration plate direction, and the depth true value and the corresponding rawphase map together constitute a set of training data; and The posture of the calibration plate is adjusted and multiple groups of training data are obtained, and the depth estimation model is trained through the multiple groups of training data; wherein the rawphase image in each group of training data is used as the input of the depth estimation model, and the true depth value in each group of training data is used as the output of the depth estimation model.
10. A training system for a depth estimation model, It is characterized in that It includes a calibration board, a common imaging device, an i-TOF depth camera, and a control and processor, wherein: The common imaging device comprises a laser projector and an image sensor, wherein the laser projector is used to emit a first line of laser light to the calibration plate, and the image sensor is used to receive the first line of laser light reflected by the calibration plate and generate a corresponding measurement map; The i-TOF depth camera is used to emit a second line of laser light to the calibration plate, and receive the second line of laser light reflected by the calibration plate and generate a corresponding rawphase image; The control and processor are used to: The three-dimensional coordinates of the calibration plate are calculated according to the line laser scanning principle and the measurement map; wherein the coordinate value corresponding to the target coordinate axis in the three-dimensional coordinates is the depth true value, the target coordinate axis is the coordinate axis pointing from the ordinary imaging device to the calibration plate direction, and the depth true value and the corresponding rawphase map together constitute a set of training data; and The posture of the calibration plate is adjusted and multiple groups of training data are obtained, and the depth estimation model is trained through the multiple groups of training data; wherein the rawphase image in each group of training data is used as the input of the depth estimation model, and the true depth value in each group of training data is used as the output of the depth estimation model.
11. An i-TOF depth camera, It is characterized in that include: A transmitting end, used for transmitting a modulated light beam to the object to be measured; A receiving end, used for receiving the modulated light beam reflected by the measured object and generating a corresponding rawphase diagram; A processing end, for using the depth estimation model described in any one of claims 1 to 4 to perform depth estimation on the rawphase image to obtain a corresponding optimal full-resolution distance map, and generating a corresponding depth map based on the i-TOF depth camera internal parameters and the optimal full-resolution distance map.
12. An i-TOF depth camera, It is characterized in that include: A transmitting end, used for transmitting modulated light beams with different modulation frequencies to the object to be measured; A receiving end, comprising an image sensor, wherein the image sensor comprises at least one pixel, and each pixel comprises at least three taps, for receiving the modulated light beams of different modulation frequencies reflected by the object under test by rotating the taps according to different demodulation frequencies, and generating rawphase diagrams under different modulation and demodulation frequencies; wherein the different demodulation frequencies correspond to the different modulation frequencies respectively; The processing end is used to use the depth estimation model described in any one of claims 1 to 4 to perform depth estimation on the rawphase image under different modulation and demodulation frequencies to obtain a corresponding optimal full-resolution distance map, and generate a corresponding depth map based on the i-TOF depth camera internal parameters and the optimal full-resolution distance map.
Citation Information
Patent Citations
Visual depth of field estimation method, apparatus, devcie, and storage medium
CN109118532A
Time flight depth camera and distance measuring method of single-frequency modulation and demodulation
CN110221273A
Time depth camera and multi-frequency modulation and demodulation distance measurement method for reducing noise
CN110320528A
Depth measuring system and measuring method thereof
CN110986816A
Unsupervised depth prediction method, system and device for multi-view image consistency
CN111476835A
