Skip to content

Commit 3a702eb

Browse files
yl-1993lijiaqi2LazyBusyYangwqyinjiaqiAA
authored
Alpha test before public (#3)
* Revise getting_started * add README files * add mvpose doc * [Fix] Fix doc, dockerfile, scripts and github action (#1) * Test codecov * [Fix] Fix outdata URL, and advices for docs (#5) * Add docs and benchmark for MvP (#2) * [Add] Add download links for checkpoints * [Fix] Fix hyperlinks, fix default dirs and filenames in configs and scripts * [Add] Add a small test set for inference/demo * Add docs and benchmark for MVPose and MVPose tracking (#6) * [Fix] Update docs for sperson in getting started (#7) * Revise mvp inference * Bump version to v0.5.0 Co-authored-by: lijiaqi2 <[email protected]> Co-authored-by: gaoyang3 <[email protected]> Co-authored-by: LazyBusyYang <[email protected]> Co-authored-by: wqyin <[email protected]> Co-authored-by: yinwanqi <[email protected]> Co-authored-by: jiaqiAA <[email protected]>
1 parent 97d51e8 commit 3a702eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1190
-400
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ name: build
66
on:
77
push:
88
branches:
9+
- alpha_test # remove it after public
910
- main
1011
paths-ignore:
1112
- 'README.md'
@@ -23,56 +24,54 @@ concurrency:
2324
cancel-in-progress: true
2425

2526
jobs:
26-
build_cuda101:
27+
build_cuda102:
2728
runs-on: ubuntu-18.04
28-
strategy:
29-
matrix:
30-
python-version: [3.7]
31-
torch: [1.7.0, 1.8.0]
32-
include:
33-
- torch: 1.7.0
34-
torchvision: 0.8.1
35-
- torch: 1.8.0
36-
torchvision: 0.9.0
3729
defaults:
3830
run:
3931
shell: bash -l {0}
40-
32+
container:
33+
image: openxrlab/xrmocap_runtime:ubuntu1804_x64_cu102_py38_torch181_mmcv153
34+
credentials:
35+
username: ${{secrets.DOCKERHUB_USERNAME}}
36+
password: ${{secrets.DOCKERHUB_PWD}}
4137
steps:
4238
- uses: actions/checkout@v2
43-
- uses: conda-incubator/setup-miniconda@v2
44-
with:
45-
activate-environment: xrmocap_env
46-
python-version: ${{matrix.python-version}}
47-
auto-activate-base: false
48-
- name: Prepare test data
39+
- name: Show conda env
4940
run: |
50-
# TODO: prepare test data or remove this step
51-
- name: Upgrade pip
52-
run: pip install pip --upgrade
53-
- name: Install ffmpeg
54-
run: |
55-
conda install ffmpeg
56-
ffmpeg -version
57-
- name: Install PyTorch
41+
source /root/miniconda3/etc/profile.d/conda.sh && conda deactivate
42+
conda info -e
43+
conda activate openxrlab
44+
conda list | grep torch
45+
conda list | grep mmcv
46+
- name: Prepare test data
5847
run: |
59-
conda install pytorch==${{matrix.torch}} torchvision==${{matrix.torchvision}} cudatoolkit=10.1 -c pytorch
60-
- name: Install MMCV
48+
sh scripts/download_test_data.sh
49+
- name: Prepare weight
6150
run: |
62-
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch${{matrix.torch}}/index.html
63-
python -c 'import mmcv; print(mmcv.__version__)'
64-
- name: Install other dependencies
65-
run: pip install -r requirements.txt
51+
sh scripts/download_test_data.sh
52+
mkdir weight
53+
cd weight
54+
wget https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth
55+
wget https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w48_coco_wholebody_384x288_dark-f5726563_20200918.pth
56+
wget https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot17-half-64ee2ed4.pth
57+
wget https://download.openmmlab.com/mmtracking/mot/reid/tracktor_reid_r50_iter25245-a452f51f.pth
58+
cd ..
6659
- name: Build and install
67-
run: rm -rf .eggs && pip install -e .
60+
run: |
61+
rm -rf xrmocap.egg-info
62+
source /root/miniconda3/etc/profile.d/conda.sh && conda activate openxrlab
63+
pip install xrprimer
64+
pip install -e .
6865
- name: Run unittests and generate coverage report
6966
run: |
67+
source /root/miniconda3/etc/profile.d/conda.sh && conda activate openxrlab
7068
coverage run --source xrmocap -m pytest tests/
7169
coverage xml
7270
coverage report -m
7371
- name: Upload coverage to Codecov
74-
uses: codecov/codecov-action@v2
72+
uses: codecov/codecov-action@v3
7573
with:
74+
token: ${{ secrets.CODECOV_TOKEN }} # deprecated after public
7675
files: ./coverage.xml
7776
flags: unittests
7877
env_vars: OS,PYTHON

.github/workflows/publish-to-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
- name: Publish distribution to PyPI
2020
run: |
2121
pip install twine
22-
twine upload dist/* -u __token__ -p ${{ secrets.pypi_password }}
22+
twine upload dist/* -u __token__ -p ${{ secrets.PYPI_PASSWORD }}

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ repos:
3737
rev: v2.1.0
3838
hooks:
3939
- id: codespell
40+
args: ["--ignore-words-list", "mot"]
4041
- repo: https://github.com/myint/docformatter.git
4142
rev: v1.3.1
4243
hooks:

Dockerfile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,19 @@ RUN . /root/miniconda3/etc/profile.d/conda.sh && \
4242
conda activate openxrlab && \
4343
pip install pre-commit interrogate coverage pytest && \
4444
pip install mmcv-full==1.5.3 -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.1/index.html && \
45-
pip install xrprimer -i https://repo.sensetime.com/repository/pypi/simple && \
45+
pip install xrprimer && \
4646
pip cache purge
4747

4848
# Install build requirements
4949
RUN . /root/miniconda3/etc/profile.d/conda.sh && \
5050
conda activate openxrlab && \
51-
wget http://10.4.11.59:18080/resources/XRlab/requirements/xrmocap/build.txt && \
52-
pip install -r build.txt && rm build.txt && \
51+
pip install -r https://github.com/openxrlab/xrmocap/blob/main/requirements/build.txt && \
5352
pip cache purge
5453

5554
# Install test requirements
5655
RUN . /root/miniconda3/etc/profile.d/conda.sh && \
5756
conda activate openxrlab && \
58-
wget http://10.4.11.59:18080/resources/XRlab/requirements/xrmocap/test.txt && \
59-
pip install -r test.txt && rm test.txt && \
57+
pip install -r https://github.com/openxrlab/xrmocap/blob/main/requirements/test.txt && \
6058
pip cache purge
6159

6260
# Install mmhuman3d
@@ -73,3 +71,11 @@ RUN . /root/miniconda3/etc/profile.d/conda.sh && \
7371
pip uninstall opencv-python opencv-python-headless -y && \
7472
pip install opencv-python-headless && \
7573
pip cache purge
74+
75+
# Clone xrmocap and install
76+
RUN . /root/miniconda3/etc/profile.d/conda.sh && \
77+
conda activate openxrlab && \
78+
cd /workspace && \
79+
git clone https://github.com/openxrlab/xrmocap.git && \
80+
cd xrmocap && pip install -e . && \
81+
pip cache purge

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# XRMocap
22

3+
<div align="left">
4+
5+
[![actions](https://github.com/openxrlab/xrmocap/workflows/build/badge.svg)](https://github.com/openxrlab/xrmocap/actions)
6+
[![codecov](https://codecov.io/gh/openxrlab/xrmocap/branch/main/graph/badge.svg)](https://codecov.io/gh/openxrlab/xrmocap)
7+
[![PyPI](https://img.shields.io/pypi/v/xrmocap)](https://pypi.org/project/xrmocap/)
8+
[![LICENSE](https://img.shields.io/github/license/openxrlab/xrmocap.svg)](https://github.com/openxrlab/xrmocap/blob/main/LICENSE)
9+
10+
</div>
311

412
## Introduction
513

@@ -9,7 +17,7 @@ XRMoCap is an open-source PyTorch-based codebase for the use of multi-view motio
917

1018
If you are interested in single-view motion capture, please refer to [mmhuman3d](https://github.com/open-mmlab/mmhuman3d) for more details.
1119

12-
**TODO:[Insert demo here]**
20+
https://user-images.githubusercontent.com/26729379/187710195-ba4660ce-c736-4820-8450-104f82e5cc99.mp4
1321

1422
A detailed introduction can be found in [introduction.md](./docs/en/tutorials/introduction.md).
1523

@@ -62,7 +70,7 @@ Supported datasets:
6270

6371
## Getting Started
6472

65-
Please see [getting_started.md](docs/getting_started.md) for the basic usage of XRMoCap.
73+
Please see [getting_started.md](docs/en/getting_started.md) for the basic usage of XRMoCap.
6674

6775
## License
6876

configs/mvp/README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,35 @@ We provide the config files for MvP: [Direct multi-view multi-person 3d pose est
1919

2020
## Results and Models
2121

22-
We evaluate MvP on 3 popular benchmarks.
23-
24-
[Explain common setting and metrics]
22+
We evaluate MvP on 3 popular benchmarks, report the Percentage of Correct Parts (PCP) on Shelf and Campus dataset, Mean Per Joint Position Error (MPJPE), mAP and recall on CMU Panoptic dataset.
2523

2624
### Campus
2725

28-
[Explain specific setting, metrics and other details (finetuned from pretrained cmu panoptic xxx)]
26+
MvP for Campus fine-tuned from the model weights pre-trained with 3 selected views in CMU Panoptic dataset is provided. Fine-tuning with the model pre-train with CMU Panoptic HD camera view 3, 6, 12 gives the best final performance on Campus dataset.
2927

3028
| Config | Campus | Download |
3129
|:------:|:-------:|:--------:|
32-
| - | - | [model]() &#124; [log]() |
30+
| [mvp_campus.py](./campus_config/mvp_campus.py) | 96.7 | [model](https://openxrlab-share.oss-cn-hongkong.aliyuncs.com/xrmocap/weight/mvp/xrmocap_mvp_campus-e6093968_20220831.pth) |
3331

3432

3533
### Shelf
3634

37-
[Explain specific setting, metrics and other details (finetuned from pretrained cmu panoptic xxx)]
35+
MvP for Shelf fine-tuned from the model weights pre-trained with 5 selected views in CMU Panoptic dataset is provided. The 5 selected views, HD camera view 3, 6, 12, 13 and 23 are the same views used in VoxelPose.
3836

3937
| Config | Shelf | Download |
4038
|:------:|:-------:|:--------:|
41-
| - | - | [model]() &#124; [log]() |
39+
| [mvp_shelf.py](./shelf_config/mvp_shelf.py) | 97.1 | [model](https://openxrlab-share.oss-cn-hongkong.aliyuncs.com/xrmocap/weight/mvp/xrmocap_mvp_shelf-22d1b5ed_20220831.pth) |
4240

4341

4442
### CMU Panoptic
4543

46-
[Explain view selection, training details etc.]
44+
MvP for CMU Panoptic trained from stcratch with pre-trained Pose ResNet50 backbone is provided. The provided model weights were trained and evaluated with the 5 selected views same as VoxelPose (HD camera view 3, 6, 12, 13, 23). A checkpoint trained with 3 selected views (HD camera view 3, 12, 23) is also provided as the pre-trained model weights for Campus dataset fine-tuning.
45+
46+
| Config | AP25 | AP100 | Recall@500 | MPJPE(mm) |Download |
47+
|:------:|:----:|:----:|:---------:|:--------:|:--------:|
48+
| [mvp_panoptic.py](./panoptic_config/mvp_panoptic.py) | 91.5 | 97.9 | 99.85 |16.45 | [model](https://openxrlab-share.oss-cn-hongkong.aliyuncs.com/xrmocap/weight/mvp/xrmocap_mvp_panoptic_5view-1b673cdf_20220831.pth) |
49+
| [mvp_panoptic_3cam.py](./panoptic_config/mvp_panoptic_3cam.py) | 54.7 | 95.1 | 98.83 |30.55 | [model](https://openxrlab-share.oss-cn-hongkong.aliyuncs.com/xrmocap/weight/mvp/xrmocap_mvp_panoptic_3view_3_12_23-4b391740_20220831.pth) |
50+
51+
### Pose ResNet50 Backbone
4752

48-
| Config | AP25 | MPJPE(mm) | Download |
49-
|:------:|:----:|:---------:|:--------:|
50-
| - | - | - | [model]() &#124; [log]() |
53+
All the checkpoints provided above were trained on top of the pre-trained [Pose ResNet50](https://openxrlab-share.oss-cn-hongkong.aliyuncs.com/xrmocap/weight/mvp/xrmocap_pose_resnet50_panoptic-5a2e53c9_20220831.pth) backbone weights.

configs/mvp/campus_config/mvp_campus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
end_epoch=25,
3434
pretrained_backbone='',
3535
model_root='./weight',
36-
finetune_model='convert_model_best_31223.pth.tar',
36+
finetune_model='xrmocap_mvp_panoptic_3view_3_12_23.pth.tar',
3737
resume=False,
3838
lr_decay_epoch=[10],
3939
inference_conf_thr=[0.0],

configs/mvp/panoptic_config/mvp_panoptic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
weight_decay=1e-4,
3131
optimizer='adam',
3232
end_epoch=200,
33-
pretrained_backbone='convert_pose_resnet50_panoptic.pth.tar',
33+
pretrained_backbone='xrmocap_pose_resnet50_panoptic.pth.tar',
3434
model_root='./weight',
3535
finetune_model=None,
3636
resume=False,

configs/mvp/panoptic_config/mvp_panoptic_3cam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
weight_decay=1e-4,
3131
optimizer='adam',
3232
end_epoch=200,
33-
pretrained_backbone='convert_pose_resnet50_panoptic.pth.tar',
33+
pretrained_backbone='xrmocap_pose_resnet50_panoptic.pth.tar',
3434
model_root='./weight',
3535
finetune_model=None,
3636
resume=False,

configs/mvp/shelf_config/mvp_shelf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
end_epoch=30,
3434
pretrained_backbone='',
3535
model_root='./weight',
36-
finetune_model='convert_model_best_5view.pth.tar',
36+
finetune_model='xrmocap_mvp_panoptic_5view.pth.tar',
3737
resume=False,
3838
lr_decay_epoch=[30],
3939
inference_conf_thr=[0.0],

0 commit comments

Comments
 (0)