Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
DETERMINING STRUCTURE AND MOTION IN IMAGES USING NEURAL NETWORKS
Document Type and Number:
WIPO Patent Application WO/2018/102717
Kind Code:
A1
Abstract:
A system comprising an encoder neural network, a scene structure decoder neural network, and a motion decoder neural network. The encoder neural network is configured to: receive a first image and a second image; and process the first image and the second image to generate an encoded representation of the first image and the second image. The scene structure decoder neural network is configured to process the encoded representation to generate a structure output characterizing a structure of a scene depicted in the first image. The motion decoder neural network configured to process the encoded representation to generate a motion output characterizing motion between the first image and the second image.

Inventors:
SCHMID CORDELIA LUISE (FR)
VIJAYANARASIMHAN SUDHEENDRA (US)
RICCO SUSANNA MARIA (US)
SEYBOLD BRYAN ANDREW (US)
SUKTHANKAR RAHUL (US)
FRAGKIADAKI AIKATERINI (US)
Application Number:
PCT/US2017/064269
Publication Date:
June 07, 2018
Filing Date:
December 01, 2017
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
GOOGLE LLC (US)
International Classes:
G06K9/00; G06T7/269; G06T7/11
Other References:
FRAGKIADAKI KATERINA ET AL: "Recurrent Network Models for Human Dynamics", 2015 IEEE INTERNATIONAL CONFERENCE ON COMPUTER VISION (ICCV), IEEE, 7 December 2015 (2015-12-07), pages 4346 - 4354, XP032866799, DOI: 10.1109/ICCV.2015.494
LI YAO ET AL: "Describing Videos by Exploiting Temporal Structure", 1 October 2015 (2015-10-01), XP055356062, Retrieved from the Internet [retrieved on 20170317]
Attorney, Agent or Firm:
PORTNOV, Michael (US)
Download PDF:
Claims:
CLAIMS

1. A system comprising one or more computers and one or more storage devices storing instructions that when executed by the one or more computers cause the one or more computers to implement:

an encoder neural network configured to:

receive a first image and a second image, and

process the first image and the second image to generate an encoded representation of the first image and the second image;

a scene structure decoder neural network configured to:

process the encoded representation to generate a structure output characterizing a structure of a scene depicted in the first image; and

a motion decoder neural network configured to:

process the encoded representation to generate a motion output characterizing motion between the first image and the second image.

2. The system of claim 1 , wherein the encoder neural network receives a concatenation of the first image and the second image.

3. The system of any one of claims 1 or 2, wherein the encoder neural network is a convolutional neural network.

4. The system of any one of claims 1-3, wherein the structure output comprises (i) a depth map specifying, for each of a plurality of pixels in the first image, a depth of the scene at the pixel and (ii) a respective segmentation mask corresponding to each of a plurality of object classes, each segmentation mask specifying, for each of the plurality of pixels, a likelihood that the scene at the pixel shows an object belonging to the corresponding object class.

5. The system of claim 4, wherein the scene structure decoder neural network comprises: a scene structure subnetwork that is configured to process the encoded representation to generate a shared decoded representation.

6. The system of claim 5, wherein the scene structure subnetwork is a deconvolutional neural network.

7. The system of any one of claims 5 or 6, wherein the scene structure decoder neural network comprises:

a depth subnetwork configured to process the shared decoded representation to generate the depth map; and

a segmentation subnetwork configured to process the shared decoded representation to generate the segmentation masks.

8. The system of any one of claims 4-7, wherein the motion output comprises (i) a first output defining motion of a camera from the first image to the second image and (ii) a second output defining motion of any objects belonging to the plurality of object classes from the first image to the second image.

9. The system of claim 8, wherein the second output defining motion of any objects belonging to the plurality of object classes, comprises, for each of the object classes, values defining rotation and translation of any objects belonging to the object class from the first image to the second image.

10. The system of claim 9, wherein the motion decoder neural network comprises:

one or more object motion neural network layers configured to process the encoded representation to generate, for each object class, the values defining rotation and translation of any objects belonging to the object class from the first image to the second image.

11. The system of any one of claims 8-10, wherein the first output defining motion of the camera comprises values defining rotation and translation of the camera from the first image to the second image.

12. The system of claim 11, wherein the motion decoder neural network comprises:

one or more camera motion neural network layers configured to process the encoded representation to generate the values defining rotation and translation of the camera from the first image to the second image.

13. The system of any one of claims 8-12, wherein the instructions further cause the one or more computers to implement:

a subsystem configured to perform operations comprising:

generating, from the structure output and the motion output, an optical flow output that characterizes motion of pixels in the first image from the first image to the second image.

14. The system of claim 13, wherein generating the optical flow output comprises:

generating, from the depth map, an initial three-dimensional (3D) point cloud representation of the scene depicted in the first image.

15. The system of claim 14, wherein generating the optical flow output further comprises: transforming, using the segmentation masks and the second output defining motion of objects, the initial 3D point cloud to generate an initial transformed 3D point cloud.

16. The system of claim 15, wherein generating the optical flow output further comprises: transforming, using the first output defining camera motion, the initial transformed

3D point cloud to generate a final transformed 3D point cloud.

17. The system of claim 16, wherein generating the optical flow output further comprises: determining the optical flow output by projecting the final transformed 3D point cloud to a two-dimensional representation of the scene in the second image.

18. The system of any one of claims 1-17, wherein the encoder neural network, the scene decoder neural network, and the motion decoder neural network have been trained jointly.

19. The system of claim 18, wherein the neural networks have been trained to generate depths that are consistent through estimated scene motion.

20. The system of any one of claims 18 or 19, wherein the neural networks have been trained in an unsupervised manner.

21. The system of any one of claims 18 or 19, wherein the neural networks have been supervised during the training by one or more of: ego-motion, depth, or ground-truth optical flow.

22. One or more computer storage media storing the instructions of any one of claims 1- 21.

23. A method comprising:

receiving a first image and a second image; and

processing the first image and the second image using the encoder neural network, the scene decoder neural network, and the motion decoder neural network of any one of claims 1 - 21 to generate a motion output and a structure output.

24. The method of claim 23, further comprising:

performing the respective operations of the subsystem of any one of claims 13-17 to generate an optical flow output that characterizes motion of pixels in the first image from the first image to the second image.

25. A system comprising one or more computers and one or more storage devices storing instructions that when executed by the one or more computers cause the one or more computers to perform the operations of the method of claim 23 or 24.

26. One or more computer storage media storing instructions that when executed by one or more computers cause the one or more computers to perform the operations of the method of claim 23 or 24.

27. A system comprising one or more computers and one or more storage devices storing instructions that when executed by the one or more computers cause the one or more computers to implement:

a motion neural network configured to:

receive a first image and a second image, and

process the first image and the second image to generate (i) a motion output characterizing motion between the first image and the second image, and (ii) a motion segmentation mask output; and

a scene structure neural network configured to:

receive the first image, and

process the first image to generate a depth map characterizing, for each of the plurality of pixels in the first image, a depth of the scene at the pixel; and

a subsystem configured to generate, from the depth map, the motion output, and the motion segmentation mask output, an optical flow output that characterizes motion of pixels in the first image from the first image to the second image.

28. The system of claim 27, wherein the motion neural network includes a motion-mask encoder subnetwork configured to process the first image and the second image to generate a first encoded representation of the first image and the second image.

29. The system of claim 28, wherein the motion-mask encoder subnetwork is a convolutional neural network.

