Skip to content
Skip to content
All examples

Legacy example · Python · Version 1.0

Colonoscopy Polyp Segmentation#

AuthorsHoloscan Team (NVIDIA)
Supported platformsx86_64, aarch64
LanguagePython
Version1.0
CompatibilityHSDK 4.6
Contribution levelLevel 1 · Very high-quality code
SourceHoloHub

Legacy HoloHub application

This application comes from HoloHub and was last tested with Holoscan SDK (HSDK) 4.6. It runs with the HoloHub CLI, ./holohub.

Full workflow including a generic visualization of segmentation results from a polyp segmentation models.

Quick Start#

Bash
./holohub run colonoscopy_segmentation

Requirements#

  • Python 3.8+
  • The provided applications are configured to either use the AJA capture card for input stream, or a pre-recorded video of the colonoscopy data (replayer). Follow the AJA Video Systems setup guide to use the AJA capture card.

Data#

📦️ (NGC) Sample App Data for AI Colonoscopy Segmentation of Polyps

The data is automatically downloaded and converted to the correct format when building the application. If you want to manually convert the video data, please refer to the instructions for using the convert_video_to_gxf_entities script.

Build Instructions#

To build the application in a runtime container:

Bash
./holohub build colonoscopy_segmentation

Or, to build the application in the host environment, install the application dependencies and then run:

Bash
./holohub build --local colonoscopy_segmentation

Run Instructions#

Application Presets#

To run the application with the pre-recorded colonoscopy sample video

Bash
./holohub run colonoscopy_segmentation replayer

To run the application with input from an AJA video capture card:

Bash
./holohub run colonoscopy_segmentation aja

Application Configurations#

To pass runtime arguments to the application:

Bash
./holohub run colonoscopy_segmentation --run-args="--contours --source=\"replayer\""

CLI Parameters#

Bash
usage: colonoscopy_segmentation.py [-h] [-s {replayer,aja}] [-c CONFIG] [-d DATA] [--contours | --no-contours]

Colonoscopy segmentation demo application.

options:
  -h, --help            show this help message and exit
  -s {replayer,aja}, --source {replayer,aja}
                        If 'replayer', replay a prerecorded video. If 'aja' use an AJA capture card as the source (default: replayer).
  -c CONFIG, --config CONFIG
                        Set config path to override the default config file location
  -d DATA, --data DATA  Set the data path
  --contours, --no-contours
                        Show segmentation contours instead of mask (default: False)
All examples