MobileNetDetectionNetwork¶
MobileNet detection network node is very similar to NeuralNetwork (in fact it extends it). The only difference is that this node
is specifically for the MobileNet NN and it decodes the result of the NN on device. This means that out
of this node is not a byte array
but a ImgDetections that can easily be used in your code.
How to place it¶
pipeline = dai.Pipeline()
mobilenetDet = pipeline.create(dai.node.MobileNetDetectionNetwork)
dai::Pipeline pipeline;
auto mobilenetDet = pipeline.create<dai::node::MobileNetDetectionNetwork>();
Inputs and Outputs¶
┌───────────────────┐
│ │ out
│ ├───────────►
│ MobileNet │
│ Detection │
input │ Network │ passthrough
───────────►│-------------------├───────────►
│ │
└───────────────────┘
Message types
input
- ImgFrameout
- ImgDetectionspassthrough
- ImgFrame
Usage¶
pipeline = dai.Pipeline()
mobilenetDet = pipeline.create(dai.node.MobileNetDetectionNetwork)
mobilenetDet.setConfidenceThreshold(0.5)
mobilenetDet.setBlobPath(nnBlobPath)
mobilenetDet.setNumInferenceThreads(2)
mobilenetDet.input.setBlocking(False)
dai::Pipeline pipeline;
auto mobilenetDet = pipeline.create<dai::node::MobileNetDetectionNetwork>();
mobilenetDet->setConfidenceThreshold(0.5f);
mobilenetDet->setBlobPath(nnBlobPath);
mobilenetDet->setNumInferenceThreads(2);
mobilenetDet->input.setBlocking(false);
Examples of functionality¶
Reference¶
-
class
depthai.node.
MobileNetDetectionNetwork
-
class
Id
Node identificator. Unique for every node on a single Pipeline
-
getAssetManager
(*args, **kwargs) Overloaded function.
getAssetManager(self: depthai.Node) -> depthai.AssetManager
getAssetManager(self: depthai.Node) -> depthai.AssetManager
-
getConfidenceThreshold
(self: depthai.node.DetectionNetwork) → float
-
getInputRefs
(*args, **kwargs) Overloaded function.
getInputRefs(self: depthai.Node) -> list[depthai.Node.Input]
getInputRefs(self: depthai.Node) -> list[depthai.Node.Input]
-
getInputs
(self: depthai.Node) → list[depthai.Node.Input]
-
getName
(self: depthai.Node) → str
-
getNumInferenceThreads
(self: depthai.node.NeuralNetwork) → int
-
getOutputRefs
(*args, **kwargs) Overloaded function.
getOutputRefs(self: depthai.Node) -> list[depthai.Node.Output]
getOutputRefs(self: depthai.Node) -> list[depthai.Node.Output]
-
getOutputs
(self: depthai.Node) → list[depthai.Node.Output]
-
getParentPipeline
(*args, **kwargs) Overloaded function.
getParentPipeline(self: depthai.Node) -> depthai.Pipeline
getParentPipeline(self: depthai.Node) -> depthai.Pipeline
-
setBlob
(*args, **kwargs) Overloaded function.
setBlob(self: depthai.node.NeuralNetwork, blob: depthai.OpenVINO.Blob) -> None
setBlob(self: depthai.node.NeuralNetwork, path: Path) -> None
-
setBlobPath
(self: depthai.node.NeuralNetwork, path: Path) → None
-
setConfidenceThreshold
(self: depthai.node.DetectionNetwork, thresh: float) → None
-
setNumInferenceThreads
(self: depthai.node.NeuralNetwork, numThreads: int) → None
-
setNumNCEPerInferenceThread
(self: depthai.node.NeuralNetwork, numNCEPerThread: int) → None
-
setNumPoolFrames
(self: depthai.node.NeuralNetwork, numFrames: int) → None
-
class
-
class
dai::node
::
MobileNetDetectionNetwork
: public dai::NodeCRTP<DetectionNetwork, MobileNetDetectionNetwork, DetectionNetworkProperties>¶ MobileNetDetectionNetwork node. Parses MobileNet results.
Public Functions