Skip to content

Commit

Permalink
lint markdown (#379)
Browse files Browse the repository at this point in the history
* lint markdown

* fix lint bug

* fix lint bug

* add markdownlint pre-commit

* fix lint

* fix lint

* fix lint
  • Loading branch information
jin-s13 authored Dec 22, 2020
1 parent 74d3399 commit b90aa3a
Show file tree
Hide file tree
Showing 50 changed files with 511 additions and 425 deletions.
29 changes: 16 additions & 13 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

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

Examples of unacceptable behavior by participants include:

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

## Our Responsibilities

Expand Down Expand Up @@ -70,6 +70,9 @@ members of the project's leadership.
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
Expand Down
17 changes: 10 additions & 7 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,32 @@ All kinds of contributions are welcome, including but not limited to the followi
## Workflow

1. Fork and pull the latest mmpose
2. Checkout a new branch with a meaningful name (do not use master branch for PRs)
3. Commit your changes
4. Create a PR
1. Checkout a new branch with a meaningful name (do not use master branch for PRs)
1. Commit your changes
1. Create a PR

Note

- If you plan to add some new features that involve large changes, it is encouraged to open an issue for discussion first.
- If you are the author of some papers and would like to include your method to mmpose,
please contact Can Wang (wangcan@sensetime.com) or Sheng Jin (jinsheng@sensetime.com). We will much appreciate your contribution.
please contact Can Wang (wangcan@sensetime.com) or Sheng Jin (jinsheng@sensetime.com). We will much appreciate your contribution.

## Code style

### Python

We adopt [PEP8](https://www.python.org/dev/peps/pep-0008/) as the preferred code style.

We use the following tools for linting and formatting:

- [flake8](http://flake8.pycqa.org/en/latest/): linter
- [yapf](https://github.com/google/yapf): formatter
- [isort](https://github.com/timothycrosley/isort): sort imports

Style configurations of yapf and isort can be found in [setup.cfg](../setup.cfg).

We use [pre-commit hook](https://pre-commit.com/) that checks and formats for `flake8`, `yapf`, `isort`, `trailing whitespaces`,
fixes `end-of-files`, sorts `requirments.txt` automatically on every commit.
fixes `end-of-files`, sorts `requirments.txt` automatically on every commit.
The config for a pre-commit hook is stored in [.pre-commit-config](../.pre-commit-config.yaml).

After you clone the repository, you will need to install initialize pre-commit hook.
Expand All @@ -40,11 +43,11 @@ pip install -U pre-commit
```

From the repository folder

```
pre-commit install
```

After this on every commit check code linters and formatter will be enforced.


>Before you create a PR, make sure that your code lints and is formatted by yapf.
> Before you create a PR, make sure that your code lints and is formatted by yapf.
30 changes: 21 additions & 9 deletions .github/ISSUE_TEMPLATE/error-report.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,55 @@
---
______________________________________________________________________

```
name: Error report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
```

---
______________________________________________________________________

Thanks for your error report and we appreciate it a lot.
If you feel we have helped you, give us a STAR! :satisfied:

**Checklist**

1. I have searched related issues but cannot get the expected help.
2. The bug has not been fixed in the latest version.
1. The bug has not been fixed in the latest version.

**Describe the bug**

A clear and concise description of what the bug is.

**Reproduction**

1. What command or script did you run?
- What command or script did you run?

```
A placeholder for the command.
```
2. Did you make any modifications on the code or config? Did you understand what you have modified?
3. What dataset did you use?

- What config did you run?

```
A placeholder for the config.
```

- Did you make any modifications on the code or config? Did you understand what you have modified?
- What dataset did you use?

**Environment**

1. Please run `PYTHONPATH=${PWD}:$PYTHONPATH python mmpose/utils/collect_env.py` to collect necessary environment information and paste it here.
2. You may add addition that may be helpful for locating the problem, such as
- How you installed PyTorch [e.g., pip, conda, source]
- Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)
1. You may add addition that may be helpful for locating the problem, such as
- How you installed PyTorch [e.g., pip, conda, source]
- Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)

**Error traceback**

If applicable, paste the error traceback here.

```
A placeholder for traceback.
```
Expand Down
12 changes: 8 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
---
______________________________________________________________________

```
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
```

---
______________________________________________________________________

Thanks for your feature request and we will review and plan for it when necessary.
If you feel we have helped you, give us a STAR! :satisfied:

**Steps**

1. Check if the feature has been requested in the [meta issue](https://github.com/open-mmlab/mmpose/issues/9), and if so, click thumb up button.
2. Post the feature request in the [meta issue](https://github.com/open-mmlab/mmpose/issues/9), if it is new.
1. Post the feature request in the [meta issue](https://github.com/open-mmlab/mmpose/issues/9), if it is new.

**Describe the feature**

**Motivation**

A clear and concise description of the motivation of the feature.

1. Ex1. It is inconvenient when [....].
2. Ex2. There is a recent paper [....], which is very helpful for [....].
1. Ex2. There is a recent paper [....], which is very helpful for [....].

**Related resources**

Expand Down
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/general_questions.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
______________________________________________________________________

```
name: General questions
about: Ask general questions to get help
title: ''
labels: ''
assignees: ''
```

---
______________________________________________________________________
36 changes: 23 additions & 13 deletions .github/ISSUE_TEMPLATE/reimplementation_questions.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,69 @@
---
______________________________________________________________________

```
name: Reimplementation Questions
about: Ask about questions during model reimplementation
title: ''
labels: 'reimplementation'
assignees: ''
```

---
______________________________________________________________________

If you feel we have helped you, give us a STAR! :satisfied:

**Notice**

There are several common situations in the reimplementation issues as below

1. Reimplement a model in the model zoo using the provided configs.
2. Reimplement a model in the model zoo on other dataset (e.g., custom datasets).
3. Reimplement a custom model but all the components are implemented in MMPose.
4. Reimplement a custom model with new modules implemented by yourself.
1. Reimplement a model in the model zoo on other dataset (e.g., custom datasets).
1. Reimplement a custom model but all the components are implemented in MMPose.
1. Reimplement a custom model with new modules implemented by yourself.

There are several things to do for different cases as below.

- For case 1 & 3, please follow the steps in the following sections thus we could help to quick identify the issue.
- For case 2 & 4, please understand that we are not able to do much help here because we usually do not know the full code and the users should be responsible to the code they write.
- One suggestion for case 2 & 4 is that the users should first check whether the bug lies in the self-implemented code or the original code. For example, users can first make sure that the same model runs well on supported datasets. If you still need help, please describe what you have done and what you obtain in the issue, and follow the steps in the following sections and try as clear as possible so that we can better help you.

**Checklist**

1. I have searched related issues but cannot get the expected help.
2. The issue has not been fixed in the latest version.
1. The issue has not been fixed in the latest version.

**Describe the issue**

A clear and concise description of what the problem you meet and what have you done.

**Reproduction**

1. What command or script did you run?
- What command or script did you run?

```
A placeholder for the command.
```
2. What config dir you run?

- What config dir you run?

```
A placeholder for the config.
```
3. Did you make any modifications on the code or config? Did you understand what you have modified?
4. What dataset did you use?

- Did you make any modifications on the code or config? Did you understand what you have modified?
- What dataset did you use?

**Environment**

1. Please run `PYTHONPATH=${PWD}:$PYTHONPATH python mmpose/utils/collect_env.py` to collect necessary environment information and paste it here.
2. You may add addition that may be helpful for locating the problem, such as
- How you installed PyTorch [e.g., pip, conda, source]
- Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)
1. You may add addition that may be helpful for locating the problem, such as
- How you installed PyTorch [e.g., pip, conda, source]
- Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)

**Results**

If applicable, paste the related results here, e.g., what you expect and what you get.

```
A placeholder for results comparison
```
Expand Down
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
exclude: ^tests/data/
repos:
- repo: https://gitlab.com/pycqa/flake8.git
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
hooks:
- id: flake8
Expand Down Expand Up @@ -28,6 +29,11 @@ repos:
args: ["--remove"]
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 2.1.4
hooks:
- id: markdownlint
args: [ "-r", "~MD002,~MD013,~MD024,~MD029,~MD033,~MD034,~MD036" ]
- repo: https://github.com/myint/docformatter
rev: v1.3.1
hooks:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
</div>

## Introduction

[![Documentation](https://readthedocs.org/projects/mmpose/badge/?version=latest)](https://mmpose.readthedocs.io/en/latest/?badge=latest)
[![actions](https://github.com/open-mmlab/mmpose/workflows/build/badge.svg)](https://github.com/open-mmlab/mmpose/actions)
[![codecov](https://codecov.io/gh/open-mmlab/mmpose/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmpose)
Expand Down Expand Up @@ -49,7 +50,6 @@ The master branch works with **PyTorch 1.3+**.
pose estimation framework by combining different modules.
We provide detailed documentation and API reference, as well as unittests.


## [Model Zoo](https://mmpose.readthedocs.io/en/latest/modelzoo.html)

Supported backbones for human pose estimation:
Expand Down
7 changes: 3 additions & 4 deletions configs/bottom_up/higherhrnet/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose Estimation

## Introduction

```
@inproceedings{cheng2020higherhrnet,
title={HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose Estimation},
Expand All @@ -23,23 +24,21 @@
| [HigherHRNet-w32](/configs/bottom_up/higherhrnet/coco/higher_hrnet32_coco_640x640.py) | 640x640 | 0.686 | 0.871 | 0.747 | 0.733 | 0.898 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_640x640-a22fe938_20200712.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_640x640_20200712.log.json) |
| [HigherHRNet-w48](/configs/bottom_up/higherhrnet/coco/higher_hrnet48_coco_512x512.py) | 512x512 | 0.686 | 0.873 | 0.741 | 0.731 | 0.892 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet48_coco_512x512-60fedcbc_20200712.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet48_coco_512x512_20200712.log.json) |

#### Results on COCO val2017 with multi-scale test. 3 default scales ([2, 1, 0.5]) are used.
#### Results on COCO val2017 with multi-scale test. 3 default scales (\[2, 1, 0.5\]) are used

| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
| [HigherHRNet-w32](/configs/bottom_up/higherhrnet/coco/higher_hrnet32_coco_512x512.py) | 512x512 | 0.706 | 0.881 | 0.771 | 0.747 | 0.901 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_512x512-8ae85183_20200713.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_512x512_20200713.log.json) |
| [HigherHRNet-w32](/configs/bottom_up/higherhrnet/coco/higher_hrnet32_coco_640x640.py) | 640x640 | 0.706 | 0.880 | 0.770 | 0.749 | 0.902 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_640x640-a22fe938_20200712.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_640x640_20200712.log.json) |
| [HigherHRNet-w48](/configs/bottom_up/higherhrnet/coco/higher_hrnet48_coco_512x512.py) | 512x512 | 0.716 | 0.884 | 0.775 | 0.755 | 0.901 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet48_coco_512x512-60fedcbc_20200712.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet48_coco_512x512_20200712.log.json) |


#### Results on CrowdPose test without multi-scale test

| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AP (E) | AP (M) | AP (H) | ckpt | log |
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: | :------: |
| [HigherHRNet-w32](/configs/bottom_up/higherhrnet/crowdpose/higher_hrnet32_crowdpose_512x512.py) | 512x512 | 0.655 | 0.859 | 0.705 | 0.728 | 0.660 | 0.577 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_crowdpose_512x512-1aa4a132_20201017.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_crowdpose_512x512_20201017.log.json) |


#### Results on CrowdPose test with multi-scale test. 2 scales ([2, 1]) are used.
#### Results on CrowdPose test with multi-scale test. 2 scales (\[2, 1\]) are used

| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AP (E) | AP (M) | AP (H) | ckpt | log |
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: | :------: |
Expand Down
3 changes: 2 additions & 1 deletion configs/bottom_up/hrnet/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Associative Embedding (AE) + HRNet

## Introduction

```
@inproceedings{newell2017associative,
title={Associative embedding: End-to-end learning for joint detection and grouping},
Expand Down Expand Up @@ -29,7 +30,7 @@
| [HRNet-w32](/configs/bottom_up/hrnet/coco/hrnet_w32_coco_512x512.py) | 512x512 | 0.654 | 0.863 | 0.720 | 0.710 | 0.892 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_coco_512x512-bcb8c247_20200816.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_coco_512x512_20200816.log.json) |
| [HRNet-w48](/configs/bottom_up/hrnet/coco/hrnet_w48_coco_512x512.py) | 512x512 | 0.665 | 0.860 | 0.727 | 0.716 | 0.889 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_coco_512x512-cf72fcdf_20200816.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_coco_512x512_20200816.log.json) |

#### Results on COCO val2017 with multi-scale test. 3 default scales ([2, 1, 0.5]) are used.
#### Results on COCO val2017 with multi-scale test. 3 default scales (\[2, 1, 0.5\]) are used

| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
Expand Down
3 changes: 2 additions & 1 deletion configs/bottom_up/mobilenet/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Associative Embedding (AE) + Mobilenetv2

## Introduction

```
@inproceedings{newell2017associative,
title={Associative embedding: End-to-end learning for joint detection and grouping},
Expand Down Expand Up @@ -28,7 +29,7 @@
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
| [pose_mobilenetv2](/configs/bottom_up/mobilenet/coco/mobilenetv2_coco_512x512.py) | 512x512 | 0.380 | 0.671 | 0.368 | 0.473 | 0.741 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/mobilenetv2_coco_512x512-4d96e309_20200816.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/mobilenetv2_coco_512x512_20200816.log.json) |

#### Results on COCO val2017 with multi-scale test. 3 default scales ([2, 1, 0.5]) are used.
#### Results on COCO val2017 with multi-scale test. 3 default scales (\[2, 1, 0.5\]) are used

| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
Expand Down
Loading

0 comments on commit b90aa3a

Please sign in to comment.