diff --git a/projects/rtmpose3d/README.md b/projects/rtmpose3d/README.md index b8cd0adcda..c1989dc819 100644 --- a/projects/rtmpose3d/README.md +++ b/projects/rtmpose3d/README.md @@ -20,5 +20,5 @@ Please refer to our [technical report](https://arxiv.org/pdf/2407.08634) for mor ```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 +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 https://download.openmmlab.com/mmpose/v1/wholebody_3d_keypoint/rtmw3d/rtmw3d-l_8xb64_cocktail14-384x288-794dbc78_20240626.pth --input /path/to/image --output-root ./ ``` diff --git a/projects/rtmpose3d/demo/body3d_img2pose_demo.py b/projects/rtmpose3d/body3d_img2pose_demo.py similarity index 100% rename from projects/rtmpose3d/demo/body3d_img2pose_demo.py rename to projects/rtmpose3d/body3d_img2pose_demo.py diff --git a/projects/rtmpose3d/configs/rtmdet_m_640-8xb32_coco-person.py b/projects/rtmpose3d/configs/rtmdet_m_640-8xb32_coco-person.py new file mode 100644 index 0000000000..620de8dc8f --- /dev/null +++ b/projects/rtmpose3d/configs/rtmdet_m_640-8xb32_coco-person.py @@ -0,0 +1,20 @@ +_base_ = 'mmdet::rtmdet/rtmdet_m_8xb32-300e_coco.py' + +checkpoint = 'https://download.openmmlab.com/mmdetection/v3.0/rtmdet/cspnext_rsb_pretrain/cspnext-m_8xb256-rsb-a1-600e_in1k-ecb3bbd9.pth' # noqa + +model = dict( + backbone=dict( + init_cfg=dict( + type='Pretrained', prefix='backbone.', checkpoint=checkpoint)), + bbox_head=dict(num_classes=1), + test_cfg=dict( + nms_pre=1000, + min_bbox_size=0, + score_thr=0.05, + nms=dict(type='nms', iou_threshold=0.6), + max_per_img=100)) + +train_dataloader = dict(dataset=dict(metainfo=dict(classes=('person', )))) + +val_dataloader = dict(dataset=dict(metainfo=dict(classes=('person', )))) +test_dataloader = val_dataloader diff --git a/projects/rtmpose3d/rtmpose3d/simcc_3d_label.py b/projects/rtmpose3d/rtmpose3d/simcc_3d_label.py index 22e42079c8..db2de60e92 100644 --- a/projects/rtmpose3d/rtmpose3d/simcc_3d_label.py +++ b/projects/rtmpose3d/rtmpose3d/simcc_3d_label.py @@ -210,7 +210,7 @@ def _generate_gaussian( self, keypoints: np.ndarray, keypoints_visible: Optional[np.ndarray] = None - ) -> tuple[ndarray, ndarray, ndarray, ndarray]: + ) -> Tuple[ndarray, ndarray, ndarray, ndarray]: """Encoding keypoints into SimCC labels with Gaussian Label Smoothing strategy."""