Giter VIP home page Giter VIP logo

clustering-images's Introduction

Clustering Images

Clustering Collection of Images as Vectors Using K-means clustering algorithm

There is database of binary images of handwritten numbers named "Hoda", and we are going to cluster these images so that members of each cluster are similar to each other and are different from other clusters.
There are two text files containing 0,1 that represents binary images.each image is 40 * 30 pixels, stored as 1 * 1200 vectors. In "TrainData.text" there are 20000 of 1 * 1200 vectors(each 0, 1 are seperated by ',') and we are going to cluster them by k-means algorithm in to the 10 clusters and then use Representative of Clusters to detect proper cluster for TestData.txt images.

Input :

K_means function get 1200 * 20000 matrix containing Training images and 1200 * 10 matrix as initial Representative of clusters

Output :

Returns 1200 * 10 matrix contianing final Representative of clusters

Run of code:

In each iteration choose proper Reoresentative for each image and update Representatives:
Below is test for K=10 clusters with 10 random initial Reprensentatives. as you can se below for K=10 clusters results are not exact. also final result depends on initial Representatives.

Alt Text

clustering-images's People

Contributors

amirmansurian avatar

Watchers

 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.