Parallel multiradial LBP features
Project description
fastLBP
Highly parallel LBP implementation
Important pre-release warning: If aborted mid-execution, this software sometimes create a lot of orphan processes that needs to be killed manually. Please, note down the name of your python script, search for
Pythonin your task manager and look for the processes that correspond to your python script.
Requirements
FastLBP is tested with Python 3.11 on Windows 10, Debian 11, and Ubuntu 22.04
Python requirements are:
- numpy >= 1.26.0
- Cython (to build the binary modules, will be optional in the future)
- scikit-image >= 0.22.0 (mostly for testing, we plan making this requirement optional in the future)
- pandas >= 2.1.1
- psutil
Installation
- Activate or create 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 --versionandpip --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 as fastlbpnow
Testing
# in repo root
conda activate fastlbp
pip install -e .
python -m unittest
Bug reporting
You can report a bug or suggest an improvement using our github issues
Implemented modules
run_fastlbp
Computes multiradial LBP of a single multichannel image in a parallel fashion.
Features:
- Powered by
fastlbp_imbg.lbp, our implementation ofskimage.feature.local_binary_pattern - Concurrency is managed by Python's
multiprocessingmodule - Parallel computation via
multiprocessing.Poolof sizencpus - Efficient memory usage via
multiprocessing.shared_memoryto make sure processes do not create redundant copies of data - If
save_intermediate_results=Falsethen computes everything in RAM, no filesystem usage
TODO:
- Use
max_ramparameter to estimate optimal number of sub-processes and collect memory stats. Nowmax_ramis ignored.
Planned modules
run_chunked_skimage
Similar to 1. run_fastlbp, but each subprocess should compute LBP for its image chunk, not the whole image.
run_dask and run_chunked_dask
Similar to 1. run_fastlbp, but use Dask and dask.array.map_overlap for parallelisation instead of multiprocessing and manual data wrangling
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastlbp_imbg-0.2.1.tar.gz.
File metadata
- Download URL: fastlbp_imbg-0.2.1.tar.gz
- Upload date:
- Size: 211.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
278ef23fe08c5ba7509d67567071fdb20f6bfc9ecdb143c70a255cd81b38386c
|
|
| MD5 |
d4cc272cb09067f52d95bef6ee5b756c
|
|
| BLAKE2b-256 |
782fdd1ef2485020cf36327ddaece724d7cdb3714ea9ff0e253f99a8f8423c03
|
File details
Details for the file fastlbp_imbg-0.2.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: fastlbp_imbg-0.2.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 123.1 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 |
d67141717398b4ca35cc85efd1dea2f7a7504b63599aea1e48fe5fc2ebf3806d
|
|
| MD5 |
1f8bc058b98576f440db4b3b9d46afbf
|
|
| BLAKE2b-256 |
d79ed3e18f895b50709d252f2ce5e255ed9afa49dac3e9199576bc5c68383e1d
|