Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
PINTO0309 committed Dec 14, 2024
1 parent 0afef22 commit 55cb275
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions 462_Gaze-LLE/demo/demo_yolov9_onnx_gazelle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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. ピーク値との差の絶対値を計算
Expand Down

0 comments on commit 55cb275

Please sign in to comment.