fastlbp-imbg


Namefastlbp-imbg JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryParallel multiradial LBP features
upload_time2024-04-19 19:14:44
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords lbp texture features image processing parallel
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

## Cython2 branch details
TODO:
- [x] Data Contiguity (`e3293cd`)
- [x] Job sorting (from slow to quick) in fastlbp.py (`8a21a04`)
- [x] Change data types in lbp.pyx from float64 to something smaller (`f177823`)
- [x] Add mask feature to lbp.pyx (`d70bc93`)
- [x] Add mask feature to fastlbp.py (`d812831`)
- [x] Fill all commit numbers


## 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`](https://docs.python.org/3/library/multiprocessing.html) 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
- It 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_skimage](#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](#1-run_skimage), but use [Dask](https://docs.dask.org/en/stable/) and [`dask.array.map_overlap`](https://docs.dask.org/en/stable/generated/dask.array.map_overlap.html#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](https://github.com/imbg-ua/nf-img-benchmarking/blob/main/skimage_lbp/skimage_lbp.pyx))
- Do some research on Numba - is it applicable here?
- Add annotations to run_skimage results using [`anndata`](https://anndata.readthedocs.io/en/latest/)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fastlbp-imbg",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "lbp, texture, features, image processing, parallel",
    "author": null,
    "author_email": "Mykhailo Koreshkov <koreshov.m@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c9/7a/349f52eb2960898c19cd68f8229da164121b9bbbb195e5227b6da314c81f/fastlbp_imbg-0.1.2.tar.gz",
    "platform": null,
    "description": "# fastLBP\r\nHighly parallel LBP implementation\r\n\r\n## Installation\r\n\r\nNote: it is not recommended to proceed on a head node; consider starting an ijob or a jupyter instance.\r\n\r\n- Activate a Python 3.11 environment (e.g. using `conda create -y -n p11 python=3.11 && conda activate p11`)\r\n- Verify you are using the right env\r\n\t- `python --version` \u0442\u0430 `pip --version`\r\n- Install a stable version from PyPI\r\n\t- `pip install fastlbp-imbg`\r\n- Or build the latest version from sources\r\n```\r\ngit clone git@github.com:imbg-ua/fastLBP.git\r\ncd fastLBP\r\n# git checkout <branchname> # if you need a specific branch\r\npip install . # this will install the fastlbp_imbg package in the current env\r\n```\r\n- You can use `import fastlbp_imbg` now\r\n\r\n## Cython2 branch details\r\nTODO:\r\n- [x] Data Contiguity (`e3293cd`)\r\n- [x] Job sorting (from slow to quick) in fastlbp.py (`8a21a04`)\r\n- [x] Change data types in lbp.pyx from float64 to something smaller (`f177823`)\r\n- [x] Add mask feature to lbp.pyx (`d70bc93`)\r\n- [x] Add mask feature to fastlbp.py (`d812831`)\r\n- [x] Fill all commit numbers\r\n\r\n\r\n## Implemented modules\r\n### run_skimage\r\nComputes multiradial LBP of a single multichannel image in a parallel fashion.  \r\nThis is a quick sample implementation that could be a baseline for further benchmarking.\r\n\r\nFeatures:\r\n- Powered by `skimage.feature.local_binary_pattern`\r\n- Concurrency is managed by Python's [`multiprocessing`](https://docs.python.org/3/library/multiprocessing.html) module\r\n- Parallel computation via `multiprocessing.Pool` of size `ncpus`\r\n- Efficient memory usage via  `multiprocessing.shared_memory` to make sure processes do not create redundant copies of data\r\n- It computes everything in RAM, no filesystem usage\r\n\r\nTODO: \r\n- Use `max_ram` parameter to estimate optimal number of sub-processes and collect memory stats. Now `max_ram` **is ignored**.\r\n\r\n## Planned modules\r\n### run_chunked_skimage\r\nSimilar to [1. run_skimage](#1-run_skimage), but each subprocess should compute LBP for its image chunk, not the whole image.\r\n\r\n### run_dask and run_chunked_dask\r\nSimilar to [1. run_skimage](#1-run_skimage), but use [Dask](https://docs.dask.org/en/stable/) and [`dask.array.map_overlap`](https://docs.dask.org/en/stable/generated/dask.array.map_overlap.html#dask.array.map_overlap) for parallelisation instead of `multiprocessing` and manual data wrangling\r\n\r\n## Other notable things to try\r\n- 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](https://github.com/imbg-ua/nf-img-benchmarking/blob/main/skimage_lbp/skimage_lbp.pyx))\r\n- Do some research on Numba - is it applicable here?\r\n- Add annotations to run_skimage results using [`anndata`](https://anndata.readthedocs.io/en/latest/)\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Parallel multiradial LBP features",
    "version": "0.1.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/imbg-ua/fastLBP/issues",
        "Homepage": "https://github.com/imbg-ua/fastLBP"
    },
    "split_keywords": [
        "lbp",
        " texture",
        " features",
        " image processing",
        " parallel"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "05208b98b570571d4ba6432a9e0b13b589c12110637b8166ed8e94c54f19561e",
                "md5": "f3e7755d56a25735ad6ba41452a8d217",
                "sha256": "a88f6939676118f20acd58e086edaeec642ea7f8c12db0381f4f37d061ce6877"
            },
            "downloads": -1,
            "filename": "fastlbp_imbg-0.1.2-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "f3e7755d56a25735ad6ba41452a8d217",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11",
            "size": 124015,
            "upload_time": "2024-04-19T19:14:42",
            "upload_time_iso_8601": "2024-04-19T19:14:42.543413Z",
            "url": "https://files.pythonhosted.org/packages/05/20/8b98b570571d4ba6432a9e0b13b589c12110637b8166ed8e94c54f19561e/fastlbp_imbg-0.1.2-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c97a349f52eb2960898c19cd68f8229da164121b9bbbb195e5227b6da314c81f",
                "md5": "16a216af745049205bbea3022d326f5a",
                "sha256": "93bf58bf6c78ff10ceb606a6d7454e0c30b4a560533e3fbe21c6e9152ff49c31"
            },
            "downloads": -1,
            "filename": "fastlbp_imbg-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "16a216af745049205bbea3022d326f5a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 205831,
            "upload_time": "2024-04-19T19:14:44",
            "upload_time_iso_8601": "2024-04-19T19:14:44.359098Z",
            "url": "https://files.pythonhosted.org/packages/c9/7a/349f52eb2960898c19cd68f8229da164121b9bbbb195e5227b6da314c81f/fastlbp_imbg-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-19 19:14:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "imbg-ua",
    "github_project": "fastLBP",
    "github_not_found": true,
    "lcname": "fastlbp-imbg"
}
        
Elapsed time: 0.24033s