30. The system of any one of claims 28 and 29, wherein the motion neural network includes a mask decoder subnetwork configured to process the first encoded representation of the first image and the second image to generate the motion segmentation mask output.

31. The system of any one of claims 27-30, wherein the motion segmentation mask output comprises a respective segmentation mask corresponding to each of a plurality of object classes, each segmentation mask specifying, for each of the plurality of pixels in the first image, a likelihood that the scene at the pixel shows an object belonging to the corresponding object class.

32. The system of any one of claims 30 and 31, wherein the mask decoder subnetwork includes deconvolutional neural network layers.

33. The system of claim 32, wherein the mask decoder subnetwork further includes a lxl convolutional neural network layer and one or more sigmoid activation layers.

34. The system of any one of claims 28-33, wherein the motion neural network includes a motion decoder subnetwork configured to process the first encoded representation of the first image and the second image to generate the motion output.

35. The system of any one of claims 27-34, wherein the motion output comprises (i) a first output defining motion of a camera from the first image to the second image and (ii) a second output defining motion of any objects belonging to the plurality of object classes from the first image to the second image.

36. The system of claim 35, wherein the first output defining motion of the camera comprises values defining rotation and translation of the camera from the first image to the second image.

37. The system of claim 36, wherein the second output defining motion of any objects belonging to the plurality of object classes, comprises, for each of the object classes, values defining rotation and translation of any objects belonging to the object class from the first image to the second image.

38. The system of claim 37, wherein the motion decoder subnetwork comprises:

one or more fully connected neural network layers configured to process the first encoded representation to (i) generate, for each object class, the values defining rotation and translation of any objects belonging to the object class from the first image to the second image, and (ii) generate the values defining rotation and translation of the camera from the first image to the second image.

39. The system of any one of claims 27-38, wherein the scene structure neural network comprises a scene structure encoder subnetwork configured to process the first image to generate a second encoded representation of the first image.

40. The system of claim 39, wherein the scene structure encoder subnetwork is a convolutional neural network.

41. The system of any one of claims 39 and 40, wherein the scene structure neural network comprises a scene structure decoder subnetwork configured to process the second encoded representation of the first image to generate the depth map.

42. The system of claim 41, wherein the scene structure decoder subnetwork includes one or more deconvolutional neural network layers.

43. The system of claim 42, wherein the scene structure decoder subnetwork further includes a lxl convolutional neural network layer and one or more RELU activation layers.

44. The system of any one of claims 35-43, wherein generating the optical flow output comprises:

generating, from the depth map, an initial three-dimensional (3D) point cloud representation of the scene depicted in the first image;

transforming, using the motion segmentation mask output and the second output defining motion of objects, the initial 3D point cloud to generate an initial transformed 3D point cloud; transforming, using the first output defining camera motion, the initial transformed 3D point cloud to generate a final transformed 3D point cloud; and

determining the optical flow output by projecting the final transformed 3D point cloud to a two-dimensional representation of the scene in the second image.

45. The system of any one of claims 27-44, wherein the motion neural network and the scene structure neural network have been trained jointly.

46. The system of claim 45, wherein the motion neural network and the scene structure neural network have been trained to generate depths that are consistent through estimated scene motion.

47. The system of any one of claims 45 or 46, wherein the neural networks have been trained in an unsupervised manner.

48. The system of any one of claims 45 or 46, wherein the neural networks have been supervised during the training by one or more of: ego-motion, depth, or ground-truth optical flow.

49. One or more computer storage media storing instructions that when executed by one or more computers cause the one or more computers to implement the respective system of any one of claims 27-48.

50. A method comprising:

receiving a first image and a second image;

processing the first image and the second image using the motion neural network of any one of claims 27-48 to generate a motion output and a motion segmentation mask output; and

processing the first image using the scene structure neural network to generate a depth map characterizing, for each of the plurality of pixels in the first image, a depth of the scene at the pixel.

51. The method of claim 50, further comprising:

performing the respective operations of the subsystem of claim 44 to generate an optical flow output that characterizes motion of pixels in the first image from the first image to the second image.

Description:
DETERMINING STRUCTURE AND MOTION IN IMAGES USING NEURAL

NETWORKS

CROSS-REFERENCE TO RELATED APPLICATION

[1] This application claims priority to U.S. Provisional Application Serial No.

62/429,637, filed on December 2, 2016. The disclosure of the prior application is considered part of and is incorporated by reference in the disclosure of this application.

BACKGROUND

[2] This specification relates to processing images, e.g., video frames, using neural networks.

[3] Neural networks are machine learning models that employ one or more layers of nonlinear units to predict an output for a received input. Some neural networks include one or more hidden layers in addition to an output layer. The output of each hidden layer is used as input to the next layer in the network, i.e., the next hidden layer or the output layer. Each layer of the network generates an output from a received input in accordance with current values of a respective set of parameters.

SUMMARY

[4] In general, one innovative aspect of the subject matter described in this specification can be embodied in a system that includes one or more computers and one or more storage devices storing instructions that when executed by the one or more computers cause the one or more computers to implement: an encoder neural network configured to: receive a first image and a second image, and process the first image and the second image to generate an encoded representation of the first image and the second image; a scene structure decoder neural network configured to: process the encoded representation to generate a structure output characterizing a structure of a scene depicted in the first image; and a motion decoder neural network configured to: process the encoded representation to generate a motion output characterizing motion between the first image and the second image.

[5] The foregoing and other embodiments can each optionally include one or more of the following features, alone or in combination. The encoder neural network may receive a concatenation of the first image and the second image. The encoder neural network can be a convolutional neural network. The structure output may include (i) a depth map specifying, for each of a plurality of pixels in the first image, a depth of the scene at the pixel and (ii) a respective segmentation mask corresponding to each of a plurality of object classes, each segmentation mask specifying, for each of the plurality of pixels, a likelihood that the scene at the pixel shows an object belonging to the corresponding object class. The scene structure decoder neural network can include a scene structure subnetwork that is configured to process the encoded representation to generate a shared decoded representation. The scene structure subnetwork can be a deconvolutional neural network. The scene structure decoder neural network may include a depth subnetwork configured to process the shared decoded representation to generate the depth map; and a segmentation subnetwork configured to process the shared decoded representation to generate the segmentation masks. The motion output may include (i) a first output defining motion of a camera from the first image to the second image and (ii) a second output defining motion of any objects belonging to the plurality of object classes from the first image to the second image. The second output defining motion of any objects belonging to the plurality of object classes, may include, for each of the object classes, values defining rotation and translation of any objects belonging to the object class from the first image to the second image. The motion decoder neural network may include one or more object motion neural network layers configured to process the encoded representation to generate, for each object class, the values defining rotation and translation of any objects belonging to the object class from the first image to the second image. The first output defining motion of the camera may include values defining rotation and translation of the camera from the first image to the second image. The motion decoder neural network may include one or more camera motion neural network layers configured to process the encoded representation to generate the values defining rotation and translation of the camera from the first image to the second image. The instructions may further cause the one or more computers to implement: a subsystem configured to perform operations comprising: generating, from the structure output and the motion output, an optical flow output that characterizes motion of pixels in the first image from the first image to the second image. The optical flow output may include generating, from the depth map, an initial three- dimensional (3D) point cloud representation of the scene depicted in the first image.

