DepthAI v2 has been superseded by DepthAI v3. You are viewing legacy documentation.

ON THIS PAGE

  • 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

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

C++

C++
1dai::Pipeline pipeline;
2auto yoloDet = pipeline.create<dai::node::YoloDetectionNetwork>();

Inputs and Outputs

Usage

Python

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)

C++

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

Examples of functionality

Reference

Need assistance?

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