ml.postprocessing.mediapipe — Google Mediapipe¶
ml.postprocessing.mediapipe 모듈은 Google Mediapipe 모델을 위한 후처리기를 포함합니다.
class mediapipe_detection_postprocess – 범용 Mediapipe 검출기¶
BlazeFace 와 BlazePalm 이 공유하는 기본 클래스입니다. 앵커 기반 경계 상자와 키포인트를 디코딩한 다음 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시그모이드 이전에 원시 로짓에 적용되는 점수 임계값입니다.anchors[0, 1]로 정규화된(cx, cy)중심을 담고 있는(N, 2)형태의 선택적 사전 구축 앵커 배열입니다.None이면anchor_grid로부터 앵커가 생성됩니다.anchor_gridanchors가None일 때 앵커를 생성하는 데 사용되는(grid_size, scales)튜플 목록입니다.scores점수 텐서를 포함하는 모델 출력 인덱스 목록입니다.cords박스/키포인트 텐서를 포함하는 모델 출력 인덱스 목록입니다.nms_threshold비최대 억제에 사용되는 IoU 임계값입니다.nms_sigmasoft-NMS 점수 감쇠에 사용되는 시그마입니다.
class BlazeFace – 얼굴 검출¶
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 후처리기를 생성합니다. 점수 출력
[1, 2]와 박스 출력[0, 3]을 가진[(16, 2), (8, 6)]앵커 그리드를 사용합니다.threshold검출에 대한 점수 임계값입니다.anchors선택적 사전 구축 앵커 배열입니다.None이면 자동으로 생성됩니다.nms_threshold비최대 억제에 사용되는 IoU 임계값입니다.nms_sigmasoft-NMS 점수 감쇠에 사용되는 시그마입니다.__call__에서((x, y, w, h), score, keypoints)튜플 목록을 반환하며, 여기서keypoints는(x, y)점들의 목록입니다.
class BlazePalm – 손바닥 검출¶
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 후처리기를 생성합니다. 점수 출력
[0]과 박스 출력[1]을 가진[(24, 2), (12, 6)]앵커 그리드를 사용합니다.threshold검출에 대한 점수 임계값입니다.anchors선택적 사전 구축 앵커 배열입니다.None이면 자동으로 생성됩니다.nms_threshold비최대 억제에 사용되는 IoU 임계값입니다.nms_sigmasoft-NMS 점수 감쇠에 사용되는 시그마입니다.__call__에서((x, y, w, h), score, keypoints)튜플 목록을 반환하며, 여기서keypoints는(x, y)점들의 목록입니다.
class FaceLandmarks – 얼굴 랜드마크¶
FaceLandmarks 모델 출력을 후처리합니다.
- class ml.postprocessing.mediapipe.FaceLandmarks(threshold: float = 0.6, nms_threshold: float = 0.1, nms_sigma: float = 0.1)¶
FaceLandmarks 후처리기를 생성합니다.
threshold검출을 수락하기 위한 점수 임계값(시그모이드 이후)입니다.nms_threshold비최대 억제에 사용되는 IoU 임계값입니다.nms_sigmasoft-NMS 점수 감쇠에 사용되는 시그마입니다.__call__에서((x, y, w, h), score, keypoints)튜플 목록을 반환하며, 여기서keypoints는(x, y, z)점들의 목록입니다.
class HandLandmarks – 손 랜드마크¶
HandLandmarks 모델 출력을 후처리합니다.
- class ml.postprocessing.mediapipe.HandLandmarks(threshold: float = 0.6, nms_threshold: float = 0.1, nms_sigma: float = 0.1)¶
HandLandmarks 후처리기를 생성합니다.
threshold검출을 수락하기 위한 점수 임계값입니다.nms_threshold비최대 억제에 사용되는 IoU 임계값입니다.nms_sigmasoft-NMS 점수 감쇠에 사용되는 시그마입니다.__call__에서[[((x, y, w, h), score, keypoints)]]을 반환하며, 손 방향 클래스(왼손=0, 오른손=1)당 하나의 내부 목록을 갖습니다.keypoints는(x, y, z)점들의 목록입니다. 각 목록의 인덱스가 클래스 인덱스와 일치하도록 빈 클래스 목록은 유지됩니다.
class MoveNet – 자세 추정¶
MoveNet 단일 자세 모델 출력을 후처리합니다.
- class ml.postprocessing.mediapipe.MoveNet(threshold: float = 0.6, nms_threshold: float = 0.1, nms_sigma: float = 0.1)¶
MoveNet 후처리기를 생성합니다.
threshold키포인트별 신뢰도 임계값입니다. 이 값 미만의 키포인트는 경계 상자 및 평균 점수에서 제외됩니다.nms_threshold비최대 억제에 사용되는 IoU 임계값입니다.nms_sigmasoft-NMS 점수 감쇠에 사용되는 시그마입니다.__call__에서((x, y, w, h), score, keypoints)튜플 목록을 반환하며, 여기서keypoints는 입력 픽셀 좌표에서의(x, y, score)점들의 목록입니다.