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

[Fix] fix hand readthedocs page #1416

Merged
merged 3 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ Results on NVGesture test set

| Arch | Input Size | fps | bbox | AP_rgb | AP_depth | ckpt | log |
| :------------------------------------------------------ | :--------: | :-: | :-------: | :----: | :------: | :-----------------------------------------------------: | :----------------------------------------------------: |
| [I3D+MTUT](/configs/hand/gesture_sview_rgbd_vid/mtut/nvgesture/i3d_nvgesture_bbox_112x112_fps15.py)$^\*$ | 112x112 | 15 | $\\surd$ | 0.725 | 0.730 | [ckpt](https://download.openmmlab.com/mmpose/gesture/mtut/i3d_nvgesture_bbox_112x112_fps15-363b5956_20220530.pth) | [log](https://download.openmmlab.com/mmpose/gesture/mtut/i3d_nvgesture_bbox_112x112_fps15-20220530.log.json) |
| [I3D+MTUT](/configs/hand/gesture_sview_rgbd_vid/mtut/nvgesture/i3d_nvgesture_bbox_112x112_fps15.py)<sup>\*</sup> | 112x112 | 15 | $\\surd$ | 0.725 | 0.730 | [ckpt](https://download.openmmlab.com/mmpose/gesture/mtut/i3d_nvgesture_bbox_112x112_fps15-363b5956_20220530.pth) | [log](https://download.openmmlab.com/mmpose/gesture/mtut/i3d_nvgesture_bbox_112x112_fps15-20220530.log.json) |
| [I3D+MTUT](/configs/hand/gesture_sview_rgbd_vid/mtut/nvgesture/i3d_nvgesture_bbox_224x224_fps30.py) | 224x224 | 30 | $\\surd$ | 0.782 | 0.811 | [ckpt](https://download.openmmlab.com/mmpose/gesture/mtut/i3d_nvgesture_bbox_224x224_fps30-98a8f288_20220530.pthh) | [log](https://download.openmmlab.com/mmpose/gesture/mtut/i3d_nvgesture_bbox_224x224_fps30-20220530.log.json) |
| [I3D+MTUT](/configs/hand/gesture_sview_rgbd_vid/mtut/nvgesture/i3d_nvgesture_224x224_fps30.py) | 224x224 | 30 | $\\times$ | 0.739 | 0.809 | [ckpt](https://download.openmmlab.com/mmpose/gesture/mtut/i3d_nvgesture_224x224_fps30-b7abf574_20220530.pth) | [log](https://download.openmmlab.com/mmpose/gesture/mtut/i3d_nvgesture_224x224_fps30-20220530.log.json) |

$^\*$: MTUT supports multi-modal training and uni-modal testing. Model trained with this config can be used to recognize gestures in rgb videos with [inference config](/configs/hand/gesture_sview_rgbd_vid/mtut/nvgesture/i3d_nvgesture_bbox_112x112_fps15_rgb.py).
<sup>\*</sup>: MTUT supports multi-modal training and uni-modal testing. Model trained with this config can be used to recognize gestures in rgb videos with [inference config](/configs/hand/gesture_sview_rgbd_vid/mtut/nvgesture/i3d_nvgesture_bbox_112x112_fps15_rgb.py).
9 changes: 5 additions & 4 deletions docs/en/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _parse_task(task):
for file in glob(f'../../configs/{topic}/{task}/*/{dataset}/*.md'):
keywords = (file.split(osp.sep)[-3],
*file.split(osp.sep)[-1].split('_')[:-1])
with open(file, 'r') as f:
with open(file, 'r', encoding='utf-8') as f:
contents[subtopic][dataset][keywords] = f.read()

# Step 4: write files by topic
Expand All @@ -91,7 +91,7 @@ def _parse_task(task):
f' on {titlecase(dataset)}'), '', info, ''
]

with open(f'topics/{subtopic.lower()}.md', 'w') as f:
with open(f'topics/{subtopic.lower()}.md', 'w', encoding='utf-8') as f:
f.write('\n'.join(lines))

# Step 5: write files by paper
Expand All @@ -101,7 +101,8 @@ def _parse_task(task):
lines = [f'# {titlecase(section)}', '']
files = [f for s, f in allfiles if s == section]
for file in files:
with open(f'../en/papers/{section}/{file}', 'r') as f:
with open(
f'../en/papers/{section}/{file}', 'r', encoding='utf-8') as f:
keyline = [
line for line in f.readlines() if line.startswith('<summary')
][0]
Expand All @@ -125,5 +126,5 @@ def _parse_task(task):
lines += ['<hr/>', '<br/><br/>', '', f'## {papername}', '']
lines += paperlines

with open(f'papers/{section}.md', 'w') as f:
with open(f'papers/{section}.md', 'w', encoding='utf-8') as f:
f.write('\n'.join(lines))
5 changes: 3 additions & 2 deletions docs/en/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ You can change the documentation language at the lower-left corner of the page.
topics/body(3d,mesh,sview,img).md
topics/face.md
topics/fashion.md
topics/hand(2d).md
topics/hand(3d).md
topics/hand(2d,kpt,rgb,img).md
topics/hand(3d,kpt,rgb,img).md
topics/hand(gesture,rgbd,vid).md
topics/wholebody.md

.. toctree::
Expand Down
8 changes: 4 additions & 4 deletions docs/en/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def anchor(name):
stats = []

for f in files:
with open(f, 'r') as content_file:
with open(f, 'r', encoding='utf-8') as content_file:
content = content_file.read()

# title
Expand Down Expand Up @@ -94,7 +94,7 @@ def anchor(name):

"""

with open('modelzoo.md', 'w') as f:
with open('modelzoo.md', 'w', encoding='utf-8') as f:
f.write(modelzoo)

# Count datasets
Expand All @@ -105,7 +105,7 @@ def anchor(name):
datastats = []

for f in files:
with open(f, 'r') as content_file:
with open(f, 'r', encoding='utf-8') as content_file:
content = content_file.read()

# title
Expand Down Expand Up @@ -172,5 +172,5 @@ def anchor(name):
{datamsglist}
"""

with open('datasets.md', 'w') as f:
with open('datasets.md', 'w', encoding='utf-8') as f:
f.write(modelzoo)
9 changes: 5 additions & 4 deletions docs/zh_cn/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _parse_task(task):
for file in glob(f'../../configs/{topic}/{task}/*/{dataset}/*.md'):
keywords = (file.split(osp.sep)[-3],
*file.split(osp.sep)[-1].split('_')[:-1])
with open(file, 'r') as f:
with open(file, 'r', encoding='utf-8') as f:
contents[subtopic][dataset][keywords] = f.read()

# Step 4: write files by topic
Expand All @@ -91,7 +91,7 @@ def _parse_task(task):
f' on {titlecase(dataset)}'), '', info, ''
]

