Skip to content

Commit dd0755e

Browse files
authored
[Docs] Replace markdownlint with mdformat for avoiding installing ruby (#130)
1 parent f3d9449 commit dd0755e

27 files changed

Lines changed: 231 additions & 216 deletions

.github/CODE_OF_CONDUCT.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
3333

3434
## Our Responsibilities
3535

@@ -70,7 +70,7 @@ members of the project's leadership.
7070
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
7171
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
7272

73-
[homepage]: https://www.contributor-covenant.org
74-
7573
For answers to common questions about this code of conduct, see
7674
<https://www.contributor-covenant.org/faq>
75+
76+
[homepage]: https://www.contributor-covenant.org

.pre-commit-config.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
repos:
2-
- repo: https://gitlab.com/pycqa/flake8.git
2+
- repo: https://github.com/PyCQA/flake8
33
rev: 3.8.3
44
hooks:
55
- id: flake8
@@ -24,15 +24,19 @@ repos:
2424
args: ["--remove"]
2525
- id: mixed-line-ending
2626
args: ["--fix=lf"]
27-
- repo: https://github.com/markdownlint/markdownlint
28-
rev: v0.11.0
29-
hooks:
30-
- id: markdownlint
31-
args: ["-r", "~MD002,~MD013,~MD024,~MD029,~MD033,~MD034,~MD036", "-t", "allow_different_nesting"]
3227
- repo: https://github.com/codespell-project/codespell
3328
rev: v2.1.0
3429
hooks:
3530
- id: codespell
31+
- repo: https://github.com/executablebooks/mdformat
32+
rev: 0.7.14
33+
hooks:
34+
- id: mdformat
35+
args: ["--number"]
36+
additional_dependencies:
37+
- mdformat-gfm
38+
- mdformat_frontmatter
39+
- linkify-it-py
3640
- repo: https://github.com/myint/docformatter
3741
rev: v1.3.1
3842
hooks:

README_zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ MMFlow 也提供了其他更详细的教程,包括:
146146

147147
## 欢迎加入 OpenMMLab 社区
148148

149-
扫描下方的二维码可关注 OpenMMLab 团队的 [知乎官方账号](https://www.zhihu.com/people/openmmlab),加入 OpenMMLab 团队的 [官方交流 QQ 群](https://jq.qq.com/?_wv=1027&k=aCvMxdr3)
149+
扫描下方的二维码可关注 OpenMMLab 团队的 [知乎官方账号](https://www.zhihu.com/people/openmmlab),加入 OpenMMLab 团队的 [官方交流 QQ 群](https://jq.qq.com/?_wv=1027&k=aCvMxdr3)
150150

151151
<div align="center">
152152
<img src="resources/zhihu_qrcode.jpg" height="400" /> <img src="resources/qq_group_qrcode.jpg" height="400" />

configs/gma/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ unpublished approaches. Code is available at https://github.com/zacjiang/GMA.
218218
## Citation
219219

220220
@article{jiang2021learning,
221-
title={Learning to Estimate Hidden Motions with Global Motion Aggregation},
222-
author={Jiang, Shihao and Campbell, Dylan and Lu, Yao and Li, Hongdong and Hartley, Richard},
223-
journal={arXiv preprint arXiv:2104.02409},
224-
year={2021}
221+
title={Learning to Estimate Hidden Motions with Global Motion Aggregation},
222+
author={Jiang, Shihao and Campbell, Dylan and Lu, Yao and Li, Hongdong and Hartley, Richard},
223+
journal={arXiv preprint arXiv:2104.02409},
224+
year={2021}
225225
}
226226

227-
[1] The mixed dataset consisted of FlyingChairs, FlyingThing3d, Sintel, KITTI2015, and HD1K.
227+
\[1\] The mixed dataset consisted of FlyingChairs, FlyingThing3d, Sintel, KITTI2015, and HD1K.

configs/raft/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,4 @@ is available at https://github.com/princeton-vl/RAFT.
121121
}
122122
```
123123

124-
[1] The mixed dataset consisted of FlyingChairs, FlyingThing3d, Sintel, KITTI2015, and HD1K.
124+
\[1\] The mixed dataset consisted of FlyingChairs, FlyingThing3d, Sintel, KITTI2015, and HD1K.

docs/en/changelog.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919

2020
### Documents
2121

22-
- Add zh-cn doc 0_config_.md ([#126](https://github.com/open-mmlab/mmflow/pull/126))
22+
- Add zh-cn doc 0_config\_.md ([#126](https://github.com/open-mmlab/mmflow/pull/126))
2323

2424
## New Contributors
2525

26-
* @HiiiXinyiii made their first contribution in https://github.com/open-mmlab/mmflow/pull/118
27-
* @SheffieldCao made their first contribution in https://github.com/open-mmlab/mmflow/pull/126
26+
- @HiiiXinyiii made their first contribution in https://github.com/open-mmlab/mmflow/pull/118
27+
- @SheffieldCao made their first contribution in https://github.com/open-mmlab/mmflow/pull/126
2828

2929
## v0.4.0(04/01/2022)
3030

docs/en/data_prepare/FlyingThings3d/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@
7474
| | | | | | | | ├── OpticalFlowIntoPast_xxxx_R.pfm
7575
```
7676

77-
You can download datasets via [BitTorrent] (https://lmb.informatik.uni-freiburg.de/data/SceneFlowDatasets_CVPR16/Release_april16/data/FlyingThings3D/raw_data/flyingthings3d__frames_cleanpass.tar.torrent). Then, you need to unzip and move corresponding datasets to follow the folder structure shown above. The datasets have been well-prepared by the original authors.
77+
You can download datasets via \[BitTorrent\] (https://lmb.informatik.uni-freiburg.de/data/SceneFlowDatasets_CVPR16/Release_april16/data/FlyingThings3D/raw_data/flyingthings3d__frames_cleanpass.tar.torrent). Then, you need to unzip and move corresponding datasets to follow the folder structure shown above. The datasets have been well-prepared by the original authors.

docs/en/data_prepare/FlyingThings3d_subset/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@
7373
| | | | | ├── xxxxxxx.png
7474
```
7575

76-
You can download datasets via [BitTorrent] (https://lmb.informatik.uni-freiburg.de/data/FlyingThings3D_subset/FlyingThings3D_subset_image_clean.tar.bz2.torrent). Then, you need to unzip and move corresponding datasets to follow the folder structure shown above. The datasets have been well-prepared by the original authors.
76+
You can download datasets via \[BitTorrent\] (https://lmb.informatik.uni-freiburg.de/data/FlyingThings3D_subset/FlyingThings3D_subset_image_clean.tar.bz2.torrent). Then, you need to unzip and move corresponding datasets to follow the folder structure shown above. The datasets have been well-prepared by the original authors.

docs/en/getting_started.md

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ This page provides basic tutorials about the usage of MMFlow.
44
For installation instructions, please see [install.md](install.md).
55

66
<!-- TOC -->
7+
78
- [Getting Started](#getting-started)
89
- [Prepare datasets](#prepare-datasets)
910
- [Inference with Pre-trained Models](#inference-with-pre-trained-models)
1011
- [Run a demo](#run-a-demo)
1112
- [Test a dataset](#test-a-dataset)
1213
- [Train a model](#train-a-model)
1314
- [Tutorials](#tutorials)
15+
1416
<!-- TOC -->
1517

1618
## Prepare datasets
@@ -39,50 +41,51 @@ We provide scripts to run demos. Here is an example to predict the optical flow
3941

4042
1. [image demo](../demo/image_demo.py)
4143

42-
```shell
43-
python demo/image_demo.py ${IMAGE1} ${IMAGE2} ${CONFIG_FILE} ${CHECKPOINT_FILE} ${OUTPUT_DIR} \
44-
[--out_prefix] ${OUTPUT_PREFIX} [--device] ${DEVICE}
45-
```
44+
```shell
45+
python demo/image_demo.py ${IMAGE1} ${IMAGE2} ${CONFIG_FILE} ${CHECKPOINT_FILE} ${OUTPUT_DIR} \
46+
[--out_prefix] ${OUTPUT_PREFIX} [--device] ${DEVICE}
47+
```
4648

47-
Optional arguments:
49+
Optional arguments:
4850

49-
- `--out_prefix`: The prefix for the output results including flow file and visualized flow map.
50-
- `--device`: Device used for inference.
51+
- `--out_prefix`: The prefix for the output results including flow file and visualized flow map.
52+
- `--device`: Device used for inference.
5153

52-
Example:
54+
Example:
5355

54-
Assume that you have already downloaded the checkpoints to the directory `checkpoints/`,
55-
and output will be saved in the directory `raft_demo`.
56+
Assume that you have already downloaded the checkpoints to the directory `checkpoints/`,
57+
and output will be saved in the directory `raft_demo`.
5658

57-
```shell
58-
python demo/image_demo.py demo/frame_0001.png demo/frame_0002.png \
59-
configs/raft/raft_8x2_100k_mixed_368x768.py \
60-
checkpoints/raft_8x2_100k_mixed_368x768.pth raft_demo
61-
```
59+
```shell
60+
python demo/image_demo.py demo/frame_0001.png demo/frame_0002.png \
61+
configs/raft/raft_8x2_100k_mixed_368x768.py \
62+
checkpoints/raft_8x2_100k_mixed_368x768.pth raft_demo
63+
```
6264

6365
2. [video demo](../demo/video_demo.py)
6466

65-
```shell
66-
python demo/video_demo.py ${VIDEO} ${CONFIG_FILE} ${CHECKPOINT_FILE} ${OUTPUT_FILE} \
67-
[--gt] ${GROUND_TRUTH} [--device] ${DEVICE}
68-
```
67+
```shell
68+
python demo/video_demo.py ${VIDEO} ${CONFIG_FILE} ${CHECKPOINT_FILE} ${OUTPUT_FILE} \
69+
[--gt] ${GROUND_TRUTH} [--device] ${DEVICE}
70+
```
71+
72+
Optional arguments:
6973

70-
Optional arguments:
71-
- `--gt`: The video file of ground truth for input video.
72-
If specified, the ground truth will be concatenated predicted result as a comparison.
73-
- `--device`: Device used for inference.
74+
- `--gt`: The video file of ground truth for input video.
75+
If specified, the ground truth will be concatenated predicted result as a comparison.
76+
- `--device`: Device used for inference.
7477

75-
Example:
78+
Example:
7679

77-
Assume that you have already downloaded the checkpoints to the directory `checkpoints/`,
78-
and output will be save as `raft_demo.mp4`.
80+
Assume that you have already downloaded the checkpoints to the directory `checkpoints/`,
81+
and output will be save as `raft_demo.mp4`.
7982

80-
```shell
81-
python demo/video_demo.py demo/demo.mp4 \
82-
configs/raft/raft_8x2_100k_mixed_368x768.py \
83-
checkpoints/raft_8x2_100k_mixed_368x768.pth \
84-
raft_demo.mp4 --gt demo/demo_gt.mp4
85-
```
83+
```shell
84+
python demo/video_demo.py demo/demo.mp4 \
85+
configs/raft/raft_8x2_100k_mixed_368x768.py \
86+
checkpoints/raft_8x2_100k_mixed_368x768.pth \
87+
raft_demo.mp4 --gt demo/demo_gt.mp4
88+
```
8689

8790
### Test a dataset
8891

@@ -100,7 +103,7 @@ Optional arguments:
100103
- `--show_dir`: Directory to save the visualized flow maps. If not specified, the flow maps will not be saved.
101104
- `--eval`: Evaluation metrics, e.g., "EPE".
102105
- `--cfg-option`: Override some settings in the used config, the key-value pair in xxx=yyy format will be merged into config file.
103-
For example, '--cfg-option model.encoder.in_channels=6'.
106+
For example, '--cfg-option model.encoder.in_channels=6'.
104107

105108
Examples:
106109

@@ -131,7 +134,7 @@ Optional arguments:
131134
- `--seed`: Seed id for random state in python, numpy and pytorch to generate random numbers.
132135
- `--deterministic`: If specified, it will set deterministic options for CUDNN backend.
133136
- `--cfg-options`: Override some settings in the used config, the key-value pair in xxx=yyy format will be merged into config file.
134-
For example, '--cfg-option model.encoder.in_channels=6'.
137+
For example, '--cfg-option model.encoder.in_channels=6'.
135138

136139
Difference between `resume-from` and `load-from`:
137140
`resume-from` loads both the model weights and optimizer status, and the epoch/iter is also inherited from the specified checkpoint. It is usually used for resuming the training process that is interrupted accidentally.

docs/en/install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ c. Install MMCV, we recommend you to install the pre-built mmcv as below.
5757
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
5858
```
5959

60-
Please replace ``{cu_version}`` and ``{torch_version}`` in the url to your desired one. mmcv-full is only compiled on
60+
Please replace `{cu_version}` and `{torch_version}` in the url to your desired one. mmcv-full is only compiled on
6161
PyTorch 1.x.0 because the compatibility usually holds between 1.x.0 and 1.x.1. If your PyTorch version is 1.x.1,
6262
you can install mmcv-full compiled with PyTorch 1.x.0 and it usually works well.
63-
For example, to install the latest ``mmcv-full`` with ``CUDA 10.2`` and ``PyTorch 1.10.0``, use the following command:
63+
For example, to install the latest `mmcv-full` with `CUDA 10.2` and `PyTorch 1.10.0`, use the following command:
6464

6565
```shell
6666
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.10/index.html

0 commit comments

Comments
 (0)