3 ms·
People interested in mixing image processing, Python, and C code for high performance might also enjoy tinkering with a combination of Numpy and PyOpenCL. It g
by saltcured 9y ago
People interested in mixing image processing, Python, and C code for high performance might also enjoy tinkering with a combination of Numpy and PyOpenCL. It gives you some powerful mechanisms to manipulate n-dimensional arrays and then offload some brute-force work to your GPU or multi-core CPU.
OpenCL is comparable to CUDA. It's essentially a C dialect with a lot of overlap to the OpenGL GLSL (shader language), with intrinsics for certain SIMD operations.
You write your outer data wrangling code in Python, and put your little OpenCL kernels into the program as multi-line strings, which get compiled at runtime into appropriate parallel processing routines which are dispatched by whichever OpenCL drivers you install. I've used my NVIDIA GPUs and Intel multi-core/SIMD CPUs to good effect.
This kind of parallel processing leads to turning your mind inside-out a little and using signal-processing techniques. You want think in terms of cooperative algorithms you can perform out of a large number of independent, localized operations rather than a single point of focus which sequentially wanders around a buffer.
- make3 9y agoyou can probably use Tensorflow without the differentiation stuff
- Hydraulix989 9y agoI miss Theano
- superbatfish 9y agoIf you don't need GPU support, vigra is a great option for ND image processing. conda install -c conda-forge vigra python -c 'import vigra; help(vigra.analysis.watersheds)' scikit-image ain't bad, and has more functions, but the functions vigra is faster if it has the function you're looking for. Next on my list of ND array libraries to learn is xtensor.