File: README.md

package info (click to toggle)
python-pycudwt 1.0.2-5
  • links: PTS
  • area: contrib
  • in suites: forky, sid, trixie
  • size: 504 kB
  • sloc: cpp: 6,173; python: 798; sh: 9; makefile: 5
file content (81 lines) | stat: -rw-r--r-- 1,852 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
## pycudwt

pycudwt is a python module for parallel Discrete Wavelet Transform.
This is a wrapper of [PDWT](https://github.com/pierrepaleo/PDWT).

**Note:** this project was formerly named `pypwt`.
It has been renamed `pycudwt` to have a spot on [pypi](https://pypi.org/project/pycudwt).

## Installation

### Requirements

You need cython and nvcc (the Nvidia CUDA compiler, available in the [NVIDIA CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit)).

For the tests, you need pywavelets. `python-pywt` is packaged for Debian-like distributions, more recent changes are available on [the new repository](https://github.com/PyWavelets/pywt).

### Stable version (from pypi)

```bash
pip install pycudwt
```

### From conda recipe

Conda build for a specific *cudatoolkit* version that matches one in your conda environment, e.g.:

```
export CUDA_VERSION="10.1.243"
conda build conda-recipe/
```


### Development version (from github)

```bash
git clone https://github.com/pierrepaleo/pypwt
cd pypwt
pip install .
```

You can specify the compute capability when building the library:  
```bash
PYCUDWT_CC=86 pip install .
```

### Testing

If `pywt` is available, you can check if pycudwt gives consistent results :

```bash
cd test
python test_all.py
```

the results are stored in `results.log`.


## Getting started

Computing a Wavelet Transform wity pycudwt is simple. In `ipython`:

```python
from pycudwt import Wavelets
from scipy.misc import lena
l = lena()
W = Wavelets(l, "db2", 3)
W
------------- Wavelet transform infos ------------
Wavelet name : db2
Number of levels : 3
Stationary WT : no
Cycle spinning : no
Separable transform : yes
Estimated memory footprint : 5.2 MB
Running on device : GeForce GTX TITAN X
--------------------------------------------------
W.forward()
W.soft_threshold(10)
W.inverse()
imshow(W.image)
```