Scene depth and camera motion prediction method and device, electronic device and medium

文档序号:1379780 发布日期:2020-08-14 浏览:6次 中文

阅读说明:本技术 场景深度和相机运动预测方法及装置、电子设备和介质 (Scene depth and camera motion prediction method and device, electronic device and medium ) 是由 韩滔 张展鹏 成慧 于 2020-04-28 设计创作,主要内容包括:本公开涉及一种场景深度和相机运动预测方法及装置、电子设备和介质,所述方法包括:获取t时刻的目标图像帧;通过场景深度预测网络利用t-1时刻的第一隐状态信息对所述目标图像帧进行场景深度预测,确定所述目标图像帧对应的预测深度图,其中,所述第一隐状态信息包括与场景深度相关的特征信息,所述场景深度预测网络是基于相机运动预测网络辅助训练得到的。本公开实施例可以得到目标图像帧对应的预测精度较高的预测深度图。(The present disclosure relates to a scene depth and camera motion prediction method and apparatus, an electronic device, and a medium, the method including: acquiring a target image frame at the time t; scene depth prediction is carried out on the target image frame through a scene depth prediction network by utilizing first hidden state information at the t-1 moment, and a prediction depth map corresponding to the target image frame is determined, wherein the first hidden state information comprises feature information related to scene depth, and the scene depth prediction network is obtained based on auxiliary training of a camera motion prediction network. According to the embodiment of the disclosure, the prediction depth map with higher prediction accuracy corresponding to the target image frame can be obtained.)

1. A method for scene depth prediction, comprising:

acquiring a target image frame at the time t;

scene depth prediction is carried out on the target image frame through a scene depth prediction network by utilizing first hidden state information at the t-1 moment, and a prediction depth map corresponding to the target image frame is determined, wherein the first hidden state information comprises feature information related to scene depth, and the scene depth prediction network is obtained based on auxiliary training of a camera motion prediction network.

2. The method according to claim 1, wherein the determining, through the scene depth prediction network, the predicted depth map corresponding to the target image frame by performing scene depth prediction on the target image frame using the first hidden state information at the time t-1 comprises:

performing feature extraction on the target image frame, and determining a first feature map corresponding to the target image frame, wherein the first feature map is a feature map related to scene depth;

determining the first hidden state information at the time t according to the first feature map and the first hidden state information at the time t-1;

and determining the predicted depth map according to the first hidden state information at the time t.

3. The method of claim 2, wherein the first hidden-state information at time t-1 comprises the first hidden-state information at different scales at time t-1;

the feature extraction of the target image frame and the determination of the first feature map corresponding to the target image frame include:

carrying out multi-scale down-sampling on the target image frame, and determining the first feature maps under different scales corresponding to the target image frame;

the determining the first hidden state information at the time t according to the first feature map and the first hidden state information at the time t-1 includes:

aiming at any scale, determining the first hidden state information under the scale at the time t according to the first feature diagram under the scale and the first hidden state information under the scale at the time t-1;

determining the predicted depth map according to the first hidden state information at the time t, including:

and performing feature fusion on the first hidden state information under different scales at the time t to determine the prediction depth map.

4. The method according to any one of claims 1-3, further comprising:

acquiring a sample image frame sequence corresponding to a time t, wherein the sample image frame sequence comprises a first sample image frame at the time t and an adjacent sample image frame of the first sample image frame;

performing camera pose prediction on the sample image frame sequence by using second hidden state information at the time t-1 through a camera motion prediction network, and determining sample predicted camera motion corresponding to the sample image frame sequence, wherein the second hidden state information comprises feature information related to the camera motion;

performing scene depth prediction on the first sample image frame by using first hidden state information at the t-1 moment through a scene depth prediction network to be trained, and determining a sample prediction depth map corresponding to the first sample image frame, wherein the first hidden state information comprises feature information related to scene depth;

constructing a loss function according to the sample prediction depth map and the sample prediction camera motion;

and training the scene depth prediction network to be trained according to the loss function to obtain the scene depth prediction network.

5. The method of claim 4, wherein constructing a loss function from the sample predicted depth map and the sample predicted camera motion comprises:

determining a reprojection error term of an adjacent sample image frame of the first sample image frame relative to the first sample image frame in the sample image frame sequence according to the sample prediction camera motion;

determining a penalty function item according to the distribution continuity of the sample prediction depth map;

and constructing the loss function according to the reprojection error term and the penalty function term.

6. A method for predicting motion of a camera, comprising:

acquiring an image frame sequence corresponding to the t moment, wherein the image frame sequence comprises a target image frame at the t moment and adjacent image frames of the target image frame;

and performing camera pose prediction on the image frame sequence by using second hidden state information at the t-1 moment through a camera motion prediction network, and determining predicted camera motion corresponding to the image frame sequence, wherein the second hidden state information comprises feature information related to the camera motion, and the camera motion prediction network is obtained based on auxiliary training of a scene depth prediction network.

7. The method of claim 6, wherein the determining, by the camera motion prediction network, the predicted camera motion corresponding to the sequence of image frames using the second hidden state information at time t-1 for camera pose prediction for the sequence of image frames comprises:

performing feature extraction on the image frame sequence, and determining a second feature map corresponding to the image frame sequence, wherein the second feature map is a feature map related to camera motion;

determining the second hidden state information at the time t according to the second feature map and the second hidden state information at the time t-1;

and determining the predicted camera motion according to the second hidden state information at the time t.

8. The method of claim 6 or 7, wherein the predicted camera motion comprises a relative pose between adjacent image frames in the sequence of image frames.

9. The method according to any one of claims 6-8, further comprising:

acquiring a sample image frame sequence corresponding to a time t, wherein the sample image frame sequence comprises a first sample image frame at the time t and an adjacent sample image frame of the first sample image frame;

performing scene depth prediction on the first sample image frame by using first hidden state information at the t-1 moment through a scene depth prediction network, and determining a sample prediction depth map corresponding to the first sample image frame, wherein the first hidden state information comprises feature information related to scene depth;

performing camera pose prediction on the sample image frame sequence by using second hidden state information at the t-1 moment through a camera motion prediction network to be trained, and determining sample predicted camera motion corresponding to the sample image frame sequence, wherein the second hidden state information comprises feature information related to the camera motion;

