GithubHelp home page GithubHelp logo

asynk-means's Introduction

Asynk-Means

A visual representation of the k-means algorithm applied to images downloaded asynchronously.

The algorithm

Every pixel RGB value is extracted and transformed to a CIELAB space. All pixels in an image are averaged into a single color vector which is used to run the K-means algorithm and cluster images in this space. Notice in the demo how it clusters images in tiles ordered vertically. Also notice that K-means is not always perfect, it might get stuck in a local minima resulting in an aparent disorder.

Alt text

Problems

With this approach this algorithm will only work properly with images that have a single comon color. A better approach will be implemented in the future.

TODO

Get top 5 colors and run the algorithm in a more sensible representation of the image with a model of these five colors.

JSON input & Image-net

A list of image links is provided in json format for download. It can be easily modified to append or change them. In the future user inputs will be configured to add new images in-app. Warning: this app is intended for dev purposes only and the GRID_SIZE variable is tightly coupled to the number of images in that list and the validity of their links, so make sure that provided links are valid and GRID_SIZE >= urlList.count.

Also a small python script is provided for easier integration with image net. Just search and download a synset, save it with the name urls.txt in the same directory of setup.py and run it. Then copy the resulting json into the xCode project.

Based on ideas from:

Contact

asynk-means's People

Contributors

bsantanas 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.