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)