-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Generate Heatmap #336
Conversation
Codecov Report
@@ Coverage Diff @@
## master #336 +/- ##
==========================================
+ Coverage 79.98% 80.03% +0.04%
==========================================
Files 180 180
Lines 9435 9465 +30
Branches 1377 1382 +5
==========================================
+ Hits 7547 7575 +28
- Misses 1698 1699 +1
- Partials 190 191 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
||
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if xx
and yy
are good names. How about grid_x
and grid_y
?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d2
-> dist
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually here d2 is better than dist, since it is distance squared.
target_size = (target_size, target_size) | ||
else: | ||
target_size = target_size[:2] | ||
self.rate = (target_size[0] / ori_size[0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does rate mean here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resize heatmap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay should be ratio. Choose target_ori_ratio
/size_ratio
/...
def __repr__(self): | ||
return (f'{self.__class__.__name__}, ' | ||
f'keypoint={self.keypoint}, ' | ||
f'rate={self.rate}, target_size={self.target_size}, ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not need to show rate here, since it is not a configurable parameter
* [Feature] Generate Heatmap * Rename * Rename * Update * Update Co-authored-by: liyinshuo <[email protected]>
No description provided.