IP Library Granted Patent US 11,804,037
Granted Patent B1
US 11,804,037 · App. 18/332,289 · Granted Oct 31, 2023

Method and system for generating image sample having specific feature

Inventors: Guannan Jiang (Ningde, CN); Jv Huang (Ningde, CN); Chao Yuan (Ningde, CN)
Assignee: CONTEMPORARY AMPEREX TECHNOLOGY CO., LIMITED
G06V10/82G06T5/002G06T7/0008G06T7/12G06V10/771G06V20/70G06T2207/20081G06T2207/20132
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,804,037
App. No.
18/332,289
Granted
Oct 31, 2023
Kind
B1
Abstract

The present application provides a method and a system for generating an image sample having a specific feature. The method includes: training a generative adversarial network-based sample generation model, where the generative adversarial network includes a generator and two discriminators: a global discriminator configured to perform global discrimination on an image, and a local discriminator configured to perform local discrimination on a specific feature; and inputting, to a trained generator that serves as a sample generation model, a semantic segmentation image that indicates a location of the specific feature and a corresponding real image not having the specific feature, to obtain a generated image sample having the specific feature.

Claims (42)

1. A method for training a sample generation model for generating an image sample having a specific feature, wherein the method comprises:

obtaining a training data set, wherein the training data set comprises a plurality of real images having a specific feature, a corresponding semantic segmentation image, and a plurality of real images not having the specific feature, and the semantic segmentation image is a binary image for distinguishing the specific feature from another object;

constructing a generative adversarial network, wherein

a generator of the generative adversarial network is configured to generate a generative image having the specific feature based on the input semantic segmentation image and a corresponding real image not having the specific feature, wherein the semantic segmentation image is used as a priori information about a location of the specific feature; and

a discriminator of the generative adversarial network further comprises a global discriminator and a local discriminator, wherein the global discriminator is configured to discriminate authenticity of an input image, and the local discriminator is configured to discriminate authenticity of an input local image having the specific feature; and

performing adversarial training on the generative adversarial network to optimize an ability of the generator to generate a generative image having the specific feature based on a real image not having the specific feature, wherein

the trained generator is used as the sample generation model.

2. The method of claim 1 , wherein the generator uses a SPADE-based generator structure, and the generator is configured to:

use, as an input, data that comprises the semantic segmentation image and an image obtained after erasing, from a corresponding real image, information about a specific feature region indicated in the semantic segmentation image, wherein the image obtained after erasing the information is input to a backbone network of an encoder-decoder structure, and the semantic segmentation image is input, as a semantic mask, to a SPADE branch to be introduced into a decoder part of the backbone network, wherein

the backbone network uses the image obtained after erasing the information as random noise to generate a feature map of the specific feature region indicated in the semantic segmentation image; and

performs blending, based on the semantic segmentation image, on the generated feature map and the image obtained after erasing the information, and uses a blended image as the generated generative image having the specific feature.

3. The method of claim 1 , wherein the performing adversarial training on the generative adversarial network comprises:

separately labeling the real image and the generative image having the specific feature that is generated by the generator, and providing the images together with a corresponding semantic segmentation image to the global discriminator for training; and

cutting, based on the semantic segmentation image, a local real image and a local generative image that have a specific feature part respectively from the labeled real image provided to the global discriminator and the generative image having the specific feature hat is generated by the generator, and providing, to the local discriminator for training, the local real image and the local generative image together with a local semantic segmentation image having the specific feature part that is cut from the semantic segmentation image.

4. The method of claim 1 , wherein data used for training the discriminator comprises:

a training data pair that comprises a labeled real image having the specific feature and a corresponding real semantic segmentation image;

a training data pair that comprises a labeled real image not having the specific feature and a semantic segmentation image selected from the real semantic segmentation image; and

a training data pair that comprises a labeled real image not having the specific feature and a randomly generated semantic segmentation image.

5. The method of claim 1 , wherein the performing adversarial training on the generative adversarial network comprises: training the global discriminator and the local discriminator in parallel.

6. The method of claim 1 , wherein the performing adversarial training on the generative adversarial network comprises:

comprehensively evaluating a generation effect of the generator in combination with discrimination results of the global discriminator and the local discriminator, and optimizing a parameter of the generator based on a comprehensive evaluation result of the discriminators.

7. The method of claim 1 , wherein the specific feature is a welding defect of a sealing pin.

8. A method for generating an image sample having a specific feature, wherein the method comprises:

obtaining a real image not having a specific feature;

constructing a semantic segmentation image that indicates a location of a region in which the specific feature is expected to be generated, wherein the semantic segmentation image is a binary image for distinguishing the specific feature from another object;

erasing information, in the real image not having the specific feature, that corresponds to the region having the specific feature in the constructed semantic segmentation image; and

inputting an image obtained after erasing the information, together with the semantic segmentation image, to a sample generation model trained by using a method according to claim 1 , to obtain an image sample having the specific feature.

9. The method of claim 8 , wherein the constructing a semantic segmentation image that indicates a location of a region in which the specific feature is expected to be generated comprises:

selecting one semantic segmentation image from a plurality of real semantic segmentation images corresponding to a plurality of real images having the specific feature; or

specifying one or more expected locations for the specific feature on a plurality of real images not having the specific feature, and generating a corresponding semantic segmentation image based on the specified one or more expected locations for the specific feature.

10. The method of claim 8 , wherein the specific feature is a welding defect of a sealing pin.

11. A system for generating an image sample having a specific feature, wherein the system comprises:

a storage unit configured to store a real image not having a specific feature, a sample generation model trained by using a method according to claim 1 , and a generated image sample having the specific feature; and

a computing unit configured to:

construct a semantic segmentation image that indicates a location of a region in which the specific feature is expected to be generated, wherein the semantic segmentation image is a binary image for distinguishing the specific feature from another object;

read the real image not having the specific feature from the storage unit;

erase information, in the real image not having the specific feature, that corresponds to the region having the specific feature in the constructed semantic segmentation image; and

use an image obtained after erasing the information, together with the semantic segmentation image, as an input to the sample generation model, to obtain an image sample having the specific feature.

12. The system of claim 11 , wherein the constructing a semantic segmentation image that indicates a location of a region in which the specific feature is expected to be generated comprises:

selecting one semantic segmentation image from a plurality of real semantic segmentation images corresponding to a plurality of real images, of welding of a sealing pin, that have the specific feature; or

specifying one or more expected locations for the specific feature on a plurality of real images not having the specific feature, and generating a corresponding semantic segmentation image based on the specified one or more expected locations for the specific feature.

13. The system of claim 11 , wherein the specific feature is a welding defect of the sealing pin.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 6, 2024
From: CONTEMPORARY AMPEREX TECHNOLOGY CO., LIMITED
To: CONTEMPORARY AMPEREX TECHNOLOGY (HONG KONG) LIMITED
Reel/Frame 068338/0723 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 9, 2023
From: JIANG, GUANNAN; HUANG, JV; YUAN, CHAO
To: CONTEMPORARY AMPEREX TECHNOLOGY CO., LIMITED
Reel/Frame 063910/0706 →
Continuity (1)
Continuation PCTCN2021135284 · Dec 3, 2021