DepthAI Nodes
DepthAI Nodes
Overview
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:nodefor host-side pipeline componentsmessagefor richer message types used by those components
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-nodesCommand Line
1git clone git@github.com:luxonis/depthai-nodes.git
2cd depthai-nodes
3pip install .Modules
Node
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
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:HostParsingNeuralNetworkfor a host-side version of the same workflowParserGeneratorwhen you need to generate parser nodes from an NN Archive
Parsers
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.| 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
| Node | Task | Purpose |
|---|---|---|
BaseHostNode | Abstract Class | Host node base class |
BaseThreadedHostNode | Abstract Class | Threaded host node base class |
ApplyColormap | Image Processing | Applies a colormap |
ApplyDepthColormap | Image Processing | Applies percentile-normalized depth or disparity coloring |
DepthMerger | Image Processing | Merges depth and detections |
FrameCropper | Image Processing | Crops and resizes image regions from detections or upstream manip-config groups |
ImgFrameOverlay | Image Processing | Overlays two images |
Tiling | Image Processing | Produces tiled dai.ImageManipConfig groups for downstream cropping pipelines |
ExtendedNeuralNetwork | Neural Network Processing | Convenience wrapper around dai.node.NeuralNetwork for model-zoo and NN archive sources |
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 |
CoordinatesMapper | Detection and Filtering | Remaps coordinates between image-transformation spaces for supported messages |
HostSpatialsCalc | Detection and Filtering | Computes host-side spatial coordinates using depth data and calibration information |
ImgDetectionsFilter | Detection and Filtering | Filters detections message |
InstanceToSemanticMask | Detection and Filtering | Converts instance-id masks into semantic masks |
GatherData | Data Management | Gathers messages into one |
MessageCollector | Data Management | Collects same-timestamp messages from a stream into a single collection |
SnapsUploader | Cloud Integration | Uploads SnapData messages to the Luxonis Hub Events API |
Message
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 Type | Stores |
|---|---|
Classifications | Object class labels with probability scores |
Cluster | A group of related points |
Clusters | Multiple Cluster objects |
Collection | A typed collection of messages or other same-type items |
GatheredData | Reference data together with the gathered messages for that reference |
Keypoints | Keypoints together with optional skeleton edges |
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 |
SnapData | Single snap event with files, tags, and extra metadata for Luxonis Hub upload |