Skip to main content

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 Python in 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 --version and pip --version
  • Install a stable version from PyPI
    pip install fastlbp
  • 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 package in the current env
    
  • You can use import fastlbp as fastlbp now

GPU (CUDA) optional install

  • CPU-only install (default):
    pip install fastlbp
    
  • GPU build (opt-in): ensure CUDA is discoverable by setting CUDA_HOME (or having nvcc on PATH) and install the extra:
    export CUDA_HOME=/usr/local/cuda  # adjust to your CUDA install
    pip install fastlbp
    
  • To hard-require CUDA and fail if not found, set:
    FORCE_CUDA=1 pip install fastlbp
    

If CUDA isn’t detected, the build will proceed with CPU-only features. At runtime, you can check availability:

import fastlbp
fastlbp.fastlbp.is_cuda_available()  # -> True/False

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.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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fastlbp-0.3.3-cp313-cp313-manylinux_2_39_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

fastlbp-0.3.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

fastlbp-0.3.3-cp312-cp312-manylinux_2_39_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

fastlbp-0.3.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

fastlbp-0.3.3-cp311-cp311-manylinux_2_39_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

fastlbp-0.3.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

File details

Details for the file fastlbp-0.3.3-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for fastlbp-0.3.3-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 b00d8ebd5dbe4fffc3204a389d361db343af57b301e2a1678a5cf1b0a35e3ba8
MD5 c3a565845ae386a23680a1809c585321
BLAKE2b-256 35e2324ac22ab3ea4f2d2b39d1464a647c651fefc60e1462bc798d6ba50d53c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlbp-0.3.3-cp313-cp313-manylinux_2_39_x86_64.whl:

Publisher: publish-to-pypi.yaml on imbg-ua/fastLBP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastlbp-0.3.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for fastlbp-0.3.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 bb9c8a7c5a7ec3f1a24d50f8ee44f7211a8bb1d4de35a8a29c40de9a7457f008
MD5 4c0ce51f86cb5977e87932de688042d8
BLAKE2b-256 699938e2fa5654c4df900aff28d749b417ae09c5ffcebc1a36adf432b71ea23d

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlbp-0.3.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: publish-to-pypi.yaml on imbg-ua/fastLBP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastlbp-0.3.3-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for fastlbp-0.3.3-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 139902d611fd8458f84821762fd389823ebac074794f9ccc737442c9be8ea5c7
MD5 14edff7c08687c9ffe378e1dfbe35d6e
BLAKE2b-256 5200b8152996b8e95dfc6bf0852b2098b10f3bbc5de4b3e9bdf1462da2d4243f

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlbp-0.3.3-cp312-cp312-manylinux_2_39_x86_64.whl:

Publisher: publish-to-pypi.yaml on imbg-ua/fastLBP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastlbp-0.3.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for fastlbp-0.3.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 c22ee5b33674fdb37c7bdd21b0bcd95ffbb0ab53fc908a7835c8ac3bf2a106d8
MD5 6eabd9b68c2de3ebacca3710ce64200d
BLAKE2b-256 5c4ff2107eaf8d45549921f83d98fa983387cd6e0c3930149531f4e8aecc154e

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlbp-0.3.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: publish-to-pypi.yaml on imbg-ua/fastLBP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastlbp-0.3.3-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for fastlbp-0.3.3-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 bea4e3aca01bc1c7431ff2308ebc2eb08e6836159743cf33e361f5c273e7d51f
MD5 ce718942a42e8a4a9149b0abfec36795
BLAKE2b-256 6741c9fc8bd23e3db4d25f409991768afa3be5b5af28ed67ec525a041399b80b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlbp-0.3.3-cp311-cp311-manylinux_2_39_x86_64.whl:

Publisher: publish-to-pypi.yaml on imbg-ua/fastLBP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastlbp-0.3.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for fastlbp-0.3.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 79f1912e2e60ad8ecf111b7c4dbff03730335c9e54153479fa7b53c36508d975
MD5 42d2b6e227fd3aedc0c92b5e281b9268
BLAKE2b-256 b181087a50699c7131d17819c8699625e7d2cde6f791d0b10d1ba0fa62a17257

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastlbp-0.3.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: publish-to-pypi.yaml on imbg-ua/fastLBP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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