Generating the optical flow output may further include transforming, using the segmentation masks and the second output defining motion of objects, the initial 3D point cloud to generate an initial transformed 3D point cloud. Generating the optical flow output may further include transforming, using the first output defining camera motion, the initial transformed 3D point cloud to generate a final transformed 3D point cloud. Generating the optical flow output may further include determining the optical flow output by projecting the final transformed 3D point cloud to a two-dimensional representation of the scene in the second image. The encoder neural network, the scene decoder neural network, and the motion decoder neural network may have been trained jointly. The neural networks may have been trained to generate depths that are consistent through estimated scene motion. The neural networks may have been trained in an unsupervised manner. The neural networks may have been supervised during the training by one or more of: ego-motion, depth, or ground-truth optical flow.

[6] Another innovative aspect of the subject matter described in this specification can be embodied in a system that includes one or more computers and one or more storage devices storing instructions that when executed by the one or more computers cause the one or more computers to implement: a motion neural network configured to: receive a first image and a second image, and process the first image and the second image to generate (i) a motion output characterizing motion between the first image and the second image, and (ii) a motion segmentation mask output; and a scene structure neural network configured to: receive the first image, and process the first image to generate a depth map characterizing, for each of the plurality of pixels in the first image, a depth of the scene at the pixel; and a subsystem configured to generate, from the depth map, the motion output, and the motion segmentation mask output, an optical flow output that characterizes motion of pixels in the first image from the first image to the second image.

[7] The foregoing and other embodiments can each optionally include one or more of the following features, alone or in combination. The motion neural network may include a motion-mask encoder subnetwork configured to process the first image and the second image to generate a first encoded representation of the first image and the second image. The motion-mask encoder subnetwork can be a convolutional neural network. The motion neural network may include a mask decoder subnetwork configured to process the first encoded representation of the first image and the second image to generate the motion segmentation mask output. The motion segmentation mask output may include a respective segmentation mask corresponding to each of a plurality of object classes, each segmentation mask specifying, for each of the plurality of pixels in the first image, a likelihood that the scene at the pixel shows an object belonging to the corresponding object class. The mask decoder subnetwork may include deconvolutional neural network layers. The mask decoder subnetwork further may include a lxl convolutional neural network layer and one or more sigmoid activation layers. The motion neural network may include a motion decoder subnetwork configured to process the first encoded representation of the first image and the second image to generate the motion output. The motion output may include (i) a first output defining motion of a camera from the first image to the second image and (ii) a second output defining motion of any objects belonging to the plurality of object classes from the first image to the second image. The first output defining motion of the camera may include values defining rotation and translation of the camera from the first image to the second image. The second output defining motion of any objects belonging to the plurality of object classes, may include, for each of the object classes, values defining rotation and translation of any objects belonging to the object class from the first image to the second image.

[8] The motion decoder subnetwork may include one or more fully connected neural network layers configured to process the first encoded representation to (i) generate, for each object class, the values defining rotation and translation of any objects belonging to the object class from the first image to the second image, and (ii) generate the values defining rotation and translation of the camera from the first image to the second image. The scene structure neural network may include a scene structure encoder subnetwork configured to process the first image to generate a second encoded representation of the first image. The scene structure encoder subnetwork can be a convolutional neural network. The scene structure neural network comprises a scene structure decoder subnetwork configured to process the second encoded representation of the first image to generate the depth map. The scene structure decoder subnetwork includes one or more deconvolutional neural network layers. The scene structure decoder subnetwork further includes a lxl convolutional neural network layer and one or more RELU activation layers. Generating the optical flow output may include generating, from the depth map, an initial three-dimensional (3D) point cloud representation of the scene depicted in the first image; transforming, using the motion segmentation mask output and the second output defining motion of objects, the initial 3D point cloud to generate an initial transformed 3D point cloud; transforming, using the first output defining camera motion, the initial transformed 3D point cloud to generate a final transformed 3D point cloud; and determining the optical flow output by projecting the final transformed 3D point cloud to a two-dimensional representation of the scene in the second image. The motion neural network and the scene structure neural network have been trained jointly. The motion neural network and the scene structure neural network have been trained to generate depths that are consistent through estimated scene motion. The neural networks have been trained in an unsupervised manner. The neural networks have been supervised during the training by one or more of: ego-motion, depth, or ground-truth optical flow. [9] The subject matter described in this specification can be implemented in particular embodiments so as to realize one or more of the following advantages. The systems described in this specification can effectively decompose image-to-image pixel motion in terms of scene and object depth, camera motion and 3D object rotations and translations. In particular, the systems can be trained with various degrees of supervision, and, in some cases, can generate accurate outputs despite being trained completely or mostly in an unsupervised manner. For example, the systems can successfully estimate segmentations of the objects in the scene, even though such supervision is never provided during the training. As the systems do not need to generate labeled datasets for supervised training, the systems can use less of their storage capacity, reducing system complexity and shortening the processing time while achieving the same or better results compared to existing systems. The systems effectively determine meaningful depth estimates or infill depth not captured by existing sensors and successfully estimates frame-to-frame camera displacements. The systems can also achieve accurate optical flow performance, which is useful for many applications such as predicting motion of moving objects in future images.

[10] The details of one or more embodiments of the subject matter of this specification are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the subject matter will become apparent from the description, the drawings, and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

[11] FIG. 1 shows an architecture of an example neural network system.

[12] FIG. 2 shows an architecture of another example neural network system.

[13] FIG. 3 is a flow diagram of a first example process for generating an optical flow from a pair of input images.

[14] FIG. 4 is a flow diagram of a second example process for generating an optical flow from a pair of input images.

[15] FIG. 5 is a flow diagram of an example process for processing a depth map, a motion output, and segmentation masks to generate an optical flow.

[16] Like reference numbers and designations in the various drawings indicate like

elements. DETAILED DESCRIPTION

[17] This specification describes a neural network system implemented as computer programs on one or more computers in one or more locations. Generally, the neural network system is configured to receive as input a first image and a second image and to decompose image-to-image pixel motion from the first image to the second image in terms of image depth, segmentation, camera motion, and 3D object motion (e.g., rotations and translations). The neural network system can then convert the image depth, segmentation, camera motion, and 3D object motion into a dense image-to-image motion field, i.e., an optical flow, that characterizes motion of pixels in the first image from the first image to the second image.

[18] FIG. 1 shows an example architecture of a neural network system 100. The neural network system 100 is an example of a system implemented as computer programs on one or more computers in one or more locations, in which the systems, components, and techniques described below can be implemented. The system 100 includes an encoder neural network 104, a scene structure decoder neural network 106, and a motion decoder neural network 102.

[19] The encoder neural network 104 is configured to receive a pair of images 110 including a first image and a second image. The first and second images may be two consecutive images in a sequence of images having the same size. For example, the pair of images 110 can be frames of a video taken by a camera of a robotic agent. In some implementations, the encoder neural network 104 is configured to receive a concatenation of the first image and the second image. The encoder neural network 104 is then configured to process the first and second images or the concatenation of the two images to generate an encoded representation of the first image and the second image.

