Skip to content
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

SImplified chained-comparison. #265

Merged
merged 3 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mmpose/datasets/pipelines/bottom_up_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def __call__(self, joints):
tot = 0
for idx, pt in enumerate(joints[i]):
x, y = int(pt[0]), int(pt[1])
if (pt[2] > 0 and x >= 0 and y >= 0 and x < self.output_res
and y < self.output_res):
if (pt[2] > 0 and self.output_res > y >= 0
and self.output_res > x >= 0):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

< is more natural, 0 <= x < self.output_res

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified.

if self.tag_per_joint:
visible_kpts[i][tot] = \
(idx * output_res**2 + y * output_res + x, 1)
Expand Down
2 changes: 1 addition & 1 deletion mmpose/models/backbones/regnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __init__(self,
self.stem_channels = stem_channels
self.base_channels = base_channels
self.num_stages = num_stages
assert num_stages >= 1 and num_stages <= 4
assert 4 >= num_stages >= 1
self.strides = strides
self.dilations = dilations
assert len(strides) == len(dilations) == num_stages
Expand Down
2 changes: 1 addition & 1 deletion mmpose/models/backbones/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def __init__(self,
self.stem_channels = stem_channels
self.base_channels = base_channels
self.num_stages = num_stages
assert num_stages >= 1 and num_stages <= 4
assert 4 >= num_stages >= 1
self.strides = strides
self.dilations = dilations
assert len(strides) == len(dilations) == num_stages
Expand Down