Git Product home page Git Product logo

som_palette's Introduction

Instructions:

Parameters that can be changed:
In "functions.py"
	N - number of iterations through each pixel
	neuron_w - width of SOM
	neuron_h - height of SOM
		* Note that the sum of neuron_w and neuron_h must be greater than or equal to 8 *
	som_dim - width and height (in pixels) of the printed SOM
	a0 - learning rate

In "run_som.py"
	pic_file - image file (.jpg/.jpeg/.bmp)

To run the code, run "run_som.py" with python. From there, an SOM map will be initialized and shown in the format of a randomized color grid. Then the image to be evaluated will show up and the training begins. After the number of iterations specified at the top of "functions.py", training finishes and the final SOM is shown. The program then recreates the image using the color palette in SOM, and the resulting SOM will be saved into "database.py". After that, the program will look through all the existing SOMs in "database.py" for the one most similar to the current image, and show that image.

It is recommended to not alter code in "database.py" and "database_index.py", as changing the values may make database searching and similar image return impossible.

som_palette's People

Contributors

dianachen77 avatar firenze11 avatar spyridon-amp avatar

Stargazers

 avatar

Watchers

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