From 378f1114040c83fef355f8d891772b4693e552cb Mon Sep 17 00:00:00 2001 From: ly015 Date: Tue, 7 Jun 2022 14:21:56 +0800 Subject: [PATCH 1/3] fix hand readthedocs page --- .../gesture_sview_rgbd_vid/mtut/nvgesture/i3d_nvgesture.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/hand/gesture_sview_rgbd_vid/mtut/nvgesture/i3d_nvgesture.md b/configs/hand/gesture_sview_rgbd_vid/mtut/nvgesture/i3d_nvgesture.md index 77b7e52d64..0c5cf04fda 100644 --- a/configs/hand/gesture_sview_rgbd_vid/mtut/nvgesture/i3d_nvgesture.md +++ b/configs/hand/gesture_sview_rgbd_vid/mtut/nvgesture/i3d_nvgesture.md @@ -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)\* | 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). +\*: 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). From 50ff44d72af4136fa3feab9b2986a09564805125 Mon Sep 17 00:00:00 2001 From: ly015 Date: Tue, 7 Jun 2022 15:01:30 +0800 Subject: [PATCH 2/3] fix docs and collect.py --- docs/en/collect.py | 9 +++++---- docs/en/stats.py | 8 ++++---- docs/zh_cn/collect.py | 9 +++++---- docs/zh_cn/stats.py | 8 ++++---- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/docs/en/collect.py b/docs/en/collect.py index 88729a4673..052c2ab58d 100755 --- a/docs/en/collect.py +++ b/docs/en/collect.py @@ -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 @@ -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 @@ -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('', '

', '', 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)) diff --git a/docs/en/stats.py b/docs/en/stats.py index 10ce3ab40f..420af908a2 100755 --- a/docs/en/stats.py +++ b/docs/en/stats.py @@ -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 @@ -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 @@ -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 @@ -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) diff --git a/docs/zh_cn/collect.py b/docs/zh_cn/collect.py index 88729a4673..052c2ab58d 100755 --- a/docs/zh_cn/collect.py +++ b/docs/zh_cn/collect.py @@ -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 @@ -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 @@ -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('', '

', '', 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)) diff --git a/docs/zh_cn/stats.py b/docs/zh_cn/stats.py index d947ab10ba..b751d416af 100755 --- a/docs/zh_cn/stats.py +++ b/docs/zh_cn/stats.py @@ -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 @@ -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 @@ -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 @@ -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) From 529a27f504fd84510c2d89725c43d01904db6966 Mon Sep 17 00:00:00 2001 From: ly015 Date: Tue, 7 Jun 2022 19:05:00 +0800 Subject: [PATCH 3/3] fix doc index --- docs/en/index.rst | 5 +++-- docs/zh_cn/index.rst | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/en/index.rst b/docs/en/index.rst index 9f98059b65..7c9b0ff82a 100644 --- a/docs/en/index.rst +++ b/docs/en/index.rst @@ -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:: diff --git a/docs/zh_cn/index.rst b/docs/zh_cn/index.rst index 318e7e4293..f0cf02450c 100644 --- a/docs/zh_cn/index.rst +++ b/docs/zh_cn/index.rst @@ -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::