DepthAI Nodes
Overview
In DepthAI pipelines, Message objects are used to send information between Nodes. While DepthAI natively supports a variety of message and node types, some use cases—such as deploying custom AI models or executing specialized tasks—may require components beyond the built-in capabilities.To address these needs, we provide an open-source Python library calleddepthai-nodes
. It offers custom elements fully compatible with DepthAI pipelines, differing only in that they execute on the host machine instead of on Luxonis device.The library consists of two primary modules: node
and message
, each serving distinct roles in pipeline composition. For more comprehensive documentation and examples, please refer to the library's GitHub repository.Installation
The package is hosted on PyPI so it can be installed with pip:Command Line
1pip install depthai-nodes
Modules
Node
Thenode
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.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. Thus, each parser node emits a DepthAI-compatible Message containing the parsed data.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.Parser | Task | Usage Example |
---|---|---|
YOLOExtendedParser | Object Detection | YOLOv8 Instance Segmentation Nano, YOLOv8 Nano Pose Estimation |
YuNetParser | Object Detection | YuNet |
SCRFDParser | Object Detection | SCRFD Person detection |
MPPalmDetectionParser | Object Detection | MediaPipe Palm Detection |
PPTextDetectionParser | Object Detection | Paddle Text Detection |
ClassificationParser | Classification | EfficientNet-Lite |
ClassificationSequenceParser | Classification | Paddle Text Recognition |
SegmentationParser | Segmentation | DeepLab-V3-Plus |
FastSAMParser | Segmentation | FastSAM s |
KeypointParser | Keypoints Detection | MediaPipe Hand Landmarker |
SuperAnimalParser | Keypoints Detection | SuperAnimal Landmarker |
HRNetParser | Keypoints Detection | Lite-HRNet |
XFeatMonoParser | Feature Matching | XFeat |
XFeatStereoParser | Feature Matching | XFeat |
LaneDetectionParser | Other | Ultra Fast Lane Detection |
MLSDParser | Other | M-LSD |
EmbeddingsParser | Other | ArcFace |
RegressionParser | Other | Head pose estimation |
MapOutputParser | Other | Depth Anything V2 |
ImageOutputParser | Other | Zero-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.Parser | Task | Purpose |
---|---|---|
BaseHostNode | Abstract Class | Host node base class |
ApplyColormap | Image Processing | Applies a colormap |
DepthMerger | Image Processing | Merges depth and detections |
ImgFrameOverlay | Image Processing | Overlays two images |
Tiling | Image Processing | Divides frames into overlapping tiles |
TilesPatcher | Image Processing | Patches detections from tiles back into the global frame |
ParsingNeuralNetwork | Neural Network Processing | Creates a NeuralNetwork node and relevant parser(s) for the given model |
HostParsingNeuralNetwork | Neural Network Processing | Host-side ParsingNeuralNetwork implementation |
ParserGenerator | Neural Network Processing | Generates parsers from the given NN archive |
ImgDetectionsBridge | Detection and Filtering | Transforms detections message |
ImgDetectionsFilter | Detection and Filtering | Filters detections message |
GatherData | Data Management | Gathers messages into one |
SnapsProducer | Data Management | Creates and sends snaps (any message type) |
SnapsProducerFrameOnly | Data Management | Creates and sends snaps (frame-only) |
Message
Themessage
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’s a quick overview of the available message types. You can find more information in the Message Type documentation.Message Type | Stores |
---|---|
Classifications | Object class labels with probability scores |
Cluster | A group of related points |
Clusters | Multiple Cluster objects |
ImgDetectionExtended | Bounding box with angle, label, keypoints, and confidence |
ImgDetectionsExtended | Multiple ImgDetectionExtended objects; includes segmentation masks |
Keypoint | A single keypoint with coordinates and probability |
Keypoints | Multiple Keypoint objects |
Line | Line coordinates with confidence |
Lines | Multiple Line objects |
Map2D | 2D float array |
Prediction | Single float value |
Predictions | Multiple Prediction objects |
SegmentationMask | 2D integer array |