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.1

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.1
File Size Uploaded
napari_roxas_ai-0.2.1.tar.gz 240.1 kB Details

Built distribution (wheel)

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

Total release size: 496.3 kB

Release files / napari_roxas_ai-0.2.1.tar.gz

Download URL napari_roxas_ai-0.2.1.tar.gz
Size 240.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e005e894b3171181410515f1e422f822a16fd290d6e762cfd6e84edfbf97ca06
BLAKE2b-256 checksum
How to use checksums
b41f6972c94858f5d8cba8d6437ca23353848bf24cb95dce715480b9cd487e74
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.1-py3-none-any.whl

Download URL napari_roxas_ai-0.2.1-py3-none-any.whl
Size 256.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
addd3847586a4ffdb96b96ff3fcc50f14aaa7226b6001c45f470affe93d0cf7b
BLAKE2b-256 checksum
How to use checksums
90f1529db49d866462888ab19b2f33e295c98da58fbc3aa0c74d057e117850b1
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

This release

0.2.1 This release

2 release files

0.2.0

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