# US 2021/0287007 A1 · Video inpainting via machine-learning models with motion constraints

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0287007 A1
- Document ID: US20210287007A1
- Status: Published application
- Kind: A1
- Application number: 16/817,100
- Filed: 2020-03-12
- Published: 2021-09-16
- Earliest claimed: 2020-03-12
- Assignees: Adobe Inc.
- Applicants: Adobe Inc.
- Inventors: Oliver Wang; Matthew Fisher; John Nelson; Geoffrey Oxholm; Elya Shechtman; Wenqi Xian
- Web page: https://patentgrep.com/patent/US20210287007A1

## CPC

- G06T 7/246: using feature-based methods, e.g. the tracking of corners or segments
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/09: Supervised learning
- G06N 20/00: Machine learning
- G06V 10/44: Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
- G06V 10/56: relating to colour
- G06V 20/41: {Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items (segmenting video sequences G06V20/49)}
- G06V 20/46: {Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames}
- G11B 27/031: Electronic editing of digitised analogue information signals, e.g. audio or video signals
- G11B 27/34: Indicating arrangements {(indicating means incorporated in magazine or cassette G11B23/046 and G11B23/0875; indicating measured values in general G01D)}
- G06N 3/045: Combinations of networks
- G06N 3/08: Learning methods
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G11B: INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER (recording measured values in a way that does not require playback through a transducer G01D9/00; recording or playback apparatus using mechanically marked tape, e.g. punched paper tape, or using unit records, e.g. punched or magnetically marked cards G06K; transferring data from one type of record carrier to another G06K1/18; circuits for coupling output of reproducer to radio receiver H04B1/20; gramophone pick-ups or like acoustic electromechanical transducers or circuits therefor H04R)

## Abstract

Certain aspects involve video inpainting in which content is propagated from a user-provided reference frame to other video frames depicting a scene. For example, a computing system accesses a set of video frames with annotations identifying a target region to be modified. The computing system determines a motion of the target region's boundary across the set of video frames, and also interpolates pixel motion within the target region across the set of video frames. The computing system also inserts, responsive to user input, a reference frame into the set of video frames. The reference frame can include reference color data from a user-specified modification to the target region. The computing system can use the reference color data and the interpolated motion to update color data in the target region across set of video frames.

## Claims

### Claim 1

A method in which one or more processing devices performs operations comprising:
accessing a scene depicting a reference object and a set of sparse feature points defining a three-dimensional model of the reference object, wherein the set of sparse feature points are computed from changes in position of the reference object across video frames comprising the scene, wherein the accessed scene has an annotation identifying a target region to be modified in one or more of the video frames;
determining, from the three-dimensional model of the reference object, a motion constraint;
computing a target motion of a target pixel subject to the motion constraint; and
updating color data of the target pixel to correspond to the target motion.

### Claim 2 (depends on 1)

The method of claim 1, further comprising computing the set of sparse feature points by at least executing a structure from motion process that computes, from the video frames, the three-dimensional model of the reference object.

### Claim 3 (depends on 1)

The method of claim 1, wherein determining the motion constraint comprises identifying a motion of the reference object through the target region that is consistent with the three-dimensional model derived from changes to a relative position of the reference object across the video frames.

### Claim 4 (depends on 1)

The method of claim 1, wherein computing the target motion of the target pixel subject to the motion constraint comprises:
accessing a video frame in which the target region occludes the reference object;
specifying a first motion value for a first sub-region within the target region to the target motion; and
applying, to the video frames, a machine-learning model that estimates a second motion value for a second sub-region within the target region based on both the specified first motion value and a boundary motion for the target region.

### Claim 5 (depends on 1)

The method of claim 1, wherein the motion constraint is a first motion constraint, and further comprising:
obtaining one or more user-specified sparse feature points, the one or more user-specified sparse feature points further defining the three-dimensional model of the reference object;
determining, from the three-dimensional model of the reference object, a second motion constraint based at least in part on the one or more user-specified sparse feature points; and
re-computing the target motion of the target pixel subject to the first motion constraint and the second motion constraint.

### Claim 6 (depends on 1)

The method of claim 1, wherein the target region comprises an object to be removed or modified.

### Claim 7

A computing system comprising:
a processing device; and
a non-transitory computer-readable medium communicatively coupled to the processing device and storing program code, the processing device configured to execute the program code and thereby performing operations comprising:
accessing a set of video frames depicting a scene, the scene comprising a reference object;
generating a set of sparse feature points based on a first motion in the scene, the first motion corresponding to the reference object, the set of sparse feature points comprising one or more sparse feature points corresponding to the reference object, wherein the one or more sparse feature points define a motion constraint;
interpolating a target motion of a target pixel within a target region of the scene, wherein the target motion is subject to the motion constraint;
updating color data of the target pixel based on the target motion.