constructing a loss function according to the sample prediction depth map and the sample prediction camera motion;

and training the camera motion prediction network to be trained according to the loss function to obtain the camera motion prediction network.

10. The method of claim 9, wherein constructing a loss function from the sample predicted depth map and the sample predicted camera motion comprises:

determining a reprojection error term of an adjacent sample image frame of the first sample image frame relative to the first sample image frame in the sample image frame sequence according to the sample prediction camera motion;

determining a penalty function item according to the distribution continuity of the sample prediction depth map;

and constructing the loss function according to the reprojection error term and the penalty function term.

11. A scene depth prediction apparatus, comprising:

the first acquisition module is used for acquiring a target image frame at the moment t;

the first scene depth prediction module is used for performing scene depth prediction on the target image frame by using first hidden state information at the t-1 moment through a scene depth prediction network, and determining a predicted depth map corresponding to the target image frame, wherein the first hidden state information comprises feature information related to scene depth, and the scene depth prediction network is obtained based on auxiliary training of a camera motion prediction network.

12. A camera motion prediction apparatus, comprising:

the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring an image frame sequence corresponding to a time t, and the image frame sequence comprises a target image frame at the time t and adjacent image frames of the target image frame;

the first camera motion prediction module is used for performing camera pose prediction on the image frame sequence by using second hidden state information at the t-1 moment through a camera motion prediction network, and determining predicted camera motion corresponding to the image frame sequence, wherein the second hidden state information comprises feature information related to the camera motion, and the camera motion prediction network is obtained based on scene depth prediction network aided training.

13. An electronic device, comprising:

a processor;

a memory for storing processor-executable instructions;

wherein the processor is configured to invoke the memory-stored instructions to perform the method of any one of claims 1 to 10.

14. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1 to 10.

Technical Field

The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for predicting scene depth and camera motion, an electronic device, and a medium.

Background

The recovery of scene depth and camera motion using an image acquired by a monocular image acquisition device (e.g., a monocular camera) as input is an active and important research direction in the field of computer vision in the last two decades, and is widely applied to many fields such as augmented reality, unmanned driving, and mobile robot positioning and navigation. In view of the above, how to improve the prediction accuracy of scene depth and camera motion becomes an urgent problem to be solved.

Disclosure of Invention

The disclosure provides a scene depth and camera motion prediction method and device, an electronic device and a medium.

According to an aspect of the present disclosure, there is provided a scene depth prediction method, including: acquiring a target image frame at the time t; scene depth prediction is carried out on the target image frame through a scene depth prediction network by utilizing first hidden state information at the t-1 moment, and a prediction depth map corresponding to the target image frame is determined, wherein the first hidden state information comprises feature information related to scene depth, and the scene depth prediction network is obtained based on auxiliary training of a camera motion prediction network.

In a possible implementation manner, the determining, by the scene depth prediction network, a predicted depth map corresponding to the target image frame by performing scene depth prediction on the target image frame using first hidden state information at a time t-1 includes: performing feature extraction on the target image frame, and determining a first feature map corresponding to the target image frame, wherein the first feature map is a feature map related to scene depth; determining the first hidden state information at the time t according to the first feature map and the first hidden state information at the time t-1; and determining the predicted depth map according to the first hidden state information at the time t.

In a possible implementation manner, the first hidden state information at the time t-1 includes the first hidden state information at different scales at the time t-1; the feature extraction of the target image frame and the determination of the first feature map corresponding to the target image frame include: carrying out multi-scale down-sampling on the target image frame, and determining the first feature maps under different scales corresponding to the target image frame; the determining the first hidden state information at the time t according to the first feature map and the first hidden state information at the time t-1 includes: aiming at any scale, determining the first hidden state information under the scale at the time t according to the first feature diagram under the scale and the first hidden state information under the scale at the time t-1; determining the predicted depth map according to the first hidden state information at the time t, including: and performing feature fusion on the first hidden state information under different scales at the time t to determine the prediction depth map.

In one possible implementation, the method further includes: acquiring a sample image frame sequence corresponding to a time t, wherein the sample image frame sequence comprises a first sample image frame at the time t and an adjacent sample image frame of the first sample image frame; performing camera pose prediction on the sample image frame sequence by using second hidden state information at the time t-1 through a camera motion prediction network, and determining sample predicted camera motion corresponding to the sample image frame sequence, wherein the second hidden state information comprises feature information related to the camera motion; performing scene depth prediction on the first sample image frame by using first hidden state information at the t-1 moment through a scene depth prediction network to be trained, and determining a sample prediction depth map corresponding to the first sample image frame, wherein the first hidden state information comprises feature information related to scene depth; constructing a loss function according to the sample prediction depth map and the sample prediction camera motion; and training the scene depth prediction network to be trained according to the loss function to obtain the scene depth prediction network.

In one possible implementation, the constructing a loss function according to the sample predicted depth map and the sample predicted camera motion includes: determining a reprojection error term of an adjacent sample image frame of the first sample image frame relative to the first sample image frame in the sample image frame sequence according to the sample prediction camera motion; determining a penalty function item according to the distribution continuity of the sample prediction depth map; and constructing the loss function according to the reprojection error term and the penalty function term.

According to an aspect of the present disclosure, there is provided a camera motion prediction method including: acquiring an image frame sequence corresponding to the t moment, wherein the image frame sequence comprises a target image frame at the t moment and adjacent image frames of the target image frame; and performing camera pose prediction on the image frame sequence by using second hidden state information at the t-1 moment through a camera motion prediction network, and determining predicted camera motion corresponding to the image frame sequence, wherein the second hidden state information comprises feature information related to the camera motion, and the camera motion prediction network is obtained based on auxiliary training of a scene depth prediction network.

In a possible implementation manner, the determining, by the camera motion prediction network, the predicted camera motion corresponding to the image frame sequence by performing camera pose prediction on the image frame sequence by using the second hidden state information at the time t-1 includes: performing feature extraction on the image frame sequence, and determining a second feature map corresponding to the image frame sequence, wherein the second feature map is a feature map related to camera motion; determining the second hidden state information at the time t according to the second graph characteristic and the second hidden state information at the time t-1; and determining the predicted camera motion according to the second hidden state information at the time t.

In one possible implementation, the predicted camera motion includes a relative pose between adjacent image frames in the sequence of image frames.

