Skip to main content

napari-roxas-ai

License GNU GPL v3.0 PyPI Python Version tests codecov napari hub

A plugin that integrates the ROXAS AI analysis methods for quantitative wood anatomy in the napari platform.

Note: This plugin is currently under development and not yet stable nor officially released.


This napari plugin was generated with copier using the napari-plugin-template.

Installation

Environment setup

It's recommended to create a dedicated Python environment for napari-roxas-ai:

  1. Install Miniconda or Miniforge if you don't have it already:

  2. Create a new environment:

conda create -n roxas-ai python=3.12
conda activate roxas-ai

Installation

Install napari-roxas-ai via pip:

pip install napari-roxas-ai

Launching the plugin

Once installed, you can launch napari with the roxas-ai plugin (from within the activated environment):

napari

Verifying installation

To check if the plugin is working correctly:

  1. Go to File > Open Sample > ROXAS AI in the napari interface.
  2. The first time you open a sample, it may take some time as sample data and model weights are being downloaded. Progress will be logged in the terminal.
  3. After the downloads, a sample made of three layers should open in the viewer

GPU Support

Model inference runs on the CPU by default. CPU inference works everywhere but is slow on large images; enabling GPU acceleration is strongly recommended if you have a compatible GPU.

On Linux and Windows systems (NVIDIA GPUs): The default installation ships a CPU-only build of PyTorch. To enable your NVIDIA GPU, reinstall PyTorch from the CUDA wheel index:

pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128

This single command covers all recent NVIDIA GPUs (RTX 20-series and newer, including the RTX 50-series); the CUDA runtime is bundled with the wheels, so no separate CUDA toolkit installation is required. You only need an up-to-date NVIDIA driver (Linux, Windows). For older GPUs or drivers, pick the matching command from the PyTorch Installation Guide instead.

On macOS: CUDA is not available for macOS, however, PyTorch is supporting GPU acceleration for Apple Silicon devices (M1 and newer) via MPS. There is no need to install drivers or CUDA. Note that the MPS acceleration can currently only be leveraged for the cell segmentation model.

Finally, enable GPU support in the napari-roxas-ai settings within the napari interface. Go to Plugins > ROXAS AI > ZZ - Settings, open the processing section, tick try_to_use_gpu and try_to_use_autocast, and press Apply. The settings take effect immediately and no restart is needed, but a segmentation or measurement run that is already in progress keeps the settings it started with.

Contributing

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

Contributor Installation

In order to contribute to the development of the plugin the installation can be done as follows:

  1. Create an environment
conda create -n roxas-ai python=3.12
conda activate roxas-ai
  1. In the cloned / forked plugin directory, install the plugin dependencies
pip install -e .
  1. Install the testing dependencies, as well as the napari plugin engine
pip install -e ".[testing]"
pip install npe2
  1. Install pre-commit for quality checks
pip install pre-commit
pre-commit install

Documentation: Plugin Template and Development

You can find more information on the plugin template on the napari-plugin-template repository. You can find more information on plugin contributions and how to create plugins on the plugins section of the napari documentation.

License

Distributed under the terms of the GNU GPL v3.0 license, "napari-roxas-ai" is free and open source software

Issues

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

Metadata

Release files for napari-roxas-ai 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for napari-roxas-ai 0.2.0
File Size Uploaded
napari_roxas_ai-0.2.0.tar.gz 238.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for napari-roxas-ai 0.2.0
File Interpreter ABI Platform
napari_roxas_ai-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 492.3 kB

Release files / napari_roxas_ai-0.2.0.tar.gz

Download URL napari_roxas_ai-0.2.0.tar.gz
Size 238.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7aa305b7213ecfdbd86c98cbee2cf98880492c43b85b83922e1988677f028edb
BLAKE2b-256 checksum
How to use checksums
8514a5d423d57723599ca7ee1df3d159ad32377c7430a3a69c8549c38d3ce5de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / napari_roxas_ai-0.2.0-py3-none-any.whl

Download URL napari_roxas_ai-0.2.0-py3-none-any.whl
Size 254.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f0d7564d06701ff6582d145947f032eac74dfa70b0a18d5b56f1eed0fc9cd25
BLAKE2b-256 checksum
How to use checksums
bf5e3866c666151d9449aba07a940572c0e4c2c897415c06e63f85f0faa59b92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page