with open(f'topics/{subtopic.lower()}.md', 'w') as f:
with open(f'topics/{subtopic.lower()}.md', 'w', encoding='utf-8') as f:
f.write('\n'.join(lines))

# Step 5: write files by paper
Expand All @@ -101,7 +101,8 @@ def _parse_task(task):
lines = [f'# {titlecase(section)}', '']
files = [f for s, f in allfiles if s == section]
for file in files:
with open(f'../en/papers/{section}/{file}', 'r') as f:
with open(
f'../en/papers/{section}/{file}', 'r', encoding='utf-8') as f:
keyline = [
line for line in f.readlines() if line.startswith('<summary')
][0]
Expand All @@ -125,5 +126,5 @@ def _parse_task(task):
lines += ['<hr/>', '<br/><br/>', '', f'## {papername}', '']
lines += paperlines

with open(f'papers/{section}.md', 'w') as f:
with open(f'papers/{section}.md', 'w', encoding='utf-8') as f:
f.write('\n'.join(lines))
5 changes: 3 additions & 2 deletions docs/zh_cn/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ You can change the documentation language at the lower-left corner of the page.
topics/body(3d,mesh,sview,img).md
topics/face.md
topics/fashion.md
topics/hand(2d).md
topics/hand(3d).md
topics/hand(2d,kpt,rgb,img).md
topics/hand(3d,kpt,rgb,img).md
topics/hand(gesture,rgbd,vid).md
topics/wholebody.md

.. toctree::
Expand Down
8 changes: 4 additions & 4 deletions docs/zh_cn/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def anchor(name):
stats = []

for f in files:
with open(f, 'r') as content_file:
with open(f, 'r', encoding='utf-8') as content_file:
content = content_file.read()

# title
Expand Down Expand Up @@ -94,7 +94,7 @@ def anchor(name):

"""

with open('modelzoo.md', 'w') as f:
with open('modelzoo.md', 'w', encoding='utf-8') as f:
f.write(modelzoo)

# Count datasets
Expand All @@ -105,7 +105,7 @@ def anchor(name):
datastats = []

for f in files:
with open(f, 'r') as content_file:
with open(f, 'r', encoding='utf-8') as content_file:
content = content_file.read()

# title
Expand Down Expand Up @@ -172,5 +172,5 @@ def anchor(name):
{datamsglist}
"""

with open('datasets.md', 'w') as f:
with open('datasets.md', 'w', encoding='utf-8') as f:
f.write(modelzoo)