In one possible implementation, the method further includes: acquiring a sample image frame sequence corresponding to a time t, wherein the sample image frame sequence comprises a first sample image frame at the time t and an adjacent sample image frame of the first sample image frame; performing scene depth prediction on the first sample image frame by using first hidden state information at the t-1 moment through a scene depth prediction network, and determining a sample prediction depth map corresponding to the first sample image frame, wherein the first hidden state information comprises feature information related to scene depth; performing camera pose prediction on the sample image frame sequence by using second hidden state information at the t-1 moment through a camera motion prediction network to be trained, and determining sample predicted camera motion corresponding to the sample image frame sequence, wherein the second hidden state information comprises feature information related to the camera motion; constructing a loss function according to the sample prediction depth map and the sample prediction camera motion; and training the camera motion prediction network to be trained according to the loss function to obtain the camera motion prediction network.

In one possible implementation, the constructing a loss function according to the sample predicted depth map and the sample predicted camera motion includes: determining a reprojection error term of an adjacent sample image frame of the first sample image frame relative to the first sample image frame in the sample image frame sequence according to the sample prediction camera motion; determining a penalty function item according to the distribution continuity of the sample prediction depth map; and constructing the loss function according to the reprojection error term and the penalty function term.

According to an aspect of the present disclosure, there is provided a scene depth prediction apparatus including: the first acquisition module is used for acquiring a target image frame at the moment t; and the scene depth prediction module is used for performing scene depth prediction on the target image frame by using first hidden state information at the t-1 moment through a scene depth prediction network, and determining a predicted depth map corresponding to the target image frame, wherein the first hidden state information comprises feature information related to scene depth, and the scene depth prediction network is obtained based on auxiliary training of a camera motion prediction network.

In one possible implementation, the scene depth prediction module includes: the first determining submodule is used for performing feature extraction on the target image frame and determining a first feature map corresponding to the target image frame, wherein the first feature map is a feature map related to scene depth; the second determining submodule is used for determining the first hidden state information at the time t according to the first feature diagram and the first hidden state information at the time t-1; and the third determining submodule is used for determining the predicted depth map according to the first hidden state information at the time t.

In a possible implementation manner, the first hidden state information at the time t-1 includes the first hidden state information at different scales at the time t-1; the first determination submodule is specifically configured to: carrying out multi-scale down-sampling on the target image frame, and determining the first feature maps under different scales corresponding to the target image frame; the second determining submodule is specifically configured to: aiming at any scale, determining the first hidden state information under the scale at the time t according to the first feature diagram under the scale and the first hidden state information under the scale at the time t-1; the third determining submodule is specifically configured to: and performing feature fusion on the first hidden state information under different scales at the time t to determine the prediction depth map.

In one possible implementation, the apparatus further includes: the second acquisition module is used for acquiring an image frame sequence corresponding to a time t, wherein the image frame sequence comprises the target image frame and an adjacent image frame of the target image frame; the camera motion prediction module is used for performing camera pose prediction on the image frame sequence by utilizing second hidden state information at the t-1 moment through a camera motion prediction network, and determining predicted camera motion corresponding to the image frame sequence, wherein the second hidden state information comprises feature information related to the camera motion; a loss function construction module for constructing a loss function according to the predicted depth map and the predicted camera motion; and the training module is used for training the scene depth prediction network according to the loss function.

In one possible implementation, the loss function constructing module includes: a fourth determining sub-module, configured to determine a reprojection error term of an adjacent image frame of the target image frame relative to the target image frame in the sequence of image frames according to the predicted camera motion; a fifth determining submodule, configured to determine a penalty function term according to distribution continuity of the predicted depth map; and the construction submodule is used for constructing the loss function according to the reprojection error term and the penalty function term.

According to an aspect of the present disclosure, there is provided a camera motion prediction apparatus including: the image processing device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an image frame sequence corresponding to a time t, and the image frame sequence comprises a target image frame at the time t and adjacent image frames of the target image frame; and the camera motion prediction module is used for performing camera pose prediction on the image frame sequence by using second hidden state information at the t-1 moment through a camera motion prediction network, and determining predicted camera motion corresponding to the image frame sequence, wherein the second hidden state information comprises feature information related to the camera motion, and the camera motion prediction network is obtained based on scene depth prediction network aided training.

In one possible implementation, the camera motion prediction module includes: the first determining submodule is used for performing feature extraction on the image frame sequence and determining a second feature map corresponding to the image frame sequence, wherein the second feature map is a feature map related to camera motion; the second determining submodule is used for determining the second hidden state information at the time t according to the second graph characteristic and the second hidden state information at the time t-1; and the third determining submodule is used for determining the predicted camera motion according to the second hidden state information at the time t.

In one possible implementation, the predicted camera motion includes a relative pose between adjacent image frames in the sequence of image frames.

In one possible implementation, the apparatus further includes: the scene depth prediction module is used for carrying out scene depth prediction on the target image frame by utilizing first hidden state information at the t-1 moment through a scene depth prediction network and determining a predicted depth map corresponding to the target image frame, wherein the first hidden state information comprises feature information related to scene depth; a loss function construction module for constructing a loss function according to the predicted depth map and the predicted camera motion; and the training module is used for training the camera motion prediction network according to the loss function.

In one possible implementation, the loss function constructing module includes: a fourth determining sub-module, configured to determine a reprojection error term of an adjacent image frame of the target image frame relative to the target image frame in the sequence of image frames according to the predicted camera motion; a fifth determining submodule, configured to determine a penalty function term according to distribution continuity of the predicted depth map; and the construction submodule is used for constructing the loss function according to the reprojection error term and the penalty function term. According to an aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.

According to an aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.

In the embodiment of the disclosure, the target image frame corresponding to the time t is obtained, and since the scene depth between adjacent times has an incidence relation in time sequence, the scene depth of the target image frame is predicted through the scene depth prediction network by using the first hidden state information related to the scene depth at the time t-1, so that a predicted depth map with higher prediction accuracy corresponding to the target image frame can be obtained.

In the embodiment of the disclosure, the image frame sequence which comprises the target image frame at the time t and the adjacent image frame of the target image frame and corresponds to the time t is obtained, because the camera poses at the adjacent times have an incidence relation in time sequence, the camera poses of the image frame sequence are predicted by utilizing the second hidden state information which is related to the camera motion at the time t-1 and through a camera motion prediction network, and the predicted camera motion with high prediction precision can be obtained.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.

