# US 2023/0274478 A1 · Neural image compositing with layout transformers

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

- Number: US 2023/0274478 A1
- Document ID: US20230274478A1
- Status: Published application
- Kind: A1
- Application number: 17/652,512
- Filed: 2022-02-25
- Published: 2023-08-31
- Earliest claimed: 2022-02-25
- Assignees: Adobe Inc.
- Applicants: Adobe Inc.
- Inventors: Kerem Can Turgutlu; Sanat Sharma; Jayant Kumar; Rohith Mohan Dodle; Vipul Dalal
- Web page: https://patentgrep.com/patent/US20230274478A1

## CPC

- G06T 11/60: Creating or editing images; Combining images with text
- G06T 11/00: Two-dimensional [2D] image generation
- G06V 10/454: {Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]}
- G06V 10/764: using classification, e.g. of video objects
- G06V 10/774: Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
- G06V 10/82: using neural networks
- G06V 20/36: {Indoor scenes}
- G06V 20/70: Labelling scene content, e.g. deriving syntactic or semantic representations
- G06T 2210/12: Bounding box
- G06T 2210/61: Scene description
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

Systems and methods for image processing are described. Embodiments of the present disclosure receive an image depicting an object; generate a sequence of tokens including a set of tokens corresponding to the object and a set of mask tokens corresponding to an additional object to be inserted into the image; generate a placement token value for the set of mask tokens based on the sequence of tokens using a sequence encoder, wherein the placement token value represents position information of the additional object; and insert the additional object into the image based on the position information to obtain a composite image.

## Claims

### Claim 1

A method for image processing, comprising:
receiving an image depicting an object;
generating a sequence of tokens including a set of tokens corresponding to the object and a set of mask tokens corresponding to an additional object to be inserted into the image;
generating a placement token value for the set of mask tokens based on the sequence of tokens using a sequence encoder, wherein the placement token value represents position information of the additional object; and
inserting the additional object into the image based on the position information to obtain a composite image.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
identifying a bounding box corresponding to the object; and
generating one or more placement tokens representing position information of the object based on the bounding box, wherein the set of tokens includes the one or more placement tokens.

### Claim 3 (depends on 2)

The method of claim 2, wherein:
the one or more placement tokens include a width token and a height token.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
detecting a class of the object, wherein the set of tokens includes a class token representing the class.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
identifying a class token value for a class mask token of the set of mask tokens, wherein the placement token value is generated based on the class token value.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
identifying a semantic category of the additional object based on the class token value; and
selecting an additional object mask for the additional object based on the semantic category, wherein the additional object is inserted into the image based on the additional object mask.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
generating an additional placement token value for the set of mask tokens based on the placement token value.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
identifying a plurality of objects in the image, wherein the sequence of tokens includes a corresponding set of tokens for each of the plurality of objects.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
generating a scene graph of the image, wherein the plurality of objects is identified based on the scene graph.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
generating an alternate sequence of tokens including the set of tokens corresponding to the object and the set of mask tokens at a different location than the set of mask tokens in the sequence of tokens; and
generating a first likelihood score for the sequence of tokens and a second likelihood score for the alternate sequence of tokens, wherein the additional object is inserted based on the first likelihood score and the second likelihood score.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
identifying coordinates for the additional object based on the placement token value, wherein the additional object is inserted at the identified coordinates.

### Claim 12 (depends on 1)

The method of claim 1, further comprising:
identifying scale of the additional object based on the placement token value, wherein the additional object is inserted at the identified scale.

### Claim 13 (depends on 1)

The method of claim 1, further comprising:
dividing the image into a grid; and
assigning a unique value to each element of the grid, wherein the placement token value corresponds to the unique value of an element of the grid.

### Claim 14

A method for training a neural network, comprising:
receiving training data including an image depicting an object and ground truth information about an additional object;
generating a sequence of tokens including a set of tokens corresponding to the object and a set of mask tokens corresponding to the additional object;
generating a placement token value for the set of mask tokens based on the sequence of tokens using a sequence encoder, wherein the placement token value represents position information of the additional object;
comparing the placement token value with the ground truth information; and
updating parameters of the sequence encoder based on the comparison of the placement token value with the ground truth information.

### Claim 15 (depends on 14)

The method of claim 14, further comprising:
generating a class token value for the set of mask tokens based on the sequence of tokens; and
comparing the class token value with the ground truth information, wherein the parameters of the sequence encoder are updated based on the comparison of the class token value with the ground truth information.

### Claim 16 (depends on 14)

The method of claim 14, further comprising:
identifying an original image including the object and the additional object; and
identifying the ground truth information based on the additional object in the original image, wherein the sequence of tokens is generated by masking a set of tokens corresponding to the additional object.

### Claim 17

An apparatus for image processing, comprising:
a sequence generation component configured to generate a sequence of tokens including a set of tokens corresponding to an object in an image and a set of mask tokens corresponding to an additional object to be inserted into the image;
a sequence encoder configured to generate a placement token value for the set of mask tokens based on the sequence of tokens, wherein the placement token value represents position information of the additional object; and
an image generation component configured to insert the additional object into the image based on the position information to obtain a composite image.

### Claim 18 (depends on 17)

The apparatus of claim 17, further comprising:
an object detection component configured to detect class information and the position information of the object, wherein the sequence of tokens is generated based on the class information and the position information of the object.

### Claim 19 (depends on 17)

The apparatus of claim 17, further comprising:
a training component configured to update parameters of the sequence encoder.

### Claim 20 (depends on 17)

The apparatus of claim 17, further comprising:
a data augmentation component configured to generate training data based on annotated training images.
