YoloDetectionNetwork
YoloDetectionNetwork
Out 输出不是 NNData(字节数组),而是 ImgDetections,可以在您的代码中轻松使用。如何放置
Python
Python
1pipeline = dai.Pipeline()
2yoloDet = 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)功能示例
参考
class
depthai.node.YoloDetectionNetwork(depthai.node.DetectionNetwork)
method
method
getAnchors(self) -> list[float]: list[float]Get anchors
method
getCoordinateSize(self) -> int: intGet coordianate size
method
getIouThreshold(self) -> float: floatGet Iou threshold
method
getNumClasses(self) -> int: intGet num classes
method
setAnchorMasks(self, anchorMasks: collections.abc.Mapping
[
str
,
collections.abc.Sequence
[
typing.SupportsInt
]
])Set anchor masks
method
method
setCoordinateSize(self, coordinates: typing.SupportsInt)Set coordianate size
method
setIouThreshold(self, thresh: typing.SupportsFloat)Set Iou threshold
method
setNumClasses(self, numClasses: typing.SupportsInt)Set num classes
需要帮助?
请前往 Discussion Forum 获取技术支持或提出您可能有的任何其他问题。