Skip to content

Hyperspectral Image Segmentation

Authors: Lars Doorenbos (NVIDIA)
Supported platforms: x86_64, aarch64
Last modified: March 18, 2025
Language: Python
Latest version: 1.0
Minimum Holoscan SDK version: 0.6.0
Tested Holoscan SDK versions: 0.6.0
Contribution metric: Level 2 - Trusted


This application segments endoscopic hyperspectral cubes into 20 organ classes. It visualizes the result together with the RGB image corresponding to the cube.

Data and Models

The data is a subset of the HeiPorSPECTRAL dataset. The application loops over the 84 cubes selected. The model is the 2022-02-03_22-58-44_generated_default_model_comparison checkpoint from this repository, converted to ONNX with the script in utils/convert_to_onnx.py.

📦️ (NGC) App Data and Model for Hyperspectral Segmentation. This resource is automatically downloaded when building the application.

Run Instructions

This application requires some python modules to be installed. For simplicity, a Dockerfile is available. To generate the container run:

./dev_container build --docker_file ./applications/hyperspectral_segmentation/Dockerfile
The application can then be built by launching this container and using the provided run script.
./dev_container launch
./run build hyperspectral_segmentation
Once the application is built it can be launched with the run script.
./run launch hyperspectral_segmentation

Viewing Results

With the default settings, the results of this application are saved to result.png file in the hyperspectral segmentation app directory. Each time a new image is processed, it overwrites result.png. By opening this image while the application is running, you can see the results as the updates are made (may depend on your image viewer).