Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maciejczyzewski/fast_gpu_voronoi
GPU-Accelerated Jump Flooding Algorithm for Voronoi Diagram in log*(n)
https://github.com/maciejczyzewski/fast_gpu_voronoi
algorithm gpgpu gpu opencl research voronoi
Last synced: 7 days ago
JSON representation
GPU-Accelerated Jump Flooding Algorithm for Voronoi Diagram in log*(n)
- Host: GitHub
- URL: https://github.com/maciejczyzewski/fast_gpu_voronoi
- Owner: maciejczyzewski
- License: mit
- Created: 2019-05-25T00:52:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-27T15:35:11.000Z (almost 2 years ago)
- Last Synced: 2024-10-31T13:33:42.619Z (14 days ago)
- Topics: algorithm, gpgpu, gpu, opencl, research, voronoi
- Language: Python
- Homepage: https://git.io/jfa_star_slides
- Size: 68.4 MB
- Stars: 25
- Watchers: 3
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[**Demo (Google Colab)**](https://colab.research.google.com/drive/1feoho8M_1a4tOpYFDPkqDVJeWHwdhJox?usp=sharing)
| | Research | Authors |
|:----|:---------|:--------|
| \[[slides](https://maciejczyzewski.github.io/fast_gpu_voronoi/slides_small.pdf)\] | __GPU-Accelerated Jump Flooding Algorithm for Voronoi Diagram in log*(n)__ [this] | Maciej A. Czyzewski |
| \[[article](https://vgl.csa.iisc.ac.in/pdf/pub/ICVGIP14_Talha.pdf)\] | Facet-JFA: Faster computation of discrete Voronoi diagrams [2014] | Talha Bin Masood, Hari Krishna Malladi, Vijay Natarajan |
| \[[article](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.101.8568&rep=rep1&type=pdf)\] | Jump Flooding in GPU with Applications to Voronoi Diagram and Distance Transform [2006] | Guodong Rong, Tiow-Seng Tan |# Implemented Algorithms
JFA*
JFA+
JFAused improvement
noise+selection
noise
--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`:
```bash
$ pip3 install fast_gpu_voronoi
```Here is a small example to whet your appetite:
```python3
from fast_gpu_voronoi import Instance
from fast_gpu_voronoi.jfa import JFA_star
from fast_gpu_voronoi.debug import saveI = 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:
```bash
$ git clone [email protected]:maciejczyzewski/fast_gpu_voronoi.git
$ pip3 install -r requirements.txt
$ pytest
```# Results
| Our method | Current best |
|:-------------------------------:|:---------------------:|
| JFA\* | JFA |
| ![JFA_star](docs/jfa_star2.gif) | ![JFA](docs/jfa2.gif) |
| steps = log\*(2000) = 4 | steps = log(720) ~= 10 |_...for x = 720; y = 720; seeds = 2000 (read as n = 2000; p = 720)._
# Thanks