Pixel Classification XGBoost

A plugin for pixel classification using XGBoost

  • Robert Haase

License BSD-3 PyPI Python Version tests codecov napari hub

A plugin for pixel classification using XGBoost, inspired by Digital Sreeni's Youtube video.

Note: This plugin is work-in-progress. Check out the github issues to see what's currently being worked on.

Usage

Load an example image into napari. Add a Labels layer by clicking on this button:

img.png

Then, draw a sparse annotation on the image. Try to draw thin lines on background and foreground, e.g. like this:

img_1.png

Then click the menu Layers > Segment > Train Pixel Classifier (XGBoost).

img_2.png

In the dialog, select the original image and the labels layer. Also enter a filename where the model should be saved. Afterwards, click on Run to explore the result.

img_3.png

Installation

You can install napari-xgboost via pip:

pip install napari-xgboost

To install latest development version :

pip install git+https://github.com/haesleinhuepf/napari-xgboost.git

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the BSD-3 license, "napari-xgboost" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

Version:

  • 0.1.0

Last updated:

  • 2024-07-05

First released:

  • 2024-07-05

License:

  • Copyright (c) 2024, Robert Haa...

Supported data:

  • Information not submitted

Plugin type:

Open extension:

Save extension:

Python versions supported:

Operating system:

  • Information not submitted

Requirements:

  • numpy
  • magicgui
  • qtpy
  • scikit-image
  • xgboost
  • apoc
  • tox ; extra == 'testing'
  • pytest ; extra == 'testing'
  • pytest-cov ; extra == 'testing'
  • pytest-qt ; extra == 'testing'
  • napari ; extra == 'testing'
  • pyqt5 ; extra == 'testing'
Website by the napari team, original design by CZI. Go to napari main website.