# US 2022/0292651 A1 · System and Method for Image Inpainting

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

- Number: US 2022/0292651 A1
- Document ID: US20220292651A1
- Status: Published application
- Kind: A1
- Application number: 17/694,687
- Filed: 2022-03-15
- Published: 2022-09-15
- Earliest claimed: 2021-03-15
- Assignees: Fudan University
- Applicants: Fudan University
- Inventors: Yanwei Fu; Chenjie Cao
- Web page: https://patentgrep.com/patent/US20220292651A1

## CPC

- G06T 5/77: Retouching; Inpainting; Scratch removal
- G06T 5/30: Erosion or dilatation, e.g. thinning
- G06T 5/60: using machine learning, e.g. neural networks
- G06T 7/12: Edge-based segmentation
- G06T 7/13: Edge detection
- G06T 2207/20016: Hierarchical, coarse-to-fine, multiscale or multiresolution image processing; Pyramid transform
- G06T 2207/20084: Artificial neural networks [ANN]
- G06T 2207/20192: Edge enhancement; Edge preservation
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A system for image inpainting is provided, including an encoder, a decoder, and a sketch tensor space of a third-order tensor; wherein the encoder includes an improved wireframe parser and a canny detector, and a pyramid structure sub-encoder; the improved wireframe parser is used to extract line maps from an original image input to the encoder, the canny detector is used to extract edge maps from the original image, and the pyramid structure sub-encoder is used to generate the sketch tensor space based on the original image, the line maps and the edge maps; and the decoder outputs an inpainted image from the sketch tensor space. A method thereof is also provided.

## Claims

### Claim 1

A system for image inpainting, comprising an encoder, a decoder, and a sketch tensor space of a third-order tensor; wherein:
the encoder includes an improved wireframe parser and a canny detector, and a pyramid structure sub-encoder;
the improved wireframe parser is used to extract line maps from an original image input to the encoder, the canny detector is used to extract edge maps from the original image, and the pyramid structure sub-encoder is used to generate the sketch tensor space based on the original image, the line maps and the edge maps; and
the decoder outputs an inpainted image from the sketch tensor space.

### Claim 2 (depends on 1)

The system of claim 1, wherein the improved wireframe parser extracts a junction set and a line set paired by junctions of the junction set.

### Claim 3 (depends on 1)

The system of claim 1, wherein when lines are corrupted by a mask, and a line segment masking (LSM) algorithm is used to infer missed line segments with a flexible wireframe parsing.

### Claim 4 (depends on 3)

The system of claim 3, wherein the flexible wireframe parsing comprises learning an LSM-HAWP network by retraining holistically attracted wireframe parsing (HAWP) with irregular and object segmentation masks, and introducing an indicator function to denote a masking probability of each line segment according to the mask as the post-processing of LSM-HAWP.

### Claim 5 (depends on 4)

The system of claim 4, wherein during post-processing of LSM-HAWP, only in inpainting training process or object removal task, the ground-truth images are known in advance.

### Claim 6 (depends on 5)

The system of claim 5, wherein all wireframes are extracted beforehand and filtered by the post-process of LSM-HAWP, rather than an end-to-end training with LSM-HAWP.

### Claim 7 (depends on 1)

The system of claim 1, wherein edge maps are binary maps.

### Claim 8 (depends on 4)

The system of claim 4, wherein line maps are got from connecting junction pairs from LSM-HAWP with anti-aliased lines.

### Claim 9 (depends on 1)

The system of claim 1, wherein the pyramid structure sub-encoder includes partially gated convolutions blocks, dilated residual blocks, an efficient attention block, and pyramid decomposing separable blocks.

### Claim 10 (depends on 9)

The system of claim 9, wherein in the partially gated convolutions (GC) blocks only three GC layers are used for the input and output features in both upsampling and downsampling parts.

### Claim 11 (depends on 9)

The system of claim 9, wherein the efficient attention block is in the middle of a pyramid structure sub-encoder.

### Claim 12 (depends on 9)

The system of claim 9, wherein the pyramid decomposing separable blocks leverages dilated lower-scale structures.

### Claim 13 (depends on 9)

The system of claim 9, wherein the pyramid decomposing separable blocks project the image feature into two separated embedding spaces; one is a line embedding space and the other is an edge embedding space.

### Claim 14 (depends on 1)

The system of claim 1, wherein the decoder includes partially gated convolutions blocks, dilated residual blocks, without efficient attention blocks or pyramid decomposing separable blocks.

### Claim 15

A method for image inpainting, comprising the steps of:
extracting line maps from an original image;
extracting edge maps from the original image;
generating a sketch tensor space based on the original image, the line maps and the edge maps; and
outputting an inpainted image from the sketch tensor space.
