Skip to main content

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_fastlbp

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 fastlbp_imbg.lbp, our implementation of skimage.feature.local_binary_pattern
  • Concurrency is managed by Python's multiprocessing module
  • Parallel computation via multiprocessing.Pool of size ncpus
  • Efficient memory usage via multiprocessing.shared_memory to make sure processes do not create redundant copies of data
  • If save_intermediate_results=False then computes everything in RAM, no filesystem usage

TODO:

  • Use max_ram parameter to estimate optimal number of sub-processes and collect memory stats. Now max_ram is 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastlbp_imbg-0.2.0.tar.gz (209.9 kB view details)

Uploaded Source

Built Distribution

fastlbp_imbg-0.2.0-cp311-cp311-win_amd64.whl (122.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

File details

Details for the file fastlbp_imbg-0.2.0.tar.gz.

File metadata

  • Download URL: fastlbp_imbg-0.2.0.tar.gz
  • Upload date:
  • Size: 209.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for fastlbp_imbg-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c0e674cea841e86a958af594422e40f31f0b81c75e0ef67d384a9f7ef67ebb0d
MD5 7f03032c9d9f3db37cf1f493842399f5
BLAKE2b-256 72a2eeab142d0123177ea204c8d89fd7f37a31d4b9ff9f63a2e3464021c7cfd1

See more details on using hashes here.

File details

Details for the file fastlbp_imbg-0.2.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for fastlbp_imbg-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2f0a9326609eab79ad1cb065ebe20801fd6f478f8fb850fe8f0d40d73d7464a2
MD5 a371548553bd1be114d654d5af137adb
BLAKE2b-256 a0351b3dd85db99ec9a218c42aab56014a3a2bc239eb099982319c783e281758

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page