Skip to content

Tensorflow projections comparing real images and images generated by SPADE GAN

Notifications You must be signed in to change notification settings

dmolony3/GAN_embedding

Repository files navigation

About

This repository can be used to generate images for use with tensorflow projector. Note this repository just compresses the raw image to the desired vector size and does not actually generate a feature space embedding.

Use

In create_embedding.py specify the following:
directory: Directory where images are stored
data_file:Path to a file which contains each image filename (no need to include the absolute file path)
num_image_rows: This number sets the number of images in each row in the sprite image (see example sprite image below). This is the square root of the total number of images
image_dim: The dimension of the images contained within the sprite image. Recommended to not exceed 64x64.
embedding_dim: The embedding dimension of the images. Images are resized to this size and embedding vectors are generated.

Edit config.json to set the correct value for the following:
tensorShape: Should be [num_images, embedding_dim2].
singleImageDim: Should be [image_dim, image_dim].
Paths to the vecs.tsv, metadata.tsv and sprite_image.jpg

Finally, time to let the projector run.

Example sprite image

Acknowledgements

Inspired by the the following repository https://github.com/anthonySegura/facenet_projections

About

Tensorflow projections comparing real images and images generated by SPADE GAN

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published