ON THIS PAGE

  • YoloDetectionNetwork
  • How to place it
  • Inputs and Outputs
  • Usage
  • Examples of functionality
  • Reference

YoloDetectionNetwork

Yolo detection network extends NeuralNetwork node by also adding YOLO NN result decoding, which happens on the OAK device. This means that Out of this node is not a NNData (a byte array) but a ImgDetections that can easily be used in your code.

How to place it

Python
C++
Python
1pipeline = dai.Pipeline()
2yoloDet = pipeline.create(dai.node.YoloDetectionNetwork)

Inputs and Outputs

Command Line
1/
2              ┌───────────────────┐
3              │                   │       out
4              │                   ├───────────►
5              │     Yolo          │
6              │     Detection     │
7  input       │     Network       │ passthrough
8  ───────────►│-------------------├───────────►
9              │                   │
10              └───────────────────┘
Message types

Usage

Python
C++
Python
1pipeline = dai.Pipeline()
2yoloDet = pipeline.create(dai.node.YoloDetectionNetwork)
3yoloDet.setBlobPath(nnBlobPath)
4
5# Yolo specific parameters
6yoloDet.setConfidenceThreshold(0.5)
7yoloDet.setNumClasses(80)
8yoloDet.setCoordinateSize(4)
9yoloDet.setAnchors([10,14, 23,27, 37,58, 81,82, 135,169, 344,319])
10yoloDet.setAnchorMasks({"side26": [1, 2, 3], "side13": [3, 4, 5]})
11yoloDet.setIouThreshold(0.5)

Examples of functionality

Reference

class

depthai.node.YoloDetectionNetwork(depthai.node.DetectionNetwork)

Need assistance?

Head over to Discussion Forum for technical support or any other questions you might have.