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

本页目录

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

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)

需要帮助?

请前往 OAKChina 官网 获取技术支持或解答您的任何疑问。