Fig. 1 shows a flow diagram of a scene depth prediction method according to an embodiment of the present disclosure;

FIG. 2 illustrates a block diagram of a scene depth prediction network in accordance with an embodiment of the present disclosure;

FIG. 3 illustrates a block diagram of unsupervised network training in accordance with an embodiment of the present disclosure;

FIG. 4 shows a flow diagram of a camera motion prediction method according to an embodiment of the present disclosure;

fig. 5 shows a block diagram of a scene depth prediction apparatus according to an embodiment of the present disclosure;

fig. 6 illustrates a block diagram of a camera motion prediction apparatus according to an embodiment of the present disclosure;

FIG. 7 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure;

FIG. 8 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure.

Detailed Description

Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.

The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.

The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.

Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.

Fig. 1 shows a flow diagram of a scene depth prediction method according to an embodiment of the present disclosure. The scene depth prediction method shown in fig. 1 may be performed by a terminal device or other processing device, where the terminal device may be a User Equipment (UE), a mobile device, a user terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like. The other processing devices may be servers or cloud servers, etc. In some possible implementations, the scene depth prediction method may be implemented by a processor calling computer readable instructions stored in a memory. As shown in fig. 1, the method may include:

in step S11, the target image frame at time t is acquired.

In step S12, performing scene depth prediction on the target image frame by using first hidden state information at time t-1 through a scene depth prediction network, and determining a predicted depth map corresponding to the target image frame, where the first hidden state information includes feature information related to the scene depth, and the scene depth prediction network is obtained based on assisted training of a camera motion prediction network.

In the embodiment of the disclosure, the target image frame at the time t is obtained, and since the scene depth between adjacent times has an incidence relation in time sequence, the scene depth of the target image frame is predicted through the scene depth prediction network by using the first hidden state information related to the scene depth at the time t-1, so that a predicted depth map with higher prediction accuracy corresponding to the target image frame can be obtained.

In a possible implementation manner, performing scene depth prediction on a target image frame by using first hidden state information at a time t-1 through a scene depth prediction network, and determining a predicted depth map corresponding to the target image frame includes: performing feature extraction on a target image frame, and determining a first feature map corresponding to the target image frame, wherein the first feature map is a feature map related to the scene depth; determining first hidden state information at the time t according to the first feature diagram and the first hidden state information at the time t-1; and determining a prediction depth map according to the first hidden state information at the time t.

The scene depth prediction network can determine first hidden state information related to the scene depth at the current time by using a first feature map related to the scene depth corresponding to a target image frame at the current time (for example, the time t) and first hidden state information related to the scene depth at the previous time (for example, the time t-1), and then perform scene depth prediction on the target image frame based on the first hidden state information related to the scene depth at the current time, so that a predicted depth map with high prediction accuracy corresponding to the target image frame at the current time can be obtained.

For example, when a predicted depth map corresponding to each image frame in a sequence of image frames (including image frames at 1-t times) is predicted by using a scene depth prediction network, a preset initial value of first hidden state information related to the scene depth is set at an initialization stage of the scene depth prediction network. Determining a first hidden state at the 1 st moment based on a preset initial value of first hidden state information and a first feature map which is corresponding to the image frame at the 1 st moment and is related to the scene depth, and further performing scene depth prediction on the image frame at the 1 st moment based on the first hidden state at the 1 st moment to obtain a prediction depth map corresponding to the image frame at the 1 st moment; determining a first hidden state at the 2 nd moment based on the first hidden state at the 1 st moment and a first feature map related to scene depth corresponding to the image frame at the 2 nd moment, and further performing scene depth prediction on the image frame at the 2 nd moment based on the first hidden state at the 2 nd moment to obtain a prediction depth map corresponding to the image frame at the 2 nd moment; determining a first hidden state at the 3 rd moment based on the first hidden state at the 2 nd moment and a first feature map related to scene depth corresponding to the image frame at the 3 rd moment, and further performing scene depth prediction on the image frame at the 3 rd moment based on the first hidden state at the 3 rd moment to obtain a predicted depth map corresponding to the image frame at the 3 rd moment; and analogizing in turn, and finally obtaining the predicted depth map corresponding to each image frame in the image frame sequence (including the image frames at the 1 st to t th moments).

In a possible implementation manner, the first hidden state information at the time t-1 comprises first hidden state information at different scales at the time t-1; the method for extracting the features of the target image frame and determining a first feature map corresponding to the target image frame comprises the following steps: carrying out multi-scale down-sampling on a target image frame, and determining first feature maps under different scales corresponding to the target image frame; determining first hidden state information at the time t according to the first feature diagram and the first hidden state information at the time t-1, wherein the determining comprises the following steps: aiming at any scale, determining first hidden state information under the scale at the time t according to a first feature diagram under the scale and the first hidden state information under the scale at the time t-1; determining a prediction depth map according to first hidden state information at the time t, wherein the method comprises the following steps: and performing feature fusion on the first hidden state information under different scales at the time t to determine a prediction depth map.

In order to better determine the predicted depth map corresponding to the target image frame at the time t, the scene depth prediction network may adopt a multi-scale feature fusion mechanism. Fig. 2 illustrates a block diagram of a scene depth prediction network in accordance with an embodiment of the disclosure. As shown in fig. 2, the scene depth prediction network includes a depth encoder, a multi-scale convolution Gated loop Unit (ConvGRU), and a depth decoder. Inputting the target image frame at the time t into a depth encoder to perform multi-scale down sampling, and obtaining first feature maps corresponding to the target image frame under different scales: first feature map at first scaleFirst feature map at second scaleAnd a first feature map at a third scaleWherein the multi-scale ConvGRU corresponds to a scale of the multi-scale first feature map, i.e. the multi-scale ConvGRU comprises: ConvGRU at first scale0ConvGRU at second Scale1And ConvGRU at the third dimension2

