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

本页目录

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

MobileNetDetectionNetwork

MobileNet 检测网络节点与 NeuralNetwork 非常相似(实际上它继承自它)。唯一的区别是此节点 专门用于 MobileNet NN,并且它会在设备上解码 NN 的结果。这意味着此节点的 out 输出不是字节数组, 而是 ImgDetections,可以在您的代码中轻松使用。

如何放置它

Python

Python
1pipeline = dai.Pipeline()
2mobilenetDet = pipeline.create(dai.node.MobileNetDetectionNetwork)

C++

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

输入和输出

用法

Python

Python
1pipeline = dai.Pipeline()
2mobilenetDet = pipeline.create(dai.node.MobileNetDetectionNetwork)
3
4mobilenetDet.setConfidenceThreshold(0.5)
5mobilenetDet.setBlobPath(nnBlobPath)
6mobilenetDet.setNumInferenceThreads(2)
7mobilenetDet.input.setBlocking(False)

C++

C++
1dai::Pipeline pipeline;
2auto mobilenetDet = pipeline.create<dai::node::MobileNetDetectionNetwork>();
3
4mobilenetDet->setConfidenceThreshold(0.5f);
5mobilenetDet->setBlobPath(nnBlobPath);
6mobilenetDet->setNumInferenceThreads(2);
7mobilenetDet->input.setBlocking(false);

功能示例

参考

class

depthai.node.MobileNetDetectionNetwork(depthai.node.DetectionNetwork)

需要帮助?

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