Giter VIP home page Giter VIP logo

gan_embedding's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.