Also taking the above FIG. 2 as an example, the first characteristic diagramInput ConvGRU0The first characteristic diagramInput ConvGRU1The first characteristic diagramInput ConvGRU2。ConvGRU0The first characteristic diagramAnd ConvGRU0First hidden state information at a first scale of time t-1 stored in the storage unitPerforming feature fusion to obtain a first hidden state under a first scale at the time tConvGRU0For a first hidden state at a first scale at time tStoring the first hidden state at the first scale of the time tOutputting to a depth decoder; ConvGRU1The first characteristic diagramAnd ConvGRU1The first hidden state information at the second scale of the t-1 moment is stored in the first memoryPerforming feature fusion to obtain a first hidden state under a second scale at the time tConvGRU1For the first hidden state at the second scale of the time tStoring the first hidden state at the second scale of the time tOutputting to a depth decoder; ConvGRU2The first characteristic diagramAnd ConvGRU2The first hidden state information at the third scale of the t-1 moment is stored in the first memoryPerforming feature fusion to obtain a first hidden state under a third scale at the time tConvGRU2For the first hidden state at the third scale of the time tStoring the first hidden state at the third scale of the time tAnd outputting the data to a depth decoder.

The decoder respectively uses a first hidden state under a first scale at the time tFirst hidden state at second scaleAnd a first hidden state at a third scaleThe scale of the target image frame is restored to be the same as the scale of the target image frame (hereinafter, the scale of the target image frame is referred to as the target scale), and three first hidden states at the target scale at the time t are obtained. Because the first hidden state information comprises feature information related to scene depth and exists in a field depth degree prediction network in the form of a feature map, feature map fusion is carried out on three first hidden states under the target scale at the time t, and a predicted depth map D corresponding to a target image frame at the time t is obtainedt

In one possible implementation, the method further includes: acquiring a sample image frame sequence corresponding to the t moment, wherein the sample image frame sequence comprises a first sample image frame at the t moment and an adjacent sample image frame of the first sample image frame; performing camera pose prediction on the sample image frame sequence by using second hidden state information at the t-1 moment through a camera motion prediction network, and determining sample prediction camera motion corresponding to the sample image frame sequence, wherein the second hidden state information comprises feature information related to the camera motion; performing scene depth prediction on a first sample image frame by using first hidden state information at the t-1 moment through a scene depth prediction network to be trained, and determining a sample prediction depth map corresponding to the first sample image frame, wherein the first hidden state information comprises feature information related to scene depth; according to the sample prediction depth map and the sample prediction camera motion, constructing a loss function; and training the scene depth prediction network to be trained according to the loss function to obtain the scene depth prediction network.

In the embodiment of the disclosure, the scene depth prediction network is obtained by auxiliary training based on the camera motion prediction network, or the scene depth prediction network and the camera motion prediction network are obtained by joint training. By utilizing the incidence relation of the scene depth and the camera pose between adjacent moments on a time sequence, introducing a sliding window data fusion mechanism, extracting and memorizing the hidden state information related to the scene depth and the camera motion of a target moment (t moment) in a sliding window sequence, and further carrying out unsupervised network training on a scene depth prediction network and/or a camera motion prediction network.

In the embodiment of the disclosure, a training set may be created in advance, where the training set includes a sample image frame sequence continuously acquired in a time sequence, and then a scene depth prediction network to be trained is trained based on the training set. Fig. 3 illustrates a block diagram of unsupervised network training of an embodiment of the disclosure. As shown in fig. 3, the target time is time t, and the sample image frame sequence corresponding to the target time (i.e. the sample image frame sequence included in the sliding window corresponding to the target time) includes: first sample image frame I at time ttAdjacent sample image frame I at time t-1t-1And adjacent sample image frame I at time t +1t+1. The number of neighbors of the adjacent sample image frame of the first sample image frame in the sample image frame sequence may be determined according to practical situations, which is not specifically limited by the present disclosure.

The scene depth prediction network to be trained shown in fig. 3 employs a single-scale feature fusion mechanism. In the network training process, the scene depth prediction network to be trained may adopt the single-scale feature fusion mechanism shown in fig. 3, or may adopt the multi-scale feature fusion mechanism shown in fig. 2, which is not specifically limited in this disclosure. As shown in fig. 3, the scene depth prediction network to be trained includes a depth encoder, a Convolutional gated loop Unit (ConvGRU), and a depth decoder. A first sample image frame I at the time ttInputting a depth decoding encoder to perform feature extraction to obtain a first sample image frame ItCorresponding first characteristic diagramFurther the first characteristic diagramConvGRU is input so that the first characteristic diagramFirst hidden state information at time t-1 stored in ConvGRUPerforming feature fusion to obtain a first hidden state at the time tConvGRU hidden state for tStoring the first hidden state at the time tOutputting the depth image to a depth decoder so as to obtain a sample prediction depth image D corresponding to the first sample image frame at the time tt

Still taking the above fig. 3 as an example, as shown in fig. 3, the camera motion prediction network includes a pose encoder, a ConvGRU and a pose decoder. Corresponding sample image frame sequence [ I ] at time tt,It-1,It+1]Inputting a pose encoder to perform feature extraction to obtain a second feature map corresponding to the sample image frame sequenceFurther the second characteristic diagramConvGRU is input so that the second characteristic diagramSecond hidden state information corresponding to time t-1 stored in ConvGRUPerforming feature fusion to obtain a second hidden state at the time tConvGRU hidden state for time tStoring, and hiding the second hidden state at time tOutputting to a pose decoder to obtain a sample predicted camera motion [ T ] corresponding to the sample image frame sequence at the time Tt-1→t,Tt→t+1]。

Also taking the above FIG. 3 as an example, the depth map D is predicted according to the sampletAnd sample predicted camera motion [ T ]t-1→t,Tt→t+1]A loss function L (I) can be constructedt,It-1,It+1,Dt,Tt-1→t,Tt→t+1). In particular, camera motion [ T ] is predicted from samplest-1→t,Tt→t+1]Determining adjacent sample image frames I in a sequence of sample image framest-1And It+1Relative to the first sample image frame ItReprojection error term Lreproj(ii) a Predicting depth map D from samplestDetermining a penalty function term Lsmooth. Further, a loss function L (I) is constructed by the following formula (one)t,It-1,It+1,Dt,Tt-1→t,Tt→t+1):

L(It,It-1,It+1,Dt,Tt-1→t,Tt→t+1)=LreprojsmoothLsmooth(formula one).

Wherein λ issmoothFor the weighting factor, λ can be determined according to the actual situationsmoothThe value of (a) is not particularly limited in this disclosure.

