Skip to content

Commit

Permalink
--update=add ckpt links
Browse files Browse the repository at this point in the history
  • Loading branch information
xiexinch committed Jul 12, 2024
1 parent 755e515 commit 0f8da98
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
7 changes: 5 additions & 2 deletions projects/rtmpose3d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@

RTMPose3D is a toolkit for real-time 3D pose estimation. It is based on the RTMPose model, which is a 2D pose estimation model that is capable of predicting 2D keypoints and body part associations in real-time. RTMPose3D extends RTMPose by adding a 3D pose estimation branch that can predict 3D keypoints from images directly.

Please refer to our [technical report](https://arxiv.org/pdf/2407.08634) for more details.

## 🗂️ Model Zoo

| Model | AP on COCO-Wholebody | MPJPE on H3WB | Download |
| :--------------------------------------------------------- | :------------------: | :-----------: | :-----------------------------------------------------------------------------------------------------------: |
| [RTMW3D-L](./configs/rtmw3d-l_8xb64_cocktail14-384x288.py) | 0.678 | 0.052 | [ckpt](https://download.openmmlab.com/mmpose/v1/projects/rtmo/rtmo-s_8xb32-600e_coco-640x640-8db55a59_20231211.pth) |
| [RTMW3D-X](./configs/rtmw3d-x_8xb32_cocktail14-384x288.py) | 0.680 | 0.052 | [ckpt](https://download.openmmlab.com/mmpose/v1/projects/rtmo/rtmo-s_8xb32-600e_coco-640x640-8db55a59_20231211.pth) |
| [RTMW3D-L](./configs/rtmw3d-l_8xb64_cocktail14-384x288.py) | 0.678 | 0.056 | [ckpt](https://download.openmmlab.com/mmpose/v1/wholebody_3d_keypoint/rtmw3d/rtmw3d-l_8xb64_cocktail14-384x288-794dbc78_20240626.pth) |
| [RTMW3D-X](./configs/rtmw3d-x_8xb32_cocktail14-384x288.py) | 0.680 | 0.057 | [ckpt](https://download.openmmlab.com/mmpose/v1/wholebody_3d_keypoint/rtmw3d/rtmw3d-x_8xb64_cocktail14-384x288-b0a0eab7_20240626.pth) |

## Usage

👉🏼 TRY RTMPose3D NOW

```bash
cd /path/to/mmpose/projects/rtmpose3d
export PYTHONPATH=$(pwd):$PYTHONPATH
python body3d_img2pose_demo.py configs/rtmdet_m_640-8xb32_coco-person.py https://download.openmmlab.com/mmpose/v1/projects/rtmpose/rtmdet_m_8xb32-100e_coco-obj365-person-235e8209.pth configs\rtmw3d-l_8xb64_cocktail14-384x288.py rtmw3d-l_cock14-0d4ad840_20240422.pth --input /path/to/image --output-root /path/to/output
```
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,8 @@
loss_weight=2.0)
],
decoder=codec),
test_cfg=dict(flip_test=False, mode='2d')
# test_cfg=dict(flip_test=False)
)
# test_cfg=dict(flip_test=False, mode='2d')
test_cfg=dict(flip_test=False))

# base dataset settings
data_mode = 'topdown'
Expand Down
2 changes: 1 addition & 1 deletion projects/rtmpose3d/rtmpose3d/pose_estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def add_pred_to_datasample(self, batch_pred_instances: InstanceList,
c = np.array(camera_params['c'])
else:
f = np.array([1145.04940459, 1143.78109572])
c = np.array(data_sample.ori_shape)
c = np.array(data_sample.ori_shape) / 2
kpts_pixel = np.concatenate([
keypoints_2d,
(keypoints_3d[..., 2] + gt_instances.root_z)[..., None]
Expand Down
3 changes: 3 additions & 0 deletions projects/rtmpose3d/rtmpose3d/simcc_3d_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class SimCC3DLabel(BaseKeypointCodec):
Human Pose Estimation`_ by Li et al (2022) for more details.
Old name: SimDR
We generate the SimCC label for 3D keypoint estimation.
Note:
- instance number: N
Expand Down Expand Up @@ -93,6 +95,7 @@ def __init__(self,
root_index, tuple) else [root_index]

# Mean value of the root z-axis of datasets
# These values are statistics from the training set
self.root_z = [5.14388]
self.z_range = z_range if z_range is not None else 2.1744869

Expand Down

0 comments on commit 0f8da98

Please sign in to comment.