ppdet
最后更新
depthai_nodes.node.parsers.utils.ppdet函数
compute_pp_text_detections
Python
1def compute_pp_text_detections(predictions: np.ndarray, *, mask_threshold: float, conf_threshold: float, max_det: int) -> tuple[np.ndarray, np.ndarray, np.ndarray]:predictions(np.ndarray):parse_paddle_detection_outputs接受的文本概率张量。mask_threshold(float): 用于二值化文本概率图的阈值。conf_threshold(float): 用于过滤候选的最小检测置信度。max_det(int): 在抑制期间保留或考虑的最大检测候选数。
tuple[np.ndarray, np.ndarray, np.ndarray]: 归一化的中心-XY/宽度/高度框、旋转角度(度)和置信度分数。
parse_paddle_detection_outputs
Python
1def parse_paddle_detection_outputs(predictions: np.ndarray, mask_threshold: float = 0.25, bbox_threshold: float = 0.5, max_detections: int = 100, width: int | None = None, height: int | None = None) -> tuple[np.ndarray, np.ndarray, np.ndarray]:predictions(np.ndarray): PaddlePaddle 文本检测模型的输出。mask_threshold(float): 掩码的阈值。bbox_threshold(float): 边界框的阈值。max_detections(int): 候选边界框的最大数量。width(int | None): 图像的宽度。height(int | None): 图像的高度。
tuple[np.ndarray, np.ndarray, np.ndarray]: 包含旋转边界框、角点和分数的元组。