From 1cb9674d6bba4fa78255e206b5169d66275cdb4b Mon Sep 17 00:00:00 2001 From: Bubbliiiing <3323290568@qq.com> Date: Mon, 18 Apr 2022 11:56:56 +0800 Subject: [PATCH] fix heatmap bugs --- yolo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yolo.py b/yolo.py index 09d688d..9c318a6 100644 --- a/yolo.py +++ b/yolo.py @@ -301,7 +301,7 @@ def sigmoid(x): b, c, h, w = np.shape(sub_output) sub_output = np.transpose(np.reshape(sub_output, [b, 3, -1, h, w]), [0, 3, 4, 1, 2])[0] score = np.max(sigmoid(sub_output[..., 4]), -1) - score = cv2.resize(score, (image.size[1], image.size[0])) + score = cv2.resize(score, (image.size[0], image.size[1])) normed_score = (score * 255).astype('uint8') mask = np.maximum(mask, normed_score)