Skip to main content

A napari plugin for segmentation using vision transformer models' features

Project description

Feature Forest

License BSD-3 PyPI Python Version tests codecov napari hub

A napari plugin for segmentation using vision transformers' features.
We developed a napari plugin to train a Random Forest model using extracted embeddings of ViT models for input and just a few scribble labels provided by the user. This approach can do the segmentation of desired objects almost as well as manual segmentations but in a much shorter time with less manual effort.


Documentation

The plugin documentation is here.

Installation

It is highly recommended to use a python environment manager like conda to create a clean environment for installation.
You can install all the requirements using provided environment config files:

# for GPU
conda env create -f ./env_gpu.yml
# if you don't have a GPU
conda env create -f ./env_cpu.yml

Requirements

  • python >= 3.9
  • numpy
  • opencv-python
  • scikit-learn
  • scikit-image
  • matplotlib
  • pyqt
  • magicgui
  • qtpy
  • napari
  • h5py
  • pytorch=2.1.2
  • torchvision=0.16.2
  • timm=1.0.9
  • pynrrd

If you want to install the plugin manually using GPU, please follow the pytorch installation instruction here.
For detailed napari installation see here.

Installing The Plugin

If you use the conda env.yml file, the plugin will be installed automatically. But in case you already have the environment setup, you can just install the plugin. First clone the repository:

git clone https://github.com/juglab/featureforest

Then run the following commands:

cd ./featureforest
pip install .

License

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

Issues

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

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

featureforest-0.0.4.tar.gz (563.5 kB view details)

Uploaded Source

Built Distribution

featureforest-0.0.4-py3-none-any.whl (43.3 kB view details)

Uploaded Python 3

File details

Details for the file featureforest-0.0.4.tar.gz.

File metadata

  • Download URL: featureforest-0.0.4.tar.gz
  • Upload date:
  • Size: 563.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for featureforest-0.0.4.tar.gz
Algorithm Hash digest
SHA256 368d5d4ff773f043513feb82e1889424506ee8289c2384fc83db05c09d49842e
MD5 8a8115baa26b8b7ac3defdc48bcab416
BLAKE2b-256 b4a775d9c72c7e0d536d33f1c36cd23df58516ac9d3e97545d8026e5fd173171

See more details on using hashes here.

File details

Details for the file featureforest-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for featureforest-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d4d8a7de06d2e85e684debf9974bb1d8382864870c6da7e621765867c216497e
MD5 121092f95609b86ca9a09fc9a5f7295c
BLAKE2b-256 0b7a4ecebdfa91e9d8eecc34e9c9be531cfcd046bcd8e7c84e83380971e28581

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