Skip to content

Commit

Permalink
[Fix] add RTMO to README and fix some bugs with Inferencer (#2900)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Louis authored Jan 3, 2024
1 parent 575f65a commit df0a374
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@
assigner=dict(
type='SimOTAAssigner',
dynamic_k_indicator='oks',
oks_calculator=dict(type='PoseOKS')),
oks_calculator=dict(type='PoseOKS', metainfo=metafile)),
prior_generator=dict(
type='MlvlPointGenerator',
centralize_points=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@
assigner=dict(
type='SimOTAAssigner',
dynamic_k_indicator='oks',
oks_calculator=dict(type='PoseOKS')),
oks_calculator=dict(type='PoseOKS', metainfo=metafile)),
prior_generator=dict(
type='MlvlPointGenerator',
centralize_points=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@
assigner=dict(
type='SimOTAAssigner',
dynamic_k_indicator='oks',
oks_calculator=dict(type='PoseOKS'),
oks_calculator=dict(type='PoseOKS', metainfo=metafile),
use_keypoints_for_center=True),
prior_generator=dict(
type='MlvlPointGenerator',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@
assigner=dict(
type='SimOTAAssigner',
dynamic_k_indicator='oks',
oks_calculator=dict(type='PoseOKS'),
oks_calculator=dict(type='PoseOKS', metainfo=metafile),
use_keypoints_for_center=True),
prior_generator=dict(
type='MlvlPointGenerator',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
assigner=dict(
type='SimOTAAssigner',
dynamic_k_indicator='oks',
oks_calculator=dict(type='PoseOKS')),
oks_calculator=dict(type='PoseOKS', metainfo=metafile)),
prior_generator=dict(
type='MlvlPointGenerator',
centralize_points=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
assigner=dict(
type='SimOTAAssigner',
dynamic_k_indicator='oks',
oks_calculator=dict(type='PoseOKS')),
oks_calculator=dict(type='PoseOKS', metainfo=metafile)),
prior_generator=dict(
type='MlvlPointGenerator',
centralize_points=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
assigner=dict(
type='SimOTAAssigner',
dynamic_k_indicator='oks',
oks_calculator=dict(type='PoseOKS'),
oks_calculator=dict(type='PoseOKS', metainfo=metafile),
use_keypoints_for_center=True),
prior_generator=dict(
type='MlvlPointGenerator',
Expand Down
4 changes: 2 additions & 2 deletions mmpose/apis/inferencers/base_mmpose_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,13 @@ def preprocess(self,
# head's `predict` method. Here, we set the arguments for filtering
if self.cfg.model.type == 'BottomupPoseEstimator':
# 1. init with default arguments
test_cfg = self.model.test_cfg.copy()
test_cfg = self.model.head.test_cfg.copy()
# 2. update the score_thr and nms_thr in the test_cfg of the head
if 'score_thr' in test_cfg:
test_cfg['score_thr'] = bbox_thr
if 'nms_thr' in test_cfg:
test_cfg['nms_thr'] = nms_thr
self.model.head.test_cfg = test_cfg
self.model.test_cfg = test_cfg

for i, input in enumerate(inputs):
bbox = bboxes[i] if bboxes else []
Expand Down
3 changes: 3 additions & 0 deletions mmpose/apis/inferencers/pose2d_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ def forward(self,

if pose_based_nms:
for ds in data_samples:
if len(ds.pred_instances) == 0:
continue

kpts = ds.pred_instances.keypoints
scores = ds.pred_instances.bbox_scores
num_keypoints = kpts.shape[-2]
Expand Down
10 changes: 10 additions & 0 deletions projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ We also provide some documentation listed below to help you get started:
<img src="https://github.com/open-mmlab/mmpose/assets/13503330/5b637d76-41dd-4376-9a7f-854cd120799d" width=800 height=200 />
</div><br/>

- **[🎳RTMO](./rtmo)**: Towards High-Performance One-Stage Real-Time Multi-Person Pose Estimation <sup>
<a href="https://openxlab.org.cn/apps/detail/mmpose/RTMPose">
<i>TRY IT NOW</i>
</a>
</sup>

<div align="center">
<img src="https://github.com/open-mmlab/mmpose/assets/26127467/61120930-09e5-4457-aa2c-b2f131d4f710" width=800 />
</div><br/>

- **[♾️PoseAnything](./pose_anything/)**: A Graph-Based Approach for Category-Agnostic Pose Estimation

<div align=center>
Expand Down

0 comments on commit df0a374

Please sign in to comment.