Parallel multiradial LBP features
Project description
fastLBP
Highly parallel LBP implementation
Installation
Note: it is not recommended to proceed on a head node; consider starting an ijob or a jupyter instance.
- Activate a Python 3.11 environment (e.g. using
conda create -y -n p11 python=3.11 && conda activate p11
) - Verify you are using the right env
python --version
таpip --version
- Install a stable version from PyPI
pip install fastlbp-imbg
- Or build the latest version from sources
git clone git@github.com:imbg-ua/fastLBP.git
cd fastLBP
# git checkout <branchname> # if you need a specific branch
pip install . # this will install the fastlbp_imbg package in the current env
- You can use
import fastlbp_imbg
now
Testing
# in repo root
conda activate fastlbp
pip install -e .
python -m unittest
Implemented modules
run_skimage
Computes multiradial LBP of a single multichannel image in a parallel fashion.
This is a quick sample implementation that could be a baseline for further benchmarking.
Features:
- Powered by
skimage.feature.local_binary_pattern
- Concurrency is managed by Python's
multiprocessing
module - Parallel computation via
multiprocessing.Pool
of sizencpus
- Efficient memory usage via
multiprocessing.shared_memory
to make sure processes do not create redundant copies of data - It computes everything in RAM, no filesystem usage
TODO:
- Use
max_ram
parameter to estimate optimal number of sub-processes and collect memory stats. Nowmax_ram
is ignored.
Planned modules
run_chunked_skimage
Similar to 1. run_skimage, but each subprocess should compute LBP for its image chunk, not the whole image.
run_dask and run_chunked_dask
Similar to 1. run_skimage, but use Dask and dask.array.map_overlap
for parallelisation instead of multiprocessing
and manual data wrangling
Other notable things to try
- Perform benchmarking of an in-house optimised cython version of
skimage.feature.local_binary_pattern
(see skimage_lbp.pyx at imbg-ua/nf-img-benchmarking) - Do some research on Numba - is it applicable here?
- Add annotations to run_skimage results using
anndata
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fastlbp_imbg-0.1.3.tar.gz
.
File metadata
- Download URL: fastlbp_imbg-0.1.3.tar.gz
- Upload date:
- Size: 210.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 374e169ec1b3e4a382dc18b0f0c16d6640b64663a22851706ec7c0dfa84664e4 |
|
MD5 | 78b7c83d87f8fea177ea5a7faa7dd89f |
|
BLAKE2b-256 | 8405af1a3d847710b5a48d760339529b7127996d3035e237211b68a33cb25e62 |
File details
Details for the file fastlbp_imbg-0.1.3-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: fastlbp_imbg-0.1.3-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 123.0 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f8676f75896ee45ae1793e242708b0daf089a8ba72054febaa29eda13cd307a |
|
MD5 | 0b232767b2f147a2f718e22bea363a76 |
|
BLAKE2b-256 | 22c074cb66b971c54e69a40f4617dad0a42e751af4848abe03648f2936d21279 |