IP Library › Granted Patent US 11,302,118
Granted Patent B2
US 11,302,118 · App. 17/016,162 · Granted Apr 12, 2022

Method and apparatus for generating negative sample of face recognition, and computer device

Inventors: Wenhan Luo (Shenzhen, CN); Linchao Bao (Shenzhen, CN); Yuan Gao (Shenzhen, CN); Wei Liu (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
G06V40/40G06K9/6256G06V40/172G06V40/50
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,302,118
App. No.
17/016,162
Granted
Apr 12, 2022
Kind
B2
Abstract

This application discloses a method of generating a negative sample for face recognition performed at a computer device. The method includes: obtaining a positive sample of a face from a training sample library required for machine learning of face recognition; embedding the obtained positive sample in a selected negative sample template, to obtain an intermediate sample of the face that simulates displaying of the positive sample in a display region of the negative sample template; and fusing the intermediate sample in a selected scenario sample, to obtain a negative sample of the face required for machine learning of face recognition.

Claims (57)

1. A method of generating a negative sample for face recognition performed at a computer device having a processor and memory storing a plurality of programs to be executed by the processor, the method comprising:

obtaining a positive sample of a face from a training sample library required for machine learning of face recognition;

embedding the obtained positive sample in a selected negative sample template, to obtain an intermediate sample of the face that simulates displaying of the positive sample in a display region of the negative sample template; and

fusing the intermediate sample in a selected scenario sample, to obtain a negative sample of the face required for machine learning of face recognition.

2. The method according to claim 1 , wherein the embedding the obtained positive sample in a selected negative sample template comprises:

pre-processing the positive sample according to a size of the display region of the negative sample template; and

embedding the pre-processed positive sample in the display region of the negative sample template.

3. The method according to claim 1 , further comprising:

before fusing the intermediate sample in a selected scenario sample:

pre-processing a selected reflective picture based on a size of the intermediate sample; and

using the intermediate sample as a foreground, and synthesizing the intermediate sample and the pre-processed reflective picture, to simulate reflections of the reflective picture in the intermediate sample.

4. The method according to claim 3 , wherein the using the intermediate sample as a foreground, and synthesizing the intermediate sample and a pre-processed reflective picture comprises:

synthesizing the intermediate sample and the pre-processed reflective picture according to a first weight value of the intermediate sample and a second weight value of the reflective picture, the first weight value being greater than a preset weight threshold, and the second weight value being less than or equal to the preset weight threshold.

5. The method according to claim 3 , wherein the fusing the intermediate sample in the scenario sample specifically comprises:

performing at least one geometric distortion on the intermediate sample, the intermediate sample after the geometric distortion comprising a mask used for indicating a position of the intermediate sample before the geometric distortion in the intermediate sample after the geometric distortion; and

fusing the intermediate sample after the geometric distortion in the scenario sample according to the mask.

6. The method according to claim 1 , wherein the negative sample template is a template of a terminal with a display function, and the display region is a display screen region of the terminal; and/or

the scenario sample comprises a scenario photo or a scenario video.

7. A computer device, comprising:

at least one processor; and

a memory communicatively connected to the at least one processor;

the memory storing a plurality of programs executable by the at least one processor, the plurality of programs, when executed by the at least one processor, causing the computer device to perform a plurality of operations including:

obtaining a positive sample of a face from a training sample library required for machine learning of face recognition;

embedding the obtained positive sample in a selected negative sample template, to obtain an intermediate sample of the face that simulates displaying of the positive sample in a display region of the negative sample template; and

fusing the intermediate sample in a selected scenario sample, to obtain a negative sample of the face required for machine learning of face recognition.

8. The computer device according to claim 7 , wherein the embedding the obtained positive sample in a selected negative sample template comprises:

pre-processing the positive sample according to a size of the display region of the negative sample template; and

embedding the pre-processed positive sample in the display region of the negative sample template.

9. The computer device according to claim 7 , wherein the plurality of operations further comprise:

before fusing the intermediate sample in a selected scenario sample:

pre-processing a selected reflective picture based on a size of the intermediate sample; and

using the intermediate sample as a foreground, and synthesizing the intermediate sample and the pre-processed reflective picture, to simulate reflections of the reflective picture in the intermediate sample.

10. The computer device according to claim 9 , wherein the using the intermediate sample as a foreground, and synthesizing the intermediate sample and a pre-processed reflective picture comprises:

synthesizing the intermediate sample and the pre-processed reflective picture according to a first weight value of the intermediate sample and a second weight value of the reflective picture, the first weight value being greater than a preset weight threshold, and the second weight value being less than or equal to the preset weight threshold.

11. The computer device according to claim 9 , wherein the fusing the intermediate sample in the scenario sample specifically comprises:

performing at least one geometric distortion on the intermediate sample, the intermediate sample after the geometric distortion comprising a mask used for indicating a position of the intermediate sample before the geometric distortion in the intermediate sample after the geometric distortion; and

fusing the intermediate sample after the geometric distortion in the scenario sample according to the mask.

12. The computer device according to claim 7 , wherein the negative sample template is a template of a terminal with a display function, and the display region is a display screen region of the terminal; and/or

the scenario sample comprises a scenario photo or a scenario video.

13. A non-transitory computer-readable storage medium, storing a plurality of programs that, when executed by a processor of a computer device, cause the computer device to perform a plurality of operations including:

obtaining a positive sample of a face from a training sample library required for machine learning of face recognition;

embedding the obtained positive sample in a selected negative sample template, to obtain an intermediate sample of the face that simulates displaying of the positive sample in a display region of the negative sample template; and

fusing the intermediate sample in a selected scenario sample, to obtain a negative sample of the face required for machine learning of face recognition.

14. The non-transitory computer-readable storage medium according to claim 13 , wherein the embedding the obtained positive sample in a selected negative sample template comprises:

pre-processing the positive sample according to a size of the display region of the negative sample template; and

embedding the pre-processed positive sample in the display region of the negative sample template.

15. The non-transitory computer-readable storage medium according to claim 13 , wherein the plurality of operations further comprise:

before fusing the intermediate sample in a selected scenario sample:

pre-processing a selected reflective picture based on a size of the intermediate sample; and

using the intermediate sample as a foreground, and synthesizing the intermediate sample and the pre-processed reflective picture, to simulate reflections of the reflective picture in the intermediate sample.

16. The non-transitory computer-readable storage medium according to claim 15 , wherein the using the intermediate sample as a foreground, and synthesizing the intermediate sample and a pre-processed reflective picture comprises:

synthesizing the intermediate sample and the pre-processed reflective picture according to a first weight value of the intermediate sample and a second weight value of the reflective picture, the first weight value being greater than a preset weight threshold, and the second weight value being less than or equal to the preset weight threshold.

17. The non-transitory computer-readable storage medium according to claim 15 , wherein the fusing the intermediate sample in the scenario sample specifically comprises:

performing at least one geometric distortion on the intermediate sample, the intermediate sample after the geometric distortion comprising a mask used for indicating a position of the intermediate sample before the geometric distortion in the intermediate sample after the geometric distortion; and

fusing the intermediate sample after the geometric distortion in the scenario sample according to the mask.

18. The non-transitory computer-readable storage medium according to claim 13 , wherein the negative sample template is a template of a terminal with a display function, and the display region is a display screen region of the terminal; and/or

the scenario sample comprises a scenario photo or a scenario video.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 16, 2021
From: LUO, WENHAN; BAO, LINCHAO; GAO, YUAN; LIU, WEI
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 055612/0314 →
Priority Claims (1)
CN 201810869295.4 · Aug 2, 2018 · national
Continuity (2)
Continuation PCTCN2019093273 · Jun 27, 2019
Related Publication 20200410266A1 · Dec 31, 2020