[20] In particular, the encoder neural network 104 is a convolutional neural network that includes one or more convolutional neural network layers (e.g., 3x3 convolutional layers). The encoder neural network 104 may alternate convolutional neural network layers with strides 1 and 2. The encoder neural network 104 processes the first and second images through each of the convolutional neural network layers to collectively generate the encoded representation of the first and second images. In some implementations, the network 104 includes a respective batch normalization layer following each of the convolutional neural network layers. Each batch normalization layer is configured to apply batch normalization on the output of the convolutional neural network layer preceding the batch normalization layer. The encoded representation generated by the encoder neural network 104 using the convolutional layers includes a down-sampled output, e.g. a down-sampled feature map characterizing features extracted from the first image and second image and having a lower resolution than the first and second images, e.g., smaller width and height dimension. The down-sampled feature map can have a depth dimension much larger than the depth dimension of the first and second images. For example, the size of the first and second images may be (320, 240, 3), where 3 is the depth dimension of the first and second images (i.e., R, G, and B dimensions), and the size of the down-sampled feature map may be (20,15, y), where y is the depth dimension of the down-sampled feature map and much larger than the depth dimension of the first and second images. For example, y may be 512.

[21] The scene structure decoder neural network 106 is generally configured to process the encoded representation to generate a structure output characterizing a structure of a scene depicted in the first image. The structure output includes a depth map 128 and segmentation masks 126.

