GithubHelp home page GithubHelp logo

max-uho / fast_gpu_voronoi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maciejczyzewski/fast_gpu_voronoi

0.0 0.0 0.0 53.84 MB

GPU-Accelerated Jump Flooding Algorithm for Voronoi Diagram in log*(n)

Home Page: https://git.io/jfa_star_slides

License: MIT License

Python 84.73% C 15.27%

fast_gpu_voronoi's Introduction

A Fork of https://github.com/maciejczyzewski/fast_gpu_voronoi for my modern Mac M1

Demo (Google Colab)

JFA*

Research Authors
[slides] GPU-Accelerated Jump Flooding Algorithm for Voronoi Diagram in log*(n) [this] Maciej A. Czyzewski
[article] Facet-JFA: Faster computation of discrete Voronoi diagrams [2014] Talha Bin Masood, Hari Krishna Malladi, Vijay Natarajan
[article] Jump Flooding in GPU with Applications to Voronoi Diagram and Distance Transform [2006] Guodong Rong, Tiow-Seng Tan

Implemented Algorithms

JFA* JFA+ JFA
used improvement noise+selection noise -- results
num. of needed steps log*(n) log4(p) log2(p)
step size p/(3^i) p/(2^i) p/(2^i)
research (our) (our) [Guodong 2006]

Installation & Example

Project can be installed using pip:

$ pip install -e git+git://github.com/max-uho/fast_gpu_voronoi.git@master#egg=fast_gpu_voronoi

Here is a small example to whet your appetite:

from fast_gpu_voronoi       import Instance
from fast_gpu_voronoi.jfa   import JFA_star
from fast_gpu_voronoi.debug import save

I = Instance(alg=JFA_star, x=50, y=50, \
        pts=[[ 7,14], [33,34], [27,10],
             [35,10], [23,42], [34,39]])
I.run()

print(I.M.shape)                 # (50, 50, 1)
save(I.M, I.x, I.y, force=True)  # __1_debug.png

Development

If you want to contribute, first clone git repository and then run tests:

$ git clone [email protected]:maciejczyzewski/fast_gpu_voronoi.git
$ pip3 install -r requirements.txt
$ pytest

Results

Our method Current best
JFA* JFA
JFA_star JFA
steps = log*(2000) = 4 steps = log(720) ~= 10

...for x = 720; y = 720; seeds = 2000 (read as n = 2000; p = 720).

Thanks

Poznan University of Technology
OpenCl

fast_gpu_voronoi's People

Contributors

maciejczyzewski avatar max-uho avatar kamilpiechowiak 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.