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.
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.
Inspired by the the following repository https://github.com/anthonySegura/facenet_projections