[22] In particular, the scene structure decoder neural network 106 includes a scene structure subnetwork 118. The scene structure subnetwork 118 is a deconvolutional neural network including multiple deconvolutional neural network layers. The scene structure subnetwork 118 is configured to depth-to-space upsample the encoded representation through each of the deconvolutional neural network layers in the subnetwork 118 to generate a shared decoded representation. The shared decoded representation includes an up-sampled feature map having higher resolution than the down-sampled feature map. The resolution of the up- sampled feature map can be the same as the first and second images. For example, the up- sampled feature map can have the same width and height dimensions as the first and second images but with a different depth dimension z (e.g., the size of the up-sampled feature map is (320, 240, z). The depth dimension z can be much smaller than the depth dimension y of the down-sampled feature map. For example, z can be 32.

[23] The scene structure decoder neural network 106 includes a depth subnetwork 116 configured to process the shared decoded representation to generate a depth map 128. The depth map 128 specifies, for each of the plurality of pixels in the first image or in the second image, a depth of the scene at the pixel. More specifically, the depth map 128 includes multiple points, in which each point is associated with a depth value for a pixel of multiple pixels in the first image (or in the second image) that represents a respective distance of a scene depicted at the pixel from a focal plane of the first image (or of the second image). In some implementations, the depth subnetwork 116 may generate the depth map di using a lxl convolutional neural network layer followed by one or more RELU activation neural network layers. The depth subnetwork 116 may use the RELU activation layers because depth values are non-negative. The RELU activation layers may have a bias of 1 to prevent small depth values, because small depth values may correspond to objects that are very close to the camera and therefore are more likely noise rather than valid depth values.

[24] The scene structure decoder neural network 106 includes a segmentation subnetwork 114 configured to process the shared decoded representation to generate segmentation masks 126. In some implementations, the segmentation subnetwork 114 includes a lxl convolutional neural network layer followed by one or more sigmoid activation neural network layers.

[25] The segmentation masks 126 include a respective segmentation mask corresponding to each of multiple object classes depicted in the first image. Generally, the segmentation mask corresponding to a given object class specifies, for each of multiple pixels in the first image, a probability that the scene at the pixel shows an object belonging to the

corresponding object class. In particular, in some cases, the segmentation mask

corresponding to a given object class specifies, for every pixel in the first image, a probability that the scene at the pixel shows an object belonging to the corresponding object class. In other cases, the segmentation mask can include a respective probability for each pixel in a down-sampled or lower-resolution version of the first image

[26] For example, assuming the first image It has width w and height h, the subnetwork 114 can generate a set of K segmentation masks m £ [0,l] xft , where k belongs to a predetermined set of K object classes (1, ... K}. Each segmentation mask corresponding to object class k specifies membership probability of each of multiple pixels in the first image It to the object class k, i.e. a probability that the scene at the pixel shows an object belonging to the object class k. Although in this example, the K segmentation masks are for the first image, in some implementations, the K segmentation masks can be generated for the second image.

[27] The motion decoder neural network 102 is generally configured to process the encoded representation to generate a motion output characterizing motion between the first image and the second image. The motion output includes (i) a camera motion output 122 defining motion of a camera from the first image to the second image, and (ii) an object motion output 124 defining motion of any objects belonging to the multiple object classes from the first image to the second image.

[28] In particular, the camera motion output 122 includes values defining rotation and translation of the camera from the first image to the second image. The motion decoder neural network 102 includes camera motion neural network layers 108 configured to process the encoded representation to generate the values defining rotation and translation of the camera from the first image to the second image. In some implementations, the camera motion neural network layers 108 include fully -connected neural network layers.

[29] The object motion output 124 includes, for each of the object classes, values defining rotation and translation of any objects belonging to the object class from the first image to the second image. The motion decoder neural network 102 includes one or more object motion neural network layers 112 configured to process the encoded representation to generate, for each object class, the values defining rotation and translation of any objects belonging to the object class from the first image to the second image. In some implementations, the object motion neural network layers 112 include fully -connected neural network layers.

[30] In some cases, the neural network system 100 also includes a subsystem 150 that generates an optical flow 120 from the depth map 128, the segmentation masks 126, the camera motion output 122 and the object motion output 124. The optical flow 120 characterizes motion of pixels in the first image from the first image to the second image.

[31] To generate the optical flow 120, the subsystem 150 first generates, from the depth map 128, an initial three-dimensional (3D) point cloud 132 corresponding to the pixels in the scene depicted in the first image. The subsystem 150 can generate the initial 3D point cloud 132 using estimated or known camera intrinsics. The subsystem 150 then transforms, using the segmentation masks 126 and the object motion output 124, the initial 3D point cloud 132 to generate an initial transformed 3D point cloud 130. Subsequently, the subsystem 150 transforms, using the camera motion output 122, the initial transformed 3D point cloud 130 to generate a final transformed 3D point cloud 134. The subsystem 150 then determines the optical flow 120 by projecting the final transformed 3D point cloud 134 to a two-dimensional representation of the scene in the second image. The process for generating an optical flow from a depth map, segmentation masks, and motion output is described in more detail below with reference to FIG. 5.

[32] In some implementations, once the optical flow is determined, the optical flow can be used to detect and track motion of moving objects depicted in the first image and the second images. Based on the detected and tracked motion, the motion of these moving objects can be modeled and their motion in future images can be predicted based on the model.

[33] In some other implementations, the optical flow can be used to estimate the motion of the camera (e.g., if it was mounted on a robot agent such as a self-driving car) and/or to compute the velocity of moving objects in the first and second images. In some other implementations, the optical flow can be used to perform motion analysis for recognizing what actions are being performed by a robotic agent.

[34] FIG. 2 shows an architecture of another example neural network system 200. The neural network system 200 is an example of a system implemented as computer programs on one or more computers in one or more locations, in which the systems, components, and techniques described herein can be implemented. The system 200 generally includes a motion neural network 202, a scene structure neural network 208, and a subsystem 250. In some implementations, the subsystem 250 can be the same as or similar to the subsystem 150 of the neural network system 100 of FIG. 1.

[35] The motion neural network 202 is generally configured to receive as input a pair of images 210 including a first image and a second image and to generate, from the first image and the second image, (i) a motion output characterizing motion between the first image and the second image, and (ii) a motion segmentation mask output. The first and second images can be two consecutive images in a sequence of images having the same size. For example, the first and second images can be frames from a video, e.g., a video taken by a camera of a robotic agent.

[36] In particular, the motion neural network 202 includes a motion-mask encoder subnetwork 204, a mask decoder subnetwork 206, and a motion decoder subnetwork 224. The motion-mask encoder subnetwork 204 is configured to receive the first image and the second image. In some implementations, the encoder neural network 104 is configured to receive a concatenation of the first image and the second image. The motion-mask encoder subnetwork 204 can be a convolutional neural network that includes one or more convolutional neural network layers. For example, the motion-mask encoder 204 may include multiple 3x3 convolutional neural network layers alternating between stride 1 and stride 2. The motion-mask encoder neural network 204 is then configured to process the first and second images or the concatenation of the two images through each of the convolutional neural network layers to collectively generate a first encoded representation of the first image and the second image. The first encoded representation includes a down-sampled output, e.g., a down-sampled feature map characterizing features extracted from the first image and second image and having a lower resolution than the first and second images, e.g., smaller width and height dimensions. The down-sampled feature map may have a depth dimension much larger than the depth dimension of the first and second images (due to the depth- concatenation of the outputs of the convolutional neural network layers). For example, the size of the first and second images may be (320, 240, 3), where 3 is the depth dimension of the first and second images (i.e., R, G, and B dimensions), and the size of the down-sampled feature map may be (20,15, y), where y is the depth dimension of the down-sampled feature map and much larger than the depth dimension of the first and second images. For example, y may be 512.

[37] Each of the convolutional layers in the motion-mask encoder 204 can be followed by a batch normalization layer that applies batch normalization on the respective output of the convolutional layer.

[38] The mask decoder subnetwork 206 is generally configured to process the first encoded representation of the first image and the second image to generate the motion segmentation mask output that includes multiple segmentation masks 218.

[39] More specifically, the mask decoder subnetwork 224 may include deconvolutional neural network layers configured to depth-to-space upsample the first encoded representation to generate a first decoded representation of the first and second images. The first decoded representation includes an up-sampled feature map having higher resolution than the down- sampled feature map. The resolution of the up-sampled feature map can be the same as the first and second images. For example, the up-sampled feature map can have the same width and height dimensions as the first and second images but with a different depth dimension z (e.g., the size of the up-sampled feature map is (320, 240, z). The depth dimension z can be much smaller than the depth dimension y of the down-sampled feature map. For example, z can be 32.

[40] In some implementations, the mask decoder subnetwork 206 may further include a lxl convolutional neural network layer and one or more sigmoid activation layers. The lxl convolutional neural network layer and one or more sigmoid activation layers may be configured to process the first decoded representation to generate the segmentation masks 218.

[41] The segmentation masks 218 includes a respective segmentation mask corresponding to each of multiple object classes depicted in the first image or in the second image. Each segmentation mask specifying, for each of multiple pixels in the first image or in the second image, a probability that the scene at the pixel shows an object belonging to the

corresponding object class. For example, assuming the first image It having width w and height h, the mask decoder subnetwork 206 generates a set of K segmentation masks m £ [0,l] xft , where k belongs to a predetermined set of K object classes (1, ... K}. Each segmentation mask mj? corresponding to object class k specifies membership probability of each of multiple pixels in the first image It to the obj ect class k, i.e. a probability that the scene at the pixel shows an object belonging to the object class k. Although in this example, the K segmentation masks are for the first image, in some implementations, the K

segmentation masks can be generated for the second image.

[42] The motion decoder subnetwork 224 is configured to process the first encoded representation to generate the motion output that includes a camera motion output 226 and an object motion output 228. The camera motion output 226 defines motion of the camera from the first image to the second image by including values defining rotation and translation of the camera from the first image to the second image. The object motion output 228 defining motion of any objects belonging to the multiple object classes depicted in the first image. The object motion output 228 includes, for each of the object classes, values defining rotation and translation of any objects belonging to the obj ect class from the first image to the second image. In some implementations, the motion decoder subnetwork 224 includes one or more fully connected neural network layers.

[43] While the motion neural network 202 takes a pair of images 210 as input, the scene structure neural network 208 can only take a single image 212 as input. For example, the scene structure neural network 208 receives the first image in the pair of images 210 as input. The scene structure neural network 208 can generate, from the first image, a depth map 220 characterizing, for each of multiple pixels in the first image, a depth of the scene at the pixel. More specifically, the depth map 220 includes multiple points, in which each point is associated with a depth value for a pixel of multiple pixels in the first image that represents a respective distance of a scene depicted at the pixel from a focal plane of the first image.

[44] The scene structure neural network 208 can include a scene structure encoder subnetwork 214 and a scene structure decoder subnetwork 216.

[45] The scene structure encoder subnetwork 214 can be a convolutional neural network that includes one or more convolutional neural network layers (e.g., 3x3 convolutional layers). The scene structure encoder subnetwork 214 may alternate convolutional neural network layers with strides 1 and 2. The scene structure encoder subnetwork 214 processes the first image through each of the convolutional neural network layers to collectively generate the second encoded representation of the first image. In some implementations, the encoder subnetwork 214 includes a respective batch normalization layer following each of the convolutional neural network layers. Each batch normalization layer is configured to apply batch normalization on the output of the convolutional neural network layer preceding the batch normalization layer. The second encoded representation generated by the encoder subnetwork 214 using the convolutional layers includes a down-sampled output, e.g. a feature map characterizing features extracted from the first image and having a lower resolution than the first image.

[46] The scene structure decoder subnetwork 216 is generally configured to process the second encoded representation to generate the depth map 220. In some implementations, the scene structure decoder subnetwork 216 can be a deconvolutional neural network including multiple deconvolutional neural network layers. The scene structure decoder subnetwork 216 is configured to depth-to-space upsample the second encoded representation through each of the deconvolutional neural network layers in the scene structure decoder subnetwork 216 to collectively generate an up-sampled feature map that has the same resolution as the first image.

[47] In some implementations, the scene structure decoder subnetwork 216 can further include a lxl convolutional neural network layer followed by one or more RELU activation neural network layers. The subnetwork 216 processes the up-sampled feature map using the lxl convolutional layer and RELU activation layers to predict the depth map 220. The subnetwork 216 may use the RELU activation layers because depth values are positive and may use a bias of 1 to prevent small depth values. In some implementations, the maximum predicted depth value can be capped at 100 to prevent large gradients.

[48] The subsystem 250 is configured to generate an optical flow 234 from the depth map 220, the segmentation masks 218, the camera motion output 226, and the object motion output 228. The optical flow 234 characterizes motion of pixels in the first image from the first image to the second image.

[49] To generate the optical flow 234, the subsystem 250 first generates, from the depth map 220, an initial three-dimensional (3D) point cloud 222 corresponding to the pixels in the scene depicted in the first image. The subsystem 250 can generate the initial 3D point cloud 222 using estimated or known camera intrinsics. The subsystem 250 then transforms, using the segmentation masks 218 and the object motion output 228, the initial 3D point cloud 222 to generate an initial transformed 3D point cloud 230. Subsequently, the subsystem 250 transforms, using the camera motion output 226, the initial transformed 3D point cloud 230 to generate a final transformed 3D point cloud 232. The system then determines the optical flow 234 by projecting the final transformed 3D point cloud 232 to a two-dimensional representation of the scene in the second image. The process for generating an optical flow from a depth map, segmentation masks, and a motion output is described in more detailed below with reference to FIG. 5. [50] In some implementations, once the optical flow is determined, the optical flow can be used to detect and track motion of moving objects depicted in the first image and the second images. Based on the detected and tracked motion, the motion of these moving objects can be modeled and their motion in future images can be predicted based on the model.

[51] In some other implementations, the optical flow can be used to estimate the motion of the camera (e.g., if it was mounted on a robot agent such as a self-driving car) and/or to compute the velocity of moving objects in the first and second images. In some other implementations, the optical flow can be used to perform motion analysis for recognizing what actions are being performed by a robotic agent.

[52] FIG. 3 is a flow diagram of a first example process for generating an optical flow from a pair of input images. For convenience, the process will be described as being performed by a system of one or more computers located in one or more locations. For example, a neural network system, e.g., the neural network system 100 of FIG. 1, appropriately programmed, can perform the process.

[53] The system receives a first image and a second image (step 302). The first and second images can be frames from a video, e.g., a video taken by a camera of a robotic agent.

[54] For example, the first and second images can be two consecutive images It and It+i in a sequence of images, each having width w and height h. The sequence of images can be frames from a video, but the sequence does not necessarily have to include all of the frames from the video. For example, the sequence could include every other frame.

[55] The system processes the first and second images using an encoder neural network to generate an encoded representation of the first and second images (step 304). In particular, the encoder neural network includes one or more convolutional neural networks. The system processes the first and second images through each of the convolutional neural network to generate the encoded representation. The encoded representation includes a down-sampled output, e.g. a down-sampled feature map characterizing features extracted from the first image and second image and having a lower resolution than the first and second images, e.g., smaller width and height dimension. The down-sampled feature map can have a depth dimension much larger than the depth dimension of the first and second images. For example, the size of the first and second images may be (320, 240, 3), where 3 is the depth dimension of the first and second images (i.e., R, G, and B dimensions), and the size of the down-sampled feature map may be (20,15, y), where y is the depth dimension of the down- sampled feature map and much larger than the depth dimension of the first and second images. For example, y may be 512. [56] The system processes the encoded representation using a scene structure decoder neural network to generate a structure output including a depth map and segmentation masks (step 306).

[57] In particular, the system first depth-to-space upsamples the encoded representation using one or more deconvolutional neural network layers (e.g., the deconvolutional neural network layers in the scene structure subnetwork 118 of FIG. 1) to generate a shared decoded representation, i.e., an up-sampled feature map having higher resolution than the down- sampled feature map. The resolution of the up-sampled feature map can be the same as the first and second images. For example, the up-sampled feature map can have the same width and height dimensions as the first and second images but with a different depth dimension z (e.g., the size of the up-sampled feature map is (320, 240, z). The depth dimension z can be much smaller than the depth dimension y of the down-sampled feature map. For example, z can be 32.

[58] The system then processes the up-sampled feature map using a convolutional neural network layer and one or more RELU activation neural network layers (e.g., the lxl convolutional layer and RELU activation layers in the depth subnetwork 116 of FIG. 1) to generate the depth map characterizing, for each of multiple pixels in the first image, a depth of the scene depicted at the pixel. More specifically, the depth map includes multiple points, in which each point is associated with a depth value for a pixel of multiple pixels in the first image that represents a respective distance of a scene depicted at the pixel from a focal plane of the first image. The system may use the RELU activation layers because depth values are positive and may use a bias of 1 to prevent small depth values. The depth map can be denoted as <i*€ ¾ ,! · ί \

[59] The system further processes the up-sampled feature map using a convolutional neural network layer, e.g., a lxl convolutional neural network layer, and one or more sigmoid activation neural network layers (e.g., the lxl convolution layer followed by one or more sigmoid activation layers in the segmentation subnetwork 114 of FIG. 1) to generate segmentation masks.

[60] The segmentation masks include a respective segmentation mask corresponding to each of multiple object classes depicted in the first image. Each segmentation mask specifying, for each of multiple pixels in the first image, a probability that the scene at the pixel shows an object belonging to the corresponding object class. [61] For example, assuming the first image It having width w and height h, the subnetwork 114 generates a set of K segmentation masks m £ [0,l] xft , where k belongs to a predetermined set of K object classes (1, ... K}. Each segmentation mask mj? corresponding to object class k specifies membership probability of each of multiple pixels in the first image It to the object class k, i.e. a probability that the scene at the pixel shows an object belonging to the object class k.

[62] The system may use sigmoid activation layers in order to allow each pixel to belong to any number of moving object classes K. When a pixel has zero activation across all K segmentation masks, the pixel is assigned to the static background and the corresponding flow is a function of the camera motion alone. The system allows a pixel to belong to multiple moving object classes in order to capture composition of motions, e.g., through kinematic chains, such as in articulated bodies.

[63] The system processes the encoded representation using a motion decoder neural network (e.g., the motion decoder neural network 102 of FIG. 1) to generate a motion output (step 308). The motion output includes (i) a camera motion output defining motion of a camera from the first image to the second image, and (ii) an object motion output defining motion of any objects belonging to the multiple object classes from the first image to the second image.

[64] The system processes the encoded representation using one or more camera motion neural network layers (e.g., fully connected neural network layers) to generate as camera motion output the values defining 3D rotation and translation of the camera from the first image to the second image. Let l^ t - 1' ^ } denote the 3D rotation and translation of the camera from the first image It to the second image It+i . The system can represent t using an Euler angle representation.

[65] The system processes the encoded representation using one or more object motion neural network layers (e.g., fully connected neural network layers) to generate, for each object class, the values defining rotation and translation of any objects belonging to the object class from the first image to the second image. The values defining rotation and translation are included in the object motion output. Let ί ¾ - ' ; I 1 - ■■■■■ denote the 3D rotation and translation of the K moving object classes in the scene depicted at each pixel. The system can use similar representations as for camera motion. While camera motion is a global transformation applied to all the pixels in the scene, the object motion transforms are weighted by the predicted membership probability to K segmentation masks E

[0,l] wx , k E Ι, .,. , Κ.

[66] The system generates, from the depth map, the motion output, and the segmentation masks, an optical flow output that characterizes motion of pixels in the first image from the first image to the second image (step 310). Generally, the system generates the optical flow output by first transforming a point cloud generated from the depth map using the camera and object motion output and segmentation masks followed by projecting the final 3D point cloud on to an image plane using camera intrinsics. The process for generating an optical flow from a depth map, segmentation masks, and a motion output is described in more detail below with reference to FIG. 5.

[67] FIG. 4 is a flow diagram of a second example process for generating an optical flow from a pair of input images. For convenience, the process will be described as being performed by a system of one or more computers located in one or more locations. For example, a neural network system, e.g., the neural network system 200 of FIG. 2, appropriately programmed, can perform the process.

[68] The system receives a first image and a second image (step 402). The first and second images can be frames from a video, e.g., a video taken by a camera of a robotic agent.

[69] For example, the first and second images can be two consecutive images It and It+i in a sequence of images, each having width w and height h. The sequence of images can be frames from a video, but the sequence does not necessarily have to include all of the frames from the video. For example, the sequence could include every other frame.

[70] The system processes the first image and the second image using a motion neural network to generate a motion segmentation mask output and a motion output (step 404).

[71] In particular, the system first processes the first and second images using a motion- mask encoder subnetwork (e.g., the motion-mask encoder subnetwork 204 of FIG. 1) to generate a first encoded representation of the first and second images. The motion-mask encoder can be a convolutional neural network that includes one or more convolutional neural network layers. For example, the motion-mask encoder may include multiple 3x3 convolutional neural network layers alternating between stride 1 and stride 2. The system processes the first and second images or a concatenation of the two images through each of the convolutional neural network layers of the motion-mask decoder subnetwork to collectively generate the first encoded representation. The first encoded representation includes a down-sampled output, e.g., a down-sampled feature map characterizing features extracted from the first image and second image and having a lower resolution than the first and second images, e.g., smaller width and height dimensions. The down-sampled feature map may have a depth dimension much larger than the depth dimension of the first and second images (due to the depth-concatenation of the outputs of the convolutional neural network layers). For example, the size of the first and second images may be (320, 240, 3), where 3 is the depth dimension of the first and second images (i.e., R, G, and B dimensions), and the size of the down-sampled feature map may be (20,15, y), where y is the depth dimension of the down-sampled feature map and much larger than the depth dimension of the first and second images. For example, y may be 512.

[72] Optionally, the system can apply batch normalization on a respective output of each of the convolutional neural network layers by using a batch normalization layer following each convolutional neural network layer.

[73] The system then processes the first encoded representation of the first image and the second image using a mask decoder subnetwork (e.g., the mask decoder subnetwork 206 of FIG. 2) to generate the motion segmentation mask output that includes multiple segmentation masks.

[74] In particular, the mask decoder subnetwork includes one or more deconvolutional neural network layers. The system depth-to-space upsamples the first encoded representation using the deconvolutional neural network layers to collectively generate a first decoded representation of the first and second images. The first decoded representation includes an up-sampled feature map having higher resolution than the down-sampled feature map. The resolution of the up-sampled feature map can be the same as the first and second images. For example, the up-sampled feature map can have the same width and height dimensions as the first and second images but with a different depth dimension z (e.g., the size of the up- sampled feature map is (320, 240, z). The depth dimension z can be much smaller than the depth dimension y of the down-sampled feature map. For example, z can be 32.

[75] The mask decoder subnetwork can further include a convolutional neural network layer (e.g., a lxl convolutional layer) and one or more sigmoid activation layers. The system processes the first decoded representation using the convolutional neural network layer and one or more sigmoid activation layers to generate the segmentation masks.

[76] The segmentation masks include a respective segmentation mask corresponding to each of multiple object classes depicted in the first image. Each segmentation mask specifying, for each of multiple pixels in the first image, a probability that the scene at the pixel shows an object belonging to the corresponding object class. For example, assuming the first image It having width w and height h, the mask decoder subnetwork 206 generates a set of K segmentation masks m £ [0,1] wxh , where k belongs to a predetermined set of K object classes (1, ... K}. Each segmentation mask m corresponding to object class k specifies membership probability of each of multiple pixels in the first image It to the object class k, i.e. a probability that the scene at the pixel shows an object belonging to the object class k. In some implementations, a pixel may be assigned to none of the segmentation masks because it is a background pixel and part of the static world.

[77] The system uses sigmoid activation layers in order to allow each pixel to belong to any number of object classes K. When a pixel has zero activation across all K segmentation masks, the pixel is assigned to the static background and the corresponding flow is a function of the camera motion alone. The system allows a pixel to belong to multiple object classes in order to capture composition of motions, e.g., through kinematic chains, such as in articulated bodies.

[78] The system processes the first encoded representation using a motion decoder subnetwork (e.g., the motion decoder subnetwork 224 of FIG. 2) to generate to a motion output. The motion decoder subnetwork can include one or more fully connected neural network layers. The motion output includes (i) a camera motion output defining motion of a camera from the first image to the second image, and (ii) an object motion output defining motion of any objects belonging to the multiple object classes from the first image to the second image.

[79] The system processes the first encoded representation using the one or more fully connected neural network layers to generate as camera motion output the values defining 3D rotation and translation of the camera from the first image to the second image. Let

> ^ ' i } denote the 3D rotation and translation of the camera from the first image It to the second image It+i . The system can represent ^ ' < using an Euler angle representation.

[80] The system further processes the encoded representation using the one or more fully connected neural network layers to generate, for each object class, the values defining rotation and translation of any objects belonging to the object class from the first image to the second image. The values defining rotation and translation are included in the object motion output. Let ' il i : ** * ' ~ { 1 ; · & I denote the 3D rotation and translation of the K moving object classes in the scene depicted at each pixel. The system can use similar representations as for camera motion. While camera motion is a global transformation applied to all the pixels in the scene, the object motion transforms are weighted by the predicted membership probability to K segmentation masks mj? £ [0, l] wx , k E Ι, .,. , Κ.

[81] While the system processes both the first and second images to generate the motion output and segmentation masks, the system processes only a single image, e.g., the first image to generate a depth map. The system generates the depth map using a scene structure neural network (e.g., the scene structure neural network 208 of FIG. 2) (step 406).

[82] The depth map characterizes, for each of multiple pixels in the first image, a depth of the scene at the pixel. More specifically, the depth map includes multiple points, in which each point is associated with a depth value for a pixel of multiple pixels in the first image that represents a respective distance of a scene depicted at the pixel from a focal plane of the first image. The depth map for the first image It can be denoted as <¾ £ ¾ !B Xf" .

[83] The scene structure neural network includes a scene structure encoder subnetwork and a scene structure decoder subnetwork.

[84] The encoder neural network includes one or more convolutional neural networks. The system processes the first image through each of the convolutional neural network to generate a second encoded representation of the first image. The second encoded representation includes a down-sampled output, e.g. a feature map characterizing features extracted from the first image and having a lower resolution than the first image.

[85] The scene structure decoder subnetwork includes one or more deconvolutional neural network layers. The system depth-to-space upsamples the second encoded representation using the one or more deconvolutional neural network layers to generate a second decoded representation, i.e., an up-sampled feature map that has the same resolution as the first and second image.

[86] The scene structure decoder subnetwork further includes a convolutional neural network layer (e.g., a lxl convolutional layer) and one or more RELU activation neural network layers. The system may process the up-sampled feature map using the convolutional neural network layer and the one or more RELU activation neural network layers to generate the depth map. The system may use the RELU activation layers because depth values are positive and may use a bias of 1 to prevent small depth values

[87] The system generates, from the depth map, the motion output, and the segmentation masks, an optical flow output that characterizes motion of pixels in the first image from the first image to the second image (step 408). Generally, the system generates the optical flow output by first transforming a point cloud generated from the depth map using the camera and object motion output and segmentation masks followed by projecting the final 3D point cloud on to an image plane using camera intrinsics. The process for generating an optical flow from a depth map, segmentation masks, and a motion output is described in more detail below with reference to FIG. 5.

[88] FIG. 5 is a flow chart of an example process for processing a depth map, a motion output including a camera motion output and object motion output, and segmentation masks to generate an optical flow. For convenience, the process will be described as being performed by a system of one or more computers located in one or more locations. For example, a neural network system, e.g., the neural network system 100 of FIG. 1 or the neural network system 200 of FIG. 2, appropriately programmed, can perform the process.

[89] The system generates, from the depth map, an initial three-dimensional (3D) point cloud representing the scene depicted in the first image (step 502).

[90] In particular, given depth map dt, the system generates the initial 3D point cloud

¾ — {Xt ι , Z t > , t 1. . . . , tt x n corresponding to the pixels in the scene depicted in the first image. The system can generate the initial 3D point cloud using a pinhole camera model. Let ^ be the column and row positions of the ζ Λ pixel in the first image It and let ' " ' ' ' be the camera intrinsics (i.e. c x , c y are principle point offset in x and directions, / is the focal length of a pinhole of camera model), then the system determines Xj as follows: where ¾ denotes the depth value of the i th pixel. The system can use the camera intrinsics when available. Otherwise, the system can revert the intrinsics values to predetermined values. For example, in some cases, the system can use (0.5, 0.5, 1.0) as default intrinsics values.

[91] The system transforms, using motion segmentation masks m and the object motion output {Rt , t£ }, the initial 3D point cloud to generate an initial transformed 3D point cloud (step 504). [92] In particular, the system applies object transformations on the initial 3D cloud point X f to obtain the initial transformed point cloud ^ as follows:

: = x ÷ =1 m (i)(} (x t - Pk ) + ή - x t ) where ί^ ΐ } · * t ( 1· - .. ) denote the 3D rotation and translation of the A moving object classes in the scene depicted at each pixel, and where p fc indicates the center coordinates of object classes k.

[93] The system then transforms, using the camera motion output { ?£ , t£ } , the initial transformed 3D point cloud to generate a final transformed 3D point cloud (step 506).

[94] In particular, the system applies camera transformations on the initial transformed point cloud f to generate the final transformed 3D point cloud Λ * as follows:

Xf = Ki ' t - pf} + %.

[95] The system determines the optical flow output by projecting the final transformed 3D point cloud to a two-dimensional representation of the scene in the second image (step 508).

[96] In particular, the system obtains the row and column position of the pixel in the second image ^ · *-Η * ·' > '> < - ·· following the first image by projecting the final transformed 3D point cloud " * * ' 1 * ' J * : to the image plan as follows:

[97] The system determines the optical flow output between the first image and the second image at pixel i as follows:

where ~ ' ! ! ■ " is a vector representing an optical flow from pixel i in the first image to the pixel i in the second image.

[98] To effectively generate the optical flow, neural networks in the neural network system (e.g., the neural network system 100 of FIG. 1 or the neural network system 200 of FIG. 2) can be trained jointly using different training techniques.

[99] The systems can be trained with various degrees of supervision. In some cases, the systems can be trained in an unsupervised manner. For example, given unconstrained video, without accompanying ground-truth structure or motion information, the system can be trained to minimize the photometric error between the first frame and the second frame warped towards the first frame according to the predicted optical flow, based on brightness constancy assumptions: w *— * * where 3 = u « l -- = # i- « Ή&Μ^· In some implementations, differentiable image warping can be used and color constancy loss can be computed in a fully differentiable manner. For example, the fully differentiable operation can be performed when the systems are trained using backpropagation or gradient descent. The fully differentiable operation is helpful as it allows the training to attribute an error generated by the systems to specific weights in the neural networks. Adjusting these specific weights can lead to a reduction in the color constancy loss on the corresponding training example.

[100] As the systems can be trained in an unsupervised manner, the system do not need to generate labeled datasets for supervised training. Therefore, the systems can use less of their storage capacity, reducing system complexity and shortening the processing time while achieving the same or better results compared to existing systems.

[101] In some other cases, the systems can be supervised during the training by one or more of camera motion (ego-motion), depth, or ground-truth optical flow.

[102] As an example, if ground-truth depth is available as part of the training input, depth supervision can be used in the form of robust depth regression:

where ^™ 8 *^ ' ' denotes a binary image that signals presence of ground-truth depth.

[103] In another example, if ground-truth camera pose trajectories are available in the training input, the system can be trained in a supervised manner by computing corresponding ground-truth camera rotation and translation from from frame to frame, and constrain the camera motion predictions accordingly. Specifically, the training computes the relative transformation between predicted and ground-truth camera motion 11 *

5iiv( . i¾)i f — .Rf- = : mv j , ?¾ }Sj }} and minimize its rotation angle and translation norm: [104] In yet another example, if ground-truth optical flow, object masks, or object motions are available in the training input, the system can be trained to minimize, for example, an LI regression loss between predicted Ϊ » ' J' · and ground-truth - f '" '' t?

flow vectors.

[105] To improve output consistency, different components (e.g., neural networks) in the system can be trained jointly by using one training objective function. The systems can be trained using conventional training techniques, for example, gradient descent methods.

[106] This specification uses the term "configured" in connection with systems and computer program components. For a system of one or more computers to be configured to perform particular operations or actions means that the system has installed on it software, firmware, hardware, or a combination of them that in operation cause the system to perform the operations or actions. For one or more computer programs to be configured to perform particular operations or actions means that the one or more programs include instructions that, when executed by data processing apparatus, cause the apparatus to perform the operations or actions.

[107] Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, in tangibly-embodied computer software or firmware, in computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible non transitory storage medium for execution by, or to control the operation of, data processing apparatus. The computer storage medium can be a machine- readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them. Alternatively or in addition, the program instructions can be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus.

[108] The term "data processing apparatus" refers to data processing hardware and encompasses all kinds of apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can also be, or further include, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit). The apparatus can optionally include, in addition to hardware, code that creates an execution environment for computer programs, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.

