-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added basic docs and config * added docs worflow
- Loading branch information
Showing
15 changed files
with
152 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: mkdocs | ||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure Git Credentials | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- run: pip install mkdocs-material | ||
- run: mkdocs gh-deploy --force |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
# Documentation | ||
--- | ||
title: Welcome | ||
--- | ||
|
||
# Welcome to Feature Forest Documentation | ||
|
||
Feature Forest (**FF**) is a *[napari]* plugin for creating image annotations with less manual work, utilizing image embeddings (*features*) of vision transformer models like *[SAM2]* and training a *Random Forest* model using a little scribble labels provided by the user. | ||
|
||
### Overview | ||
![figure 1](assets/fig1.png) | ||
|
||
## How to use the plugin | ||
This plugin provides four widgets; one for extracting the SAM embeddings and three for segmentation using different methods: | ||
- [SAM Embedding Extractor](./widgets.md#sam-embedding-extractor-widget) | ||
- [SAM-RF Widget](./widgets.md#sam-rf-widget) | ||
- [Notes](./widgets.md#notes) | ||
- [SAM Prompt Segmentation Widget](./widgets.md#sam-prompt-segmentation-widget) | ||
- [SAM Predictor Widget](./widgets.md#sam-predictor-widget) | ||
<br><br> | ||
|
||
## Overview of SAM-RF Segmentation | ||
![extraction process](images/extract_process.jpg) | ||
|
||
![training process](images/training_process.jpg) | ||
|
||
![prediction process](images/prediction_process.jpg) | ||
[napari]: https://napari.org/ | ||
[SAM2]: https://ai.meta.com/sam2/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
title: Installation | ||
--- | ||
|
||
## Easy Way! | ||
To install this plugin you need to use [mamba] or [conda] to create a environment and install the requirements. Use the commands below to create the environment and install the plugin: | ||
```bash | ||
# for GPU | ||
mamba env create -f ./env_gpu.yml | ||
``` | ||
```bash | ||
# if you don't have a GPU | ||
mamba env create -f ./env_cpu.yml | ||
``` | ||
|
||
### Note | ||
You need to install `sam-2` which can be installed easily using mamba (or conda). To install `sam-2` using `pip` please refer to the official [sam-2](https://github.com/facebookresearch/sam2) repository. | ||
|
||
## Requirements | ||
- `python >= 3.10` | ||
- `numpy==1.24.4` | ||
- `opencv-python` | ||
- `scikit-learn` | ||
- `scikit-image` | ||
- `matplotlib` | ||
- `pyqt` | ||
- `magicgui` | ||
- `qtpy` | ||
- `napari` | ||
- `h5py` | ||
- `pytorch=2.3.1` | ||
- `torchvision=0.18.1` | ||
- `timm=1.0.9` | ||
- `pynrrd` | ||
- `segment-anything` | ||
- `sam-2` | ||
|
||
If you want to install the plugin manually using GPU, please follow the pytorch installation instruction [here](https://pytorch.org/get-started/locally/). | ||
For detailed napari installation see [here](https://napari.org/stable/tutorials/fundamentals/installation). | ||
|
||
## Installing Only The Plugin | ||
If you use the provided conda environment yaml files, 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: | ||
```bash | ||
git clone https://github.com/juglab/featureforest | ||
``` | ||
Then run the following commands: | ||
```bash | ||
cd ./featureforest | ||
pip install . | ||
``` | ||
|
||
[PyPI]: https://pypi.org/ | ||
[conda]: https://conda.io/projects/conda/en/latest/index.html | ||
[mamba]: https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.md-typeset code { | ||
font-size: 90%; | ||
font-weight: 600; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
site_name: Feature Forest Documents | ||
site_url: https://juglab.github.io/featureforest | ||
extra_css: | ||
- stylesheets/extra.css | ||
theme: | ||
name: material | ||
features: | ||
- navigation.footer | ||
- navigation.sections | ||
- navigation.instant | ||
- navigation.instant.progress | ||
- content.code.copy | ||
# logo: assets/logo.png | ||
# favicon: images/favicon.png | ||
icon: | ||
repo: fontawesome/brands/git-alt | ||
font: | ||
text: Parkinsans | ||
code: Fira Code | ||
palette: | ||
# Palette toggle for dark mode | ||
- scheme: slate | ||
primary: green | ||
accent: cyan | ||
toggle: | ||
icon: material/brightness-4 | ||
name: Switch to light mode | ||
|
||
# Palette toggle for light mode | ||
- scheme: default | ||
primary: green | ||
accent: cyan | ||
toggle: | ||
icon: material/brightness-7 | ||
name: Switch to dark mode | ||
|
||
extra: | ||
version: | ||
provider: mike | ||
social: | ||
- icon: fontawesome/brands/github-alt | ||
link: https://github.com/juglab/featureforest | ||
|
||
repo_url: https://github.com/juglab/featureforest | ||
repo_name: juglab/featureforest | ||
|
||
markdown_extensions: | ||
- pymdownx.highlight: | ||
anchor_linenums: true | ||
line_spans: __span | ||
pygments_lang_class: true | ||
- pymdownx.inlinehilite | ||
- pymdownx.snippets | ||
- pymdownx.superfences |