ml.postprocessing.mediapipe --- Google Mediapipe¶
โมดูล ml.postprocessing.mediapipe มีตัวประมวลผลหลังการทำงานสำหรับโมเดล Google Mediapipe
class mediapipe_detection_postprocess -- Generic Mediapipe Detector¶
คลาสฐานที่ใช้ร่วมกันโดย BlazeFace และ BlazePalm ถอดรหัส bounding box และจุดสำคัญที่อิงตาม anchor จากนั้นทำ NMS
- class ml.postprocessing.mediapipe.mediapipe_detection_postprocess(threshold: float = 0.6, anchors: ndarray | None = None, anchor_grid: list[tuple[int, int]] | None = None, scores: list[int] = [], cords: list[int] = [], nms_threshold: float = 0.1, nms_sigma: float = 0.1)¶
สร้างตัวประมวลผลการตรวจจับ Mediapipe แบบทั่วไป
thresholdค่าขีดแบ่ง score ที่ใช้กับ logits ดิบก่อน sigmoidanchorsอาร์เรย์ anchor ที่สร้างไว้ล่วงหน้าแบบ optional ที่มี shape(N, 2)ประกอบด้วยจุดศูนย์กลาง(cx, cy)ที่ normalize เป็น[0, 1]หากNoneจะสร้าง anchor จากanchor_gridanchor_gridรายการของ tuple(grid_size, scales)ที่ใช้สร้าง anchor เมื่อanchorsเป็นNonescoresรายการดัชนีเอาต์พุตของโมเดลที่มีเทนเซอร์ scorecordsรายการดัชนีเอาต์พุตของโมเดลที่มีเทนเซอร์ box/keypointnms_thresholdค่าขีดแบ่ง IoU สำหรับ non-maximum suppressionnms_sigmaSigma สำหรับการลด score แบบ soft-NMS
class BlazeFace -- Face Detection¶
ประมวลผลเอาต์พุตของโมเดล BlazeFace หลังการอนุมาน
- class ml.postprocessing.mediapipe.BlazeFace(threshold: float = 0.6, anchors: ndarray | None = None, nms_threshold: float = 0.1, nms_sigma: float = 0.1)¶
สร้างตัวประมวลผลหลังการทำงาน BlazeFace ใช้ anchor grid ของ
[(16, 2), (8, 6)]พร้อม score outputs[1, 2]และ box outputs[0, 3]thresholdค่าขีดแบ่ง score สำหรับการตรวจจับanchorsอาร์เรย์ anchor ที่สร้างไว้ล่วงหน้าแบบ optional หากเป็นNoneจะสร้างอัตโนมัติnms_thresholdค่าขีดแบ่ง IoU สำหรับ non-maximum suppressionnms_sigmaSigma สำหรับการลด score แบบ soft-NMSคืนรายการของ tuple
((x, y, w, h), score, keypoints)จาก__call__โดยkeypointsคือรายการของจุด(x, y)
class BlazePalm -- Palm Detection¶
ประมวลผลเอาต์พุตของโมเดล BlazePalm หลังการอนุมาน
- class ml.postprocessing.mediapipe.BlazePalm(threshold: float = 0.6, anchors: ndarray | None = None, nms_threshold: float = 0.1, nms_sigma: float = 0.1)¶
สร้างตัวประมวลผลหลังการทำงาน BlazePalm ใช้ anchor grid ของ
[(24, 2), (12, 6)]พร้อม score outputs[0]และ box outputs[1]thresholdค่าขีดแบ่ง score สำหรับการตรวจจับanchorsอาร์เรย์ anchor ที่สร้างไว้ล่วงหน้าแบบ optional หากเป็นNoneจะสร้างอัตโนมัติnms_thresholdค่าขีดแบ่ง IoU สำหรับ non-maximum suppressionnms_sigmaSigma สำหรับการลด score แบบ soft-NMSคืนรายการของ tuple
((x, y, w, h), score, keypoints)จาก__call__โดยkeypointsคือรายการของจุด(x, y)
class FaceLandmarks -- Face Landmarks¶
ประมวลผลเอาต์พุตของโมเดล FaceLandmarks หลังการอนุมาน
- class ml.postprocessing.mediapipe.FaceLandmarks(threshold: float = 0.6, nms_threshold: float = 0.1, nms_sigma: float = 0.1)¶
สร้างตัวประมวลผลหลังการทำงาน FaceLandmarks
thresholdค่าขีดแบ่ง score (หลัง sigmoid) สำหรับยอมรับการตรวจจับnms_thresholdค่าขีดแบ่ง IoU สำหรับ non-maximum suppressionnms_sigmaSigma สำหรับการลด score แบบ soft-NMSคืนรายการของ tuple
((x, y, w, h), score, keypoints)จาก__call__โดยkeypointsคือรายการของจุด(x, y, z)
class HandLandmarks -- Hand Landmarks¶
ประมวลผลเอาต์พุตของโมเดล HandLandmarks หลังการอนุมาน
- class ml.postprocessing.mediapipe.HandLandmarks(threshold: float = 0.6, nms_threshold: float = 0.1, nms_sigma: float = 0.1)¶
สร้างตัวประมวลผลหลังการทำงาน HandLandmarks
thresholdค่าขีดแบ่ง score สำหรับยอมรับการตรวจจับnms_thresholdค่าขีดแบ่ง IoU สำหรับ non-maximum suppressionnms_sigmaSigma สำหรับการลด score แบบ soft-NMSคืนค่า
[[((x, y, w, h), score, keypoints)]]จาก__call__โดยมีรายการภายในหนึ่งรายการต่อคลาส handedness (ซ้าย=0, ขวา=1)keypointsคือรายการของจุด(x, y, z)รายการคลาสว่างจะถูกเก็บไว้เพื่อให้ดัชนีของแต่ละรายการตรงกับดัชนีคลาส
class MoveNet -- Pose Estimation¶
ประมวลผลเอาต์พุตของโมเดล MoveNet single-pose หลังการอนุมาน
- class ml.postprocessing.mediapipe.MoveNet(threshold: float = 0.6, nms_threshold: float = 0.1, nms_sigma: float = 0.1)¶
สร้างตัวประมวลผลหลังการทำงาน MoveNet
thresholdค่าขีดแบ่งความเชื่อมั่นต่อจุดสำคัญ จุดสำคัญที่ต่ำกว่าค่านี้จะถูกยกเว้นจาก bounding box และค่า score เฉลี่ยnms_thresholdค่าขีดแบ่ง IoU สำหรับ non-maximum suppressionnms_sigmaSigma สำหรับการลด score แบบ soft-NMSคืนรายการของ tuple
((x, y, w, h), score, keypoints)จาก__call__โดยkeypointsคือรายการของจุด(x, y, score)ในพิกัดพิกเซลอินพุต