From 55cb275b6e7f27e246a63b9175a156d419eec7dd Mon Sep 17 00:00:00 2001 From: pinto0309 Date: Sun, 15 Dec 2024 08:44:18 +0900 Subject: [PATCH] update --- 462_Gaze-LLE/demo/demo_yolov9_onnx_gazelle.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/462_Gaze-LLE/demo/demo_yolov9_onnx_gazelle.py b/462_Gaze-LLE/demo/demo_yolov9_onnx_gazelle.py index a2e9bd04b3..9858d1ca90 100755 --- a/462_Gaze-LLE/demo/demo_yolov9_onnx_gazelle.py +++ b/462_Gaze-LLE/demo/demo_yolov9_onnx_gazelle.py @@ -1365,6 +1365,22 @@ def check_positive(value): # 重心 (centroid) を計算する関数 def calculate_centroid(heatmap: np.ndarray) -> Tuple[int, int, float]: + """calculate_centroid + + Parameters + ---------- + heatmap: np.ndarray + One-channel entire image. [H, W] + + Returns + ------- + x: int + Peak X coordinate of the heat map score + y: int + Peak Y coordinate of the heat map score + score: float + Peak score for heat map score + """ # 1. ピーク値を求める peak_value = np.max(heatmap) # 2. ピーク値との差の絶対値を計算