Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
liyinshuo committed May 31, 2021
1 parent 585ebfa commit 367a5ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mmedit/datasets/pipelines/generate_assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def _generate_one_heatmap(self, keypoint):

x_range = np.arange(start=0, stop=w, dtype=int)
y_range = np.arange(start=0, stop=h, dtype=int)
xx, yy = np.meshgrid(x_range, y_range)
d2 = (xx - keypoint[0])**2 + (yy - keypoint[1])**2
exponent = d2 / 2.0 / self.sigma / self.sigma
grid_x, grid_y = np.meshgrid(x_range, y_range)
dist = (grid_x - keypoint[0])**2 + (grid_y - keypoint[1])**2
exponent = dist / 2.0 / self.sigma / self.sigma
heatmap = np.exp(-exponent)
return heatmap

Expand Down

0 comments on commit 367a5ff

Please sign in to comment.