Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pelletier/color_som
Self-Organizing Map Python implementation for images
https://github.com/pelletier/color_som
Last synced: about 1 month ago
JSON representation
Self-Organizing Map Python implementation for images
- Host: GitHub
- URL: https://github.com/pelletier/color_som
- Owner: pelletier
- Created: 2014-07-12T19:26:04.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-12T19:42:51.000Z (over 10 years ago)
- Last Synced: 2024-10-13T14:17:45.786Z (2 months ago)
- Language: Python
- Size: 613 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SOM in Python for images
This is a very simple Python implementation of a
[Self-Organizing Map](http://en.wikipedia.org/wiki/Self-organizing_map)
for colors classification in a given image.## Dependencies
* [Python 3](http://python.org/)
* [Pillow](http://pillow.readthedocs.org/en/latest/)## Run
python som.py input_image.png output_image.png
## Example
### Input
![Lenna](lenna.png?raw=true)
### Output
![Result](result.png?raw=true)
## Warnings
* This was hacked together in about an hour.
* Only accepts square images.
* Quite slow.## Improvement ideas
* Parallelize.
* Better weights initialization (for a cleaner output).
* Stop after convergence.
* Writer cleaner code / split into modules.
* Support non square images.## License
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004Copyright (C) 2014 Thomas Pelletier
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION0. You just DO WHAT THE FUCK YOU WANT TO.