ON THIS PAGE

  • Overview
  • Installation
  • Modules
  • Node
  • Message

DepthAI Nodes

Overview

In DepthAI pipelines, messages are used to send information between nodes. While DepthAI natively supports many message and node types, some use cases need extra host-side components for postprocessing, filtering, visualization, or higher-level pipeline composition.depthai-nodes is an open-source Python library of host-side nodes and message types for DepthAI v3 pipelines. It extends standard DepthAI workflows with parser, utility, and helper nodes that run on the host machine while remaining compatible with the rest of the pipeline.The library is organized into two main modules:
  • node for host-side pipeline components
  • message for richer message types used by those components
For more examples and package-level documentation, see the GitHub repository and the API reference.

Installation

depthai-nodes requires Python 3.10 or newer and is intended for depthai v3 pipelines.Install it from PyPI with:
Command Line
1pip install depthai-nodes
If you want to work from source, clone the repository and install it locally:
Command Line
1git clone git@github.com:luxonis/depthai-nodes.git
2cd depthai-nodes
3pip install .

Modules

Node

The node module provides a collection of custom node objects that extend the functionality of standard DepthAI nodes. These nodes are grouped into parser, utility, and helper categories.

Typical workflow

For most AI use cases, ParsingNeuralNetwork is the main entry point. It creates the underlying NeuralNetwork node together with the parser nodes required for the selected model. Model sources can be provided as a Luxonis Models reference, a local NN Archive, or a dai.NNModelDescription.Related helpers include:
  • HostParsingNeuralNetwork for a host-side version of the same workflow
  • ParserGenerator when you need to generate parser nodes from an NN Archive

Parsers

Parser nodes are used to interpret the outputs of AI models. Their primary purpose is to encapsulate and abstract away postprocessing logic, allowing users to interact directly with clean, structured outputs. Depending on the parser, outputs can be standard DepthAI messages such as dai.ImgDetections, dai.TrackedFeatures, or dai.ImgFrame, or custom depthai_nodes.message types.Below is an overview of the available parser nodes, along with their corresponding tasks and usage examples. We list only a small fraction of examples as many more are available on Luxonis Models. For detailed information on each individual parser, please refer to the Parser Node documentation.
ParserTaskUsage Example
YOLOExtendedParserObject DetectionYOLOv8 Instance Segmentation Nano, YOLOv8 Nano Pose Estimation
YuNetParserObject DetectionYuNet
SCRFDParserObject DetectionSCRFD Person detection
MPPalmDetectionParserObject DetectionMediaPipe Palm Detection
PPTextDetectionParserObject DetectionPaddle Text Detection
ClassificationParserClassificationEfficientNet-Lite
ClassificationSequenceParserClassificationPaddle Text Recognition
SegmentationParserSegmentationDeepLab-V3-Plus
FastSAMParserSegmentationFastSAM s
KeypointParserKeypoints DetectionMediaPipe Hand Landmarker
SuperAnimalParserKeypoints DetectionSuperAnimal Landmarker
HRNetParserKeypoints DetectionLite-HRNet
XFeatMonoParserFeature MatchingXFeat
XFeatStereoParserFeature MatchingXFeat
LaneDetectionParserOtherUltra Fast Lane Detection
MLSDParserOtherM-LSD
EmbeddingsParserOtherArcFace
RegressionParserOtherHead pose estimation
MapOutputParserOtherDepth Anything V2
ImageOutputParserOtherZero-DCE

Utility & Helpers

This group includes nodes designed to assist with common tasks such as data processing, filtering, and pipeline management. It also contains abstract base nodes that serve as templates for building custom node implementations.Below is a brief overview of the available utility and helper nodes, along with their corresponding tasks and usage explanations. You can find more information about each individual node in the Utility & Helper Nodes documentation.
NodeTaskPurpose
BaseHostNodeAbstract ClassHost node base class
BaseThreadedHostNodeAbstract ClassThreaded host node base class
ApplyColormapImage ProcessingApplies a colormap
ApplyDepthColormapImage ProcessingApplies percentile-normalized depth or disparity coloring
DepthMergerImage ProcessingMerges depth and detections
FrameCropperImage ProcessingCrops and resizes image regions from detections or upstream manip-config groups
ImgFrameOverlayImage ProcessingOverlays two images
TilingImage ProcessingProduces tiled dai.ImageManipConfig groups for downstream cropping pipelines
ExtendedNeuralNetworkNeural Network ProcessingConvenience wrapper around dai.node.NeuralNetwork for model-zoo and NN archive sources
ParsingNeuralNetworkNeural Network ProcessingCreates a NeuralNetwork node and relevant parser(s) for the given model
HostParsingNeuralNetworkNeural Network ProcessingHost-side ParsingNeuralNetwork implementation
ParserGeneratorNeural Network ProcessingGenerates parsers from the given NN archive
CoordinatesMapperDetection and FilteringRemaps coordinates between image-transformation spaces for supported messages
HostSpatialsCalcDetection and FilteringComputes host-side spatial coordinates using depth data and calibration information
ImgDetectionsFilterDetection and FilteringFilters detections message
InstanceToSemanticMaskDetection and FilteringConverts instance-id masks into semantic masks
GatherDataData ManagementGathers messages into one
MessageCollectorData ManagementCollects same-timestamp messages from a stream into a single collection
SnapsUploaderCloud IntegrationUploads SnapData messages to the Luxonis Hub Events API

Message

The message module provides a set of custom message types that extend the standard DepthAI messages. These custom types make it easier to work with the outputs of various AI models and integrate them into visualization or processing pipelines.Here is a quick overview of the message types currently implemented in the library. For field-level details, see the Message Type documentation and the API reference.
Message TypeStores
ClassificationsObject class labels with probability scores
ClusterA group of related points
ClustersMultiple Cluster objects
CollectionA typed collection of messages or other same-type items
GatheredDataReference data together with the gathered messages for that reference
KeypointsKeypoints together with optional skeleton edges
LineLine coordinates with confidence
LinesMultiple Line objects
Map2D2D float array
PredictionSingle float value
PredictionsMultiple Prediction objects
SegmentationMask2D integer array
SnapDataSingle snap event with files, tags, and extra metadata for Luxonis Hub upload