Code Monkey home page Code Monkey logo

kmeans-gpu's People

Contributors

redwarp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

kmeans-gpu's Issues

K-mean++

Let's see if k-mean++ improves convergence!

Optimize choose pass if memory is available

Currently, we do as many pass as there are centroids to calculate each new centroid.
The reason is buffer size: we create a buffer (colour buffer) that holds the aggregate and the full prefix, so 8 info, times 4 bits, per workgroup.
The max size of a buffer is defined by the limit max_storage_buffer_binding_size, defaults to 128MB.

Let's calculate how many colour buffer can fit in 128MB dynamically, and modify the shader so it can calculate multiple centroids at once.
This should speed things dramatically.

Make the methods async

We currently call several block_on() using pollster, let's make them async, and let the cli part actually handle how async code is called.

crate?

Hello!

I'm writing lulezojne. It's a WIP pywal clone heavily inspierd by lule with templating support and some additional goodies. I'd like it if this was a crate I could use as a color extraction backend.

I'm currently using kmeans-colors and color-thief-rs for backends (which the user can select as is the case with pywal). The kmeans cpu implementation is slow (maybe im setting wrong arguments on it) and the colorthief backend only generates 16 colors max. I'd like to see how much performance I could get with this backend.

I could make a PR for it and all that's needed - I'm just asking to see if you are interested in something like that.

Fix choose centroid dispatch size

The dispatch size is rounded down, meaning some pixels will be omitted.
The size of the colour buffer is also wrong, the same way.

I should first calculate the proper dispatch size, then create the colour buffer accordingly.

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.