{"id":19102254,"url":"https://github.com/haesleinhuepf/napari-oclrfc","last_synced_at":"2025-07-24T14:13:46.938Z","repository":{"id":57444907,"uuid":"367709920","full_name":"haesleinhuepf/napari-oclrfc","owner":"haesleinhuepf","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-01T16:45:06.000Z","size":4166,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-28T20:06:15.587Z","etag":null,"topics":["napari-plugin"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haesleinhuepf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-15T19:02:27.000Z","updated_at":"2021-10-29T17:08:16.000Z","dependencies_parsed_at":"2022-09-26T17:30:39.626Z","dependency_job_id":null,"html_url":"https://github.com/haesleinhuepf/napari-oclrfc","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/haesleinhuepf/napari-oclrfc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesleinhuepf%2Fnapari-oclrfc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesleinhuepf%2Fnapari-oclrfc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesleinhuepf%2Fnapari-oclrfc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesleinhuepf%2Fnapari-oclrfc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haesleinhuepf","download_url":"https://codeload.github.com/haesleinhuepf/napari-oclrfc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesleinhuepf%2Fnapari-oclrfc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266854660,"owners_count":23995487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["napari-plugin"],"created_at":"2024-11-09T03:54:34.380Z","updated_at":"2025-07-24T14:13:46.845Z","avatar_url":"https://github.com/haesleinhuepf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Note: This is a decommissioned napari plugin \n\nThis project is discontinued. You can still install and use it (version 0.4.4 was last tested with napari 0.4.11) but this project is \nno longer maintained and supported. \n```python\nconda install pyopencl\npip install napari-oclrfc==0.4.4\n```\n\nCheck out [napari-accelerated-pixel-and-object-classification (APOC)](https://github.com/haesleinhuepf/napari-accelerated-pixel-and-object-classification)\nto learn more about this plugin's successor.\n\n---\n\n# napari-oclrfc\n\n[![License](https://img.shields.io/pypi/l/napari-oclrfc.svg?color=green)](https://github.com/haesleinhuepf/napari-oclrfc/raw/master/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-oclrfc.svg?color=green)](https://pypi.org/project/napari-oclrfc)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-oclrfc.svg?color=green)](https://python.org)\n[![tests](https://github.com/haesleinhuepf/napari-oclrfc/workflows/tests/badge.svg)](https://github.com/haesleinhuepf/napari-oclrfc/actions)\n[![codecov](https://codecov.io/gh/haesleinhuepf/napari-oclrfc/branch/master/graph/badge.svg)](https://codecov.io/gh/haesleinhuepf/napari-oclrfc)\n\n[py-clEsperanto](https://github.com/clEsperanto/pyclesperanto_prototype) meets [scikit-learn](https://scikit-learn.org/stable/)\n\nA yet experimental OpenCL-based Random Forest Classifier for pixel and labeled object classification in [napari].\n\n![](https://github.com/haesleinhuepf/napari-oclrfc/raw/master/images/screenshot.png)\nThe processed example image [maize_clsm.tif](https://github.com/dlegland/mathematical_morphology_with_MorphoLibJ/blob/master/sampleImages/maize_clsm.tif)\nis licensed by David Legland under \n[CC-BY 4.0 license](https://github.com/dlegland/mathematical_morphology_with_MorphoLibJ/blob/master/LICENSE)\n\nFor using OpenCL-based Random Forest Classifiers for pixel classification in python, check out [oclrfc](https://github.com/haesleinhuepf/oclrfc).\n\n\n----------------------------------\n\nThis [napari] plugin was generated with [Cookiecutter] using with [@napari]'s [cookiecutter-napari-plugin] template.\n\n## Installation\n\nYou can install `napari-oclrfc` via [pip]. Note: you also need [pyopencl](https://documen.tician.de/pyopencl/).\n\n    conda install pyopencl\n    pip install napari-oclrfc\n    \nIn case of issues in napari, make sure these dependencies are installed properly:\n    \n    pip install pyclesperanto_prototype\n    pip install oclrfc\n\n## Usage\n\nOpen an image in napari and add a labels layer. Annotate foreground and background with two different label identifiers. You can also add a third, e.g. a membrane-like region in between to improve segmentation quality.\n![img.png](https://github.com/haesleinhuepf/napari-oclrfc/raw/master/images/img.png)\n\nClick the menu `Plugins \u003e OpenCL Random Forest Classifiers \u003e Train pixel classifier`. \nConsider changing the `featureset`. There are three options for selecting \nsmall (about 1 pixel sized) objects, \nmedium (about 5 pixel sized) object and \nlarge (about 25 pixel sized) objects.\nMake sure the right image and annotation layers are selected and click on `Run`.\n\n![img_1.png](https://github.com/haesleinhuepf/napari-oclrfc/raw/master/images/img_1.png)\n\nThe classifier was saved as `temp.cl` to disc. You can later re-use it by clicking the menu `Plugins \u003e OpenCL Random Forest Classifiers \u003e Predict pixel classifier`\n\nOptional: Hide the annotation layer.\n\nClick the menu `Plugins \u003e OpenCL Random Forest Classifiers \u003e Connected Component Labeling`.\nMake sure the right labels layer is selected. It is supposed to be the result layer from the pixel classification.\nSelect the `object class identifier` you used for annotating objects, that's the intensity you drew on objects in the annotation layer.\nHint: If you want to analyse touching neigbors afterwards, activate the `fill gaps between labels` checkbox.\nClick on the `Run` button.\n![img_2.png](https://github.com/haesleinhuepf/napari-oclrfc/raw/master/images/img_2.png)\n\nOptional: Hide the pixel classification result layer. Change the opacity of the connected component labels layer.\n\nAdd a new labels layer and annotate different object classes by drawing lines through them. \nIn the following example objects with different size and shape were annotated in three classes:\n* round, small\n* round, large\n* elongated\n![img_3.png](https://github.com/haesleinhuepf/napari-oclrfc/raw/master/images/img_3.png)\n  \nClick the menu `Plugins \u003e OpenCL Random Forest Classifiers \u003e Train label classifier`. Select the right layers for training.\nThe labels layer should be the result from connected components labeling.\nThe annotation layer should be the just annotated object classes layer.\nSelect the right features for training. Click on the `Run` button. \nAfter training, the classifier will be stored to disc in the file you specified.\nYou can later re-use it by clicking the menu `Plugins \u003e OpenCL Random Forest Classifiers \u003e Predict label classifier`\n\n![img_5.png](https://github.com/haesleinhuepf/napari-oclrfc/raw/master/images/img_5.png)\n\nThis is an experimental napari plugin. Feedback is very welcome!\n\n## Contributing\n \nContributions are very welcome. Tests can be run with [tox], please ensure\nthe coverage at least stays the same before you submit a pull request.\n\n## License\n\nDistributed under the terms of the [BSD-3] license,\n\"napari-oclrfc\" is free and open source software\n\n## Issues\n\nIf you encounter any problems, please [open a thread on image.sc](https://image.sc) along with a detailed description and tag [@haesleinhuepf](https://github.com/haesleinhuepf).\n\n[napari]: https://github.com/napari/napari\n[Cookiecutter]: https://github.com/audreyr/cookiecutter\n[@napari]: https://github.com/napari\n[MIT]: http://opensource.org/licenses/MIT\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\n[GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt\n[GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt\n[Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0\n[Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt\n[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin\n[file an issue]: https://github.com/haesleinhuepf/napari-oclrfc/issues\n[napari]: https://github.com/napari/napari\n[tox]: https://tox.readthedocs.io/en/latest/\n[pip]: https://pypi.org/project/pip/\n[PyPI]: https://pypi.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaesleinhuepf%2Fnapari-oclrfc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaesleinhuepf%2Fnapari-oclrfc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaesleinhuepf%2Fnapari-oclrfc/lists"}