DepthAI Python API
package
depthai
package
depthai.beta
module
node
Experimental nodes
class
ClassificationSequenceParserConfig
Runtime configuration for ClassificationSequenceParser.
class
class
Classifications
Classifications message. Carries classification class names and their corresponding scores. The classes and scores vectors are index-aligned. Parsers emit them sorted in descending order of score, so the first entry is the most probable class.
class
Cluster
Cluster of 2D points. Serialized value type contained by the Clusters message.
class
Clusters
Clusters message. Carries clusters of 2D points, each cluster with an integer label. Parsers emit clusters with sequential labels starting at 0 and point image coordinates normalized to [0, 1]. Clusters may be empty, e.g. lanes without enough detected points.
class
FastSAMParserConfig
Runtime configuration for FastSAMParser.
class
class
HRNetParserConfig
Runtime configuration for HRNetParser.
class
class
class
class
Keypoints
Keypoints message. Streamable wrapper around the native dai::KeypointsList, carrying 2D or 3D keypoints together with optional skeleton edges connecting them. Keypoint image coordinates are normalized to [0, 1] by the keypoint parsers. 2D keypoints carry a z coordinate of 0.
class
Line
Detected line segment. Serialized value type contained by the Lines message.
class
Lines
Lines message. Carries detected line segments, each with a start point, an end point and a confidence score. Parsers emit line point image coordinates normalized to [0, 1] and confidences clipped to [0, 1]. The message may carry no lines when nothing passes the detection thresholds.
class
MLSDParserConfig
Runtime configuration for MLSDParser.
class
class
MPPalmDetectionParserConfig
Runtime configuration for MPPalmDetectionParser.
class
class
Map2D
Map2D message. Carries a dense 2D map of 32-bit floats, such as a depth map, a density map or a heat map, together with image transformation metadata. The map values are stored row-major in the buffer payload; the map dimensions are carried in the serialized metadata.
class
MapOutputParserConfig
Runtime configuration for MapOutputParser.
class
class
PPTextDetectionParserConfig
Runtime configuration for PPTextDetectionParser.
class
class
Prediction
Single predicted value. Serialized value type contained by the Predictions message.
class
Predictions
Predictions message. Carries the predicted value(s) of a regression model in the order the model emitted them. The message may carry no predictions when the parsed tensor is empty.
class
RFDETRParserConfig
Runtime configuration for RFDETRParser.
class
class
SCRFDParserConfig
Runtime configuration for SCRFDParser.
class
class
StitchingProperties
Serializable properties for the Stitching node.
class
SuperAnimalParserConfig
Runtime configuration for SuperAnimalParser.
class
class
XFeatMonoParserConfig
Runtime configuration for XFeatMonoParser.
class
class
XFeatStereoParserConfig
Runtime configuration for XFeatStereoParser.
class
class
YuNetParserConfig
Runtime configuration for YuNetParser.
class
module
depthai.beta.node
class
ClassificationParser
ClassificationParser node. Parses the raw output of a classification neural network into a dai::beta::Classifications message with class names and scores sorted in descending order of score. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. Raw scores are dequantized and flattened; when the model output is not already softmaxed, the parser applies softmax to convert the scores to probabilities.
class
ClassificationSequenceParser
ClassificationSequenceParser node. Parses the raw output of a classification sequence neural network into a dai::beta::Classifications message with class names and scores ordered by their position in the sequence. The model predicts the classes multiple times and returns a list of predicted classes, where each item corresponds to the relative step in the sequence. In addition to time series classification, this parser can also be used for text recognition models where words can be interpreted as a sequence of characters (classes). The parser consumes a single output tensor of shape (sequenceLength, nClasses), (1, sequenceLength, nClasses) or (sequenceLength, nClasses, 1). When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. Raw scores are dequantized; when the model output is not already softmaxed, the parser applies softmax along each sequence step to convert the scores to probabilities.
class
EmbeddingsParser
EmbeddingsParser node. Validates the raw output of an embeddings neural network model head and forwards it unchanged as a dai::NNData message. The parser expects a single output tensor carrying the embedding vector. When the output layer name is left unconfigured, every incoming NNData must contain exactly one tensor; otherwise the message is rejected. The message itself is forwarded without modification, so all tensors, sequence number, timestamps, and image transformation metadata are preserved.
class
FastSAMParser
FastSAMParser node. Parses the output of the FastSAM segmentation model (https://github.com/CASIA-IVA-Lab/FastSAM) into a dai::SegmentationMask message where each pixel holds the index of the instance it belongs to and 255 marks background. The parser consumes the model's YOLO detection outputs (NCHW tensors of shape (1, numClasses + 5, gridH, gridW), sorted by layer name and decoded anchorless with strides 8/16/32), the per-head mask-coefficient outputs (NCHW tensors of shape (1, numPrototypes, gridH, gridW), sorted by layer name) and the prototype masks output (NCHW tensor of shape (1, numPrototypes, protoH, protoW)). The model input size is derived from the first (stride-8) YOLO output's grid times 8; the number of prototypes from the protos tensor's channel count. Boxes pass confidence filtering and non-maximum suppression, boxes within 20 pixels of the image border are snapped to it, and a box overlapping the full image with IoU > 0.9 is replaced by the full-image box. Each kept detection's mask is combined from the prototypes, resized to the model input size with nearest-neighbor interpolation, cropped to its box and binarized with the mask confidence threshold. The prompt selects the emitted instances: "everything" keeps all detections (later, lower-confidence instances overwrite earlier ones on overlapping pixels), "bbox" keeps the single mask with the highest IoU against the prompt bounding box, and "point" combines the masks containing the prompt point (added for point label 1, subtracted for 0). With no detections, a fully-background mask is emitted.
class
HRNetParser
HRNetParser node. Parses the heatmap output of an HRNet pose estimation neural network into a dai::beta::Keypoints message. The decoding is inspired by https://github.com/ibaiGorordo/ONNX-HRNET-Human-Pose-Estimation. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The tensor is read in NCHW orientation regardless of its stored order; after squeezing a leading batch dimension of 1 it must be a 3D tensor of shape (numKeypoints, height, width). The number of keypoints and the heatmap size are derived from the tensor shape. Per heatmap, the keypoint is the position of the maximum value normalized by the heatmap size and the keypoint's score is the maximum value clipped to [0, 1]. Keypoints with a score below the score threshold are dropped and the skeleton edges are remapped to the kept keypoints.
class
ImageOutputParser
ImageOutputParser node. Parses the output of image-to-image models (e.g. DnCNN3, zero-dce) where the output is a modified image (denoised, enhanced etc.) into a dai::ImgFrame message. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The tensor is read in its stored order; after squeezing a leading batch dimension of 1 it must be a 3D image tensor in CHW or HWC orientation, with the channel dimension equal to 1 (grayscale) or 3 (color). All dimensions are derived from the runtime tensor descriptor. The values are min-max normalized and scaled to the [0, 255] 8-bit range. A grayscale image is emitted as a GRAY8 frame. A color image is emitted as a BGR888p frame when the pipeline's default device platform is RVC2 and as a BGR888i frame otherwise, including in a device-less pipeline. The model output is treated as RGB and converted to BGR unless the BGR-output flag marks it as already BGR.
class
ImgDetectionsFilter
Experimental node for filtering image detections.
class
KeypointParser
KeypointParser node. Parses the raw output of a 2D or 3D keypoints neural network into a dai::beta::Keypoints message. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The number of keypoints must be configured before the pipeline starts. The number of coordinates per keypoint (2 or 3) is derived from the tensor size and the configured number of keypoints. Keypoint coordinates are divided by the configured scale factor and clipped to [0, 1].
class
LaneDetectionParser
LaneDetectionParser node. Parses the output of an Ultra-Fast-Lane-Detection (UFLD) neural network, e.g. the CULane and TuSimple variants, into a dai::beta::Clusters message with one cluster of normalized points per lane, including empty clusters for lanes without enough detected points. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The tensor is read in its stored order and must be a 4D tensor of shape (batch, gridingNum + 1, clsNumPerLane, numLanes); the first batch entry is decoded. The row anchors, griding number and number of points per lane must be configured before the pipeline starts, either explicitly or through an NNArchive head. The input size must also be configured before the pipeline starts: building from a full NNArchive derives it from the model input's declared shape and layout (NHWC or NCHW), while building from a specific head requires setInputSize() because a head carries no model input metadata.
class
MLSDParser
MLSDParser node. Parses the output of the M-LSD line segment detection model into a dai::beta::Lines message with the detected lines and their confidence scores, ordered by descending score. The parser consumes two output tensors that must be configured before the pipeline starts, either explicitly or through an NNArchive head: the tpMap tensor, read in NCHW orientation as a 4D tensor of shape (batch, channels, height, width) whose channels 1 to 4 hold the line displacement maps of the first batch entry, and the heat tensor, flattened to one score per (height, width) grid position. The topK highest-scoring grid positions are decoded into candidate lines and kept when their score and length are strictly above the score and distance thresholds. Ties between equal heat scores are ordered following numpy's portable argpartition/argsort semantics. The emitted line coordinates are normalized by the model input size, which defaults to 512x512 (the input size of all known M-LSD models, hard-coded by the source parser); building from a full NNArchive derives it from the model input's declared shape and layout (NHWC or NCHW), and setInputSize() overrides it.
class
MPPalmDetectionParser
MPPalmDetectionParser node. Parses the output of the MediaPipe palm detection model into a dai::ImgDetections message containing the rotated bounding boxes, labels and confidence scores of the detected hands. The decoding is based on https://github.com/geaxgx/depthai_hand_tracker (MIT License). The parser consumes two output tensors and identifies them by their last dimension: the tensor with the larger last dimension holds the raw bounding boxes and is reshaped to (numAnchors, 18) rows of bounding box center/size plus 7 palm keypoint coordinate pairs; the tensor with the smaller last dimension holds the raw scores and is flattened to (numAnchors,). The scores are passed through a sigmoid and filtered with the confidence threshold, the kept rows are decoded against the model's SSD anchors generated from the configured scale (the model input size), converted to rectangles rotated to align the wrist to middle- finger direction with the rectangle's y-axis and expanded to squares, and non- maximum suppression keeps at most the configured maximum number of detections. The emitted bounding boxes are normalized to [0, 1].
class
MapOutputParser
MapOutputParser node. Parses the output of models that produce map outputs, such as depth maps (e.g. DepthAnything), density maps (e.g. DM-Count), heat maps, and similar, into a dai::beta::Map2D message. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The tensor is read in its stored order; leading dimensions of 1 are squeezed and the tensor must then be a 2D HW map, or a 3D HWN map with a singleton trailing dimension that is squeezed as well. All map dimensions are derived from the runtime tensor descriptor. When min-max scaling is enabled, the map values are scaled to the [0, 1] range; a constant map is left unchanged.
class
PPTextDetectionParser
PPTextDetectionParser node. Parses the output of the PaddlePaddle OCR text detection model into a dai::ImgDetections message containing the rotated bounding boxes and confidence scores of the detected text. The parser consumes a single probability-map output tensor of shape (1, 1, H, W) or (1, H, W, 1). The map is thresholded with the mask threshold into a binary text mask, the mask is dilated and its contours become rotated-rectangle candidates; when more contours than the maximum number of detections remain, the largest by area are kept. Rectangles smaller than 8 pixels on their smaller side are dropped, each candidate is scored with the mean probability inside its (slightly shrunk) corner polygon, candidates scoring below the confidence threshold are dropped, and the kept rectangles are expanded by sqrt(2) in both dimensions. The emitted bounding boxes are normalized to [0, 1] with angles in degrees rounded to whole numbers; the detections carry no labels.
class
RFDETRParser
RFDETRParser node. Parses the output of RF-DETR object detection models (https://github.com/roboflow/rf-detr) into a dai::ImgDetections message containing the bounding boxes, labels, confidence scores and, in segmentation mode, an instance segmentation mask, everything normalized to [0, 1]. The parser consumes 2 output tensors for detection (boxes, class logits) or 3 for instance segmentation (boxes, class logits, mask logits), in that order. When no output layer names are configured, all layer names of the incoming NNData are used in their reported order. The boxes tensor squeezes to (N, 4) with normalized (xCenter, yCenter, width, height) boxes, the logits tensor is (1, N, C) and the mask logits tensor squeezes to (N, maskHeight, maskWidth). Class probabilities are the sigmoid of the logits; per query the maximum probability is the score and its class the label. Detections are ordered by descending score, truncated to the maximum number of detections and kept when their score is strictly greater than the confidence threshold. In segmentation mode at most 255 instances fit into the mask, so the truncation is additionally capped at 255. Each detection's mask logits are passed through a sigmoid, cropped to its bounding box, binarized with the mask confidence threshold and resized to the model input size with nearest-neighbor interpolation; the pixels not claimed by an earlier (higher-scoring) detection receive the detection's index, with 255 marking background.
class
RegressionParser
RegressionParser node. Parses the output of a model with regression output (e.g. age-gender) into a dai::beta::Predictions message with the predicted value(s) in the order the model emitted them. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The tensor is dequantized and all its singleton dimensions are squeezed; the remaining values become the predictions, so any tensor with at most one non-singleton dimension is accepted regardless of rank (for example (1, 1, 1, 3), (1, 1) or (1,)) and an empty tensor yields a message with no predictions. A tensor with more than one non-singleton dimension after squeezing is rejected.
class
SCRFDParser
SCRFDParser node. Parses the output of SCRFD detection models (e.g. SCRFD face and person detection) into a dai::ImgDetections message containing the bounding boxes, labels, confidence scores and 5 keypoints per detected object, everything normalized to [0, 1]. The parser consumes three output tensors per configured feature stride, named score_{stride}, bbox_{stride} and kps_{stride}. The score tensor is flattened, the bbox tensor is paired 4 values per score (left, top, right, bottom distances from the anchor center) and the kps tensor 10 values per score (5 keypoint coordinate pairs), accepting both batched (1, N, C) and unbatched (N, C) tensors. Scores greater than or equal to the confidence threshold (inclusive) are kept, decoded against the anchor centers derived from the input size, the stride and the number of anchors, sorted by descending score and suppressed with the original SCRFD non-maximum suppression (+1 offset box areas, overlaps at most the IoU threshold survive). The anchor centers are cached across messages and refreshed when the input size, feature strides or number of anchors change.class
Stitching
Stitching node. Combines N time-synced image streams into a single stitched image. The node runs on the host by default and can run on an RVC4 device when selected with `setRunOnHost(false)`. Host execution requires depthai-core OpenCV support. Inputs are fixed at build() time and synced by an internal Sync subnode that follows the node's execution side, so host-mode sources may come from different devices. Two independent stitching modes are available: - `Mode::PANORAMA` wraps OpenCV's cv::Stitcher and registers the images from their content, so no calibration is needed, but the cameras have to overlap. - `Mode::PLANAR_PROJECTION` projects the images onto a plane given in the common origin frame of the inputs (bird's-eye view), driven purely by the calibration carried in the messages, so it also works without overlap. All input transformations must have the same origin camera socket.
class
SuperAnimalParser
SuperAnimalParser node. Parses the heatmap output of the SuperAnimal landmark neural network into a dai::beta::Keypoints message. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The tensor is read in its stored order and must be a 4D tensor of shape (batch, height, width, numKeypoints) with a batch size of exactly 1. The number of keypoints and the heatmap size are derived from the tensor shape; the configured number of keypoints is informational only and does not affect the decoding. Per keypoint, the keypoint is the position of the maximum heatmap value with a 0.5-pixel center offset, mapped to input-image pixels and normalized by the configured scale factor without clipping, and the keypoint's score is the heatmap value at that position, which must lie in [0, 1]. Keypoints with a score strictly below the score threshold are dropped and the skeleton edges are remapped to the kept keypoints.
class
ToFStereoFusion
Experimental node that fuses aligned ToF and neural stereo-depth measurements. The node configures its internal ToF, neural-depth, alignment, synchronization, and fusion-network stages when built from a left and right camera. @note This node is supported on RVC4 devices only. Creating it for an RVC2 device throws an exception.
class
XFeatMonoParser
XFeatMonoParser node. Parses the output of the XFeat model from one source (e.g. one camera) into a dai::TrackedFeatures message with the keypoints of a reference frame matched to the keypoints of the current frame. The parser consumes three output tensors, assigned from an NNArchive head by name substring or configured explicitly: the feature map (layer name containing "feats"), read in NCHW orientation as (1, descriptor size, height, width), the keypoint logits (name containing "keypoints"), read as (1, channels >= 64, height, width), and the reliability heat map (name containing "heatmaps"), read as (1, 1, height, width). Every frame is decoded into keypoints, scores and descriptors; the strongest keypoints (up to the maximum count) with a positive score are kept and their positions are scaled from the model input size to the original image size. The parser keeps a reference frame state: calling setTrigger() stores the next decoded result as the reference after that frame's message is emitted. Frames decoded while no reference is stored produce an empty TrackedFeatures message; afterwards each frame's keypoints are matched to the reference by mutual nearest-neighbor cosine similarity and emitted as feature pairs, where match i produces the reference position with id i and age 0 followed by the matched current position with id i and age 1. A frame whose keypoint heat map has no candidate produces an empty message and leaves the reference and the pending trigger untouched. The original image size must be configured before the pipeline starts, either through head metadata or with setOriginalSize().
class
XFeatStereoParser
XFeatStereoParser node. Parses the output of the XFeat model from two sources (e.g. two cameras - left and right) into a dai::TrackedFeatures message with the keypoints of the reference frame matched to the keypoints of the target frame. The parser consumes three output tensors per source, assigned from an NNArchive head by name substring or configured explicitly: the feature map (layer name containing "feats"), read in NCHW orientation as (1, descriptor size, height, width), the keypoint logits (name containing "keypoints"), read as (1, channels >= 64, height, width), and the reliability heat map (name containing "heatmaps"), read as (1, 1, height, width). Both sources share one layer, size and keypoint-count configuration. Each iteration consumes one reference message followed by one target message; the node performs no synchronization beyond these two sequential blocking reads. Both messages are decoded into keypoints, scores and descriptors; the strongest keypoints (up to the maximum count) with a positive score are kept and their positions are scaled from the model input size to the original image size. When the reference (checked first) or the target frame's keypoint heat map has no candidate, an empty TrackedFeatures message is emitted carrying that frame's timestamps and the reference frame's sequence number. Otherwise the reference keypoints are matched to the target keypoints by mutual nearest-neighbor cosine similarity and emitted as feature pairs, where match i produces the reference position with id i and age 0 followed by the matched target position with id i and age 1; the message carries the target frame's timestamps and the reference frame's sequence number, like the source parser. The original image size must be configured before the pipeline starts, either through head metadata or with setOriginalSize().
class
YuNetParser
YuNetParser node. Parses the output of the YuNet face detection model into a dai::ImgDetections message containing the bounding boxes, labels, confidence scores and 5 facial keypoints per detected face, everything normalized to [0, 1]. The decoding is based on https://github.com/Kazuhito00/YuNet-ONNX-TFLite- Sample (Apache License 2.0). The parser consumes three output tensors: a loc tensor with 14 values per anchor (2 bounding box center offsets, 2 bounding box size values and 5 keypoint coordinate offset pairs), a conf tensor with 2 values per anchor (non-face and face scores) and an iou tensor with 1 value per anchor. When a layer name is not configured, it is auto-detected from the incoming NNData as the single layer name starting with "loc", "conf" or "iou" respectively. The candidate scores are sqrt(conf face score * iou score clipped to [0, 1]); candidates with a score strictly greater than the confidence threshold are decoded against the YuNet anchors generated from the input size, suppressed with cv2.dnn.NMSBoxes- semantics non-maximum suppression (IoU threshold, maximum number of detections as the top-k limit) and emitted in descending score order. Keypoint coordinates are truncated to whole pixels before normalization, mirroring the source parser. The anchors are cached across messages and refreshed when the input size changes.
class
depthai.beta.node.ClassificationParser(depthai.DeviceNode)
method
method
getClasses(self) -> list[str]: list[str]Returns the class names to link with the classification scores.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
getSoftmax(self) -> bool: boolReturns whether the model output is treated as already softmaxed.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setClasses(self, classes: list
[
str
])Sets the class names to link with the classification scores. The class names are expected to be in the same order as the neural network's output. The number of class names must match the number of scores produced by the model. Parameter ``classes``: Vector of class names
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one ClassificationParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a ClassificationParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setSoftmax(self, isSoftmax: bool)Sets whether the model output is already softmaxed. When false, the parser applies softmax to convert the raw scores to probabilities. Parameter ``isSoftmax``: True when the model output is already softmaxed
property
input
Input NN results with classification data to parse.
property
out
Outputs Classifications message with classes and scores sorted in descending order of score.
class
depthai.beta.node.ClassificationSequenceParser(depthai.DeviceNode)
method
method
getClasses(self) -> list[str]: list[str]Returns the class names to link with the per-step classification scores.
method
getConcatenateClasses(self) -> bool: boolReturns whether the remaining classes are concatenated.
method
getIgnoredIndexes(self) -> list[int]: list[int]Returns the class indexes ignored during classification sequence generation.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
getRemoveDuplicates(self) -> bool: boolReturns whether consecutive duplicate classes are removed from the sequence.
method
getSoftmax(self) -> bool: boolReturns whether the model output is treated as already softmaxed.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setClasses(self, classes: list
[
str
])Sets the class names to link with the per-step classification scores. The class names are expected to be in the same order as the neural network's output. The number of class names must match the number of scores produced by the model at each sequence step. Parameter ``classes``: Vector of class names
method
setConcatenateClasses(self, concatenateClasses: bool)Sets whether the remaining classes are concatenated. Used mostly for text processing. When true and more than one class remains: when all remaining class names are at most one character long, they are joined and split on whitespace into words with a per-word mean score; otherwise all class names are joined into a single string with a " " separator and one mean score. Parameter ``concatenateClasses``: True to concatenate the remaining classes @note Configures startup behavior. Send ClassificationSequenceParserConfig to inputConfig after the pipeline starts.
method
setIgnoredIndexes(self, ignoredIndexes: list
[
int
])Sets the class indexes to ignore during classification sequence generation (e.g. background class, blank space). Sequence steps whose most probable class index is listed here are dropped from the output. Every index must be within [0, nClasses - 1]. Parameter ``ignoredIndexes``: Vector of class indexes to ignore @note Configures startup behavior. Send ClassificationSequenceParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one ClassificationSequenceParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a ClassificationSequenceParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRemoveDuplicates(self, removeDuplicates: bool)Sets whether consecutive duplicate classes are removed from the sequence. Only consecutive duplicates are removed; repeated classes separated by other classes are kept. Parameter ``removeDuplicates``: True to remove consecutive duplicates from the sequence @note Configures startup behavior. Send ClassificationSequenceParserConfig to inputConfig after the pipeline starts.
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setSoftmax(self, isSoftmax: bool)Sets whether the model output is already softmaxed. When false, the parser applies softmax along each sequence step to convert the raw scores to probabilities. Parameter ``isSoftmax``: True when the model output is already softmaxed
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with classification sequence data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs Classifications message with classes and scores ordered by their position in the sequence.
class
depthai.beta.node.EmbeddingsParser(depthai.DeviceNode)
method
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer carrying the embeddings.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one EmbeddingsParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an EmbeddingsParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer carrying the embeddings. When left empty, the parser requires the incoming NNData to contain exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
input
Input NN results with embeddings data to validate and forward.
property
out
Outputs the unchanged NNData message containing the embeddings output layer.
class
depthai.beta.node.FastSAMParser(depthai.DeviceNode)
method
method
getBoundingBox(self) -> typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(4)]|None: typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(4)]|NoneReturns the prompt bounding box as (x1, y1, x2, y2), or std::nullopt when it is not set.
method
getConfidenceThreshold(self) -> float: floatReturns the confidence score threshold for detected objects.
method
getIouThreshold(self) -> float: floatReturns the non-maximum suppression overlap threshold.
method
getMaskConfidence(self) -> float: floatReturns the mask confidence threshold.
method
getMaskOutputs(self) -> list[str]: list[str]Returns the names of the model's mask-coefficient output layers.
method
getNumClasses(self) -> int: intReturns the number of classes in the model.
method
getPointLabel(self) -> int|None: int|NoneReturns the prompt point label, or std::nullopt when it is not set.
method
getPoints(self) -> tuple[int, int]|None: tuple[int, int]|NoneReturns the prompt point as (x, y), or std::nullopt when it is not set.
method
getPrompt(self) -> str: strReturns the prompt type.
method
getProtosOutput(self) -> str: strReturns the name of the model's prototype-masks output layer.
method
getYoloOutputs(self) -> list[str]: list[str]Returns the names of the model's YOLO output layers.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setBoundingBox(self, bbox: typing.Annotated
[
list
[
int
]
,
pybind11_stubgen.typing_ext.FixedSize
(
4
)
])Sets the prompt bounding box as (x1, y1, x2, y2) in model-input pixels, used by the "bbox" prompt. Unset by default; the "bbox" prompt requires it and its x2 and y2 coordinates must not be 0. Parameter ``bbox``: Bounding box as (x1, y1, x2, y2) @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setConfidenceThreshold(self, threshold: float)Sets the confidence score threshold for detected objects. Detections whose score is strictly greater than the threshold are kept. Defaults to 0.5. Parameter ``threshold``: Confidence score threshold, must be between 0 and 1 @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setIouThreshold(self, iouThreshold: float)Sets the non-maximum suppression overlap threshold. Boxes whose overlap with a kept box is strictly greater than the threshold are suppressed. Defaults to 0.5. Parameter ``iouThreshold``: Overlap threshold, must be between 0 and 1 @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setMaskConfidence(self, maskConfidence: float)Sets the mask confidence threshold used to binarize instance masks. Mask pixels with a sigmoid probability strictly greater than the threshold belong to the instance. Defaults to 0.5. Parameter ``maskConfidence``: Mask confidence threshold, must be between 0 and 1 @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setMaskOutputs(self, maskOutputs: list
[
str
])Sets the names of the model's mask-coefficient output layers. Only names containing "mask" are used, sorted by name and index-aligned with the sorted YOLO output layers; when empty, all layer names of the incoming NNData containing "mask" are used. Defaults to ["output1_masks", "output2_masks", "output3_masks"]. Parameter ``maskOutputs``: Names of the mask output layers
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one FastSAMParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head's output layer names containing "_yolo" configure the YOLO output layers and those containing "_masks" the mask output layers (each only when at least one matches). The confidence threshold, number of classes, NMS threshold, mask confidence, prompt, points, point label and bounding box are read from the head metadata when present. Parameter ``head:``: NNArchive head to set
method
setNumClasses(self, numClasses: int)Sets the number of classes in the model. The YOLO output tensors must have numClasses + 5 channels. Defaults to 1. Parameter ``numClasses``: Number of classes, must be greater than 0
method
setPointLabel(self, pointLabel: int)Sets the prompt point label, used by the "point" prompt: 1 adds the instance masks containing the point, 0 subtracts them. Unset by default; the "point" prompt requires it. Parameter ``pointLabel``: Point label @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setPoints(self, x: int, y: int)Sets the prompt point as (x, y) in model-input pixels, used by the "point" prompt. Unset by default; the "point" prompt requires it. Parameter ``x``: Point x coordinate Parameter ``y``: Point y coordinate @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setPrompt(self, prompt: str)Sets the prompt type: "everything" emits every detected instance, "bbox" the single instance mask with the highest IoU against the prompt bounding box (see setBoundingBox()), and "point" the combination of the instance masks containing the prompt point (see setPoints() and setPointLabel()). Defaults to "everything". Parameter ``prompt``: Prompt type, one of "everything", "bbox" or "point" @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setProtosOutput(self, protosOutput: str)Sets the name of the model's prototype-masks output layer; when empty, "protos_output" is used. Defaults to "protos_output". Parameter ``protosOutput``: Name of the protos output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setYoloOutputs(self, yoloOutputs: list
[
str
])Sets the names of the model's YOLO output layers. The layers are processed sorted by name, so the stride-8 head must come first in sort order. Defaults to ["output1_yolov8", "output2_yolov8", "output3_yolov8"]. Parameter ``yoloOutputs``: Names of the YOLO output layers
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with FastSAM data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs SegmentationMask message with the resulting segmentation masks given the prompt.
class
depthai.beta.node.HRNetParser(depthai.DeviceNode)
method
method
getEdges(self) -> list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]Returns the skeleton edges as pairs of keypoint indices.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the keypoints.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
getScoreThreshold(self) -> float: floatReturns the confidence score threshold for detected keypoints.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setEdges(self, edges: list
[
typing.Annotated
[
list
[
int
]
,
pybind11_stubgen.typing_ext.FixedSize
(
2
)
]
])Sets the skeleton edges as pairs of keypoint indices used for visualizing the skeleton. Example: {{0, 1}, {1, 2}, {2, 3}, {3, 0}} connects keypoint 0 to keypoint 1, keypoint 1 to keypoint 2, etc. Parameter ``edges``: Vector of keypoint index pairsmethod
setLabelNames(self, labelNames: list
[
str
])Sets the label names for the keypoints, indexed by keypoint index. Parameter ``labelNames``: Vector of label names
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one HRNetParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an HRNetParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setScoreThreshold(self, threshold: float)Sets the confidence score threshold for detected keypoints. Keypoints with a score strictly below the threshold are dropped. Parameter ``threshold``: Confidence score threshold, must be between 0 and 1 @note Configures startup behavior. Send HRNetParserConfig to inputConfig after the pipeline starts.
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with heatmaps data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs Keypoints message with the detected body keypoints.
class
depthai.beta.node.ImageOutputParser(depthai.DeviceNode)
method
method
getBGROutput(self) -> bool: boolReturns the flag indicating whether the model output image is in BGR (Blue- Green-Red) channel order.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setBGROutput(self, outputIsBGR: bool = True)Sets the flag indicating whether the model output image is in BGR (Blue-Green- Red) channel order. When false (the default), a color model output is treated as RGB and its channels are swapped to BGR before being emitted. Parameter ``outputIsBGR``: True when the model output image is already BGR, defaults to true
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one ImageOutputParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an ImageOutputParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
input
Input NN results with image tensor data to parse.
property
out
Outputs ImgFrame message with the model output image, e.g. a denoised or enhanced image.
class
depthai.beta.node.ImgDetectionsFilter(depthai.DeviceNode)
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
initialConfig
Configuration used until a message is received on inputConfig. The default configuration forwards detections unchanged.
property
input
Image detections to filter.
property
inputConfig
Runtime filter configuration. The most recently received configuration is reused for subsequent detection messages.
property
output
Filtered image detections.
class
depthai.beta.node.KeypointParser(depthai.DeviceNode)
method
method
getEdges(self) -> list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]Returns the skeleton edges as pairs of keypoint indices.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the keypoints.
method
getNumKeypoints(self) -> int|None: int|NoneReturns the number of keypoints the model detects, or std::nullopt when not configured.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
getScaleFactor(self) -> float: floatReturns the scale factor to divide the keypoint coordinates by.
method
getScoreThreshold(self) -> float|None: float|NoneReturns the confidence score threshold for detected keypoints, or std::nullopt when not configured.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setEdges(self, edges: list
[
typing.Annotated
[
list
[
int
]
,
pybind11_stubgen.typing_ext.FixedSize
(
2
)
]
])Sets the skeleton edges as pairs of keypoint indices used for visualizing the skeleton. Example: {{0, 1}, {1, 2}, {2, 3}, {3, 0}} connects keypoint 0 to keypoint 1, keypoint 1 to keypoint 2, etc. Parameter ``edges``: Vector of keypoint index pairsmethod
setLabelNames(self, labelNames: list
[
str
])Sets the label names for the keypoints, indexed by keypoint index. Parameter ``labelNames``: Vector of label names
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one KeypointParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a KeypointParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setNumKeypoints(self, nKeypoints: int)Sets the number of keypoints the model detects. Must be configured before the pipeline starts, either explicitly or through an NNArchive head. Parameter ``nKeypoints``: Number of keypoints, must be greater than 0
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setScaleFactor(self, scaleFactor: float)Sets the scale factor to divide the keypoint coordinates by. Parameter ``scaleFactor``: Scale factor, must be greater than 0
method
setScoreThreshold(self, threshold: float)Sets the confidence score threshold for detected keypoints. Parameter ``threshold``: Confidence score threshold, must be between 0 and 1
property
input
Input NN results with keypoints data to parse.
property
out
Outputs Keypoints message with the parsed 2D or 3D keypoints.
class
depthai.beta.node.LaneDetectionParser(depthai.DeviceNode)
method
method
getClsNumPerLane(self) -> int|None: int|NoneReturns the number of points per lane, or std::nullopt when not configured.
method
getGridingNum(self) -> int|None: int|NoneReturns the griding number, or std::nullopt when not configured.
method
getInputSize(self) -> tuple[int, int]|None: tuple[int, int]|NoneReturns the model input image size as (width, height), or std::nullopt when not configured.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
getRowAnchors(self) -> list[int]: list[int]Returns the row anchors, or an empty vector when not configured.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setClsNumPerLane(self, clsNumPerLane: int)Sets the number of points per lane. Must be configured before the pipeline starts, either explicitly or through an NNArchive head. Parameter ``clsNumPerLane``: Number of points per lane, must be greater than 0
method
setGridingNum(self, gridingNum: int)Sets the griding number, the number of column samples the model predicts lane positions over. Must be configured before the pipeline starts, either explicitly or through an NNArchive head. Parameter ``gridingNum``: Griding number, must be greater than 1
method
setInputSize(self, width: int, height: int)Sets the model input image size the emitted points are computed against and normalized by. Must be configured before the pipeline starts. Configuring from a full NNArchive derives it from the model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one LaneDetectionParser head and exactly one model input; use setNNArchiveHead() to select a specific head from a multi-head archive. The input size is derived from the model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a LaneDetectionParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set @note A head carries no model input metadata, so the input size must additionally be configured with setInputSize().
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRowAnchors(self, rowAnchors: list
[
int
])Sets the row anchors, the image rows at which the model predicts lane positions. Must be configured before the pipeline starts, either explicitly or through an NNArchive head, and must contain at least as many entries as the number of points per lane. Parameter ``rowAnchors``: Row anchors, must not be empty
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
input
Input NN results with lane detection data to parse.
property
out
Outputs Clusters message with the detected lanes represented as clusters of points.
class
depthai.beta.node.MLSDParser(depthai.DeviceNode)
method
method
getDistanceThreshold(self) -> float: floatReturns the distance threshold for detected lines.
method
getInputSize(self) -> tuple[int, int]: tuple[int, int]Returns the model input image size as (width, height).
method
getOutputLayerHeat(self) -> str: strReturns the name of the output layer containing the heat tensor, or an empty string when not configured.
method
getOutputLayerTPMap(self) -> str: strReturns the name of the output layer containing the tpMap tensor, or an empty string when not configured.
method
getScoreThreshold(self) -> float: floatReturns the confidence score threshold for detected lines.
method
getTopK(self) -> int: intReturns the number of top candidates to keep.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setDistanceThreshold(self, distanceThreshold: float)Sets the distance threshold for detected lines. Candidates whose length in heat map grid units is strictly above the threshold are kept. Parameter ``distanceThreshold``: Distance threshold @note Configures startup behavior. Send MLSDParserConfig to inputConfig after the pipeline starts.
method
setInputSize(self, width: int, height: int)Sets the model input image size the emitted line coordinates are normalized by, x coordinates by the width and y coordinates by the height. Defaults to 512x512, the input size of all known M-LSD models. Configuring from a full NNArchive derives it from the model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one MLSDParser head and exactly one model input; use setNNArchiveHead() to select a specific head from a multi-head archive. The input size is derived from the model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an MLSDParser head with exactly two output layers; the layer whose name contains "tpMap" is used as the tpMap layer and the layer whose name contains "heat" as the heat layer. Parameter ``head:``: NNArchive head to set @note A head carries no model input metadata, so the input size keeps its current value (512x512 by default); use setInputSize() for models with a different input size.
method
setOutputLayerHeat(self, outputLayerHeat: str)Sets the name of the output layer containing the heat tensor. Must be configured before the pipeline starts, either explicitly or through an NNArchive head. Parameter ``outputLayerHeat``: Name of the output layer containing the heat tensor
method
setOutputLayerTPMap(self, outputLayerTPMap: str)Sets the name of the output layer containing the tpMap tensor. Must be configured before the pipeline starts, either explicitly or through an NNArchive head. Parameter ``outputLayerTPMap``: Name of the output layer containing the tpMap tensor
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setScoreThreshold(self, scoreThreshold: float)Sets the confidence score threshold for detected lines. Candidates with a heat score strictly above the threshold are kept. Parameter ``scoreThreshold``: Confidence score threshold @note Configures startup behavior. Send MLSDParserConfig to inputConfig after the pipeline starts.
method
setTopK(self, topK: int)Sets the number of top candidates to keep. The number of candidates is capped at the heat map size when decoding. Parameter ``topK``: Number of top candidates to keep, must be positive @note Configures startup behavior. Send MLSDParserConfig to inputConfig after the pipeline starts.
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with line detection data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs Lines message with the detected lines and confidence scores.
class
depthai.beta.node.MPPalmDetectionParser(depthai.DeviceNode)
method
method
getConfidenceThreshold(self) -> float: floatReturns the confidence score threshold for detected hands.
method
getIouThreshold(self) -> float: floatReturns the non-maximum suppression (IoU) threshold.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the detected hands.
method
getMaxDetections(self) -> int: intReturns the maximum number of detections to keep.
method
getOutputLayerNames(self) -> list[str]: list[str]Returns the names of the model output layers relevant to the parser.
method
getScale(self) -> int: intReturns the scale of the model input image in pixels.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setConfidenceThreshold(self, threshold: float)Sets the confidence score threshold for detected hands. Detections with a sigmoid score strictly above the threshold are kept. Parameter ``threshold``: Confidence score threshold @note Configures startup behavior. Send MPPalmDetectionParserConfig to inputConfig after the pipeline starts.
method
setIouThreshold(self, threshold: float)Sets the non-maximum suppression (IoU) threshold. Parameter ``threshold``: Non-maximum suppression threshold @note Configures startup behavior. Send MPPalmDetectionParserConfig to inputConfig after the pipeline starts.
method
setLabelNames(self, labelNames: list
[
str
])Sets the label names for the detected hands. The first label name is assigned to every detection (all detections carry label 0). When empty, no label name is assigned. Parameter ``labelNames``: List of label names
method
setMaxDetections(self, maxDetections: int)Sets the maximum number of detections to keep. Parameter ``maxDetections``: Maximum number of detections to keep @note Configures startup behavior. Send MPPalmDetectionParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one MPPalmDetectionParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an MPPalmDetectionParser head with exactly two output layers. Parameter ``head:``: NNArchive head to set
method
setOutputLayerNames(self, outputLayerNames: list
[
str
])Sets the names of the model output layers relevant to the parser. Exactly two layer names are required. Parameter ``outputLayerNames``: Names of the output layers
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setScale(self, scale: int)Sets the scale of the model input image in pixels (e.g. 192 for a 192x192 model). The SSD anchors used for decoding are generated from the scale; a scale that does not match the model input size fails decoding with an anchor count mismatch. Parameter ``scale``: Scale of the input image
property
initialConfig
Configuration used when the parser starts.
property
input
Input NN results with palm detection data to parse.
property
inputConfig
Runtime parser configuration. In synchronized mode one configuration is consumed per input frame; otherwise all queued configurations are drained and the newest valid one is retained.
property
out
Outputs ImgDetections message with the rotated bounding boxes, labels and confidence scores of the detected hands.
class
depthai.beta.node.MapOutputParser(depthai.DeviceNode)
method
method
getMinMaxScaling(self) -> bool: boolReturns the flag indicating whether the map is scaled to the [0, 1] range.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setMinMaxScaling(self, minMaxScaling: bool = True)Sets the flag indicating whether the map is scaled to the [0, 1] range. When true, the map values are min-max scaled to [0, 1]; a constant map is left unchanged. Defaults to false. Parameter ``minMaxScaling``: True to scale the map to the [0, 1] range, defaults to true @note Configures startup behavior. Send MapOutputParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one MapOutputParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a MapOutputParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with map tensor data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs Map2D message with the parsed 2D map, e.g. a depth or density map.
class
depthai.beta.node.PPTextDetectionParser(depthai.DeviceNode)
method
method
getConfidenceThreshold(self) -> float: floatReturns the confidence score threshold for the detected text bounding boxes.
method
getMaskThreshold(self) -> float: floatReturns the mask threshold for creating the binary text mask from the model output probabilities.
method
getMaxDetections(self) -> int: intReturns the maximum number of candidate bounding boxes.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer holding the text probability map.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setConfidenceThreshold(self, threshold: float)Sets the confidence score threshold for the detected text bounding boxes. Candidates with a score strictly below the threshold are dropped. Parameter ``threshold``: Confidence score threshold @note Configures startup behavior. Send PPTextDetectionParserConfig to inputConfig after the pipeline starts.
method
setMaskThreshold(self, maskThreshold: float)Sets the mask threshold for creating the binary text mask from the model output probabilities. Probabilities strictly above the threshold belong to the mask. Parameter ``maskThreshold``: Mask threshold @note Configures startup behavior. Send PPTextDetectionParserConfig to inputConfig after the pipeline starts.
method
setMaxDetections(self, maxDetections: int)Sets the maximum number of candidate bounding boxes. When more candidate contours are found, only the largest by area are kept. Parameter ``maxDetections``: Maximum number of candidate bounding boxes @note Configures startup behavior. Send PPTextDetectionParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one PPTextDetectionParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head configures the confidence threshold, the mask threshold and the maximum number of detections when present in its metadata. The head's declared output names are not consumed: the parser resolves the single runtime output tensor by itself (or uses the explicitly configured output layer name), mirroring the source parser; archives whose head output name differs from the model's declared output name therefore parse correctly. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer holding the text probability map. When empty (the default), the layer is resolved automatically from single-tensor NN results; multi-tensor results require an explicit name. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
initialConfig
Configuration used when the parser starts.
property
input
Input NN results with text detection probability map to parse.
property
inputConfig
Runtime parser configuration. In synchronized mode one configuration is consumed per input frame; otherwise all queued configurations are drained and the newest valid one is retained.
property
out
Outputs ImgDetections message with the rotated bounding boxes and confidence scores of the detected text.
class
depthai.beta.node.RFDETRParser(depthai.DeviceNode)
method
method
getConfidenceThreshold(self) -> float: floatReturns the confidence score threshold for detected objects.
method
getInputSize(self) -> tuple[int, int]|None: tuple[int, int]|NoneReturns the model input image size as (width, height), or std::nullopt when it is not set.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the detected objects.
method
getMaskConfidence(self) -> float: floatReturns the mask confidence threshold.
method
getMaxDetections(self) -> int: intReturns the maximum number of detections to keep.
method
getOutputLayerNames(self) -> list[str]: list[str]Returns the names of the model output layers.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setConfidenceThreshold(self, threshold: float)Sets the confidence score threshold for detected objects. Detections with a score strictly greater than the threshold are kept. Defaults to 0.5. Parameter ``threshold``: Confidence score threshold, must be between 0 and 1 @note Configures startup behavior. Send RFDETRParserConfig to inputConfig after the pipeline starts.
method
setInputSize(self, width: int, height: int)Sets the model input image size the segmentation mask is emitted at. Unset by default; segmentation mode requires it to be configured from an NNArchive or with this setter before the parser processes messages. Detection mode does not use it. Configuring from a full NNArchive derives it from the first model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setLabelNames(self, labelNames: list
[
str
])Sets the label names for the detected objects, indexed by the class label. A detection whose label is out of range receives the name "class_<label>". When empty, no label names are assigned. Defaults to empty. Parameter ``labelNames``: List of label names
method
setMaskConfidence(self, maskConfidence: float)Sets the mask confidence threshold used to binarize instance segmentation masks in segmentation mode. Mask pixels with a sigmoid probability strictly greater than the threshold belong to the instance. Defaults to 0.5. Parameter ``maskConfidence``: Mask confidence threshold, must be between 0 and 1 @note Configures startup behavior. Send RFDETRParserConfig to inputConfig after the pipeline starts.
method
setMaxDetections(self, maxDetections: int)Sets the maximum number of detections to keep, applied to the detections ordered by descending score. In segmentation mode the applied limit is additionally capped at 255, the maximum number of instances the segmentation mask can encode. Defaults to 300. Parameter ``maxDetections``: Maximum number of detections to keep, must be greater than 0 @note Configures startup behavior. Send RFDETRParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one RFDETRParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. The input size is derived from the first model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an RFDETRParser head with 2 output layers (boxes, class logits) for detection or 3 (boxes, class logits, mask logits) for segmentation. Parameter ``head:``: NNArchive head to set @note A head carries no model input metadata, so the input size keeps its current value; segmentation mode requires it to be configured with setInputSize() when it is not set yet.
method
setOutputLayerNames(self, outputLayerNames: list
[
str
])Sets the names of the model output layers, positionally: the boxes layer, the class logits layer and, in segmentation mode, the mask logits layer. Must hold 2 or 3 names. When left empty, all layer names of the incoming NNData are used in their reported order. Parameter ``outputLayerNames``: Names of the output layers
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
initialConfig
Configuration used when the parser starts.
property
input
Input NN results with RF-DETR detection data to parse.
property
inputConfig
Runtime parser configuration. In synchronized mode one configuration is consumed per input frame; otherwise all queued configurations are drained and the newest valid one is retained.
property
out
Outputs ImgDetections message with the bounding boxes, labels and confidence scores of the detected objects and, in segmentation mode, the instance segmentation mask.
class
depthai.beta.node.RegressionParser(depthai.DeviceNode)
method
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one RegressionParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a RegressionParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
input
Input NN results with regression data to parse.
property
out
Outputs Predictions message with the predicted value(s).
class
depthai.beta.node.SCRFDParser(depthai.DeviceNode)
method
method
getConfidenceThreshold(self) -> float: floatReturns the confidence score threshold for detected objects.
method
getFeatStrideFPN(self) -> list[int]: list[int]Returns the feature strides of the FPN.
method
getInputSize(self) -> tuple[int, int]: tuple[int, int]Returns the model input image size as (width, height).
method
getIouThreshold(self) -> float: floatReturns the non-maximum suppression (IoU) threshold.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the detected objects.
method
getMaxDetections(self) -> int: intReturns the maximum number of detections to keep.
method
getNumAnchors(self) -> int: intReturns the number of anchors per feature map position.
method
getOutputLayerNames(self) -> list[str]: list[str]Returns the names of the model output layers relevant to the parser.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setConfidenceThreshold(self, threshold: float)Sets the confidence score threshold for detected objects. Detections with a score greater than or equal to the threshold (inclusive) are kept. Parameter ``threshold``: Confidence score threshold @note Configures startup behavior. Send SCRFDParserConfig to inputConfig after the pipeline starts.
method
setFeatStrideFPN(self, featStrideFpn: list
[
int
])Sets the feature strides of the FPN. One score_{stride}, bbox_{stride} and kps_{stride} layer triple is parsed per stride. Defaults to (8, 16, 32). Parameter ``featStrideFpn``: Feature strides, every stride must be greater than 0method
setInputSize(self, width: int, height: int)Sets the model input image size the anchor centers are computed against and the emitted coordinates are normalized by. Defaults to (640, 640). Configuring from a full NNArchive derives it from the model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setIouThreshold(self, threshold: float)Sets the non-maximum suppression (IoU) threshold. Candidates whose overlap with a kept detection is at most the threshold (inclusive) survive suppression. Parameter ``threshold``: Non-maximum suppression threshold @note Configures startup behavior. Send SCRFDParserConfig to inputConfig after the pipeline starts.
method
setLabelNames(self, labelNames: list
[
str
])Sets the label names for the detected objects. The first label name is assigned to every detection (all detections carry label 0). When empty, no label name is assigned. Defaults to ("Face"). Parameter ``labelNames``: List of label namesmethod
setMaxDetections(self, maxDetections: int)Sets the maximum number of detections to keep. Parameter ``maxDetections``: Maximum number of detections to keep @note Configures startup behavior. Send SCRFDParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one SCRFDParser head and exactly one model input; use setNNArchiveHead() to select a specific head from a multi-head archive. The input size is derived from the model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an SCRFDParser head with an equal number of score, bbox and kps output layers. Parameter ``head:``: NNArchive head to set @note A head carries no model input metadata, so the input size keeps its current value; configure it with setInputSize() when it differs from the default.
method
setNumAnchors(self, numAnchors: int)Sets the number of anchors per feature map position. Defaults to 2. Parameter ``numAnchors``: Number of anchors; values of 1 or less yield one anchor per position, mirroring the source behavior
method
setOutputLayerNames(self, outputLayerNames: list
[
str
])Sets the names of the model output layers relevant to the parser. The parser looks up the per-stride score_{stride}, bbox_{stride} and kps_{stride} layer names in this list. When left empty, the list is resolved from the layer names of the first incoming NNData. Parameter ``outputLayerNames``: Names of the output layersmethod
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
initialConfig
Configuration used when the parser starts.
property
input
Input NN results with SCRFD detection data to parse.
property
inputConfig
Runtime parser configuration. In synchronized mode one configuration is consumed per input frame; otherwise all queued configurations are drained and the newest valid one is retained.
property
out
Outputs ImgDetections message with the bounding boxes, labels, confidence scores and keypoints of the detected objects.
class
depthai.beta.node.Stitching(depthai.DeviceNode)
class
CameraModel
Camera projection model the panorama images are warped onto. Members: SPHERICAL PINHOLE CYLINDRICAL
class
Mode
Stitching mode. Members: PANORAMA PLANAR_PROJECTION
class
Plane
A plane used by planar projection stitching.
class
SeamFinder
Seam estimation method. Members: NONE VORONOI DP_COLOR DP_COLOR_GRAD GRAPHCUT_COLOR GRAPHCUT_COLOR_GRAD
class
VirtualCamera
The pinhole camera used to render a planar projection.
method
method
method
method
method
method
method
method
getNumInputs(self) -> int: intNumber of inputs the node was built with.
method
method
method
method
method
resetTransform(self)Discard the fixed transform and composition state and re-run the estimation. In `Mode::PLANAR_PROJECTION` the projection maps, seams and exposure gains are rebuilt from the next synced group. In non-continuous `Mode::PANORAMA`, registration is repeated and the fixed maps, regions, seams and exposure parameters are rebuilt.
method
runOnHost(self) -> bool: boolCheck whether the node is configured to run on host.
method
setCameraModel(self, model: Stitching.CameraModel)Set the projection surface the images are warped onto. Defaults to SPHERICAL, same as OpenCV. Only used in `Mode::PANORAMA`.
method
setContinuous(self, continuous: bool)Re-estimate the camera parameters on every frame. Only used in `Mode::PANORAMA`. When true, registration runs for every synced group, which is slow but tolerates cameras that move relative to each other. When false, registration evaluates getEstimationFrames() complete candidates without composing them, selects the one with the strongest geometrically consistent feature-match score, and then starts emitting panoramas using that transform. Projection maps, output regions, seam masks and exposure parameters are prepared with the first emitted panorama and reused for subsequent groups.
method
setEstimationFrames(self, frames: int)Number of complete registration candidates evaluated before the strongest transform is fixed. Failed registrations, oversized candidates, and candidates that omit an input do not count. No panorama is emitted while the candidates are being evaluated. Only used when continuous is false.
method
setMaxPanoramaSize(self, width: int, height: int)Reject panorama registrations whose projected canvas exceeds this size before OpenCV allocates and composes it. This protects against degenerate feature matches producing extremely large canvases. By default the size is unbounded.
method
setMaxRange(self, range: float, unit: depthai.LengthUnit = ...)Distance from a camera center beyond which the plane is not painted anymore. Bounds the automatic view and cuts off the region around the horizon, where a few pixels are stretched over a large part of the plane. Defaults to 10 meters.
method
setMaxViewSize(self, width: int, height: int)Upper bound on the size of the automatically computed view, in pixels. Defaults to 1920x1920.
method
setMinIncidenceAngle(self, degrees: float)Smallest angle between a camera ray and the plane for the ray to still be used. Rays hitting the plane at a shallower angle are heavily stretched, so they are dropped. Defaults to 5 degrees.
method
setMode(self, mode: Stitching.Mode)Set the stitching mode. `Mode::PLANAR_PROJECTION` additionally needs a plane, see `setPlane()`.
method
setPanoConfidenceThreshold(self, threshold: float)Confidence below which an image is dropped from the panorama
method
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or an RVC4 device. By default, the node runs on host.
method
method
setSyncThreshold(self, syncThreshold: datetime.timedelta)Set the maximal interval between messages of a synced group. Parameter ``syncThreshold``: Maximal interval between messages in the group
method
setView(self, view: Stitching.VirtualCamera)Camera the plane is rendered from, in `Mode::PLANAR_PROJECTION`. By default the view is computed from the content: the node intersects the field of view of every input with the plane and places a camera looking straight at the plane so that all of the footprints fit, at a resolution derived from the inputs and bounded by `setMaxViewSize()`.
method
property
inputs
A map of inputs, one per stitched source. Populated by build().
property
out
Stitched image, ImgFrame of type BGR888i.
property
sync
Internal Sync node time-aligning the inputs.
class
depthai.beta.node.Stitching.CameraModel
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.beta.node.Stitching.Mode
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.beta.node.Stitching.SeamFinder
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.beta.node.Stitching.VirtualCamera
method
property
height
Height of the rendered image in pixels.
method
property
intrinsics
Intrinsic matrix of the camera.
method
property
pose
Pose of the camera with respect to the reference frame.
method
property
unit
Length unit of the translation part of `pose`.
method
property
width
Width of the rendered image in pixels.
method
class
depthai.beta.node.SuperAnimalParser(depthai.DeviceNode)
method
method
getEdges(self) -> list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]Returns the skeleton edges as pairs of keypoint indices.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the keypoints.
method
getNumKeypoints(self) -> int: intReturns the number of keypoints the model detects.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
getScaleFactor(self) -> float: floatReturns the scale factor the keypoint coordinates are scaled and normalized by.
method
getScoreThreshold(self) -> float: floatReturns the confidence score threshold for detected keypoints.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host.
method
setEdges(self, edges: list
[
typing.Annotated
[
list
[
int
]
,
pybind11_stubgen.typing_ext.FixedSize
(
2
)
]
])Sets the skeleton edges as pairs of keypoint indices used for visualizing the skeleton. Example: {{0, 1}, {1, 2}, {2, 3}, {3, 0}} connects keypoint 0 to keypoint 1, keypoint 1 to keypoint 2, etc. Parameter ``edges``: Vector of keypoint index pairsmethod
setLabelNames(self, labelNames: list
[
str
])Sets the label names for the keypoints, indexed by keypoint index. Parameter ``labelNames``: Vector of label names
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one SuperAnimalParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a SuperAnimalParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setNumKeypoints(self, nKeypoints: int)Sets the number of keypoints the model detects. Informational only: the decoding derives the number of keypoints from the heatmap tensor's last dimension. Parameter ``nKeypoints``: Number of keypoints, must be greater than 0
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device. By default, the node runs on the device.
method
setScaleFactor(self, scaleFactor: float)Sets the scale factor the keypoint coordinates are scaled and normalized by, typically the model input size. Parameter ``scaleFactor``: Scale factor, must be greater than 0
method
setScoreThreshold(self, threshold: float)Sets the confidence score threshold for detected keypoints. Keypoints with a score strictly below the threshold are dropped. Parameter ``threshold``: Confidence score threshold, must be between 0 and 1 @note Configures startup behavior. Send SuperAnimalParserConfig to inputConfig after the pipeline starts.
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with heatmaps data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs Keypoints message with the detected animal keypoints.
class
depthai.beta.node.ToFStereoFusion(depthai.DeviceNode)
method
build(self, left: depthai.node.Camera, right: depthai.node.Camera) -> ToFStereoFusion: ToFStereoFusionConfigures fusion from a synchronized left and right camera pair. @note This node is supported on RVC4 devices only. Parameter ``left``: Left camera node. Parameter ``right``: Right camera node. Returns: This node.
property
depth
Fused depth output, aligned to the ToF sensor.
property
property
inputLeft
Left camera input used when the node runs outside the RVC4 device build.
property
inputRight
Right camera input used when the node runs outside the RVC4 device build.
property
neuralConfidence
Confidence output produced by the ToF-neural fusion network.
property
property
property
class
depthai.beta.node.XFeatMonoParser(depthai.DeviceNode)
method
method
getInputSize(self) -> tuple[int, int]: tuple[int, int]Returns the model input image size as (width, height).
method
getMaxKeypoints(self) -> int: intReturns the maximum number of keypoints to keep per frame.
method
getOriginalSize(self) -> tuple[int, int]|None: tuple[int, int]|NoneReturns the original image size as (width, height), or std::nullopt when not configured.
method
getOutputLayerFeats(self) -> str: strReturns the name of the output layer containing the feature map.
method
getOutputLayerHeatmaps(self) -> str: strReturns the name of the output layer containing the reliability heat map.
method
getOutputLayerKeypoints(self) -> str: strReturns the name of the output layer containing the keypoint logits.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host.
method
setInputSize(self, width: int, height: int)Sets the model input image size the keypoint positions are decoded in. Defaults to 640x352 like the source parser. Configuring from a full NNArchive takes it from the head metadata or derives it from the model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setMaxKeypoints(self, maxKeypoints: int)Sets the maximum number of keypoints to keep per frame. Parameter ``maxKeypoints``: Maximum number of keypoints @note Configures startup behavior. Send XFeatMonoParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one XFeatMonoParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. When the head metadata carries no input size, the input size is derived from the model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an XFeatMonoParser head with exactly three output layers; the layer whose name contains "feats" is used as the feature map layer, the layer whose name contains "keypoints" as the keypoint logit layer and the layer whose name contains "heatmaps" as the reliability heat map layer. The original size, input size and maximum keypoint count are read from the head metadata keys original_size, input_size and max_keypoints; missing keys keep the current values. Parameter ``head:``: NNArchive head to set
method
setOriginalSize(self, width: int, height: int)Sets the original image size the emitted keypoint positions are scaled to. Must be configured before the pipeline starts, either explicitly or through head metadata. Parameter ``width``: Original image width, must be greater than 0 Parameter ``height``: Original image height, must be greater than 0
method
setOutputLayerFeats(self, outputLayerFeats: str)Sets the name of the output layer containing the feature map. Parameter ``outputLayerFeats``: Name of the output layer containing the feature map
method
setOutputLayerHeatmaps(self, outputLayerHeatmaps: str)Sets the name of the output layer containing the reliability heat map. Parameter ``outputLayerHeatmaps``: Name of the output layer containing the reliability heat map
method
setOutputLayerKeypoints(self, outputLayerKeypoints: str)Sets the name of the output layer containing the keypoint logits. Parameter ``outputLayerKeypoints``: Name of the output layer containing the keypoint logits
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device. By default, the node runs on the device.
method
setTrigger(self)Requests the reference frame update: after the next decoded frame's message is emitted, that frame's keypoints become the reference the following frames are matched against. May be called at any time while the pipeline runs.
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with XFeat data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs TrackedFeatures message with the matched keypoint pairs.
class
depthai.beta.node.XFeatStereoParser(depthai.DeviceNode)
method
method
getInputSize(self) -> tuple[int, int]: tuple[int, int]Returns the model input image size as (width, height).
method
getMaxKeypoints(self) -> int: intReturns the maximum number of keypoints to keep per frame.
method
getOriginalSize(self) -> tuple[int, int]|None: tuple[int, int]|NoneReturns the original image size as (width, height), or std::nullopt when not configured.
method
getOutputLayerFeats(self) -> str: strReturns the name of the output layer containing the feature map.
method
getOutputLayerHeatmaps(self) -> str: strReturns the name of the output layer containing the reliability heat map.
method
getOutputLayerKeypoints(self) -> str: strReturns the name of the output layer containing the keypoint logits.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host.
method
setInputSize(self, width: int, height: int)Sets the model input image size the keypoint positions are decoded in. Defaults to 640x352 like the source parser. Configuring from a full NNArchive takes it from the head metadata or derives it from the model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setMaxKeypoints(self, maxKeypoints: int)Sets the maximum number of keypoints to keep per frame. Parameter ``maxKeypoints``: Maximum number of keypoints @note Configures startup behavior. Send XFeatStereoParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one XFeatStereoParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. When the head metadata carries no input size, the input size is derived from the model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an XFeatStereoParser head with exactly three output layers; the layer whose name contains "feats" is used as the feature map layer, the layer whose name contains "keypoints" as the keypoint logit layer and the layer whose name contains "heatmaps" as the reliability heat map layer. The original size, input size and maximum keypoint count are read from the head metadata keys original_size, input_size and max_keypoints; missing keys keep the current values. Parameter ``head:``: NNArchive head to set
method
setOriginalSize(self, width: int, height: int)Sets the original image size the emitted keypoint positions are scaled to. Must be configured before the pipeline starts, either explicitly or through head metadata. Parameter ``width``: Original image width, must be greater than 0 Parameter ``height``: Original image height, must be greater than 0
method
setOutputLayerFeats(self, outputLayerFeats: str)Sets the name of the output layer containing the feature map. Parameter ``outputLayerFeats``: Name of the output layer containing the feature map
method
setOutputLayerHeatmaps(self, outputLayerHeatmaps: str)Sets the name of the output layer containing the reliability heat map. Parameter ``outputLayerHeatmaps``: Name of the output layer containing the reliability heat map
method
setOutputLayerKeypoints(self, outputLayerKeypoints: str)Sets the name of the output layer containing the keypoint logits. Parameter ``outputLayerKeypoints``: Name of the output layer containing the keypoint logits
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device. By default, the node runs on the device.
property
initialConfig
Configuration used until a message is received on inputConfig.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame pair; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs TrackedFeatures message with the matched keypoint pairs.
property
referenceInput
Input NN results of the reference source (e.g. the left camera) with XFeat data to parse.
property
targetInput
Input NN results of the target source (e.g. the right camera) with XFeat data to parse.
class
depthai.beta.node.YuNetParser(depthai.DeviceNode)
method
method
getConfidenceThreshold(self) -> float: floatReturns the confidence score threshold for detected faces.
method
getInputSize(self) -> tuple[int, int]|None: tuple[int, int]|NoneReturns the model input image size as (width, height), or std::nullopt when it is not set.
method
getIouThreshold(self) -> float: floatReturns the non-maximum suppression (IoU) threshold.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the detected faces.
method
getMaxDetections(self) -> int: intReturns the maximum number of detections to keep.
method
getOutputLayerConf(self) -> str: strReturns the name of the output layer containing the confidence predictions.
method
getOutputLayerIou(self) -> str: strReturns the name of the output layer containing the IoU predictions.
method
getOutputLayerLoc(self) -> str: strReturns the name of the output layer containing the location predictions.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host.
method
setConfidenceThreshold(self, threshold: float)Sets the confidence score threshold for detected faces. Detections with a score strictly greater than the threshold are kept. Parameter ``threshold``: Confidence score threshold @note Configures startup behavior. Send YuNetParserConfig to inputConfig after the pipeline starts.
method
setInputSize(self, width: int, height: int)Sets the model input image size the anchors are computed against and the emitted coordinates are normalized by. Unset by default; it must be configured from an NNArchive or with this setter before the parser processes messages. Configuring from a full NNArchive derives it from the model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setIouThreshold(self, threshold: float)Sets the non-maximum suppression (IoU) threshold. Candidates whose overlap with a kept detection is at most the threshold (inclusive) survive suppression. Parameter ``threshold``: Non-maximum suppression threshold @note Configures startup behavior. Send YuNetParserConfig to inputConfig after the pipeline starts.
method
setLabelNames(self, labelNames: list
[
str
])Sets the label names for the detected faces. The first label name is assigned to every detection (all detections carry label 0). When empty, no label name is assigned. Defaults to ("Face"). Parameter ``labelNames``: List of label namesmethod
setMaxDetections(self, maxDetections: int)Sets the maximum number of detections to keep, applied as the non-maximum suppression top-k limit (no limit when 0 or negative). Parameter ``maxDetections``: Maximum number of detections to keep @note Configures startup behavior. Send YuNetParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one YuNetParser head and exactly one model input; use setNNArchiveHead() to select a specific head from a multi-head archive. The input size is derived from the model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a YuNetParser head; every head output layer name must contain "loc", "conf" or "iou" and is routed to the matching output layer name setting. Parameter ``head:``: NNArchive head to set @note A head carries no model input metadata, so the input size keeps its current value; configure it with setInputSize() when it is not set yet.
method
setOutputLayerConf(self, confOutputLayerName: str)Sets the name of the output layer containing the confidence predictions. When left empty, the name is auto-detected from the incoming NNData as the single layer name starting with "conf". Parameter ``confOutputLayerName``: Output layer name for the conf tensor
method
setOutputLayerIou(self, iouOutputLayerName: str)Sets the name of the output layer containing the IoU predictions. When left empty, the name is auto-detected from the incoming NNData as the single layer name starting with "iou". Parameter ``iouOutputLayerName``: Output layer name for the IoU tensor
method
setOutputLayerLoc(self, locOutputLayerName: str)Sets the name of the output layer containing the location predictions. When left empty, the name is auto-detected from the incoming NNData as the single layer name starting with "loc". Parameter ``locOutputLayerName``: Output layer name for the loc tensor
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device. By default, the node runs on the device.
property
initialConfig
Configuration used when the parser starts.
property
input
Input NN results with YuNet detection data to parse.
property
inputConfig
Runtime parser configuration. In synchronized mode one configuration is consumed per input frame; otherwise all queued configurations are drained and the newest valid one is retained.
property
out
Outputs ImgDetections message with the bounding boxes, labels, confidence scores and keypoints of the detected faces.
class
depthai.beta.ClassificationSequenceParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getConcatenateClasses(self) -> bool: boolGets whether decoded class labels are concatenated. Returns: Whether class labels are concatenated
method
getIgnoredIndexes(self) -> list[int]: list[int]Gets the class indexes ignored while decoding the sequence. Returns: Ignored class indexes
method
getRemoveDuplicates(self) -> bool: boolGets whether consecutive duplicate classes are removed. Returns: Whether duplicate classes are removed
method
setConcatenateClasses(self, enabled: bool)Sets whether decoded class labels are concatenated. Parameter ``concatenateClasses``: Whether class labels are concatenated
method
setIgnoredIndexes(self, indexes: list
[
int
])Sets the class indexes ignored while decoding the sequence. Parameter ``indexes``: Nonnegative class indexes to ignore
method
setRemoveDuplicates(self, enabled: bool)Sets whether consecutive duplicate classes are removed. Parameter ``removeDuplicates``: Whether duplicate classes are removed
method
validate(self) -> bool: boolValidates this configuration. Returns: True if all ignored indexes are nonnegative
class
depthai.beta.ClassificationSequenceParserProperties
variable
variable
variable
variable
variable
class
depthai.beta.Classifications(depthai.Buffer, depthai.Transformable)
method
method
method
getTopClass(self) -> str: strReturns the most probable class name. Assumes the classes are sorted in descending order of score, which holds for parser-emitted messages. Throws: std::runtime_error if the message contains no classes.
method
getTopScore(self) -> float: floatReturns the score of the most probable class. Assumes the scores are sorted in descending order, which holds for parser- emitted messages. Throws: std::runtime_error if the message contains no scores.
method
getVisualizationMessage(self) -> depthai.ImgAnnotations|depthai.ImgFrame|None: depthai.ImgAnnotations|depthai.ImgFrame|NoneReturns an ImgAnnotations visualization with up to the top five classes and their scores, or std::monostate when no transformation metadata is available to derive the annotation layout from.
method
transformTo(self, target: depthai.ImgTransformation) -> Classifications: ClassificationsReturns a new Classifications message with the transformation metadata replaced by the target transformation. Classification results carry no spatial data, so classes and scores are unchanged. Parameter ``target``: Target image transformation.
property
classes
Class names, index-aligned with the scores vector.
method
property
scores
Classification scores, index-aligned with the classes vector.
method
class
depthai.beta.Clusters(depthai.Buffer, depthai.Transformable)
method
method
method
getVisualizationMessage(self) -> depthai.ImgAnnotations|depthai.ImgFrame|None: depthai.ImgAnnotations|depthai.ImgFrame|NoneReturns an ImgAnnotations visualization with each cluster drawn as points in a distinct color sampled from a rainbow colormap. Throws: std::runtime_error if the message contains more than 255 clusters.
method
transformTo(self, target: depthai.ImgTransformation) -> Clusters: ClustersReturns a new Clusters message with the cluster point image coordinates remapped from this message's transformation into the target transformation. Parameter ``target``: Target image transformation. Throws: std::runtime_error if this message carries no transformation metadata.
property
clusters
Detected clusters of points.
method
class
depthai.beta.FastSAMParserConfig(depthai.Buffer)
class
Prompt
Prompt mode used to select emitted segmentation masks. Members: EVERYTHING : Keep all detected instances. POINT : Select instances using a point and point label. BOUNDING_BOX : Select an instance using a bounding box.
variable
variable
variable
variable
variable
variable
variable
method
method
method
getBoundingBox(self) -> typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(4)]|None: typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(4)]|NoneGets the prompt bounding box. Returns: Optional bounding box as {x1, y1, x2, y2}method
getConfidenceThreshold(self) -> float: floatGets the minimum detection confidence. Returns: Confidence threshold
method
getIouThreshold(self) -> float: floatGets the intersection-over-union threshold. Returns: IoU threshold
method
getMaskConfidence(self) -> float: floatGets the threshold used to binarize instance masks. Returns: Mask confidence threshold
method
getPointLabel(self) -> int|None: int|NoneGets the prompt point label. Returns: Optional point label
method
getPoints(self) -> tuple[int, int]|None: tuple[int, int]|NoneGets the prompt point. Returns: Optional prompt point as (x, y)
method
getPrompt(self) -> FastSAMParserConfig.Prompt: FastSAMParserConfig.PromptGets the prompt mode. Returns: Prompt mode
method
setBoundingBox(self, boundingBox: typing.Annotated
[
list
[
int
]
,
pybind11_stubgen.typing_ext.FixedSize
(
4
)
])Sets the prompt bounding box. Parameter ``boundingBox``: Bounding box as {x1, y1, x2, y2}, with ordered coordinates and positive x2/y2method
setConfidenceThreshold(self, threshold: float)Sets the minimum detection confidence. Parameter ``threshold``: Confidence threshold in the range [0, 1]
method
setIouThreshold(self, threshold: float)Sets the intersection-over-union threshold used by non-maximum suppression. Parameter ``threshold``: IoU threshold in the range [0, 1]
method
setMaskConfidence(self, threshold: float)Sets the threshold used to binarize instance masks. Parameter ``threshold``: Mask confidence threshold in the range [0, 1]
method
setPointLabel(self, label: int)Sets the prompt point label. Parameter ``label``: Point label, 0 for negative or 1 for positive
method
setPoints(self, x: int, y: int)Sets the prompt point. Parameter ``x``: Point x coordinate Parameter ``y``: Point y coordinate
method
setPrompt(self, prompt: FastSAMParserConfig.Prompt)Sets the prompt mode. Required point or bounding-box data must already be present. Parameter ``prompt``: Prompt mode
method
validate(self) -> bool: boolValidates thresholds, prompt payload, point label, and bounding-box coordinates. Returns: True if the complete configuration is valid
class
depthai.beta.FastSAMParserConfig.Prompt
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.beta.FastSAMParserProperties
variable
variable
variable
variable
variable
class
depthai.beta.HRNetParserConfig(depthai.Buffer)
variable
method
method
method
getScoreThreshold(self) -> float: floatGets the minimum keypoint score. Returns: Score threshold
method
setScoreThreshold(self, threshold: float)Sets the minimum keypoint score. Parameter ``threshold``: Score threshold in the range [0, 1]
method
validate(self) -> bool: boolValidates this configuration. Returns: True if the score threshold is in the range [0, 1]
class
depthai.beta.HRNetParserProperties
class
depthai.beta.ImgDetectionsFilterConfig(depthai.Buffer)
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
class
depthai.beta.ImgDetectionsFilterProperties
class
depthai.beta.Keypoints(depthai.Buffer, depthai.Transformable)
method
method
method
getEdges(self) -> list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]Returns the skeleton edges as pairs of keypoint indices.
method
getKeypoints(self) -> list[depthai.Keypoint]: list[depthai.Keypoint]Returns the keypoints.
method
getPoints2f(self) -> depthai.VectorPoint2f: depthai.VectorPoint2fReturns the 2D image coordinates of the keypoints, dropping the z axis values.
method
getPoints3f(self) -> list[depthai.Point3f]: list[depthai.Point3f]Returns the 3D image coordinates of the keypoints. 2D keypoints carry a z coordinate of 0.
method
getVisualizationMessage(self) -> depthai.ImgAnnotations|depthai.ImgFrame|None: depthai.ImgAnnotations|depthai.ImgFrame|NoneReturns an ImgAnnotations visualization with the keypoints drawn as points and the skeleton edges drawn as lines.
method
setEdges(self, edges: list
[
typing.Annotated
[
list
[
int
]
,
pybind11_stubgen.typing_ext.FixedSize
(
2
)
]
])Sets the skeleton edges. Parameter ``edges``: Pairs of keypoint indices to connect. Throws: std::invalid_argument if an edge index is out of range or an edge is a self- loop.
method
method
transformTo(self, target: depthai.ImgTransformation) -> Keypoints: KeypointsReturns a new Keypoints message with the keypoint image coordinates remapped from this message's transformation into the target transformation. Parameter ``target``: Target image transformation. Throws: std::runtime_error if this message carries no transformation metadata.
property
keypointsList
Native keypoints list carrying the keypoints and the skeleton edges connecting them.
method
class
depthai.beta.Line
method
property
confidence
Confidence of the line, in [0, 1].
method
property
endPoint
End point of the line with x and y coordinate.
method
property
startPoint
Start point of the line with x and y coordinate.
method
class
depthai.beta.Lines(depthai.Buffer, depthai.Transformable)
method
method
method
getVisualizationMessage(self) -> depthai.ImgAnnotations|depthai.ImgFrame|None: depthai.ImgAnnotations|depthai.ImgFrame|NoneReturns an ImgAnnotations visualization with each line drawn as a two-point line strip.
method
transformTo(self, target: depthai.ImgTransformation) -> Lines: LinesReturns a new Lines message with the line point image coordinates remapped from this message's transformation into the target transformation. Parameter ``target``: Target image transformation. Throws: std::runtime_error if this message carries no transformation metadata.
property
lines
Detected lines.
method
class
depthai.beta.MLSDParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getDistanceThreshold(self) -> float: floatGets the distance threshold used while decoding line segments. Returns: Distance threshold
method
getScoreThreshold(self) -> float: floatGets the minimum candidate score. Returns: Score threshold
method
getTopK(self) -> int: intGets the number of highest-scoring candidates retained for decoding. Returns: Candidate count
method
setDistanceThreshold(self, threshold: float)Sets the distance threshold used while decoding line segments. Parameter ``threshold``: Nonnegative distance threshold
method
setScoreThreshold(self, threshold: float)Sets the minimum candidate score. Parameter ``threshold``: Score threshold in the range [0, 1]
method
setTopK(self, topK: int)Sets the number of highest-scoring candidates retained for decoding. Parameter ``topK``: Positive candidate count
method
validate(self) -> bool: boolValidates this configuration. Returns: True if topK is positive, the score threshold is in [0, 1], and the distance threshold is nonnegative
class
depthai.beta.MLSDParserProperties
variable
variable
variable
variable
class
depthai.beta.MPPalmDetectionParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getConfidenceThreshold(self) -> float: floatGets the minimum detection confidence. Returns: Confidence threshold
method
getIouThreshold(self) -> float: floatGets the intersection-over-union threshold. Returns: IoU threshold
method
getMaxDetections(self) -> int: intGets the maximum number of emitted detections. Returns: Maximum detection count
method
setConfidenceThreshold(self, threshold: float)Sets the minimum detection confidence. Parameter ``threshold``: Confidence threshold in the range [0, 1]
method
setIouThreshold(self, threshold: float)Sets the intersection-over-union threshold used by non-maximum suppression. Parameter ``threshold``: IoU threshold in the range [0, 1]
method
setMaxDetections(self, maxDetections: int)Sets the maximum number of emitted detections. Parameter ``maxDetections``: Positive maximum detection count
method
validate(self) -> bool: boolValidates this configuration. Returns: True if both thresholds are in [0, 1] and maxDetections is positive
class
depthai.beta.MPPalmDetectionParserProperties
variable
variable
variable
variable
class
depthai.beta.Map2D(depthai.Buffer, depthai.Transformable)
method
method
method
getHeight(self) -> int: intReturns the height of the 2D map.
method
getMap(self) -> numpy.ndarray[numpy.float32]: numpy.ndarray[numpy.float32]Returns a copy of the 2D map values in row-major order. If no map is set, returns an empty vector.
method
getVisualizationMessage(self) -> depthai.ImgAnnotations|depthai.ImgFrame|None: depthai.ImgAnnotations|depthai.ImgFrame|NoneReturns an ImgFrame visualization of the map colored with a plasma colormap. When any map value is below 1 the values are scaled by 255, so maps normalized to [0, 1] use the full colormap range. The values are then truncated to 8-bit indices into the colormap and emitted as an interleaved BGR frame.
method
getWidth(self) -> int: intReturns the width of the 2D map.
method
setMap(self, map: numpy.ndarray)Sets the 2D map. The values are copied into the buffer payload. Parameter ``map``: Map values in row-major order, of size width * height. Parameter ``width``: Map width in values per row. Parameter ``height``: Map height in rows. Throws: std::runtime_error if the map size does not equal width * height.
method
transformTo(self, target: depthai.ImgTransformation) -> Map2D: Map2DReturns a new Map2D message with the transformation metadata replaced by the target transformation. The map values and dimensions are unchanged. Parameter ``target``: Target image transformation. Throws: std::runtime_error if this message carries no transformation metadata.
class
depthai.beta.MapOutputParserConfig(depthai.Buffer)
variable
method
method
method
getMinMaxScaling(self) -> bool: boolGets whether output values are scaled using their minimum and maximum. Returns: Whether min-max scaling is enabled
method
setMinMaxScaling(self, enabled: bool)Sets whether output values are scaled using their minimum and maximum. Parameter ``enabled``: Whether min-max scaling is enabled
method
validate(self) -> bool: boolValidates this configuration. Returns: True because every value of the boolean option is valid
class
depthai.beta.MapOutputParserProperties
class
depthai.beta.PPTextDetectionParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getConfidenceThreshold(self) -> float: floatGets the minimum detection confidence. Returns: Confidence threshold
method
getMaskThreshold(self) -> float: floatGets the threshold applied to the text probability mask. Returns: Mask threshold
method
getMaxDetections(self) -> int: intGets the maximum number of emitted detections. Returns: Maximum detection count
method
setConfidenceThreshold(self, threshold: float)Sets the minimum detection confidence. Parameter ``threshold``: Confidence threshold in the range [0, 1]
method
setMaskThreshold(self, threshold: float)Sets the threshold applied to the text probability mask. Parameter ``threshold``: Mask threshold in the range [0, 1]
method
setMaxDetections(self, maxDetections: int)Sets the maximum number of emitted detections. Parameter ``maxDetections``: Positive maximum detection count
method
validate(self) -> bool: boolValidates this configuration. Returns: True if both thresholds are in [0, 1] and maxDetections is positive
class
depthai.beta.PPTextDetectionParserProperties
class
depthai.beta.Prediction
class
depthai.beta.Predictions(depthai.Buffer, depthai.Transformable)
method
method
method
getFirstPrediction(self) -> float: floatReturns the first predicted value. Useful for single-prediction models. Throws: std::runtime_error if the message contains no predictions.
method
getVisualizationMessage(self) -> depthai.ImgAnnotations|depthai.ImgFrame|None: depthai.ImgAnnotations|depthai.ImgFrame|NoneReturns an ImgAnnotations visualization with each predicted value drawn as text, one below the other, or std::monostate when no transformation metadata is available to derive the annotation layout from.
method
transformTo(self, target: depthai.ImgTransformation) -> Predictions: PredictionsReturns a new Predictions message with the transformation metadata replaced by the target transformation. Regression results carry no spatial data, so the predictions are unchanged. Parameter ``target``: Target image transformation.
property
predictions
Predicted values, in the order the model emitted them.
method
class
depthai.beta.RFDETRParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getConfidenceThreshold(self) -> float: floatGet the minimum detection confidence. Returns: Confidence threshold in the inclusive range [0, 1]
method
getMaskConfidence(self) -> float: floatGet the minimum per-pixel confidence used when creating instance masks. Returns: Mask confidence threshold in the inclusive range [0, 1]
method
getMaxDetections(self) -> int: intGet the maximum number of detections to retain. Returns: Maximum detection count
method
setConfidenceThreshold(self, threshold: float)Set the minimum detection confidence. Parameter ``threshold``: Confidence threshold in the inclusive range [0, 1]
method
setMaskConfidence(self, threshold: float)Set the minimum per-pixel confidence used when creating instance masks. Parameter ``threshold``: Mask confidence threshold in the inclusive range [0, 1]
method
setMaxDetections(self, maxDetections: int)Set the maximum number of detections to retain. Parameter ``maxDetections``: Maximum detection count, which must be positive
method
validate(self) -> bool: boolCheck whether all configuration values are valid. Returns: True when both confidence thresholds are in the inclusive range [0, 1] and maxDetections is positive
class
depthai.beta.RFDETRParserProperties
variable
variable
variable
variable
class
depthai.beta.SCRFDParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getConfidenceThreshold(self) -> float: floatGet the minimum detection confidence. Returns: Confidence threshold in the inclusive range [0, 1]
method
getIouThreshold(self) -> float: floatGet the non-maximum suppression intersection-over-union threshold. Returns: Intersection-over-union threshold in the inclusive range [0, 1]
method
getMaxDetections(self) -> int: intGet the maximum number of post-suppression detections to retain. Returns: Maximum post-suppression detection count
method
setConfidenceThreshold(self, threshold: float)Set the minimum detection confidence. Parameter ``threshold``: Confidence threshold in the inclusive range [0, 1]
method
setIouThreshold(self, threshold: float)Set the non-maximum suppression intersection-over-union threshold. Parameter ``threshold``: Intersection-over-union threshold in the inclusive range [0, 1]
method
setMaxDetections(self, maxDetections: int)Set the maximum number of post-suppression detections to retain. Parameter ``maxDetections``: Maximum detection count, which must be positive
method
validate(self) -> bool: boolCheck whether all configuration values are valid. Returns: True when both thresholds are in the inclusive range [0, 1] and maxDetections is positive
class
depthai.beta.SCRFDParserProperties
variable
variable
variable
variable
variable
variable
class
depthai.beta.StitchingProperties
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
class
depthai.beta.SuperAnimalParserConfig(depthai.Buffer)
variable
method
method
method
getScoreThreshold(self) -> float: floatGet the minimum keypoint score. Returns: Score threshold in the inclusive range [0, 1]
method
setScoreThreshold(self, threshold: float)Set the minimum keypoint score. Parameter ``threshold``: Score threshold in the inclusive range [0, 1]
method
validate(self) -> bool: boolCheck whether all configuration values are valid. Returns: True when scoreThreshold is in the inclusive range [0, 1]
class
depthai.beta.SuperAnimalParserProperties
class
depthai.beta.XFeatMonoParserConfig(depthai.Buffer)
variable
method
method
method
getMaxKeypoints(self) -> int: intGet the maximum number of keypoints to retain per frame. Returns: Maximum keypoint count
method
setMaxKeypoints(self, maxKeypoints: int)Set the maximum number of keypoints to retain per frame. Parameter ``maxKeypoints``: Maximum keypoint count, which must be positive
method
validate(self) -> bool: boolCheck whether all configuration values are valid. Returns: True when maxKeypoints is positive
class
depthai.beta.XFeatMonoParserProperties
variable
variable
variable
variable
variable
variable
class
depthai.beta.XFeatStereoParserConfig(depthai.Buffer)
variable
method
method
method
getMaxKeypoints(self) -> int: intGet the maximum number of keypoints to retain from each frame in the stereo pair. Returns: Maximum keypoint count applied to each frame
method
setMaxKeypoints(self, maxKeypoints: int)Set the maximum number of keypoints to retain from each frame in the stereo pair. Parameter ``maxKeypoints``: Maximum keypoint count, which must be positive
method
validate(self) -> bool: boolCheck whether all configuration values are valid. Returns: True when maxKeypoints is positive
class
depthai.beta.XFeatStereoParserProperties
variable
variable
variable
variable
variable
variable
class
depthai.beta.YuNetParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getConfidenceThreshold(self) -> float: floatGet the minimum face detection confidence. Returns: Confidence threshold in the inclusive range [0, 1]
method
getIouThreshold(self) -> float: floatGet the non-maximum suppression intersection-over-union threshold. Returns: Intersection-over-union threshold in the inclusive range [0, 1]
method
getMaxDetections(self) -> int: intGet the maximum number of detections to retain. Returns: Maximum detection count; a value less than or equal to zero means unlimited
method
setConfidenceThreshold(self, threshold: float)Set the minimum face detection confidence. Parameter ``threshold``: Confidence threshold in the inclusive range [0, 1]
method
setIouThreshold(self, threshold: float)Set the non-maximum suppression intersection-over-union threshold. Parameter ``threshold``: Intersection-over-union threshold in the inclusive range [0, 1]
method
setMaxDetections(self, maxDetections: int)Set the maximum number of detections to retain. Parameter ``maxDetections``: Maximum detection count; a value less than or equal to zero means unlimited
method
validate(self) -> bool: boolCheck whether all configuration values are valid. Returns: True when confidenceThreshold and iouThreshold are in the inclusive range [0, 1]; maxDetections may have any integer value
class
depthai.beta.YuNetParserProperties
variable
variable
variable
variable
variable
variable
package
depthai.filters
module
params
Parameters for filters
module
depthai.filters.params
class
MedianFilter
Members: MEDIAN_OFF KERNEL_3x3 KERNEL_5x5 KERNEL_7x7
class
class
class
TemporalFilter
Temporal filtering with optional persistence.
class
ThresholdFilter
Threshold filtering. Filters out distances outside of a given interval.
class
depthai.filters.params.MedianFilter
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.filters.params.SpatialFilter
method
method
property
alpha
The Alpha factor in an exponential moving average with Alpha=1 - no filter. Alpha = 0 - infinite filter. Determines the amount of smoothing.
method
property
delta
Step-size boundary. Establishes the threshold used to preserve "edges". If the disparity value between neighboring pixels exceed the disparity threshold set by this delta parameter, then filtering will be temporarily disabled. Default value 0 means auto: 3 disparity integer levels. In case of subpixel mode it's 3*number of subpixel levels.
method
property
enable
Whether to enable or disable the filter.
method
property
holeFillingRadius
An in-place heuristic symmetric hole-filling mode applied horizontally during the filter passes. Intended to rectify minor artefacts with minimal performance impact. Search radius for hole filling.
method
property
numIterations
Number of iterations over the image in both horizontal and vertical direction.
method
class
depthai.filters.params.SpeckleFilter
method
method
property
differenceThreshold
Maximum difference between neighbor disparity pixels to put them into the same blob. Units in disparity integer levels.
method
property
enable
Whether to enable or disable the filter.
method
property
speckleRange
Speckle search range.
method
class
depthai.filters.params.TemporalFilter
class
PersistencyMode
Persistency algorithm type. Members: PERSISTENCY_OFF : VALID_8_OUT_OF_8 : VALID_2_IN_LAST_3 : VALID_2_IN_LAST_4 : VALID_2_OUT_OF_8 : VALID_1_IN_LAST_2 : VALID_1_IN_LAST_5 : VALID_1_IN_LAST_8 : PERSISTENCY_INDEFINITELY :
method
method
property
alpha
The Alpha factor in an exponential moving average with Alpha=1 - no filter. Alpha = 0 - infinite filter. Determines the extent of the temporal history that should be averaged.
method
property
delta
Step-size boundary. Establishes the threshold used to preserve surfaces (edges). If the disparity value between neighboring pixels exceed the disparity threshold set by this delta parameter, then filtering will be temporarily disabled. Default value 0 means auto: 3 disparity integer levels. In case of subpixel mode it's 3*number of subpixel levels.
method
property
enable
Whether to enable or disable the filter.
method
property
persistencyMode
Persistency mode. If the current disparity/depth value is invalid, it will be replaced by an older value, based on persistency mode.
method
class
depthai.filters.params.TemporalFilter.PersistencyMode
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
module
depthai.modelzoo
function
getDefaultCachePath() -> os.PathLike: os.PathLikeGet the default cache path (where models are cached)
function
getDefaultModelsPath() -> os.PathLike: os.PathLikeGet the default models path (where yaml files are stored)
function
getDownloadEndpoint() -> str: strGet the download endpoint (for model querying)
function
getHealthEndpoint() -> str: strGet the health endpoint (for internet check)
function
setDefaultCachePath(path: os.PathLike)Set the default cache path (where models are cached) Parameter ``path``:
function
setDefaultModelsPath(path: os.PathLike)Set the default models path (where yaml files are stored) Parameter ``path``:
function
setDownloadEndpoint(endpoint: str)Set the download endpoint (for model querying) Parameter ``endpoint``:
function
setHealthEndpoint(endpoint: str)Set the health endpoint (for internet check) Parameter ``endpoint``:
package
depthai.nn_archive
module
module
depthai.nn_archive.v1
class
Config
The main class of the multi/single-stage model config scheme (multi- stage models consists of interconnected single-stage models). @type config_version: str @ivar config_version: String representing config schema version in format 'x.y' where x is major version and y is minor version @type model: Model @ivar model: A Model object representing the neural network used in the archive.
class
DataType
Data type of the input data (e.g., 'float32'). Represents all existing data types used in i/o streams of the model. Precision of the model weights. Data type of the output data (e.g., 'float32'). Members: BOOLEAN FLOAT16 FLOAT32 FLOAT64 INT4 INT8 INT16 INT32 INT64 UINT4 UINT8 UINT16 UINT32 UINT64 STRING
class
Head
Represents head of a model. @type name: str | None @ivar name: Optional name of the head. @type parser: str @ivar parser: Name of the parser responsible for processing the models output. @type outputs: List[str] | None @ivar outputs: Specify which outputs are fed into the parser. If None, all outputs are fed. @type metadata: C{HeadMetadata} | C{HeadObjectDetectionMetadata} | C{HeadClassificationMetadata} | C{HeadObjectDetectionSSDMetadata} | C{HeadSegmentationMetadata} | C{HeadYOLOMetadata} @ivar metadata: Metadata of the parser.class
Input
Represents input stream of a model. @type name: str @ivar name: Name of the input layer. @type dtype: DataType @ivar dtype: Data type of the input data (e.g., 'float32'). @type input_type: InputType @ivar input_type: Type of input data (e.g., 'image'). @type shape: list @ivar shape: Shape of the input data as a list of integers (e.g. [H,W], [H,W,C], [N,H,W,C], ...). @type layout: str @ivar layout: Lettercode interpretation of the input data dimensions (e.g., 'NCHW'). @type preprocessing: PreprocessingBlock @ivar preprocessing: Preprocessing steps applied to the input data.
class
InputType
Members: IMAGE RAW
class
Metadata
Metadata of the parser. Metadata for the object detection head. @type classes: list @ivar classes: Names of object classes detected by the model. @type n_classes: int @ivar n_classes: Number of object classes detected by the model. @type iou_threshold: float @ivar iou_threshold: Non-max supression threshold limiting boxes intersection. @type conf_threshold: float @ivar conf_threshold: Confidence score threshold above which a detected object is considered valid. @type max_det: int @ivar max_det: Maximum detections per image. @type anchors: list @ivar anchors: Predefined bounding boxes of different sizes and aspect ratios. The innermost lists are length 2 tuples of box sizes. The middle lists are anchors for each output. The outmost lists go from smallest to largest output. Metadata for the classification head. @type classes: list @ivar classes: Names of object classes classified by the model. @type n_classes: int @ivar n_classes: Number of object classes classified by the model. @type is_softmax: bool @ivar is_softmax: True, if output is already softmaxed Metadata for the SSD object detection head. @type boxes_outputs: str @ivar boxes_outputs: Output name corresponding to predicted bounding box coordinates. @type scores_outputs: str @ivar scores_outputs: Output name corresponding to predicted bounding box confidence scores. Metadata for the segmentation head. @type classes: list @ivar classes: Names of object classes segmented by the model. @type n_classes: int @ivar n_classes: Number of object classes segmented by the model. @type is_softmax: bool @ivar is_softmax: True, if output is already softmaxed @type background_class: bool | None @ivar background_class: True, if class index 0 is treated as background. Metadata for the YOLO head. @type yolo_outputs: list @ivar yolo_outputs: A list of output names for each of the different YOLO grid sizes. @type mask_outputs: list | None @ivar mask_outputs: A list of output names for each mask output. @type protos_outputs: str | None @ivar protos_outputs: Output name for the protos. @type keypoints_outputs: list | None @ivar keypoints_outputs: A list of output names for the keypoints. @type angles_outputs: list | None @ivar angles_outputs: A list of output names for the angles. @type subtype: str @ivar subtype: YOLO family decoding subtype (e.g. yolov5, yolov6, yolov7 etc.) @type n_prototypes: int | None @ivar n_prototypes: Number of prototypes per bbox in YOLO instance segmnetation. @type n_keypoints: int | None @ivar n_keypoints: Number of keypoints per bbox in YOLO keypoint detection. @type is_softmax: bool | None @ivar is_softmax: True, if output is already softmaxed in YOLO instance segmentation @type strides: list | None @ivar strides: Strides for each YOLO output. Metadata for the basic head. It allows you to specify additional fields. @type postprocessor_path: str | None @ivar postprocessor_path: Path to the postprocessor.
class
MetadataClass
Metadata object defining the model metadata. Represents metadata of a model. @type name: str @ivar name: Name of the model. @type path: str @ivar path: Relative path to the model executable.
class
Model
A Model object representing the neural network used in the archive. Class defining a single-stage model config scheme. @type metadata: Metadata @ivar metadata: Metadata object defining the model metadata. @type inputs: list @ivar inputs: List of Input objects defining the model inputs. @type outputs: list @ivar outputs: List of Output objects defining the model outputs. @type heads: list @ivar heads: List of Head objects defining the model heads. If not defined, we assume a raw output.
class
Output
Represents output stream of a model. @type name: str @ivar name: Name of the output layer. @type dtype: DataType @ivar dtype: Data type of the output data (e.g., 'float32').
class
PreprocessingBlock
Preprocessing steps applied to the input data. Represents preprocessing operations applied to the input data. @type mean: list | None @ivar mean: Mean values in channel order. Order depends on the order in which the model was trained on. @type scale: list | None @ivar scale: Standardization values in channel order. Order depends on the order in which the model was trained on. @type reverse_channels: bool | None @ivar reverse_channels: If True input to the model is RGB else BGR. @type interleaved_to_planar: bool | None @ivar interleaved_to_planar: If True input to the model is interleaved (NHWC) else planar (NCHW). @type dai_type: str | None @ivar dai_type: DepthAI input type which is read by DepthAI to automatically setup the pipeline.
class
depthai.nn_archive.v1.Config
method
property
configVersion
String representing config schema version in format 'x.y' where x is major version and y is minor version.
method
property
model
A Model object representing the neural network used in the archive.
method
class
depthai.nn_archive.v1.DataType
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.nn_archive.v1.Head
class
depthai.nn_archive.v1.Input
method
property
dtype
Data type of the input data (e.g., 'float32').
method
property
inputType
Type of input data (e.g., 'image').
method
property
layout
Lettercode interpretation of the input data dimensions (e.g., 'NCHW')
method
property
name
Name of the input layer.
method
property
preprocessing
Preprocessing steps applied to the input data.
method
property
shape
Shape of the input data as a list of integers (e.g. [H,W], [H,W,C], [N,H,W,C], ...).
method
class
depthai.nn_archive.v1.InputType
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.nn_archive.v1.Metadata
method
property
anchors
Predefined bounding boxes of different sizes and aspect ratios. The innermost lists are length 2 tuples of box sizes. The middle lists are anchors for each output. The outmost lists go from smallest to largest output.
method
property
anglesOutputs
A list of output names for the angles.
method
property
backgroundClass
True, if class index 0 is treated as background.
method
property
boxesOutputs
Output name corresponding to predicted bounding box coordinates.
method
property
classes
Names of object classes recognized by the model.
method
property
confThreshold
Confidence score threshold above which a detected object is considered valid.
method
property
extraParams
Additional parameters
method
property
iouThreshold
Non-max supression threshold limiting boxes intersection.
method
property
isSoftmax
True, if output is already softmaxed. True, if output is already softmaxed in YOLO instance segmentation.
method
property
keypointsOutputs
A list of output names for the keypoints.
method
property
maskOutputs
A list of output names for each mask output.
method
property
maxDet
Maximum detections per image.
method
property
nClasses
Number of object classes recognized by the model.
method
property
nKeypoints
Number of keypoints per bbox in YOLO keypoint detection.
method
property
nPrototypes
Number of prototypes per bbox in YOLO instance segmnetation.
method
property
postprocessorPath
Path to the postprocessor.
method
property
protosOutputs
Output name for the protos.
method
property
scoresOutputs
Output name corresponding to predicted bounding box confidence scores.
method
property
strides
Strides for each YOLO output.
method
property
subtype
YOLO family decoding subtype (e.g. yolov5, yolov6, yolov7 etc.).
method
property
yoloOutputs
A list of output names for each of the different YOLO grid sizes.
method
class
depthai.nn_archive.v1.Model
method
property
heads
List of Head objects defining the model heads. If not defined, we assume a raw output.
method
property
inputs
List of Input objects defining the model inputs.
method
property
metadata
Metadata object defining the model metadata.
method
property
outputs
List of Output objects defining the model outputs.
method
class
depthai.nn_archive.v1.Output
class
depthai.nn_archive.v1.PreprocessingBlock
method
property
daiType
DepthAI input type which is read by DepthAI to automatically setup the pipeline.
method
property
interleavedToPlanar
If True input to the model is interleaved (NHWC) else planar (NCHW).
method
property
mean
Mean values in channel order. Order depends on the order in which the model was trained on.
method
property
reverseChannels
If True input to the model is RGB else BGR.
method
property
scale
Standardization values in channel order. Order depends on the order in which the model was trained on.
method
package
depthai.node
module
class
Align
Align node. Aligns ImgFrame and Transformable messages using ImgTransformation metadata.
class
AprilTag
AprilTag node.
class
class
BasaltVIO
Basalt Visual Inertial Odometry node. Performs VIO on stereo images and IMU data.
class
class
class
class
ColorCamera
ColorCamera node. For use with color sensors.
class
Depth
Depth node. Unified depth output from StereoDepth, NeuralDepth, NeuralAssistedStereo, ToF, or GPUStereo. With Algorithm::AUTO, the backend is chosen from device capabilities, target FPS, and stereo resolution. On RVC4 this prefers NeuralDepth when available; on other platforms it uses ToF when a ToF sensor is connected, otherwise StereoDepth. Use build() to pin algorithm, FPS, or resolution before the first depth() / confidence() access. Use setAlignTo() to align depth to another camera output.
class
DetectionNetwork
DetectionNetwork, base for different network specializations
class
DetectionParser
DetectionParser node. Parses detection results from Mobilenet-SSD or YOLO neural networks. @note If multiple detection heads are present in the NNArchive, only one type is supported (either YOLO or Mobilenet-SSD) and the last one will be used.
class
class
EdgeDetector
EdgeDetector node. Performs edge detection using 3x3 Sobel filter
class
FeatureTracker
FeatureTracker node. Performs feature tracking and reidentification using motion estimation between 2 consecutive frames.
class
GPUStereo
GPU-accelerated stereo depth node for RVC4. Computes disparity and depth maps from a synchronized stereo camera pair using OpenCL on the Adreno GPU. Supports both rectified and unrectified inputs (controlled via setRectification).
class
Gate
Gate Node. This node acts as a valve for data pipelines. It controls the flow of messages from the 'input' to the 'output' based on the state configured via 'inputControl'. It can be configured to stay open indefinitely, stay closed, or open for a specific number of messages.
class
class
IMU
IMU node for BNO08X.
class
ImageAlign
ImageAlign node. Calculates spatial location data on a set of ROIs on depth map.
class
class
ImageManip
ImageManip node. Capability to crop, resize, warp, ... incoming image frames
class
class
MonoCamera
MonoCamera node. For use with grayscale sensors.
class
NeuralAssistedStereo
NeuralAssistedStereo node. Combines Neural Depth with VPP and traditional Stereo Depth. This composite node internally creates and connects: - Rectification node (full resolution) - NeuralDepth node (low resolution depth estimation) - VPP node (applies virtual projection pattern) - StereoDepth node (final depth computation on VPP-enhanced images) Pipeline structure: Left/Right Cameras → Rectification → [Full res to VPP] ↓ NeuralDepth (low res) → [disparity + confidence to VPP] ↓ VPP (combines neural depth with full res images) ↓ StereoDepth → Final Depth Output
class
NeuralDepth
NeuralDepth node. Compute depth from left-right image pair using neural network.
class
NeuralNetwork
NeuralNetwork node. Runs a neural inference on input data.
class
ObjectTracker
ObjectTracker node. Performs object tracking using Kalman filter and hungarian algorithm.
class
PointCloud
PointCloud node. Computes point cloud from depth frames.
class
RGBD
RGBD node. Combines depth and color frames into a single point cloud.
class
RTABMapSLAM
RTABMap SLAM node. Performs SLAM on given odometry pose, rectified frame and depth frame.
class
RTABMapVIO
RTABMap Visual Inertial Odometry node. Performs VIO on rectified frame, depth frame and IMU data.
class
RecordMetadataOnly
RecordMetadataOnly node, used to record a source stream to a file
class
RecordVideo
RecordVideo node, used to record a video source stream to a file
class
class
ReplayMetadataOnly
Replay node, used to replay a file to a source node
class
ReplayVideo
Replay node, used to replay a file to a source node
class
SPIIn
SPIIn node. Receives messages over SPI.
class
SPIOut
SPIOut node. Sends messages over SPI.
class
class
SegmentationParser
SegmentationParser node. Parses raw segmentation output from segmentation neural networks into a dai::SegmentationMask datatype. The parser supports two output model types: 1. Single-channel output where the model argmaxes the class probabilities internally and outputs a single channel mask with class indices. 2. Multi-channel output where each channel corresponds to the probability map for a specific class. The parser will perform argmax across channels to generate the final mask. The parser can be configured to treat the first class (index 0) as the background class, which will be ignored in the final segmentation mask. .. warning:: Only OAK4 supports running SegmentationParser on device. On other platforms, the node will automatically switch to host execution.
class
SpatialDetectionNetwork
SpatialDetectionNetwork node. Runs a neural inference on input image and calculates spatial location data.
class
SpatialLocationCalculator
SpatialLocationCalculator node. Calculates the spatial locations of detected objects based on the input depth map. Spatial location calculations can be additionally refined by using a segmentation mask. If keypoints are provided, the spatial location is calculated around each keypoint.
class
StereoDepth
StereoDepth node. Compute stereo disparity and depth from left-right image pair.
class
Sync
Sync node. Performs syncing between image frames
class
SystemLogger
SystemLogger node. Send system information periodically.
class
Thermal
Thermal node.
class
class
class
ToFBase
ToFBase node. Performs feature tracking and reidentification using motion estimation between 2 consecutive frames.
class
ToFDepthConfidenceFilter
Node for depth confidence filter, designed to be used with the `ToF` node.
class
UVC
UVC (USB Video Class) node
class
VideoEncoder
VideoEncoder node. Encodes frames into MJPEG, H264 or H265.
class
Vpp
Vpp node. Apply Virtual Projection Pattern algorithm to stereo images based on disparity.
class
Warp
Warp node. Capability to crop, resize, warp, ... incoming image frames
class
depthai.node.Align(depthai.DeviceNode)
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setNumFramesPool(self, numFramesPool: int) -> Align: AlignSpecify number of frames in the pool
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
initialConfig
Initial config to use when aligning messages.
property
input
Input message to be aligned. Can be either ImgFrame or any message that implements Transformable interface. Default queue is non-blocking with size 4.
property
inputAlignTo
Input align to message. Default queue is non-blocking with size 1.
property
inputConfig
Input message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
outputAligned
Outputs the input message aligned to the inputAlignTo message. Output message will be of the same type as input message.
property
passthroughInput
Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
class
depthai.node.AprilTag(depthai.DeviceNode)
method
getNumThreads(self) -> int: intGet number of threads to use for AprilTag detection. Returns: Number of threads to use.
method
getWaitForConfigInput(self) -> bool: boolGet whether or not wait until configuration message arrives to inputConfig Input.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setNumThreads(self, numThreads: int)Set number of threads to use for AprilTag detection. Parameter ``numThreads``: Number of threads to use.
method
setRunOnHost(self, arg0: bool)Specify whether to run on host or device By default, the node will run on device.
method
setWaitForConfigInput(self, wait: bool)Specify whether or not wait until configuration message arrives to inputConfig Input. Parameter ``wait``: True to wait for configuration message, false otherwise.
property
initialConfig
Initial config to use when calculating spatial location data.
property
inputConfig
Input AprilTagConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
inputImage
Input message with depth data used to retrieve spatial information about detected object. Default queue is non-blocking with size 4.
property
out
Outputs AprilTags message that carries spatial location results.
property
passthroughInputImage
Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
class
depthai.node.AutoCalibration(depthai.DeviceNode)
class
depthai.node.BasaltVIO(depthai.node.ThreadedHostNode)
method
method
method
method
method
method
method
method
method
method
property
imu
Input IMU data.
property
property
passthrough
Output passthrough of left image.
property
property
transform
Output transform data.
class
depthai.node.BenchmarkIn(depthai.DeviceNode)
method
logReportsAsWarnings(self, logReportsAsWarnings: bool)Log the reports as warnings
method
measureIndividualLatencies(self, attachLatencies: bool)Attach latencies to the report
method
sendReportEveryNMessages(self, num: int)Specify how many messages to measure for each report
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
input
Receive messages as fast as possible
property
passthrough
Passthrough for input messages (so the node can be placed between other nodes)
property
report
Send a benchmark report when the set number of messages are received
class
depthai.node.BenchmarkOut(depthai.DeviceNode)
method
setFps(self, fps: float)Set FPS at which the node is sending out messages. 0 means as fast as possible
method
setNumMessagesToSend(self, num: int)Sets number of messages to send, by default send messages indefinitely Parameter ``num``: number of messages to send
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
input
Message that will be sent repeatedly
property
out
Send messages out as fast as possible
class
depthai.node.Camera(depthai.DeviceNode)
method
method
getBoardSocket(self) -> depthai.CameraBoardSocket: depthai.CameraBoardSocketRetrieves which board socket to use Returns: Board socket to use
method
getImageOrientation(self) -> depthai.CameraImageOrientation: depthai.CameraImageOrientationGet camera image orientation Returns: Image orientation
method
getIspNumFramesPool(self) -> int: intGet number of frames in isp pool Returns: Number of frames
method
getMaxSizePoolIsp(self) -> int: intGet maximum size of isp pool Returns: Maximum size in bytes of isp pool
method
getMaxSizePoolRaw(self) -> int: intGet maximum size of raw pool Returns: Maximum size in bytes of raw pool
method
getOutputsMaxSizePool(self) -> int|None: int|NoneGet maximum size of outputs pool for all outputs Returns: Maximum size in bytes of image manip pool
method
getOutputsNumFramesPool(self) -> int|None: int|NoneGet number of frames in outputs pool for all outputs Returns: Number of frames
method
getRawNumFramesPool(self) -> int: intGet number of frames in raw pool Returns: Number of frames
method
getSensorType(self) -> depthai.CameraSensorType: depthai.CameraSensorTypeGet the sensor type Returns: Sensor type
method
requestFullResolutionOutput(self, type: depthai.ImgFrame.Type
|
None = None, fps: float
|
None = None, useHighestResolution: bool = False) -> depthai.Node.Output: depthai.Node.OutputGet a high resolution output with full FOV on the sensor. By default the function will not use the resolutions higher than 5000x4000, as those often need a lot of resources, making them hard to use in combination with other nodes. Parameter ``type``: Type of the output (NV12, BGR, ...) - by default it's auto-selected for best performance Parameter ``fps``: FPS of the output - by default it's auto-selected to highest possible that a sensor config support or 30, whichever is lower Parameter ``useHighestResolution``: If true, the function will use the highest resolution available on the sensor, even if it's higher than 5000x4000
method
requestIspOutput(self, fps: float
|
None = None) -> depthai.Node.Output: depthai.Node.OutputRequest output with isp resolution. The fps does not vote.
method
method
setImageOrientation(self, imageOrientation: depthai.CameraImageOrientation) -> Camera: CameraSet camera image orientation Parameter ``imageOrientation``: Image orientation to set Returns: Shared pointer to the camera node
method
setIspNumFramesPool(self, num: int) -> Camera: CameraSet number of frames in isp pool (will be automatically reduced if the maximum pool memory size is exceeded) Parameter ``num``: Number of frames Returns: Shared pointer to the camera node
method
setMaxSizePoolIsp(self, size: int) -> Camera: CameraSet maximum size of isp pool Parameter ``size``: Maximum size in bytes of isp pool Returns: Shared pointer to the camera node
method
setMaxSizePoolRaw(self, size: int) -> Camera: CameraSet maximum size of raw pool Parameter ``size``: Maximum size in bytes of raw pool Returns: Shared pointer to the camera node
method
setMaxSizePools(self, raw: int, isp: int, imgmanip: int) -> Camera: CameraSet maximum memory size of all pools Parameter ``raw``: Maximum size in bytes of raw pool Parameter ``isp``: Maximum size in bytes of isp pool Parameter ``outputs``: Maximum size in bytes of outputs pools Returns: Shared pointer to the camera node
method
setMockIsp(self, mockIsp: ReplayVideo) -> Camera: CameraSet mock ISP for Camera node. Automatically sets mockIsp size. Parameter ``replay``: ReplayVideo node to use as mock ISP
method
setNumFramesPools(self, raw: int, isp: int, imgmanip: int) -> Camera: CameraSet number of frames in all pools (will be automatically reduced if the maximum pool memory size is exceeded) Parameter ``raw``: Number of frames in raw pool Parameter ``isp``: Number of frames in isp pool Parameter ``outputs``: Number of frames in outputs pools Returns: Shared pointer to the camera node
method
setOutputsMaxSizePool(self, size: int) -> Camera: CameraSet maximum size of pools for all outputs Parameter ``size``: Maximum size in bytes of pools for all outputs Returns: Shared pointer to the camera node
method
setOutputsNumFramesPool(self, num: int) -> Camera: CameraSet number of frames in pools for all outputs Parameter ``num``: Number of frames in pools for all outputs Returns: Shared pointer to the camera node
method
setRawNumFramesPool(self, num: int) -> Camera: CameraSet number of frames in raw pool (will be automatically reduced if the maximum pool memory size is exceeded) Parameter ``num``: Number of frames Returns: Shared pointer to the camera node
method
setSensorType(self, sensorType: depthai.CameraSensorType) -> Camera: CameraSet the sensor type to use Parameter ``sensorType``: Sensor type to use
property
initialControl
Initial control options to apply to sensor
property
inputControl
Input for CameraControl message, which can modify camera parameters in runtime
property
mockIsp
Input for mocking 'isp' functionality on RVC2. Default queue is blocking with size 8
property
raw
Outputs ImgFrame message that carries RAW10-packed (MIPI CSI-2 format) frame data. Captured directly from the camera sensor, and the source for the 'isp' output.
class
depthai.node.ColorCamera(depthai.DeviceNode)
method
method
getBoardSocket(self) -> depthai.CameraBoardSocket: depthai.CameraBoardSocketRetrieves which board socket to use Returns: Board socket to use
method
method
getCamera(self) -> str: strRetrieves which camera to use by name Returns: Name of the camera to use
method
getColorOrder(self) -> depthai.ColorCameraProperties.ColorOrder: depthai.ColorCameraProperties.ColorOrderGet color order of preview output frames. RGB or BGR
method
getFp16(self) -> bool: boolGet fp16 (0..255) data of preview output frames
method
getFps(self) -> float: floatGet rate at which camera should produce frames Returns: Rate in frames per second
method
method
getImageOrientation(self) -> depthai.CameraImageOrientation: depthai.CameraImageOrientationGet camera image orientation
method
getInterleaved(self) -> bool: boolGet planar or interleaved data of preview output frames
method
getIspHeight(self) -> int: intGet 'isp' output height
method
getIspNumFramesPool(self) -> int: intGet number of frames in isp pool
method
getIspSize(self) -> tuple[int, int]: tuple[int, int]Get 'isp' output resolution as size, after scaling
method
getIspWidth(self) -> int: intGet 'isp' output width
method
getPreviewHeight(self) -> int: intGet preview height
method
getPreviewKeepAspectRatio(self) -> bool: boolSee also: setPreviewKeepAspectRatio Returns: Preview keep aspect ratio option
method
getPreviewNumFramesPool(self) -> int: intGet number of frames in preview pool
method
getPreviewSize(self) -> tuple[int, int]: tuple[int, int]Get preview size as tuple
method
getPreviewWidth(self) -> int: intGet preview width
method
getRawNumFramesPool(self) -> int: intGet number of frames in raw pool
method
getResolution(self) -> depthai.ColorCameraProperties.SensorResolution: depthai.ColorCameraProperties.SensorResolutionGet sensor resolution
method
getResolutionHeight(self) -> int: intGet sensor resolution height
method
getResolutionSize(self) -> tuple[int, int]: tuple[int, int]Get sensor resolution as size
method
getResolutionWidth(self) -> int: intGet sensor resolution width
method
getSensorCrop(self) -> tuple[float, float]: tuple[float, float]Returns: Sensor top left crop coordinates
method
getSensorCropX(self) -> float: floatGet sensor top left x crop coordinate
method
getSensorCropY(self) -> float: floatGet sensor top left y crop coordinate
method
getStillHeight(self) -> int: intGet still height
method
getStillNumFramesPool(self) -> int: intGet number of frames in still pool
method
getStillSize(self) -> tuple[int, int]: tuple[int, int]Get still size as tuple
method
getStillWidth(self) -> int: intGet still width
method
getVideoHeight(self) -> int: intGet video height
method
getVideoNumFramesPool(self) -> int: intGet number of frames in video pool
method
getVideoSize(self) -> tuple[int, int]: tuple[int, int]Get video size as tuple
method
getVideoWidth(self) -> int: intGet video width
method
sensorCenterCrop(self)Specify sensor center crop. Resolution size / video size
method
setBoardSocket(self, boardSocket: depthai.CameraBoardSocket)Specify which board socket to use Parameter ``boardSocket``: Board socket to use
method
method
setCamera(self, name: str)Specify which camera to use by name Parameter ``name``: Name of the camera to use
method
setColorOrder(self, colorOrder: depthai.ColorCameraProperties.ColorOrder)Set color order of preview output images. RGB or BGR
method
setFp16(self, fp16: bool)Set fp16 (0..255) data type of preview output frames
method
setFps(self, fps: float)Set rate at which camera should produce frames Parameter ``fps``: Rate in frames per second
method
method
setImageOrientation(self, imageOrientation: depthai.CameraImageOrientation)Set camera image orientation
method
setInterleaved(self, interleaved: bool)Set planar or interleaved data of preview output frames
method
setIsp3aFps(self, arg0: int)Isp 3A rate (auto focus, auto exposure, auto white balance, camera controls etc.). Default (0) matches the camera FPS, meaning that 3A is running on each frame. Reducing the rate of 3A reduces the CPU usage on CSS, but also increases the convergence rate of 3A. Note that camera controls will be processed at this rate. E.g. if camera is running at 30 fps, and camera control is sent at every frame, but 3A fps is set to 15, the camera control messages will be processed at 15 fps rate, which will lead to queueing.
method
setIspNumFramesPool(self, arg0: int)Set number of frames in isp pool
method
method
setNumFramesPool(self, raw: int, isp: int, preview: int, video: int, still: int)Set number of frames in all pools
method
setPreviewKeepAspectRatio(self, keep: bool)Specifies whether preview output should preserve aspect ratio, after downscaling from video size or not. Parameter ``keep``: If true, a larger crop region will be considered to still be able to create the final image in the specified aspect ratio. Otherwise video size is resized to fit preview size
method
setPreviewNumFramesPool(self, arg0: int)Set number of frames in preview pool
method
method
setRawNumFramesPool(self, arg0: int)Set number of frames in raw pool
method
setRawOutputPacked(self, packed: bool)Configures whether the camera `raw` frames are saved as MIPI-packed to memory. The packed format is more efficient, consuming less memory on device, and less data to send to host: RAW10: 4 pixels saved on 5 bytes, RAW12: 2 pixels saved on 3 bytes. When packing is disabled (`false`), data is saved lsb-aligned, e.g. a RAW10 pixel will be stored as uint16, on bits 9..0: 0b0000'00pp'pppp'pppp. Default is auto: enabled for standard color/monochrome cameras where ISP can work with both packed/unpacked, but disabled for other cameras like ToF.
method
setResolution(self, resolution: depthai.ColorCameraProperties.SensorResolution)Set sensor resolution
method
setSensorCrop(self, x: float, y: float)Specifies the cropping that happens when converting ISP to video output. By default, video will be center cropped from the ISP output. Note that this doesn't actually do on-sensor cropping (and MIPI-stream only that region), but it does postprocessing on the ISP (on RVC). Parameter ``x``: Top left X coordinate Parameter ``y``: Top left Y coordinate
method
setStillNumFramesPool(self, arg0: int)Set number of frames in preview pool
method
method
setVideoNumFramesPool(self, arg0: int)Set number of frames in preview pool
method
property
frameEvent
Outputs metadata-only ImgFrame message as an early indicator of an incoming frame. It's sent on the MIPI SoF (start-of-frame) event, just after the exposure of the current frame has finished and before the exposure for next frame starts. Could be used to synchronize various processes with camera capture. Fields populated: camera id, sequence number, timestamp
property
initialControl
Initial control options to apply to sensor
property
inputControl
Input for CameraControl message, which can modify camera parameters in runtime
property
isp
Outputs ImgFrame message that carries YUV420 planar (I420/IYUV) frame data. Generated by the ISP engine, and the source for the 'video', 'preview' and 'still' outputs
property
preview
Outputs ImgFrame message that carries BGR/RGB planar/interleaved encoded frame data. Suitable for use with NeuralNetwork node
property
raw
Outputs ImgFrame message that carries RAW10-packed (MIPI CSI-2 format) frame data. Captured directly from the camera sensor, and the source for the 'isp' output.
property
still
Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data. The message is sent only when a CameraControl message arrives to inputControl with captureStill command set.
property
video
Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data. Suitable for use with VideoEncoder node
class
depthai.node.Depth(depthai.DeviceNodeGroup)
class
Algorithm
Backend selection for the Depth node. Members: AUTO STEREO NEURAL NEURAL_ASSISTED_STEREO TOF GPU_STEREO
method
method
getRequestedAlgorithm(self) -> Depth.Algorithm: Depth.AlgorithmGet the requested algorithm selection.
method
getRequestedConfig(self) -> typing.Any: typing.AnyGet the requested config override, if any. Returns: Config override, or std::nullopt when config is auto-picked
method
getResolvedAlgorithm(self) -> Depth.Algorithm: Depth.AlgorithmGet the algorithm actually wired (AUTO resolved). Valid after first depth() access.
method
getResolvedConfig(self) -> typing.Any: typing.AnyGet the resolved algorithm-specific config.
method
setAlgorithm(self, algorithm: Depth.Algorithm) -> Depth: DepthSet the requested algorithm before wiring. Parameter ``algorithm``: Backend to use; AUTO re-enables auto-selection
method
setAlignTo(self, alignTo: depthai.Node.Output) -> Depth: DepthAlign depth output to another image source. Must be called before first depth() or confidence() access. Only depth() is aligned; confidence() stays in the backend frame. Parameter ``alignTo``: Output to align depth to
method
property
confidence
Output confidence map from the active backend. When ToF is active, this forwards the actual ToF confidence output.
property
depth
Output depth map from the active backend.
class
depthai.node.Depth.Algorithm
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.node.DetectionNetwork(depthai.DeviceNodeGroup)
class
method
method
method
method
getConfidenceThreshold(self) -> float: floatRetrieves threshold at which to filter the rest of the detections. Returns: Detection confidence
method
getNumInferenceThreads(self) -> int: intHow many inference threads will be used to run the network Returns: Number of threads, 0, 1 or 2. Zero means AUTO
method
setBackend(self, setBackend: str)Specifies backend to use Parameter ``backend``: String specifying backend to use
method
setBackendProperties(self, setBackendProperties: dict
[
str
,
str
])Set backend properties Parameter ``backendProperties``: backend properties map
method
method
setBlobPath(self, path: os.PathLike)Load network blob into assets and use once pipeline is started. Throws: Error if file doesn't exist or isn't a valid network blob. Parameter ``path``: Path to network blob
method
setConfidenceThreshold(self, thresh: float)Specifies confidence threshold at which to filter the rest of the detections. Parameter ``thresh``: Detection confidence must be greater than specified threshold to be added to the list
method
setFromModelZoo(self, description: depthai.NNModelDescription, useCached: bool = False)Download model from zoo and set it for this Node Parameter ``description:``: Model description to download Parameter ``useCached:``: Use cached model if available
method
setModelPath(self, modelPath: os.PathLike)Load a network model into assets. DLC and other custom model files are loaded lazily and must remain available and unchanged until the pipeline has been built. Parameter ``modelPath``: Path to the model file.
method
method
setNumInferenceThreads(self, numThreads: int)How many threads should the node use to run the network. Parameter ``numThreads``: Number of threads to dedicate to this node
method
setNumNCEPerInferenceThread(self, numNCEPerThread: int)How many Neural Compute Engines should a single thread use for inference Parameter ``numNCEPerThread``: Number of NCE per thread
method
setNumPoolFrames(self, numFrames: int)Specifies how many frames will be available in the pool Parameter ``numFrames``: How many frames will pool have
method
setNumShavesPerInferenceThread(self, numShavesPerInferenceThread: int)How many Shaves should a single thread use for inference Parameter ``numShavesPerThread``: Number of shaves per thread
property
property
input
Input message with data to be inferred upon
property
property
out
Outputs ImgDetections message that carries parsed detection results. Overrides NeuralNetwork 'out' with ImgDetections output message type.
property
outNetwork
Outputs unparsed inference results.
property
passthrough
Passthrough message on which the inference was performed. Suitable for when input queue is set to non-blocking behavior.
class
depthai.node.DetectionNetwork.Model
method
class
depthai.node.DetectionParser(depthai.DeviceNode)
method
method
getAnchorMasks(self) -> dict[str, list[int]]: dict[str, list[int]]Get anchor masks for anchor-based yolo models
method
getAnchors(self) -> list[float]: list[float]Get anchors for anchor-based yolo models
method
getClasses(self) -> list[str]|None: list[str]|NoneGet class names to decode.
method
getConfidenceThreshold(self) -> float: floatRetrieves threshold at which to filter the rest of the detections. Returns: Detection confidence
method
getCoordinateSize(self) -> int: intGet number of coordinates per bounding box.
method
getDecodeKeypoints(self) -> bool: boolGet whether keypoints decoding is enabled.
method
getDecodeSegmentation(self) -> bool: boolGet whether segmentation mask decoding is enabled.
method
getIouThreshold(self) -> float: floatGet IOU threshold for non-maxima suppression
method
getNNFamily(self) -> depthai.DetectionNetworkType: depthai.DetectionNetworkTypeGets NN Family to parse
method
getNkeypoints(self) -> int: intGet number of keypoints to decode.
method
getNumClasses(self) -> int: intGet number of classes to decode.
method
getNumFramesPool(self) -> int: intReturns number of frames in pool
method
getStrides(self) -> list[int]: list[int]Get strides for yolo models
method
getSubtype(self) -> str: strGet subtype for the parser.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setAnchorMasks(self, anchorMasks: dict
[
str
,
list
[
int
]
])Set anchor masks for anchor-based yolo models Parameter ``anchorMasks``: Map of anchor masks
method
method
method
setBlobPath(self, path: os.PathLike)Load network blob into assets and use once pipeline is started. Throws: Error if file doesn't exist or isn't a valid network blob. Parameter ``path``: Path to network blob
method
setClasses(self, classes: list
[
str
])Set class names. This will clear any previously set number of classes. Parameter ``classes``: Vector of class names
method
setConfidenceThreshold(self, thresh: float)Specifies confidence threshold at which to filter the rest of the detections. Parameter ``thresh``: Detection confidence must be greater than specified threshold to be added to the list
method
setCoordinateSize(self, coordinates: int)Sets the number of coordinates per bounding box. Parameter ``coordinates``: Number of coordinates. Default is 4
method
setDecodeKeypoints(self, decode: bool)Enable/disable keypoints decoding. If enabled, number of keypoints must also be set.
method
setDecodeSegmentation(self, decode: bool)Enable/disable segmentation mask decoding.
method
method
setIouThreshold(self, thresh: float)Set IOU threshold for non-maxima suppression Parameter ``thresh``: IOU threshold
method
setKeypointEdges(self, edges: list
[
typing.Annotated
[
list
[
int
]
,
pybind11_stubgen.typing_ext.FixedSize
(
2
)
]
])Set edges connections between keypoints. Parameter ``edges``: Vector edges connections represented as pairs of keypoint indices. @note This is only applicable if keypoints decoding is enabled.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. If the archive's type is SUPERBLOB, use default number of shaves. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. Parameter ``head:``: NNArchive head to set
method
setNNFamily(self, type: depthai.DetectionNetworkType)Sets NN Family to parse. Possible values are: DetectionNetworkType::YOLO - 0 DetectionNetworkType::MOBILENET - 1 .. warning:: If NN Family is set manually, user must ensure that it matches the actual model being used.
method
setNumClasses(self, numClasses: int)Set number of classes. This will clear any previously set class names. Parameter ``numClasses``: Number of classes
method
setNumFramesPool(self, numFramesPool: int)Specify number of frames in pool. Parameter ``numFramesPool``: How many frames should the pool have
method
setNumKeypoints(self, numKeypoints: int)Set number of keypoints to decode. Automatically enables keypoints decoding.
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
method
setStrides(self, strides: list
[
int
])Set strides for yolo models
method
setSubtype(self, subtype: str)Set subtype for the parser. Parameter ``subtype``: Subtype string, currently supported subtypes are: yolov6r1, yolov6r2 yolov8n, yolov6, yolov8, yolov10, yolov11, yolov3, yolov3-tiny, yolov5, yolov7, yolo-p, yolov5-u
property
input
Input NN results with detection data to parse Default queue is blocking with size 5
property
out
Outputs image frame with detected edges
class
depthai.node.DynamicCalibration(depthai.DeviceNode)
method
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on host on RVC2 and on device on RVC4.
property
calibrationOutput
Output calibration quality result
property
property
inputControl
Input DynamicCalibrationControl message with ability to modify parameters in runtime.
property
property
property
property
property
property
property
class
depthai.node.EdgeDetector(depthai.DeviceNode)
method
setMaxOutputFrameSize(self, arg0: int)Specify maximum size of output image. Parameter ``maxFrameSize``: Maximum frame size in bytes
method
setNumFramesPool(self, arg0: int)Specify number of frames in pool. Parameter ``numFramesPool``: How many frames should the pool have
property
initialConfig
Initial config to use for edge detection.
property
inputConfig
Input EdgeDetectorConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
inputImage
Input image on which edge detection is performed. Default queue is non-blocking with size 4.
property
outputImage
Outputs image frame with detected edges
class
depthai.node.FeatureTracker(depthai.DeviceNode)
method
setHardwareResources(self, numShaves: int, numMemorySlices: int)Specify allocated hardware resources for feature tracking. 2 shaves/memory slices are required for optical flow, 1 for corner detection only. Parameter ``numShaves``: Number of shaves. Maximum 2. Parameter ``numMemorySlices``: Number of memory slices. Maximum 2.
property
initialConfig
Initial config to use for feature tracking.
property
inputConfig
Input FeatureTrackerConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
inputImage
Input message with frame data on which feature tracking is performed. Default queue is non-blocking with size 4.
property
outputFeatures
Outputs TrackedFeatures message that carries tracked features results.
property
passthroughInputImage
Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
class
depthai.node.GPUStereo(depthai.DeviceNode)
method
build(self, leftInput: depthai.Node.Output, rightInput: depthai.Node.Output) -> GPUStereo: GPUStereoBuild the node by linking left and right camera outputs.
method
setRectification(self, enable: bool) -> GPUStereo: GPUStereoEnable or disable built-in stereo rectification. When enabled, the node rectifies the input images internally using calibration data. When disabled, inputs are expected to be already rectified.
property
confidenceMap
Outputs ImgFrame message that carries RAW8 confidence map. Lower values mean lower confidence of the calculated disparity value. Note: postprocessing steps like LR-check/median filter are not applied to confidence map.
property
depth
Outputs ImgFrame message that carries RAW16 encoded (0..65535) depth data in depth units (millimeter by default). Non-determined / invalid depth values are set to 0
property
disparity
Outputs ImgFrame message that carries RAW16 encoded disparity data.
property
initialConfig
Initial config to use for GPUStereo. Use this to configure startup parameters before the pipeline starts. Note: Only `confidenceThreshold` is supported/exposed for this node.
property
property
class
depthai.node.Gate(depthai.DeviceNode)
method
runOnHost(self) -> bool: boolCheck if the node is configured to run on the host. Returns: true if running on host, false otherwise.
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
initialConfig
Initial config of the node.
method
property
input
Main data input. * Accepts arbitrary Buffer messages (e.g., ImgFrame, NNData). If the Gate is Open, messages received here are forwarded to 'output'. If the Gate is Closed, messages received here are discarded/dropped. * Default queue size: 1 Blocking: False
property
inputControl
Control input. * Accepts 'GateControl' messages to dynamically change the Gate's state. Use this to Open/Close the gate or set it to pass a specific number of frames at runtime. * Default queue size: 4
property
output
Main data output. * Forwards messages that were allowed through the Gate. The data type matches the input message.
class
depthai.node.HostNode(depthai.node.ThreadedHostNode)
CLASS_METHOD
method
method
method
method
method
method
method
method
sendProcessingToPipeline(self, arg0: bool)Send processing to pipeline. If set to true, it's important to call `pipeline.run()` in the main thread or `pipeline.processTasks()` in the main thread. Otherwise, if set to false, such action is not needed.
property
property
class
depthai.node.IMU(depthai.DeviceNode)
method
enableFirmwareUpdate(self, arg0: bool)Whether to perform firmware update or not. Default value: false.
method
method
getBatchReportThreshold(self) -> int: intAbove this packet threshold data will be sent to host, if queue is not blocked
method
getMaxBatchReports(self) -> int: intMaximum number of IMU packets in a batch report
method
setBatchReportThreshold(self, batchReportThreshold: int)Above this packet threshold data will be sent to host, if queue is not blocked
method
setMaxBatchReports(self, maxBatchReports: int)Maximum number of IMU packets in a batch report
property
mockIn
Mock IMU data for replaying recorded data
property
out
Outputs IMUData message that carries IMU packets.
class
depthai.node.ImageAlign(depthai.DeviceNode)
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setInterpolation(self, interp: depthai.Interpolation) -> ImageAlign: ImageAlignSpecify interpolation method to use when resizing
method
setNumFramesPool(self, numFramesPool: int) -> ImageAlign: ImageAlignSpecify number of frames in the pool
method
setNumShaves(self, numShaves: int) -> ImageAlign: ImageAlignSpecify number of shaves to use for this node
method
setOutKeepAspectRatio(self, keep: bool) -> ImageAlign: ImageAlignSpecify whether to keep aspect ratio when resizing
method
setOutputSize(self, alignWidth: int, alignHeight: int) -> ImageAlign: ImageAlignSpecify the output size of the aligned image
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
initialConfig
Initial config to use when calculating spatial location data.
property
input
Input message. Default queue is non-blocking with size 4.
property
inputAlignTo
Input align to message. Default queue is non-blocking with size 1.
property
inputConfig
Input message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
outputAligned
Outputs ImgFrame message that is aligned to inputAlignTo.
property
passthroughInput
Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
class
depthai.node.ImageFilters(depthai.DeviceNode)
method
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
initialConfig
Initial config for image filters.
property
input
Input for image frames to be filtered
property
inputConfig
Config to be set for a specific filter
property
output
Filtered frame
class
depthai.node.ImageManip(depthai.DeviceNode)
class
Backend
Members: HW CPU GPU AUTO
class
PerformanceMode
Members: BALANCED PERFORMANCE LOW_POWER
method
setBackend(self, arg0: depthai.ImageManipProperties.Backend) -> ImageManip: ImageManipSet backend preference: - CPU: Run ImageManip on the CPU. - HW: Prefer the dedicated hardware image manipulation backend. - GPU: Prefer the GPU backend. - AUTO: Let the runtime select the backend automatically (GPU with CPU fallback). Hardware-accelerated backends can cause some unexpected behavior when using multiple ImageManip nodes in series. Currently, the only operation affected is downscaling. Parameter ``backend``: Backend preference
method
setMaxOutputFrameSize(self, arg0: int)Specify maximum size of output image. Parameter ``maxFrameSize``: Maximum frame size in bytes
method
setMaxPoolSize(self, arg0: int)Specify maximum size of output image pool. Parameter ``maxPoolSize``: Maximum pool size in bytes
method
setNumFramesPool(self, arg0: int)Specify number of frames in pool. Parameter ``numFramesPool``: How many frames should the pool have
method
setPerformanceMode(self, arg0: depthai.ImageManipProperties.PerformanceMode) -> ImageManip: ImageManipSet performance mode Parameter ``performanceMode``: Performance mode
method
setRunOnHost(self, arg0: bool) -> ImageManip: ImageManipSpecify whether to run on host or device Parameter ``runOnHost``: Run node on host
property
initialConfig
Initial config to use when manipulating frames
property
inputConfig
Input ImageManipConfig message with ability to modify parameters in runtime
property
inputImage
Input image to be modified
property
class
depthai.node.ImageManip.Backend
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.node.ImageManip.PerformanceMode
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.node.MessageDemux(depthai.DeviceNode)
method
getProcessor(self) -> depthai.ProcessorType: depthai.ProcessorTypeGet on which processor the node should run Returns: Processor type - Leon CSS or Leon MSS
method
setProcessor(self, arg0: depthai.ProcessorType)Specify on which processor the node should run. RVC2 only. Parameter ``type``: Processor type - Leon CSS or Leon MSS
property
input
Input message of type MessageGroup
property
outputs
A map of outputs, where keys are same as in the input MessageGroup
class
depthai.node.MonoCamera(depthai.DeviceNode)
method
getBoardSocket(self) -> depthai.CameraBoardSocket: depthai.CameraBoardSocketRetrieves which board socket to use Returns: Board socket to use
method
method
getCamera(self) -> str: strRetrieves which camera to use by name Returns: Name of the camera to use
method
getFps(self) -> float: floatGet rate at which camera should produce frames Returns: Rate in frames per second
method
method
getImageOrientation(self) -> depthai.CameraImageOrientation: depthai.CameraImageOrientationGet camera image orientation
method
getNumFramesPool(self) -> int: intGet number of frames in main (ISP output) pool
method
getRawNumFramesPool(self) -> int: intGet number of frames in raw pool
method
getResolution(self) -> depthai.MonoCameraProperties.SensorResolution: depthai.MonoCameraProperties.SensorResolutionGet sensor resolution
method
getResolutionHeight(self) -> int: intGet sensor resolution height
method
getResolutionSize(self) -> tuple[int, int]: tuple[int, int]Get sensor resolution as size
method
getResolutionWidth(self) -> int: intGet sensor resolution width
method
setBoardSocket(self, boardSocket: depthai.CameraBoardSocket)Specify which board socket to use Parameter ``boardSocket``: Board socket to use
method
method
setCamera(self, name: str)Specify which camera to use by name Parameter ``name``: Name of the camera to use
method
setFps(self, fps: float)Set rate at which camera should produce frames Parameter ``fps``: Rate in frames per second
method
method
setImageOrientation(self, imageOrientation: depthai.CameraImageOrientation)Set camera image orientation
method
setIsp3aFps(self, arg0: int)Isp 3A rate (auto focus, auto exposure, auto white balance, camera controls etc.). Default (0) matches the camera FPS, meaning that 3A is running on each frame. Reducing the rate of 3A reduces the CPU usage on CSS, but also increases the convergence rate of 3A. Note that camera controls will be processed at this rate. E.g. if camera is running at 30 fps, and camera control is sent at every frame, but 3A fps is set to 15, the camera control messages will be processed at 15 fps rate, which will lead to queueing.
method
setNumFramesPool(self, arg0: int)Set number of frames in main (ISP output) pool
method
setRawNumFramesPool(self, arg0: int)Set number of frames in raw pool
method
setRawOutputPacked(self, packed: bool)Configures whether the camera `raw` frames are saved as MIPI-packed to memory. The packed format is more efficient, consuming less memory on device, and less data to send to host: RAW10: 4 pixels saved on 5 bytes, RAW12: 2 pixels saved on 3 bytes. When packing is disabled (`false`), data is saved lsb-aligned, e.g. a RAW10 pixel will be stored as uint16, on bits 9..0: 0b0000'00pp'pppp'pppp. Default is auto: enabled for standard color/monochrome cameras where ISP can work with both packed/unpacked, but disabled for other cameras like ToF.
method
setResolution(self, resolution: depthai.MonoCameraProperties.SensorResolution)Set sensor resolution
property
property
initialControl
Initial control options to apply to sensor
property
property
property
class
depthai.node.NeuralAssistedStereo(depthai.DeviceNode)
method
property
property
property
property
property
property
property
property
property
property
property
property
property
property
property
property
property
class
depthai.node.NeuralDepth(depthai.DeviceNode)
static method
NeuralDepth.getInputSize(model: depthai.DeviceModelZoo) -> tuple[int, int]: tuple[int, int]Get input size for specific model
method
method
setRectification(self, enable: bool) -> NeuralDepth: NeuralDepthEnable or disable rectification (useful for prerectified inputs)
property
confidence
Output confidence ImgFrame
property
depth
Output depth ImgFrame
property
disparity
Output disparity ImgFrame
property
edge
Output edge ImgFrame
property
initialConfig
Initial config to use for NeuralDepth.
property
inputConfig
Input config to modify parameters in runtime.
property
left
Input for left ImgFrame of left-right pair
property
property
property
property
rectifiedLeft
Output for rectified left ImgFrame
property
rectifiedRight
Output for rectified right ImgFrame
property
right
Input for right ImgFrame of left-right pair
property
class
depthai.node.NeuralNetwork(depthai.DeviceNode)
class
method
method
getNNArchive(self) -> depthai.NNArchive|None: depthai.NNArchive|NoneGet the archive owned by this Node. Returns: constant reference to this Nodes archive
method
getNumInferenceThreads(self) -> int: intHow many inference threads will be used to run the network Returns: Number of threads, 0, 1 or 2. Zero means AUTO
method
setBackend(self, setBackend: str)Specifies backend to use Parameter ``backend``: String specifying backend to use
method
setBackendProperties(self, setBackendProperties: dict
[
str
,
str
])Set backend properties Parameter ``backendProperties``: backend properties map
method
method
setBlobPath(self, path: os.PathLike)Load network blob into assets and use once pipeline is started. Throws: Error if file doesn't exist or isn't a valid network blob. Parameter ``path``: Path to network blob
method
setFromModelZoo(self, description: depthai.NNModelDescription, useCached: bool)Download model from zoo and set it for this Node Parameter ``description:``: Model description to download Parameter ``useCached:``: Use cached model if available
method
setModelFromDeviceZoo(self, model: depthai.DeviceModelZoo)Set model from Device Model Zoo Parameter ``model``: DeviceModelZoo model enum @note Only applicable for RVC4 devices with OS 1.20.5 or higher
method
setModelPath(self, modelPath: os.PathLike)Load a network model into assets. DLC and other custom model files are loaded lazily and must remain available and unchanged until the pipeline has been built. Parameter ``modelPath``: Path to the neural network model file.
method
method
setNumInferenceThreads(self, numThreads: int)How many threads should the node use to run the network. Parameter ``numThreads``: Number of threads to dedicate to this node
method
setNumNCEPerInferenceThread(self, numNCEPerThread: int)How many Neural Compute Engines should a single thread use for inference Parameter ``numNCEPerThread``: Number of NCE per thread
method
setNumPoolFrames(self, numFrames: int)Specifies how many frames will be available in the pool Parameter ``numFrames``: How many frames will pool have
method
setNumShavesPerInferenceThread(self, numShavesPerInferenceThread: int)How many Shaves should a single thread use for inference Parameter ``numShavesPerThread``: Number of shaves per thread
property
input
Input message with data to be inferred upon
property
inputs
Inputs mapped to network inputs. Useful for inferring from separate data sources Default input is non-blocking with queue size 1 and waits for messages
property
out
Outputs NNData message that carries inference results
property
passthrough
Passthrough message on which the inference was performed. Suitable for when input queue is set to non-blocking behavior.
property
passthroughs
Passthroughs which correspond to specified input
class
depthai.node.NeuralNetwork.Model
method
class
depthai.node.ObjectTracker(depthai.DeviceNode)
method
setDetectionLabelsToTrack(self, labels: list
[
int
])Specify detection labels to track. Parameter ``labels``: Detection labels to track. Default every label is tracked from image detection network output.
method
setMaxObjectsToTrack(self, maxObjectsToTrack: int)Specify maximum number of object to track. Parameter ``maxObjectsToTrack``: Maximum number of object to track. Maximum 60 in case of SHORT_TERM_KCF, otherwise 1000.
method
setOcclusionRatioThreshold(self, threshold: float)Set the occlusion ratio threshold. Used to filter out overlapping tracklets. Parameter ``theshold``: Occlusion ratio threshold. Default 0.3.
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
method
setSpatialAssociation(self, enabled: bool)Enable or disable spatially-aware association. If disabled, only 2D association is used. Parameter ``enabled``: `true` enables spatially-aware association, `false` uses 2D-only association. Default is false.
method
setSpatialAssociationWeight(self, weight: float)Set spatial association weight in [0,1]. Parameter ``weight``: Spatial association weight in [0,1] used to blend 2D and spatial association scores (0 = 2D-only scoring, 1 = spatial-only scoring). This weight affects candidate scoring only; final acceptance still requires passing the 2D IoU threshold gate. Default is 0.5.
method
setSpatialDepthAwareScale(self, scale: float)Set depth-aware gating scale used for spatial association. Increases gating threshold with increased depth. Parameter ``scale``: Depth-aware gating scale factor. Default is 0.35
method
setSpatialDistanceThreshold(self, thresholdMeters: float)Set base 3D gating threshold in meters for spatial association. Parameter ``thresholdMeters``: Base spatial gating distance in meters. Default is 1.5m.
method
setTrackerIdAssignmentPolicy(self, type: depthai.TrackerIdAssignmentPolicy)Specify tracker ID assignment policy. Parameter ``type``: Tracker ID assignment policy.
method
setTrackerThreshold(self, threshold: float)Specify tracker threshold. Parameter ``threshold``: Above this threshold the detected objects will be tracked. Default 0, all image detections are tracked.
method
setTrackerType(self, type: depthai.TrackerType)Specify tracker type algorithm. Parameter ``type``: Tracker type.
method
setTrackingPerClass(self, trackingPerClass: bool)Whether tracker should take into consideration class label for tracking.
method
setTrackletBirthThreshold(self, trackletBirthThreshold: int)Set the tracklet birth threshold. Minimum consecutive tracked frames required to consider a tracklet as a new (TRACKED) instance. Parameter ``trackletBirthThreshold``: Tracklet birth threshold. Default 3.
method
setTrackletMaxLifespan(self, trackletMaxLifespan: int)Set the tracklet lifespan in number of frames. Number of frames after which a LOST tracklet is removed. Parameter ``trackletMaxLifespan``: Tracklet lifespan in number of frames. Default 120.
property
inputConfig
Input ObjectTrackerConfig message with ability to modify parameters at runtime. Default queue is non-blocking with size 4.
property
inputDetectionFrame
Input ImgFrame message on which object detection was performed. Default queue is non-blocking with size 4.
property
inputDetections
Input message with image detection from neural network. Default queue is non- blocking with size 4.
property
inputTrackerFrame
Input ImgFrame message on which tracking will be performed. RGBp, BGRp, NV12, YUV420p types are supported. Default queue is non-blocking with size 4.
property
out
Outputs Tracklets message that carries object tracking results.
property
passthroughDetectionFrame
Passthrough ImgFrame message on which object detection was performed. Suitable for when input queue is set to non-blocking behavior.
property
passthroughDetections
Passthrough image detections message from neural network output. Suitable for when input queue is set to non-blocking behavior.
property
passthroughTrackerFrame
Passthrough ImgFrame message on which tracking was performed. Suitable for when input queue is set to non-blocking behavior.
class
depthai.node.PointCloud(depthai.DeviceNode)
method
setNumFramesPool(self, numFramesPool: int)Specify number of frames in pool. Parameter ``numFramesPool``: How many frames should the pool have
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on host.
method
method
useCPU(self)Use single-threaded CPU for processing
method
useCPUMT(self, numThreads: int = 2)Use multi-threaded CPU for processing
method
useGPU(self, device: int = 0)Use GPU for point cloud computation Parameter ``device``: GPU device index (default 0)
property
initialConfig
Initial config to use when computing the point cloud.
property
property
inputConfig
Input PointCloudConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
property
outputPointCloud
Outputs PointCloudData message
property
passthroughDepth
Passthrough depth from which the point cloud was calculated. Suitable for when input queue is set to non-blocking behavior.
class
depthai.node.RGBD(depthai.node.ThreadedHostNode)
method
method
printDevices(self)Print available GPU devices
method
method
useCPU(self)Use single-threaded CPU for processing
method
useCPUMT(self, numThreads: int = 2)Use multi-threaded CPU for processing Parameter ``numThreads``: Number of threads to use
method
useGPU(self, device: int = 0)Use GPU for processing (needs to be compiled with Kompute support) Parameter ``device``: GPU device index
property
property
property
pcl
Output point cloud.
property
rgbd
Output RGBD frames.
class
depthai.node.RTABMapSLAM(depthai.node.ThreadedHostNode)
method
method
method
setAlphaScaling(self, alpha: float)Set the alpha scaling factor for the camera model.
method
setDatabasePath(self, path: str)Set RTABMap database path. "/tmp/rtabmap.tmp.db" by default.
method
setFreq(self, f: float)Set the frequency at which the node processes data. 1Hz by default.
method
setLoadDatabaseOnStart(self, load: bool)Whether to load the database on start. False by default.
method
method
setParams(self, params: dict
[
str
,
str
])Set RTABMap parameters. For the list of all parameters visit https://github.com/introlab/rtabmap/blob/master/corelib/include/rtabmap/core/Par ameters.h
method
setPublishGrid(self, publish: bool)Whether to publish the ground point cloud. True by default.
method
setPublishGroundCloud(self, publish: bool)Whether to publish the ground point cloud. True by default.
method
setPublishObstacleCloud(self, publish: bool)Whether to publish the obstacle point cloud. True by default.
method
setSaveDatabaseOnClose(self, save: bool)Whether to save the database on close. False by default.
method
setSaveDatabasePeriod(self, period: float)Set the interval at which the database is saved. 30.0s by default.
method
setSaveDatabasePeriodically(self, save: bool)Whether to save the database periodically. False by default.
method
setUseFeatures(self, useFeatures: bool)Whether to use input features for SLAM. False by default.
method
triggerNewMap(self)Trigger a new map.
property
property
features
Input tracked features on which SLAM is performed (optional).
property
groundPCL
Output ground point cloud.
property
obstaclePCL
Output obstacle point cloud.
property
occupancyGridMap
Output occupancy grid map.
property
odom
Input odometry pose.
property
odomCorrection
Output odometry correction (map to odom).
property
passthroughDepth
Output passthrough depth image.
property
passthroughFeatures
Output passthrough features.
property
passthroughOdom
Output passthrough odometry pose.
property
passthroughRect
Output passthrough rectified image.
property
property
transform
Output transform.
class
depthai.node.RTABMapVIO(depthai.node.ThreadedHostNode)
method
reset(self, transform: depthai.TransformData)Reset Odometry.
method
method
setParams(self, params: dict
[
str
,
str
])Set RTABMap parameters.
method
setUseFeatures(self, useFeatures: bool)Whether to use input features or calculate them internally.
property
property
features
Input tracked features on which VIO is performed (optional).
property
imu
Input IMU data.
property
passthroughDepth
Passthrough depth frame.
property
passthroughFeatures
Passthrough features.
property
passthroughRect
Passthrough rectified frame.
property
property
transform
Output transform.
class
depthai.node.RecordMetadataOnly(depthai.node.ThreadedHostNode)
method
method
method
method
property
input
Input IMU messages to be recorded (will support other types in the future) Default queue is blocking with size 8
class
depthai.node.RecordVideo(depthai.node.ThreadedHostNode)
method
method
method
method
method
method
method
property
input
Input for ImgFrame or EncodedFrame messages to be recorded Default queue is blocking with size 15
class
depthai.node.Rectification(depthai.DeviceNode)
method
enableRectification(self, enable: bool) -> Rectification: RectificationEnable or disable rectification (useful for minimal changes during debugging)
method
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
input1
Input images to be rectified
property
property
output1
Send outputs
property
property
passthrough1
Passthrough for input messages (so the node can be placed between other nodes)
property
class
depthai.node.ReplayMetadataOnly(depthai.node.ThreadedHostNode)
method
method
method
method
method
method
property
out
Output for any type of messages to be transferred over XLink stream Default queue is blocking with size 8
class
depthai.node.ReplayVideo(depthai.node.ThreadedHostNode)
method
method
method
method
method
method
method
method
method
method
method
method
property
out
Output for any type of messages to be transferred over XLink stream Default queue is blocking with size 8
class
depthai.node.SPIIn(depthai.DeviceNode)
method
getBusId(self) -> int: intGet bus id
method
getMaxDataSize(self) -> int: intGet maximum messages size in bytes
method
getNumFrames(self) -> int: intGet number of frames in pool
method
getStreamName(self) -> str: strGet stream name
method
setBusId(self, id: int)Specifies SPI Bus number to use Parameter ``id``: SPI Bus id
method
setMaxDataSize(self, maxDataSize: int)Set maximum message size it can receive Parameter ``maxDataSize``: Maximum size in bytes
method
setNumFrames(self, numFrames: int)Set number of frames in pool for sending messages forward Parameter ``numFrames``: Maximum number of frames in pool
method
setStreamName(self, name: str)Specifies stream name over which the node will receive data Parameter ``name``: Stream name
property
out
Outputs message of same type as send from host.
class
depthai.node.SPIOut(depthai.DeviceNode)
method
setBusId(self, id: int)Specifies SPI Bus number to use Parameter ``id``: SPI Bus id
method
setStreamName(self, name: str)Specifies stream name over which the node will send data Parameter ``name``: Stream name
property
input
Input for any type of messages to be transferred over SPI stream Default queue is blocking with size 8
class
depthai.node.Script(depthai.DeviceNode)
method
getProcessor(self) -> depthai.ProcessorType: depthai.ProcessorTypeGet on which processor the script should run Returns: Processor type - Leon CSS or Leon MSS
method
getScriptName(self) -> str: strGet the script name in utf-8. When name set with setScript() or setScriptPath(), returns that name. When script loaded with setScriptPath() with name not provided, returns the utf-8 string of that path. Otherwise, returns "<script>" Returns: std::string of script name in utf-8
method
setProcessor(self, arg0: depthai.ProcessorType)Set on which processor the script should run Parameter ``type``: Processor type - Leon CSS or Leon MSS
method
method
property
property
class
depthai.node.SegmentationParser(depthai.DeviceNode)
method
method
getBackgroundClass(self) -> bool: boolGets whether the first class (index 0) is considered the background class.
method
getLabels(self) -> list[str]: list[str]Returns the class labels associated with the segmentation mask.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setBackgroundClass(self, backgroundClass: bool)Sets whether the first class (index 0) is considered the background class. If true, the pixels classified as index 0 will be treated as background. Parameter ``backgroundClass``: Boolean indicating if the first class is the background class @note Only applicable if the number of classes is greater than 1 and the output classes are not in a single layer (eg. classesInOneLayer = false).
method
setLabels(self, labels: list
[
str
])Sets the class labels associated with the segmentation mask. The label at index $i$ in the `labels` vector corresponds to the value $i$ in the segmentation mask data array. Parameter ``labels``: Vector of class labels
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. Parameter ``head:``: NNArchive head to set
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
initialConfig
Initial config to use when parsing segmentation masks.
property
input
Input NN results with segmentation data to parser
property
inputConfig
Input SegmentationParserConfig message with ability to modify parameters in runtime.
property
out
Outputs segmentation mask
class
depthai.node.SpatialDetectionNetwork(depthai.DeviceNode)
class
method
method
getClasses(self) -> list[str]|None: list[str]|NoneGet classes labels
method
getConfidenceThreshold(self) -> float: floatRetrieves threshold at which to filter the rest of the detections. Returns: Detection confidence
method
getNumInferenceThreads(self) -> int: intHow many inference threads will be used to run the network Returns: Number of threads, 0, 1 or 2. Zero means AUTO
method
setBackend(self, setBackend: str)Specifies backend to use Parameter ``backend``: String specifying backend to use
method
setBackendProperties(self, setBackendProperties: dict
[
str
,
str
])Set backend properties Parameter ``backendProperties``: backend properties map
method
method
setBlobPath(self, path: os.PathLike)Load network blob into assets and use once pipeline is started. Throws: Error if file doesn't exist or isn't a valid network blob. Parameter ``path``: Path to network blob
method
setBoundingBoxScaleFactor(self, scaleFactor: float)Custom interface Specifies scale factor for detected bounding boxes. Parameter ``scaleFactor``: Scale factor must be in the interval (0,1].
method
setConfidenceThreshold(self, thresh: float)Specifies confidence threshold at which to filter the rest of the detections. Parameter ``thresh``: Detection confidence must be greater than specified threshold to be added to the list
method
setDepthLowerThreshold(self, lowerThreshold: int)Specifies lower threshold in depth units (millimeter by default) for depth values which will used to calculate spatial data Parameter ``lowerThreshold``: LowerThreshold must be in the interval [0,upperThreshold] and less than upperThreshold.
method
setDepthUpperThreshold(self, upperThreshold: int)Specifies upper threshold in depth units (millimeter by default) for depth values which will used to calculate spatial data Parameter ``upperThreshold``: UpperThreshold must be in the interval (lowerThreshold,65535].
method
setFromModelZoo(self, description: depthai.NNModelDescription, useCached: bool)Download model from zoo and set it for this Node Parameter ``description:``: Model description to download Parameter ``useCached:``: Use cached model if available
method
setModelPath(self, modelPath: os.PathLike)Load a network model into assets. DLC and other custom model files are loaded lazily and must remain available and unchanged until the pipeline has been built. Parameter ``modelPath``: Path to the model file.
method
method
setNumInferenceThreads(self, numThreads: int)How many threads should the node use to run the network. Parameter ``numThreads``: Number of threads to dedicate to this node
method
setNumNCEPerInferenceThread(self, numNCEPerThread: int)How many Neural Compute Engines should a single thread use for inference Parameter ``numNCEPerThread``: Number of NCE per thread
method
setNumPoolFrames(self, numFrames: int)Specifies how many frames will be available in the pool Parameter ``numFrames``: How many frames will pool have
method
setNumShavesPerInferenceThread(self, numShavesPerInferenceThread: int)How many Shaves should a single thread use for inference Parameter ``numShavesPerThread``: Number of shaves per thread
method
setSpatialCalculationAlgorithm(self, calculationAlgorithm: depthai.SpatialLocationCalculatorAlgorithm)Specifies spatial location calculator algorithm: Average/Min/Max Parameter ``calculationAlgorithm``: Calculation algorithm.
property
property
input
Input message with data to be inferred upon
property
inputDepth
Input message with depth data used to retrieve spatial information about detected object Default queue is non-blocking with size 4
property
property
out
Outputs ImgDetections message that carries parsed detection results.
property
outNetwork
Outputs unparsed inference results.
property
passthrough
Passthrough message on which the inference was performed. Suitable for when input queue is set to non-blocking behavior.
property
passthroughDepth
Passthrough message for depth frame on which the spatial location calculation was performed. Suitable for when input queue is set to non-blocking behavior.
property
class
depthai.node.SpatialDetectionNetwork.Model
method
class
depthai.node.SpatialLocationCalculator(depthai.DeviceNode)
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
initialConfig
Initial config to use when calculating spatial location data.
property
inputConfig
Input SpatialLocationCalculatorConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
inputDepth
Input message with depth data used to retrieve spatial information about detected object. Default queue is non-blocking with size 4.
property
inputDetections
Input messages on which spatial location will be calculated. Possible datatypes are ImgDetections or Keypoints.
property
out
Outputs SpatialLocationCalculatorData message that carries spatial locations for each additional ROI that is specified in the config.
property
outputDetections
Outputs SpatialImgDetections message that carries spatial locations along with original input data.
property
passthroughDepth
Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
class
depthai.node.StereoDepth(depthai.DeviceNode)
class
PresetMode
Preset modes for stereo depth. Members: FAST_ACCURACY FAST_DENSITY DEFAULT FACE HIGH_DETAIL ROBOTICS DENSITY ACCURACY
method
method
method
enableDistortionCorrection(self, arg0: bool)Equivalent to useHomographyRectification(!enableDistortionCorrection)
method
loadMeshData()Specify mesh calibration data for 'left' and 'right' inputs, as vectors of bytes. Overrides useHomographyRectification behavior. See `loadMeshFiles` for the expected data format
method
loadMeshFiles(self, pathLeft: os.PathLike, pathRight: os.PathLike)Specify local filesystem paths to the mesh calibration files for 'left' and 'right' inputs. When a mesh calibration is set, it overrides the camera intrinsics/extrinsics matrices. Overrides useHomographyRectification behavior. Mesh format: a sequence of (y,x) points as 'float' with coordinates from the input image to be mapped in the output. The mesh can be subsampled, configured by `setMeshStep`. With a 1280x800 resolution and the default (16,16) step, the required mesh size is: width: 1280 / 16 + 1 = 81 height: 800 / 16 + 1 = 51
method
setAlphaScaling(self, arg0: float)Free scaling parameter between 0 (when all the pixels in the undistorted image are valid) and 1 (when all the source image pixels are retained in the undistorted image). On some high distortion lenses, and/or due to rectification (image rotated) invalid areas may appear even with alpha=0, in these cases alpha < 0.0 helps removing invalid areas. See getOptimalNewCameraMatrix from opencv for more details.
method
setBaseline(self, arg0: float)Override baseline from calibration. Used only in disparity to depth conversion. Units are centimeters.
method
setDefaultProfilePreset(self, arg0: StereoDepth.PresetMode)Sets a default preset based on specified option. Parameter ``mode``: Stereo depth preset mode .. warning:: If using alpha scaling on RVC4 the DEFAULT, DENSITY, and FAST_DENSITY presets can produce inaccurate depth in black padded regions, as they prioritize coverage.
method
method
setDepthAlignmentUseSpecTranslation(self, arg0: bool)Use baseline information for depth alignment from specs (design data) or from calibration. Default: true
method
setDisparityToDepthUseSpecTranslation(self, arg0: bool)Use baseline information for disparity to depth conversion from specs (design data) or from calibration. Default: true
method
setExtendedDisparity(self, enable: bool)Disparity range increased from 0-95 to 0-190, combined from full resolution and downscaled images. Suitable for short range objects. Currently incompatible with sub-pixel disparity
method
setFocalLength(self, arg0: float)Override focal length from calibration. Used only in disparity to depth conversion. Units are pixels.
method
method
setLeftRightCheck(self, enable: bool)Computes and combines disparities in both L-R and R-L directions, and combine them. For better occlusion handling, discarding invalid disparity values
method
setMeshStep(self, width: int, height: int)Set the distance between mesh points. Default: (16, 16)
method
setNumFramesPool(self, arg0: int)Specify number of frames in pool. Parameter ``numFramesPool``: How many frames should the pool have
method
setOutputKeepAspectRatio(self, keep: bool)Specifies whether the frames resized by `setOutputSize` should preserve aspect ratio, with potential cropping when enabled. Default `true`
method
setOutputSize(self, width: int, height: int)Specify disparity/depth output resolution size, implemented by scaling. Currently only applicable when aligning to RGB camera
method
setPostProcessingHardwareResources(self, arg0: int, arg1: int)Specify allocated hardware resources for stereo depth. Suitable only to increase post processing runtime. Parameter ``numShaves``: Number of shaves. Parameter ``numMemorySlices``: Number of memory slices.
method
setRectification(self, enable: bool)Rectify input images or not.
method
setRectificationUseSpecTranslation(self, arg0: bool)Obtain rectification matrices using spec translation (design data) or from calibration in calculations. Should be used only for debugging. Default: false
method
setRectifyEdgeFillColor(self, color: int)Fill color for missing data at frame edges Parameter ``color``: Grayscale 0..255, or -1 to replicate pixels
method
setRuntimeModeSwitch(self, arg0: bool)Enable runtime stereo mode switch, e.g. from standard to LR-check. Note: when enabled resources allocated for worst case to enable switching to any mode.
method
setSubpixel(self, enable: bool)Computes disparity with sub-pixel interpolation (3 fractional bits by default). Suitable for long range. Currently incompatible with extended disparity
method
setSubpixelFractionalBits(self, subpixelFractionalBits: int)Number of fractional bits for subpixel mode. Default value: 3. Valid values: 3,4,5. Defines the number of fractional disparities: 2^x. Median filter postprocessing is supported only for 3 fractional bits.
method
useHomographyRectification(self, arg0: bool)Use 3x3 homography matrix for stereo rectification instead of sparse mesh generated on device. Default behaviour is AUTO, for lenses with FOV over 85 degrees sparse mesh is used, otherwise 3x3 homography. If custom mesh data is provided through loadMeshData or loadMeshFiles this option is ignored. Parameter ``useHomographyRectification``: true: 3x3 homography matrix generated from calibration data is used for stereo rectification, can't correct lens distortion. false: sparse mesh is generated on-device from calibration data with mesh step specified with setMeshStep (Default: (16, 16)), can correct lens distortion. Implementation for generating the mesh is same as opencv's initUndistortRectifyMap function. Only the first 8 distortion coefficients are used from calibration data.
property
confidenceMap
Outputs ImgFrame message that carries RAW8 confidence map. Lower values mean lower confidence of the calculated disparity value. RGB alignment, left-right check or any postprocessing (e.g., median filter) is not performed on confidence map.
property
debugDispCostDump
Outputs ImgFrame message that carries cost dump of disparity map. Useful for debugging/fine tuning.
property
debugDispLrCheckIt1
Outputs ImgFrame message that carries left-right check first iteration (before combining with second iteration) disparity map. Useful for debugging/fine tuning.
property
debugDispLrCheckIt2
Outputs ImgFrame message that carries left-right check second iteration (before combining with first iteration) disparity map. Useful for debugging/fine tuning.
property
debugExtDispLrCheckIt1
Outputs ImgFrame message that carries extended left-right check first iteration (downscaled frame, before combining with second iteration) disparity map. Useful for debugging/fine tuning.
property
debugExtDispLrCheckIt2
Outputs ImgFrame message that carries extended left-right check second iteration (downscaled frame, before combining with first iteration) disparity map. Useful for debugging/fine tuning.
property
depth
Outputs ImgFrame message that carries RAW16 encoded (0..65535) depth data in depth units (millimeter by default). Non-determined / invalid depth values are set to 0
property
disparity
Outputs ImgFrame message that carries RAW8 / RAW16 encoded disparity data: RAW8 encoded (0..95) for standard mode; RAW8 encoded (0..190) for extended disparity mode; RAW16 encoded for subpixel disparity mode: - 0..760 for 3 fractional bits (by default) - 0..1520 for 4 fractional bits - 0..3040 for 5 fractional bits
property
initialConfig
Initial config to use for StereoDepth.
property
inputAlignTo
Input align to message. Default queue is non-blocking with size 1.
property
inputConfig
Input StereoDepthConfig message with ability to modify parameters in runtime.
property
left
Input for left ImgFrame of left-right pair
property
outConfig
Outputs StereoDepthConfig message that contains current stereo configuration.
property
rectifiedLeft
Outputs ImgFrame message that carries RAW8 encoded (grayscale) rectified frame data.
property
rectifiedRight
Outputs ImgFrame message that carries RAW8 encoded (grayscale) rectified frame data.
property
right
Input for right ImgFrame of left-right pair
property
syncedLeft
Passthrough ImgFrame message from 'left' Input.
property
syncedRight
Passthrough ImgFrame message from 'right' Input.
class
depthai.node.StereoDepth.PresetMode
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.node.Sync(depthai.DeviceNode)
class
TimestampSource
Members: DEFAULT DEVICE HOST SYSTEM
method
getProcessor(self) -> depthai.ProcessorType: depthai.ProcessorTypeGet on which processor the node should run Returns: Processor type - Leon CSS or Leon MSS
method
getSyncAttempts(self) -> int: intGets the number of sync attempts
method
getSyncThreshold(self) -> datetime.timedelta: datetime.timedeltaGets the maximal interval between messages in the group in milliseconds
method
getTimestampSource(self) -> depthai.SyncProperties.TimestampSource: depthai.SyncProperties.TimestampSourceGet the timestamp source
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setProcessor(self, processorType: depthai.ProcessorType)Specify on which processor the node should run. RVC2 only. Parameter ``type``: Processor type - Leon CSS or Leon MSS
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
method
setSyncAttempts(self, maxDataSize: int)Set the number of attempts to get the specified max interval between messages in the group Parameter ``syncAttempts``: Number of attempts to get the specified max interval between messages in the group: - if syncAttempts = 0 then the node sends a message as soon at the group is filled - if syncAttempts > 0 then the node will make syncAttemts attempts to synchronize before sending out a message - if syncAttempts = -1 (default) then the node will only send a message if successfully synchronized
method
setSyncThreshold(self, syncThreshold: datetime.timedelta)Set the maximal interval between messages in the group Parameter ``syncThreshold``: Maximal interval between messages in the group
method
setTimestampSource(self, source: depthai.SyncProperties.TimestampSource)Specify the timestamp source
property
inputs
A map of inputs
property
class
depthai.node.Sync.TimestampSource
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.node.SystemLogger(depthai.DeviceNode)
method
getRate(self) -> float: floatGets logging rate, at which messages will be sent out
method
setRate(self, hz: float)Specify logging rate, at which messages will be sent out Parameter ``hz``: Sending rate in hertz (messages per second)
property
out
Outputs SystemInformation[RVC4] message that carries various system information like memory and CPU usage, temperatures, ... For series 2 devices output SystemInformation message, for series 4 devices output SystemInformationRVC4 message
class
depthai.node.Thermal(depthai.DeviceNode)
method
build(self, boardSocket: depthai.CameraBoardSocket = ..., fps: float = 25.0) -> Thermal: ThermalBuild with a specific board socket and fps.
method
getBoardSocket(self) -> depthai.CameraBoardSocket: depthai.CameraBoardSocketRetrieves which board socket to use Returns: Board socket to use
property
color
Outputs YUV422i grayscale thermal image.
property
initialConfig
Initial config to use for thermal sensor.
property
inputConfig
Input ThermalConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
temperature
Outputs FP16 (degC) thermal image.
class
depthai.node.ThreadedHostNode(depthai.ThreadedNode)
method
method
method
method
method
method
method
class
depthai.node.ToF(depthai.DeviceNodeGroup)
static method
method
method
method
method
setOutputUndistortion(self, enable: bool) -> ToF: ToFEnable or disable undistortion for depth and auxiliary outputs. Parameter ``enable``: Whether to undistort the outputs. @note Undistortion is supported on RVC4. RVC2 logs a warning and leaves outputs unchanged. Returns: This ToF node.
property
amplitude
Amplitude output
property
confidence
Confidence output
property
depth
Filtered depth output
property
imageFiltersInputConfig
Input config for image filters
property
imageFiltersNode
Image filters node
property
intensity
Intensity output
property
phase
Phase output
property
raw
Raw data coming from the sensor
property
rawDepth
Raw depth output from ToF sensor. On RVC2 this is connected to the unfiltered base depth output. On RVC4 this is an unconnected placeholder output.
property
tofBaseInputConfig
Input config for ToF base node
property
tofBaseNode
ToF base node
class
depthai.node.ToFBase(depthai.DeviceNode)
method
build(self, boardSocket: depthai.CameraBoardSocket = ..., profile: depthai.ToFConfig.Profile = ..., fps: float
|
None = None) -> ToFBase: ToFBaseBuild with a specific board socket
method
getBoardSocket(self) -> depthai.CameraBoardSocket: depthai.CameraBoardSocketRetrieves which board socket to use Returns: Board socket to use
method
setOutputUndistortion(self, enable: bool) -> ToFBase: ToFBaseEnable or disable undistortion for depth and auxiliary outputs. Parameter ``enable``: Whether to undistort the outputs. @note Undistortion is supported on RVC4. RVC2 logs a warning and leaves outputs unchanged. Returns: This ToF base node.
property
property
property
property
initialConfig
Initial config to use for feature tracking.
property
inputConfig
Input ToFConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
property
property
class
depthai.node.ToFDepthConfidenceFilter(depthai.DeviceNode)
method
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
amplitude
Amplitude frame image, expected ImgFrame type is RAW8 or RAW16.
property
confidence
RAW16 encoded confidence frame
property
depth
Depth frame image, expected ImgFrame type is RAW8 or RAW16.
property
filteredDepth
RAW16 encoded filtered depth frame
property
initialConfig
Initial config for ToF depth confidence filter.
property
inputConfig
Config message for runtime filter configuration
class
depthai.node.UVC(depthai.DeviceNode)
method
setGpiosOnInit(self, list: dict
[
int
,
int
])Set GPIO list <gpio_number, value> for GPIOs to set (on/off) at init
method
setGpiosOnStreamOff(self, list: dict
[
int
,
int
])Set GPIO list <gpio_number, value> for GPIOs to set when streaming is disabled
method
setGpiosOnStreamOn(self, list: dict
[
int
,
int
])Set GPIO list <gpio_number, value> for GPIOs to set when streaming is enabled
property
input
Input for image frames to be streamed over UVC Default queue is blocking with size 8
class
depthai.node.VideoEncoder(depthai.DeviceNode)
method
method
method
getBitrate(self) -> int: intGet bitrate in bps
method
getBitrateKbps(self) -> int: intGet bitrate in kbps
method
getFrameRate(self) -> float: floatGet frame rate
method
getKeyframeFrequency(self) -> int: intGet keyframe frequency
method
getLossless(self) -> bool: boolGet lossless mode. Applies only when using [M]JPEG profile.
method
method
getNumBFrames(self) -> int: intGet number of B frames
method
getNumFramesPool(self) -> int: intGet number of frames in pool Returns: Number of pool frames
method
getProfile(self) -> depthai.VideoEncoderProperties.Profile: depthai.VideoEncoderProperties.ProfileGet profile
method
getQuality(self) -> int: intGet quality
method
getRateControlMode(self) -> depthai.VideoEncoderProperties.RateControlMode: depthai.VideoEncoderProperties.RateControlModeGet rate control mode
method
setBitrate(self, bitrate: int)Set output bitrate in bps, for CBR rate control mode. 0 for auto (based on frame size and FPS)
method
setBitrateKbps(self, bitrateKbps: int)Set output bitrate in kbps, for CBR rate control mode. 0 for auto (based on frame size and FPS)
method
setDefaultProfilePreset(self, fps: float, profile: depthai.VideoEncoderProperties.Profile)Sets a default preset based on specified frame rate and profile Parameter ``fps``: Frame rate in frames per second Parameter ``profile``: Encoding profile
method
setFrameRate(self, frameRate: float)Sets expected frame rate Parameter ``frameRate``: Frame rate in frames per second
method
setKeyframeFrequency(self, freq: int)Set keyframe frequency. Every Nth frame a keyframe is inserted. Applicable only to H264 and H265 profiles Examples: - 30 FPS video, keyframe frequency: 30. Every 1s a keyframe will be inserted - 60 FPS video, keyframe frequency: 180. Every 3s a keyframe will be inserted
method
setLossless(self, arg0: bool)Set lossless mode. Applies only to [M]JPEG profile Parameter ``lossless``: True to enable lossless jpeg encoding, false otherwise
method
setMaxOutputFrameSize(self, maxFrameSize: int)Specifies maximum output encoded frame size
method
setNumBFrames(self, numBFrames: int)Set number of B frames to be inserted
method
setNumFramesPool(self, frames: int)Set number of frames in pool Parameter ``frames``: Number of pool frames
method
setProfile(self, profile: depthai.VideoEncoderProperties.Profile)Set encoding profile
method
setQuality(self, quality: int)Set quality Parameter ``quality``: Value between 0-100%. Approximates quality
method
setRateControlMode(self, mode: depthai.VideoEncoderProperties.RateControlMode)Set rate control mode
property
bitstream
Outputs ImgFrame message that carries BITSTREAM encoded (MJPEG, H264 or H265) frame data. Mutually exclusive with out.
property
input
Input for NV12 ImgFrame to be encoded
property
out
Outputs EncodedFrame message that carries encoded (MJPEG, H264 or H265) frame data. Mutually exclusive with bitstream.
class
depthai.node.Vpp(depthai.DeviceNode)
method
property
property
property
initialConfig
Initial config of the node.
method
property
property
property
leftOut
Output ImgFrame message that carries the processed left image with virtual projection pattern applied.
property
property
rightOut
Output ImgFrame message that carries the processed right image with virtual projection pattern applied.
property
syncedInputs
"Synchronised Left Img, Right Img, Dispatiy and confidence input."
class
depthai.node.Warp(depthai.DeviceNode)
method
getHwIds(self) -> list[int]: list[int]Retrieve which hardware warp engines to use
method
getInterpolation(self) -> depthai.Interpolation: depthai.InterpolationRetrieve which interpolation method to use
method
setHwIds(self, arg0: list
[
int
])Specify which hardware warp engines to use Parameter ``ids``: Which warp engines to use (0, 1, 2)
method
setInterpolation(self, arg0: depthai.Interpolation)Specify which interpolation method to use Parameter ``interpolation``: type of interpolation
method
setMaxOutputFrameSize(self, arg0: int)Specify maximum size of output image. Parameter ``maxFrameSize``: Maximum frame size in bytes
method
setNumFramesPool(self, arg0: int)Specify number of frames in pool. Parameter ``numFramesPool``: How many frames should the pool have
method
method
property
inputImage
Input image to be modified Default queue is blocking with size 8
property
out
Outputs ImgFrame message that carries warped image.
module
depthai.utility
function