In one possible implementation, the depth map D is predicted from the samplestDetermining a penalty function term LsmoothThe specific process comprises the following steps: determining a first sample image frame ItThe gradient value of each pixel point can reflect the first sample image frame ItSo that the first sample image frame I can be determined according to the gradient value of each pixel pointtThe edge region (the region formed by pixel points with gradient values larger than or equal to the threshold value) and the non-edge region (the region formed by pixel points with gradient values smaller than the threshold value) in the image frame I, and then the first sample image frame I can be determinedtCorresponding sample prediction depth map DtThe edge region and the non-edge region; determining a sample prediction depth map DtThe gradient value of each pixel point in the depth map D is predicted in order to ensure the sampletThe distribution continuity of the middle non-edge region and the distribution discontinuity of the edge region, and the depth map D is predicted for the sampletSetting a penalty factor in direct proportion to the gradient value for each pixel point in the middle non-edge region; predicting depth map D for a sampletSetting a penalty factor in inverse proportion to the gradient value for each pixel point in the middle edge region; thereby predicting depth map D based on samplestThe punishment factor of each pixel point in the system is used for constructing a punishment function item Lsmooth

Because the sample prediction depth map and the sample prediction camera motion are obtained by utilizing the incidence relation of the scene depth and the camera motion in time sequence between adjacent moments, the re-projection error item determined by the prediction camera motion obtained according to the camera motion prediction network and the loss function established by the penalty function item determined by the prediction depth map obtained according to the scene depth prediction network are comprehensively utilized to train the scene depth prediction network to be trained, and the prediction precision of the scene depth prediction can be improved by training the obtained scene depth prediction network.

In a possible implementation manner, the camera motion prediction network in fig. 3 may be a to-be-trained camera motion prediction network, and the to-be-trained camera motion network may be trained according to the loss function, so as to implement joint training of the to-be-trained scene depth prediction network and the to-be-trained camera motion network, and obtain the trained scene depth prediction network and the trained camera motion prediction network.

The predicted depth map and the predicted camera motion are obtained by utilizing the incidence relation of the scene depth and the camera motion in time sequence between adjacent moments, so that a re-projection error item determined according to the predicted camera motion obtained by a camera motion prediction network and a loss function established according to a penalty function item determined by the predicted depth map obtained by the scene depth prediction network are comprehensively utilized to carry out combined training on the scene depth prediction network and the camera motion prediction network, and the scene depth prediction network and the camera motion prediction network obtained by training can improve the prediction accuracy of the scene depth prediction and the camera motion prediction.

In a possible implementation manner, the depth encoder and the pose encoder may multiplex a ResNet18 structure, a ResNet54 structure, and other structures, which is not specifically limited in this disclosure. The depth decoder and the pose decoder may adopt a network structure of a uet network, and may also adopt other decoder network structures, which is not specifically limited in this disclosure.

In one possible implementation, the ConvGRU includes a convolution operation, and the activation function in the ConvGRU is an ELU activation function.

For example, ConvGRU capable of data processing two-dimensional image data can be obtained by improving a convolution gating cycle unit ConvGRU capable of data processing only one-dimensional data, replacing linear operation in ConvGRU with convolution operation, and replacing tanh activation function in ConvGRU with ELU activation function.

By utilizing the incidence relation of the scene depth and/or the camera motion in time sequence, the ConvGRU can carry out cyclic convolution processing on the image frame sequences corresponding to different moments according to the time sequence, so that the first hidden state and/or the second hidden state corresponding to different moments can be obtained.

In order to implement the sliding window data fusion mechanism, in addition to the ConvGRU, a convolution Long Short-Term Memory unit (ConvLSTM) may be used, and other structures capable of implementing sliding window data fusion may also be used, which is not specifically limited by the present disclosure.

Fig. 4 illustrates a flow chart of a camera motion prediction method according to an embodiment of the present disclosure. The camera motion prediction method shown in fig. 4 may be performed by a terminal device or other processing device, where the terminal device may be a User Equipment (UE), a mobile device, a user terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like. The other processing devices may be servers or cloud servers, etc. In some possible implementations, the camera motion prediction method may be implemented by a processor calling computer readable instructions stored in a memory. As shown in fig. 4, the method may include:

in step S41, an image frame sequence corresponding to time t is obtained, where the image frame sequence includes a target image frame at time t and adjacent image frames of the target image frame.

In step S42, performing camera pose prediction on the image frame sequence by using second hidden state information at time t-1 through a camera motion prediction network, and determining predicted camera motion corresponding to the image frame sequence, where the second hidden state information includes feature information related to the camera motion, and the camera motion prediction network is obtained through assisted training by using a scene depth prediction network.

In the embodiment of the disclosure, an image frame sequence including a target image frame at the time t and adjacent image frames of the target image frame corresponding to the time t is obtained, and because the camera motion between the adjacent times has an association relation in time sequence, the camera pose prediction is performed on the image frame sequence through a camera motion prediction network by using second hidden state information related to the camera motion at the time t-1, so that the predicted camera motion with higher prediction precision corresponding to the image frame sequence can be obtained.

In a possible implementation manner, performing camera pose prediction on an image frame sequence by using second hidden state information at a time t-1 through a camera motion prediction network, and determining a predicted camera motion corresponding to the image frame sequence, includes: performing feature extraction on the image frame sequence, and determining a second feature map corresponding to the image frame sequence, wherein the second feature map is a feature map related to camera motion; determining second hidden state information at the time t according to the second graph characteristic and the second hidden state information at the time t-1; and determining and predicting the camera motion according to the second hidden state information at the time t.

The camera motion prediction network can determine second hidden state information related to the camera motion at the time t by utilizing a second feature map related to scene depth corresponding to the image frame sequence at the time t and second hidden state information related to the camera motion at the time t-1, and then carry out camera motion prediction on the image frame sequence at the time t based on the second hidden state information related to the camera motion at the time t, so that a predicted depth map with high prediction precision corresponding to the image frame sequence at the time t can be obtained.

In one possible implementation, the predicted camera motion includes a relative pose between adjacent image frames in the sequence of image frames. The relative pose is a six-dimensional parameter and comprises three-dimensional rotation information and three-dimensional translation information.

