DepthAI v2 has been superseded by DepthAI v3. You are viewing legacy documentation.
此页面由 AI 自动翻译。查看英文原版

本页目录

  • 如何放置
  • 输入和输出
  • 用法
  • 功能示例
  • 参考

YoloDetectionNetwork

Yolo 检测网络扩展了 NeuralNetwork 节点,还增加了YOLO NN 结果解码功能,该功能在 OAK 设备上进行。 这意味着此节点的 Out 输出不是 NNData(字节数组),而是 ImgDetections,可以在您的代码中轻松使用。

如何放置

Python

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

C++

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

输入和输出

用法

Python

Python
1pipeline = dai.Pipeline()
2yoloDet = pipeline.create(dai.node.YoloDetectionNetwork)
3yoloDet.setBlobPath(nnBlobPath)
4
5# Yolo 特定参数
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 特定参数
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);

功能示例

参考

需要帮助?

请前往 Discussion Forum 获取技术支持或提出您可能有的任何其他问题。