Skip to content

Commit

Permalink
fix heatmap bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
bubbliiiing committed Apr 18, 2022
1 parent 71c94df commit f371ab8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,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)

Expand Down

0 comments on commit f371ab8

Please sign in to comment.