For example, predict camera motion [ T ]t-1→t,Tt→t+1]Including adjacent image frames It-1To the target image frame ItRelative pose T therebetweent-1→tAnd a target image frame ItTo adjacent image frame It+1Relative pose T therebetweent→t+1

Taking the above fig. 3 as an example, as shown in fig. 3, the camera motion prediction network includes a pose encoder, a ConvGRU, and a pose decoder. Image frame sequence [ I ] corresponding to t timet,It-1,It+1]Inputting a pose encoder to perform feature extraction to obtain a second feature map corresponding to the image frame sequenceFurther the second characteristic diagramConvGRU is input so that the second characteristic diagramSecond hidden state information corresponding to time t-1 stored in ConvGRUPerforming feature fusion to obtain a second hidden state at the time tConvGRU hidden state for time tStoring, and hiding the second hidden state at time tOutputting to a pose decoder so as to obtain predicted camera motion [ T ] corresponding to the image frame sequence at the time Tt-1→t,Tt→t+1]。

For example, when the camera motion prediction network is used to predict the predicted camera motion corresponding to the image frame sequence, a preset initial value of the second hidden state information related to the camera motion is set at the initialization stage of the camera motion prediction network. Determining a second hidden state at the 1 st moment based on a preset initial value of second hidden state information and a second feature map which is corresponding to the image frame sequence at the 1 st moment and is related to the camera motion, and further performing camera motion prediction on the image frame sequence at the 1 st moment based on the second hidden state at the 1 st moment to obtain predicted camera motion corresponding to the image frame sequence at the 1 st moment; determining a second hidden state at the 2 nd moment based on the second hidden state at the 1 st moment and a second feature map which is corresponding to the image frame sequence at the 2 nd moment and is related to the camera motion, and further performing camera motion prediction on the image frame sequence at the 2 nd moment based on the second hidden state at the 2 nd moment to obtain predicted camera motion corresponding to the image frame sequence at the 2 nd moment; determining a second hidden state at the 3 rd moment based on a second hidden state at the 2 nd moment and a second feature map related to the camera motion and corresponding to the image frame sequence at the 3 rd moment, and further performing camera motion prediction on the image frame sequence at the 3 rd moment based on the second hidden state at the 3 rd moment to obtain predicted camera motion corresponding to the image frame sequence at the 3 rd moment; and analogizing in turn to finally obtain the predicted camera motion corresponding to the image frame sequence at different moments.

In one possible implementation, the method further includes: acquiring a sample image frame sequence corresponding to the t moment, wherein the sample image frame sequence comprises a first sample image frame at the t moment and an adjacent sample image frame of the first sample image frame; performing scene depth prediction on a target image frame by using first hidden state information at the t-1 moment through a scene depth prediction network, and determining a prediction depth map corresponding to the first sample image frame, wherein the first hidden state information comprises feature information related to the scene depth; performing camera pose prediction on the sample image frame sequence by using second hidden state information at the t-1 moment through a camera motion prediction network to be trained, and determining sample predicted camera motion corresponding to the sample image frame sequence, wherein the second hidden state information comprises feature information related to the camera motion; according to the sample prediction depth map and the sample prediction camera motion, constructing a loss function; and training the camera motion prediction network to be trained according to the loss function to obtain the camera motion prediction network.

In one possible implementation, constructing a loss function from the sample predicted depth map and the sample predicted camera motion includes: according to the sample prediction camera motion, determining a reprojection error term of an adjacent sample image frame of a first sample image frame relative to the first sample image frame in the image frame sequence; determining a penalty function item according to the distribution continuity of the sample prediction depth map; and constructing a loss function according to the reprojection error term and the penalty function term.

In the embodiment of the disclosure, the camera motion prediction network is obtained by auxiliary training based on the scene depth prediction network, or the scene depth prediction network and the camera motion prediction network are obtained by joint training. In a possible implementation manner, the camera motion prediction network to be trained may be trained based on the above fig. 3, in this training process, the camera motion prediction network in fig. 3 is the camera motion prediction network to be trained, the scene depth prediction network in fig. 3 may be a scene depth prediction network to be trained (jointly training the scene depth prediction network to be trained and the camera motion prediction network to be trained), or may be a trained scene depth prediction network (separately training the camera motion prediction network to be trained), a specific training process is the same as that in fig. 3, and details of the embodiment of the present disclosure are not repeated here.

The predicted depth map and the predicted camera motion are obtained by utilizing the incidence relation of the scene depth and the camera motion in time sequence between adjacent moments, so that a re-projection error item determined according to the predicted camera motion obtained by a camera motion prediction network and a loss function established according to a penalty function item determined by the predicted depth map obtained by the scene depth prediction network are comprehensively utilized to carry out combined training on the scene depth prediction network and the camera motion prediction network, and the scene depth prediction network and the camera motion prediction network obtained by training can improve the prediction accuracy of the scene depth prediction and the camera motion prediction.

In the embodiment of the present disclosure, the scene depth prediction network and the camera motion prediction network obtained by the network training method shown in fig. 3 may perform depth prediction and three-dimensional scene construction of an environment. For example, the scene depth prediction network is applied to indoor and outdoor mobile robot navigation scenes such as sweepers and mowers, RGB images are obtained through RGB cameras, a prediction depth map corresponding to the RGB images is determined through the scene depth prediction network, camera motion of the RGB cameras is determined through the camera prediction network, distance measurement and three-dimensional scene construction of obstacles are achieved, and obstacle avoidance and navigation tasks are completed.

It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted. Those skilled in the art will appreciate that in the above methods of the specific embodiments, the specific order of execution of the steps should be determined by their function and possibly their inherent logic.

In addition, the present disclosure also provides a scene depth/camera motion prediction apparatus, an electronic device, a computer-readable storage medium, and a program, which can all be used to implement any one of the scene depth/camera motion prediction methods provided by the present disclosure, and the corresponding technical solutions and descriptions and corresponding descriptions in the method section are not repeated.

Fig. 5 illustrates a block diagram of a scene depth prediction apparatus according to an embodiment of the present disclosure. As shown in fig. 5, the apparatus 50 includes:

a first obtaining module 51, configured to obtain a target image frame at time t;

the first scene depth prediction module 52 is configured to perform scene depth prediction on the target image frame by using first hidden state information at the time t-1 through a scene depth prediction network, and determine a predicted depth map corresponding to the target image frame, where the first hidden state information includes feature information related to scene depth, and the scene depth prediction network is obtained based on camera motion prediction network assisted training.