[109] A computer program, which may also be referred to or described as a program, software, a software application, an app, a module, a software module, a script, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages; and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data, e.g., one or more scripts stored in a markup language document, in a single file dedicated to the program in question, or in multiple coordinated files, e.g., files that store one or more modules, sub-programs, or portions of code. A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a data communication network.

[110] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, e.g., an FPGA or an ASIC, or by a combination of special purpose logic circuitry and one or more programmed computers. [Ill] Computers suitable for the execution of a computer program can be based on general or special purpose microprocessors or both, or any other kind of central processing unit. Generally, a central processing unit will receive instructions and data from a read-only memory or a random access memory or both. The essential elements of a computer are a central processing unit for performing or executing instructions and one or more memory devices for storing instructions and data. The central processing unit and the memory can be supplemented by, or incorporated in, special purpose logic circuitry. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device, e.g., a universal serial bus (USB) flash drive, to name just a few.

[112] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks.

[113] To provide for interaction with a user, embodiments of the subject matter described in this specification can be implemented on a computer having a display device, e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input. In addition, a computer can interact with a user by sending documents to and receiving documents from a device that is used by the user; for example, by sending web pages to a web browser on a user's device in response to requests received from the web browser. Also, a computer can interact with a user by sending text messages or other forms of message to a personal device, e.g., a smartphone that is running a messaging application, and receiving responsive messages from the user in return.

[114] Data processing apparatus for implementing machine learning models can also include, for example, special-purpose hardware accelerator units for processing common and compute-intensive parts of machine learning training or production, i.e., inference, workloads.

[115] Machine learning models can be implemented and deployed using a machine learning framework, e.g., a TensorFlow framework, a Microsoft Cognitive Toolkit framework, an Apache Singa framework, or an Apache MXNet framework.

[116] Embodiments of the subject matter described in this specification can be implemented in a computing system that includes a back-end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front-end component, e.g., a client computer having a graphical user interface, a web browser, or an app through which a user can interact with an implementation of the subject matter described in this specification, or any combination of one or more such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN) and a wide area network (WAN), e.g., the Internet.

[117] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. In some embodiments, a server transmits data, e.g., an HTML page, to a user device, e.g., for purposes of displaying data to and receiving user input from a user interacting with the device, which acts as a client. Data generated at the user device, e.g., a result of the user interaction, can be received at the server from the device.

[118] While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or on the scope of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially be claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.

[119] Similarly, while operations are depicted in the drawings and recited in the claims in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[120] Particular embodiments of the subject matter have been described. Other

embodiments are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve desirable results. As one example, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous.