Giter Site home page Giter Site logo

sjaandi's Introduction

Sjaandi CircleCI Coverage Status PyPI Python License

Use your images to create collages based on visual similarity, where similar images are located close to each other, like in the example below:

Example

Note: This work was inspired by Andrej Karpathy's visualizations of ImageNet dataset.

1. Installation

Sjaandi is available for installation using pip:

pip install sjaandi

2. Using the Library

All you need is to have all images for collage in one folder, and use that path as input to VisualSearchEngine():

from sjaandi import VisualSearchEngine

DATA_PATH = # path to the folder with images

collage = VisualSearchEngine(DATA_PATH).make_collage()

The collage will be a square, two-dimensional grid of square images. If the number of pictures in your folder is not a square of some number, some photos will not end up in the collage. For example, if you provide 50 images, you will get a 7-by-7 collage having 49 images, which means 1 of the pictures of the 50 will not be included.

3. Technical Details

Underneath the hood, this library puts your images through a neural network and collects high dimensional activations. The activations are mapped to a two-dimensional Cartesional space using the t-SNE algorithm. The next step is to transform the t-SNE coordinates into a square lattice of coordinates. Finally, your images are laid out at lattice coordinates to produce the final image.

Main Dependencies:

sjaandi's People

Contributors

tbabej avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.