Skip to content
rapidsaiPublic

Latest commit

 

History

907 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

NVIDIA cuCIM

NVIDIA cuCIM (pronounced "koo-sim", see here) is an open-source, accelerated computer vision and image processing software library for multidimensional images used in biomedical, geospatial, material and life science, and remote sensing use cases.

cuCIM offers:

  • Enhanced Image Processing Capabilities for large and n-dimensional tag image file format (TIFF) files
  • Accelerated performance through Graphics Processing Unit (GPU)-based image processing and computer vision primitives
  • A Straightforward Pythonic Interface with Matching Application Programming Interface (API) for Openslide

cuCIM supports the following formats:

  • Aperio ScanScope Virtual Slide (SVS)
  • Philips TIFF
  • Generic Tiled, Multi-resolution RGB TIFF files with the following compression schemes:
    • No Compression
    • JPEG
    • JPEG2000
    • Lempel-Ziv-Welch (LZW)
    • Deflate

NOTE: For the latest stable README.md ensure you are on the main branch.

Developer Page

Blogs

Webinars

Documentation

Release notes are available on our wiki page.

Install cuCIM

Conda

conda create -n cucim -c rapidsai -c conda-forge cucim cuda-version=`<CUDA version>`

<CUDA version> should be 12.0+ (e.g., 12.0, etc.)

conda create -n cucim -c rapidsai-nightly -c conda-forge cucim cuda-version=`<CUDA version>`

<CUDA version> should be 12.0+ (e.g., 12.0, etc.)

Install for CUDA 12:

pip install cucim-cu12

Install for CUDA 13:

pip install cucim-cu13

Notebooks

Please check out our Welcome notebook (NBViewer)

Downloading sample images

To download images used in the notebooks, please execute the following commands from the repository root folder to copy sample input images into notebooks/input folder:

(You will need Docker installed in your system)

./run download_testdata

or

mkdir -p notebooks/input
tmp_id=$(docker create gigony/svs-testdata:little-big)
docker cp $tmp_id:/input notebooks
docker rm -v ${tmp_id}

cuslide2 Plugin

Note: cuslide is still the default plugin. cuslide2 is opt-in (see below) and is included in the pip wheels and in the conda packages (libcucim). It uses nvImageCodec for GPU-accelerated TIFF decoding and adds tile-level caching, async batch decoding, and broader format support. The original cuslide plugin is planned to be deprecated in favor of cuslide2, so please plan to migrate existing workflows to cuslide2.

Enabling cuslide2

To enable the cuslide2 plugin, set the ENABLE_CUSLIDE2 environment variable:

ENABLE_CUSLIDE2=1 python your_script.py

Requirements

The plugin decodes with nvImageCodec (>=0.10.0,<0.11.0) and needs its nvJPEG2000 and nvTIFF libraries to read JPEG 2000 and TIFF files, in addition to nvJPEG for JPEG.

  • pip: pip install cucim-cu13 (or cucim-cu12) installs nvidia-nvimgcodec-cu13[nvjpeg,nvjpeg2k,nvtiff] (-cu12 for CUDA 12). The plugin finds the nvImageCodec library in the nvidia/nvimgcodec directory of site-packages, and LD_LIBRARY_PATH does not have to be set. If you installed nvidia-nvimgcodec-cu13 without these extras, install them with pip install "nvidia-nvimgcodec-cu13[nvjpeg,nvjpeg2k,nvtiff]". Without them, nvImageCodec prints Failed to load nvtiff library! or Failed to load nvjpeg2k library!, and cuslide2 reports the wrong number of levels and tile sizes of (0, 0) or fails to read JPEG 2000 files.

  • Conda: The libcucim package includes cuslide2 and depends on the nvImageCodec and codec libraries. The plugin loads them from the active Conda environment's lib directory without setting LD_LIBRARY_PATH.

Test Scripts

The test scripts are in the cuCIM repository (scripts/) and are not installed with the packages. They use the cuslide2 plugin of a source build in the checkout if there is one, and the plugin of the installed package otherwise. They fail if the tile sizes of the image are (0, 0) or if all decoded tiles are zero.

cuCIM provides test scripts to verify cuslide2 functionality with different TIFF formats:

Aperio SVS files:

# Download a sample SVS file and run the test
python scripts/test_aperio_svs.py --download

# Or test with your own SVS file
ENABLE_CUSLIDE2=1 python scripts/test_aperio_svs.py /path/to/your/file.svs

Philips TIFF files:

# Test with a Philips TIFF file
ENABLE_CUSLIDE2=1 python scripts/test_philips_tiff.py /path/to/your/philips.tiff

# List available test options
python scripts/test_philips_tiff.py --help

Build/Install from Source

See build instructions.

Contributing Guide

Contributions to cuCIM are more than welcome! Please review the CONTRIBUTING.md file for information on how to contribute code and issues to the project.

Acknowledgments

Without awesome third-party open source software, this project wouldn't exist.

Please find LICENSE-3rdparty.md to see which third-party open source software is used in this project.

License

Apache-2.0 License (see LICENSE file).

Copyright (c) 2020-2026, NVIDIA CORPORATION.

Releases

Packages

Used by

Contributors

Languages