Git Product home page Git Product logo

tsne-grid's Introduction

tsne-grid

This is a python script for t-SNE visualization of multiple images in a square grid.

Setup

Dependencies:

Usage

Basic usage:

python tsne_grid.py --dir ./examples/inputs/ --size 4

Options (required)

  • --dir: Path to directory containing image collection.
  • --size: Number of small images in a row/column in output image.

Options (optional)

  • --res: Width/height if small images (in pixels). Default is 224.
  • --name: Output filename. Default is tsne_grid.jpg
  • --path: Output image path. Default is current directory.
  • --per: Perplexity for t-SNE algorithm. Default is 50.
  • --iter: Number of iterations for t-SNE algorithm. Default is 5000.

Implementation details

VGG16 (without fc layers on top) is used to generate high dimensional feature representations of images. 2D representaions of these features are formed using scikit-learn's t-SNE implementation. These 2D representations are converted into a square grid using Jonker-Volgenant algorithm.

Support

The script was tested with tensorflow (1.4.0) and keras (2.1.1) on Nvidia GeForce GT 740M

References

  • L.J.P. van der Maaten and G.E. Hinton. Visualizing High-Dimensional Data Using t-SNE. Journal of Machine Learning Research 9(Nov):2579-2605, 2008. PDF [Supplemental material] [Talk] [Code]

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.