In one possible implementation, the first scene depth prediction module 52 includes:

the first determining submodule is used for extracting the features of the target image frame and determining a first feature map corresponding to the target image frame, wherein the first feature map is a feature map related to the scene depth;

the second determining submodule is used for determining the first hidden state information at the time t according to the first feature diagram and the first hidden state information at the time t-1;

and the third determining submodule is used for determining the prediction depth map according to the first hidden state information at the time t.

In a possible implementation manner, the first hidden state information at the time t-1 comprises first hidden state information at different scales at the time t-1;

the first determination submodule is specifically configured to: carrying out multi-scale down-sampling on a target image frame, and determining first feature maps under different scales corresponding to the target image frame;

the second determination submodule is specifically configured to: aiming at any scale, determining first hidden state information under the scale at the time t according to a first feature diagram under the scale and the first hidden state information under the scale at the time t-1;

the third determination submodule is specifically configured to: and performing feature fusion on the first hidden state information under different scales at the time t to determine a prediction depth map.

In one possible implementation, the apparatus 50 further includes:

the second obtaining module is used for obtaining a sample image frame sequence corresponding to the time t, wherein the sample image frame sequence comprises a first sample image frame at the time t and an adjacent sample image frame of the first sample image frame;

the camera motion prediction module is used for predicting the camera pose of the sample image frame sequence by utilizing second hidden state information at the t-1 moment through a camera motion prediction network and determining the sample predicted camera motion corresponding to the sample image frame sequence, wherein the second hidden state information comprises feature information related to the camera motion;

the second scene depth prediction module is used for carrying out scene depth prediction on a first sample image frame by using first hidden state information at the t-1 moment through a scene depth prediction network to be trained and determining a sample prediction depth map corresponding to the first sample image frame, wherein the first hidden state information comprises feature information related to scene depth;

the loss function construction module is used for constructing a loss function according to the sample prediction depth map and the sample prediction camera motion;

and the training module is used for training the scene depth prediction network to be trained according to the loss function so as to obtain the scene depth prediction network.

In one possible implementation, the loss function building module includes:

the fourth determining submodule is used for predicting the camera motion according to the sample and determining a reprojection error item of an adjacent sample image frame of the first sample image frame relative to the first sample image frame in the sample image frame sequence;

the fifth determining submodule is used for determining a penalty function item according to the distribution continuity of the sample prediction depth map;

and the construction submodule is used for constructing a loss function according to the reprojection error term and the penalty function term.

Fig. 6 illustrates a block diagram of a camera motion prediction apparatus according to an embodiment of the present disclosure. As shown in fig. 6, the apparatus 60 includes:

the first obtaining module 61 is configured to obtain an image frame sequence corresponding to a time t, where the image frame sequence includes a target image frame at the time t and an adjacent image frame of the target image frame;

and the first camera motion prediction module 62 is configured to perform camera pose prediction on the image frame sequence by using second hidden state information at the time t-1 through a camera motion prediction network, and determine predicted camera motion corresponding to the image frame sequence, where the second hidden state information includes feature information related to camera motion, and the camera motion prediction network is obtained through auxiliary training based on a scene depth prediction network.

In one possible implementation, the first camera motion prediction module 62 includes:

the first determining submodule is used for extracting the features of the image frame sequence and determining a second feature map corresponding to the image frame sequence, wherein the second feature map is a feature map related to the motion of the camera;

the second determining submodule is used for determining second hidden state information at the time t according to the second graph characteristic and the second hidden state information at the time t-1;

and the third determining submodule is used for determining and predicting the motion of the camera according to the second hidden state information at the time t.

In one possible implementation, the predicted camera motion includes a relative pose between adjacent image frames in the sequence of image frames.

In one possible implementation, the apparatus 60 further includes:

the second obtaining module is used for obtaining a sample image frame sequence corresponding to the time t, wherein the sample image frame sequence comprises a first sample image frame at the time t and an adjacent sample image frame of the first sample image frame;

the scene depth prediction module is used for carrying out scene depth prediction on a first sample image frame by utilizing first hidden state information at the t-1 moment through a scene depth prediction network and determining a sample prediction depth map corresponding to the first sample image frame, wherein the first hidden state information comprises feature information related to scene depth;

the second camera motion prediction module is used for predicting the camera pose of the sample image frame sequence by utilizing second hidden state information at the t-1 moment through a to-be-trained camera motion prediction network and determining the sample predicted camera motion corresponding to the sample image frame sequence, wherein the second hidden state information comprises feature information related to the camera motion;

the loss function construction module is used for constructing a loss function according to the sample prediction depth map and the sample prediction camera motion;

and the training module is used for training the camera motion prediction network to be trained according to the loss function so as to obtain the camera motion prediction network.

In one possible implementation, the loss function building module includes:

the fourth determining submodule is used for predicting the camera motion according to the sample and determining a reprojection error item of an adjacent sample image frame of the first sample image frame relative to the first sample image frame in the sample image frame sequence;

the fifth determining submodule is used for determining a penalty function item according to the distribution continuity of the sample prediction depth map;

and the construction submodule is used for constructing a loss function according to the reprojection error term and the penalty function term.

In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.

Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a volatile or non-volatile computer readable storage medium.

An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.

The disclosed embodiments also provide a computer program product comprising computer readable code which, when run on a device, a processor in the device executes instructions for implementing a scene depth and/or camera motion prediction method as provided in any of the above embodiments.

The disclosed embodiments also provide another computer program product for storing computer readable instructions, which when executed, cause a computer to perform the operations of the scene depth and/or camera motion prediction method provided in any of the above embodiments.

The electronic device may be provided as a terminal, server, or other form of device.

Fig. 7 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure. As shown in fig. 7, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.

Referring to fig. 7, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.

The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.

The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.

The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.

The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.

The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.

In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.

FIG. 8 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure. As shown in fig. 8, electronic device 1900 may be provided as a server. Referring to fig. 8, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.

The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system, such as Windows Server, stored in memory 1932TM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTMOr the like.

In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.

The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.

The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.

The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.

The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).

Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.

These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.

The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.

The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.

Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

24页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:航空发动机涡轮叶片气膜孔轴线方向检测方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!