### Claim 8 (depends on 7)

The computing system of claim 7, wherein the operations further comprise:
computing the set of sparse feature points by executing a structure from motion process that generates a three-dimensional reconstruction of the reference object, the three-dimensional reconstruction of the reference object comprising a three-dimensional pixel map.

### Claim 9 (depends on 7)

The computing system of claim 7, wherein the target motion is a first target motion, the target pixel is a first target pixel, the target region comprises a boundary point, and wherein the operations further comprise:
accessing a video frame of the set of video frames, the video frame comprising the reference object, wherein the reference object is partially occluded by a sub-region of the target region in the video frame; and
interpolating a second target motion of a second target pixel within the target region of the scene, the second target motion corresponding to the sub-region of the target region, wherein the second target motion based at least in part on at least on both the first target motion and the boundary point of the target region.

### Claim 10 (depends on 7)

The computing system of claim 7, wherein the motion constraint is configured to provide a pixel value of the target pixel, and wherein the operations further comprise:
determining the motion constraint by identifying a motion vector of the reference object through the target region, the motion vector being derived from spatiotemporal changes to the reference object across the set of video frames; and
updating the color data of the target pixel by changing a pixel value of the target pixel based at least in part on the motion constraint.

### Claim 11 (depends on 7)

The computing system of claim 7, wherein the operations further comprise:
receiving a user input comprising at least one sparse feature point corresponding to the reference object; and
updating the set of sparse feature points based on the user input.

### Claim 12 (depends on 11)

The computing system of claim 11, wherein the motion constraint is a first motion constraint, and wherein the operations further comprise:
determining a second motion constraint based at least in part on the user input; and
re-computing the target motion of the target pixel subject to the first motion constraint and the second motion constraint.

### Claim 13 (depends on 7)

The computing system of claim 7, wherein the operations further comprise:
obtaining a subset of sparse feature points, the subset of sparse feature points being randomly selected or user-selected; and
validating the updated color data of the target region based on the subset of sparse feature points by re-computing the color data of the target region across a subset of the set of video frames in a forward temporal order or a reverse temporal order.

### Claim 14 (depends on 7)

The computing system of claim 7, wherein the target region comprises an object to be removed or modified.

### Claim 15

A non-transitory computer-readable medium having program code of a video editing tool stored thereon, wherein the program code, when executed by one or more processing devices, configures the one or more processing devices to perform operations comprising:
accessing a scene depicting a reference object and a set of sparse feature points corresponding to features that define a model of the reference object, wherein the set of sparse feature points are generated from changes in relative positions of the features that define the model of the reference object across video frames comprising the scene, wherein the set sparse feature points comprises one or more two-dimensional feature points or three-dimensional feature points, and wherein the accessed scene has an annotation identifying a target region to be modified in one or more of the video frames;
determining, based on the model of the reference object, a motion constraint;
computing a target motion of a target pixel subject to the motion constraint; and
updating color data of the target pixel to correspond to the target motion.

### Claim 16 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the motion constraint is a first motion constraint, and wherein the operations further comprise:
obtaining one or more user-specified sparse feature points, the one or more user-specified sparse feature points further defining the model of the reference object;
determining, from the model of the reference object, a second motion constraint based at least in part on the one or more user-specified sparse feature points; and
re-computing the target motion of the target pixel subject to the first motion constraint and the second motion constraint.

### Claim 17 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the target region comprises an object to be removed or modified.

### Claim 18 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the model of the reference object is a three-dimensional model, and wherein the operations further comprise:
computing the set of computer-generated sparse feature points by at least executing a structure from motion process that computes, from the video frames, the three-dimensional model of the reference object.

### Claim 19 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the model is a three-dimensional model, and wherein determining the motion constraint comprises:
identifying a motion vector of the reference object through the target region that is consistent with the three-dimensional model derived from changes to a relative position of the reference object across the video frames.

### Claim 20 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein computing the target motion of the target pixel subject to the motion constraint comprises:
accessing a video frame in which the target region occludes the reference object;
specifying a first motion value for a first sub-region within the target region to the target motion; and
applying, to the video frames, a machine-learning model that estimates a second motion value for a second sub-region within the target region based on both the specified first motion value and a boundary motion for the target region.
