Using augmented face images to improve facial recognition tasks
Methods and systems for generating synthetic images based on an input image are described. The method may include receiving an input image; generating, using an encoder, a first latent code vector representation based on the input image; receiving a latent code corresponding to a feature to be added to the input image; modifying the first latent code vector representation based on the latent code corresponding to the feature to be added; generating, by an image decoder, a synthesized image based on the modified first latent code vector representation; identifying, using a landmark detector, one or more landmarks in the base image; identifying, using a landmark detector, one or more landmarks in the synthesized image; determining a measure of similarity between the landmark identified on the base image and the landmark identified in the synthesized image; and discarding the synthesized image based on the comparison.
1 . A method for generating synthetic images based on an input image, the method comprising:
receiving an input image;
generating, using an encoder, a first latent code vector representation based on the input image;
determining a feature underrepresented in a base image set by analyzing the base image set;
receiving a latent code corresponding to the feature to be added to the input image;
modifying the first latent code vector representation based on the latent code corresponding to the feature to be added to the input image;
generating, by an image decoder, a synthesized image based on the modified first latent code vector representation;
identifying, using a landmark detector, one or more landmarks in the input image;
identifying, using a landmark detector, one or more landmarks in the synthesized image;
determining a measure of similarity between the landmark identified on the input image and the landmark identified in the synthesized image; and
discarding the synthesized image based on the measure of similarity,
wherein the determining a feature underrepresented in a base image set further comprises:
analyzing a plurality of input images to determine at least one underrepresented feature of a plurality of underrepresented features; and
identifying the feature to be added to the input image based on the analysis.
2 . The method of claim 1 , wherein the latent code corresponding to the feature to be added is a randomly-scaled semantic vector.
3 . The method of claim 1 , wherein the feature to be added corresponds to at least one of a beard, eyeglasses, earrings, or a mustache.
4 . The method of claim 1 , wherein the image decoder is a StyleGAN image decoder.
5 . The method of claim 1 , further comprising:
training a machine learning neural network model utilizing a plurality of synthesized images, wherein the generated synthesized image is included in the plurality of synthesized images.
6 . The method of claim 1 , wherein the input image includes a facial image of a person.
7 . A system, comprising:
one or more hardware processors configured by machine-readable instructions to:
receive an input image;
generate, using an encoder, a first latent code vector representation based on the input image;
determine a feature underrepresented in a base image set by analyzing the base image set;
receive a latent code corresponding to the feature to be added to the input image;
modify the first latent code vector representation based on the latent code corresponding to the feature to be added to the input image;
generate, by an image decoder, a synthesized image based on the modified first latent code vector representation;
identify, using a landmark detector, one or more landmarks in the input image;
identify, using a landmark detector, one or more landmarks in the synthesized image;
determine a measure of similarity between the landmark identified on the input image and the landmark identified in the synthesized image; and
discard the synthesized image based on the measure of similarity,
wherein the determine a feature underrepresented in a base image set further comprises:
analyzing a plurality of input images to determine at least one underrepresented feature of a plurality of underrepresented features; and
identifying the feature to be added to the input image based on the analysis.
8 . The system of claim 7 , wherein the latent code corresponding to the feature to be added is a randomly-scaled semantic vector.
9 . The system of claim 7 , wherein the feature to be added corresponds to at least one of a beard, eyeglasses, earrings, or a mustache.
10 . The system of claim 7 , further comprising: training a machine learning neural network model utilizing a plurality of synthesized images, wherein the generated synthesized image is included in the plurality of synthesized images.
11 . The system of claim 7 , wherein the input image includes a facial image of a person.
12 . The system of claim 7 , wherein the image decoder is a StyleGAN image decoder.
13 . A non-transitory computer-readable storage medium comprising instructions being executable by one or more processors to cause the one or more processors to:
receive an input image;
generate, using an encoder, a first latent code vector representation based on the input image;
determine a feature underrepresented in a base image set by analyzing the base image set;
receive a latent code corresponding to the feature to be added to the input image;
modify the first latent code vector representation based on the latent code corresponding to the feature to be added to the input image;
generate, by an image decoder, a synthesized image based on the modified first latent code vector representation;
identify, using a landmark detector, one or more landmarks in the input image;
identify, using a landmark detector, one or more landmarks in the synthesized image;
determine a measure of similarity between the landmark identified on the input image and the landmark identified in the synthesized image; and
discard the synthesized image based on the measure of similarity,
wherein the determine a feature underrepresented in a base image set further comprises:
analyzing a plurality of input images to determine at least one underrepresented feature of a plurality of underrepresented features; and
identifying the feature to be added to the input image based on the analysis.
14 . The computer-readable storage medium of claim 13 , wherein the latent code corresponding to the feature to be added is a randomly-scaled semantic vector.
15 . The computer-readable storage medium of claim 13 , wherein the determine a feature underrepresented in a base image set further comprises: training a machine learning neural network model utilizing a plurality of synthesized images, wherein the generated synthesized image is included in the plurality of synthesized images.
16 . The computer-readable storage medium of claim 13 , wherein the input image includes a facial image of a person.
17 . The computer-readable storage medium of claim 13 , wherein the image decoder is a StyleGAN image decoder.
18 . The computer-readable storage medium of claim 13 , wherein the feature to be added corresponds to at least one of a beard, eyeglasses, earrings, or a mustache.