Skip to content

Commit

Permalink
[Docs] Refine RAEDME (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
MeowZheng authored Aug 31, 2022
1 parent 47a009d commit 1468286
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 36 deletions.
59 changes: 59 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Contributing to MMFlow 1.x

All kinds of contributions are welcome, including but not limited to the following.

- Fix typo or bugs
- Add documentation or translate the documentation into other languages
- Add new features and components

## Workflow

1. fork and pull the latest MMFlow repository
2. checkout a new branch from 'dev-1.x' (do not use master branch for PRs)
3. commit your changes
4. 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.
```

## 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](https://github.com/PyCQA/flake8): A wrapper around some linter tools.
- [isort](https://github.com/timothycrosley/isort): A Python utility to sort imports.
- [yapf](https://github.com/google/yapf): A formatter for Python files.
- [codespell](https://github.com/codespell-project/codespell): A Python utility to fix common misspellings in text files.
- [mdformat](https://github.com/executablebooks/mdformat): Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files.
- [docformatter](https://github.com/myint/docformatter): A formatter to format docstring.

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`, `markdown files`,
fixes `end-of-files`, `double-quoted-strings`, `python-encoding-pragma`, `mixed-line-ending`, 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.

```shell
pip install -U pre-commit
```

From the repository folder

```shell
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.
### C++ and CUDA

We follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@

[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mmflow)](https://pypi.org/project/mmflow/)
[![PyPI](https://img.shields.io/pypi/v/mmflow)](https://pypi.org/project/mmflow)
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmflow.readthedocs.io/en/dev-1.x/)
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmflow.readthedocs.io/en/1.x/)
[![badge](https://github.com/open-mmlab/mmflow/workflows/build/badge.svg)](https://github.com/open-mmlab/mmflow/actions)
[![codecov](https://codecov.io/gh/open-mmlab/mmflow/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmflow)
[![license](https://img.shields.io/github/license/open-mmlab/mmflow.svg)](https://github.com/open-mmlab/mmflow/blob/dev-1.x/LICENSE)
[![license](https://img.shields.io/github/license/open-mmlab/mmflow.svg)](https://github.com/open-mmlab/mmflow/blob/1.x/LICENSE)
[![open issues](https://isitmaintained.com/badge/open/open-mmlab/mmflow.svg)](https://github.com/open-mmlab/mmflow/issues)

Documentation: <https://mmflow.readthedocs.io/en/dev-1.x>
Documentation: <https://mmflow.readthedocs.io/en/1.x>

## Introduction

English | [简体中文](README_zh-CN.md)

MMFlow is an open source optical flow toolbox based on PyTorch. It is a part of the [OpenMMLab](https://openmmlab.com/) project.

The dev-1.x branch works with **PyTorch 1.6+**.
The 1.x branch works with **PyTorch 1.6+**.

<https://user-images.githubusercontent.com/76149310/141947796-af4f1e67-60c9-48ed-9dd6-fcd809a7d991.mp4>

Expand Down Expand Up @@ -64,6 +64,20 @@ Please refer to [changelog.md](docs/en/notes/changelog.md) for details and relea
- Faster training and testing speed with complete support of mixed precision training.
- Refactored and more flexible architecture.

## Installation

Please refer to [install.md](docs/en/install.md) for installation and
guidance in [dataset_prepare](docs/en/user_guides/2_dataset_prepare.md) for dataset preparation.

## Get Started

Please see [Overview](docs/en/overview.md) for the general introduction of MMFlow.

Please see [user guides](https://mmflow.readthedocs.io/en/1.x/user_guides/index.html) for the basic usage of MMFlow.
There are also [advanced tutorials](https://mmflow.readthedocs.io/en/1.x/advanced_guides/index.html) for in-depth understanding of mmflow design and implementation .

To migrate from MMFlow 0.x, please refer to [migration](docs/en/migration.md).

## Benchmark and model zoo

Results and models are available in the [model zoo](docs/en/model_zoo.md).
Expand All @@ -80,23 +94,9 @@ Supported methods:
- [x] [RAFT (ECCV'2020)](configs/raft/README.md)
- [x] [GMA (ICCV' 2021)](configs/gma/README.md)

## Installation

Please refer to [install.md](docs/en/install.md) for installation and
guidance in [dataset_prepare](docs/en/user_guides/2_dataset_prepare.md) for dataset preparation.

## Get Started

Please see [Overview](docs/en/overview.md) for the general introduction of MMFlow.

Please see [user guides](https://mmflow.readthedocs.io/en/dev-1.x/user_guides/index.html) for the basic usage of MMFlow.
There are also [advanced tutorials](https://mmflow.readthedocs.io/en/dev-1.x/advanced_guides/index.html) for in-depth understanding of mmflow design and implementation .

To migrate from MMFlow 1.x, please refer to [migration](docs/en/migration.md).

## Contributing

We appreciate all contributions improving MMFlow. Please refer to [CONTRIBUTING.md](https://github.com/open-mmlab/mmcv/blob/master/CONTRIBUTING.md) in MMCV for more details about the contributing guideline.
We appreciate all contributions improving MMFlow. Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for more details about the contributing guideline.

## Citation

Expand All @@ -113,6 +113,7 @@ If you use this toolbox or benchmark in your research, please cite this project.

## Projects in OpenMMLab

- [MMEngine](https://github.com/open-mmlab/mmengine): OpenMMLab foundational library for training deep learning models
- [MMCV](https://github.com/open-mmlab/mmcv): OpenMMLab foundational library for computer vision.
- [MIM](https://github.com/open-mmlab/mim): MIM installs OpenMMLab packages.
- [MMClassification](https://github.com/open-mmlab/mmclassification): OpenMMLab image classification toolbox and benchmark.
Expand Down
33 changes: 16 additions & 17 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mmflow)](https://pypi.org/project/mmflow/)
[![PyPI](https://img.shields.io/pypi/v/mmflow)](https://pypi.org/project/mmflow)
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmflow.readthedocs.io/en/dev-1.x/)
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmflow.readthedocs.io/en/1.x/)
[![badge](https://github.com/open-mmlab/mmflow/workflows/build/badge.svg)](https://github.com/open-mmlab/mmflow/actions)
[![codecov](https://codecov.io/gh/open-mmlab/mmflow/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmflow)
[![license](https://img.shields.io/github/license/open-mmlab/mmflow.svg)](https://github.com/open-mmlab/mmflow/blob/dev-1.x/LICENSE)
[![license](https://img.shields.io/github/license/open-mmlab/mmflow.svg)](https://github.com/open-mmlab/mmflow/blob/1.x/LICENSE)
[![open issues](https://isitmaintained.com/badge/open/open-mmlab/mmflow.svg)](https://github.com/open-mmlab/mmflow/issues)

文档: <https://mmflow.readthedocs.io/en/dev-1.x>
Expand All @@ -35,7 +35,7 @@

MMFlow 是一款基于 PyTorch 的光流工具箱,是 [OpenMMLab](http://openmmlab.org/) 项目的成员之一。

dev-1.x 分支代码目前支持 **PyTorch 1.6 以上**的版本。
1.x 分支代码目前支持 **PyTorch 1.6 以上**的版本。

<https://user-images.githubusercontent.com/76149310/141947796-af4f1e67-60c9-48ed-9dd6-fcd809a7d991.mp4>

Expand All @@ -59,7 +59,17 @@ dev-1.x 分支代码目前支持 **PyTorch 1.6 以上**的版本。
最新版本 v1.0.0rc0 在 2022.8.31 发布。
如果想了解更多版本更新细节和历史信息,请阅读[更新日志](docs/en/notes/changelog.md)

如果想了解更多版本更新细节和历史信息,请参考[更新日志](docs/en/changelog.md)
## 安装

请参考[安装文档](docs/en/install.md)进行安装, 参考[数据准备](docs/en/user_guides/2_dataset_prepare.md)准备数据集。

## 快速入门

请参考[概述](docs/zh_cn/overview.md)对 MMFlow 进行初步了解

请参考[用户指南](https://mmflow.readthedocs.io/zh_CN/1.x/user_guides/index.html)了解 mmflow 的基本使用,以及[进阶指南](https://mmflow.readthedocs.io/zh_CN/1.x/advanced_guides/index.html)深入了解 mmflow 设计和代码实现。

若需要将 0.x 版本的代码迁移至新版,请参考[迁移文档](docs/zh_cn/migration.md)

## 基准测试和模型库

Expand All @@ -77,21 +87,9 @@ dev-1.x 分支代码目前支持 **PyTorch 1.6 以上**的版本。
- [x] [RAFT (ECCV'2020)](configs/raft/README.md)
- [x] [GMA (ICCV' 2021)](configs/gma/README.md)

## 安装

请参考[安装文档](docs/en/install.md)进行安装, 参考[数据准备](docs/en/user_guides/2_dataset_prepare.md)准备数据集。

## 快速入门

请参考[概述](docs/zh_cn/overview.md)对 MMFlow 进行初步了解

请参考[用户指南](https://mmflow.readthedocs.io/zh_CN/dev-1.x/user_guides/index.html)了解 mmflow 的基本使用,以及[进阶指南](https://mmflow.readthedocs.io/zh_CN/dev-1.x/advanced_guides/index.html)深入了解 mmflow 设计和代码实现。

若需要将 0.x 版本的代码迁移至新版,请参考[迁移文档](docs/zh_cn/migration.md)

## 贡献指南

我们感谢所有的贡献者为改进和提升 MMFlow 所作出的努力。请参考[贡献指南](https://github.com/open-mmlab/mmcv/blob/master/CONTRIBUTING.md)来了解参与项目贡献的相关指引。
我们感谢所有的贡献者为改进和提升 MMFlow 所作出的努力。请参考[贡献指南](CONTRIBUTING.md)来了解参与项目贡献的相关指引。

## 引用

Expand All @@ -108,6 +106,7 @@ dev-1.x 分支代码目前支持 **PyTorch 1.6 以上**的版本。

## OpenMMLab 的其他项目

- [MMEngine](https://github.com/open-mmlab/mmengine): OpenMMLab 深度学习模型训练库
- [MMCV](https://github.com/open-mmlab/mmcv): OpenMMLab 计算机视觉基础库
- [MIM](https://github.com/open-mmlab/mim): MIM 是 OpenMMlab 项目、算法、模型的统一入口
- [MMClassification](https://github.com/open-mmlab/mmclassification): OpenMMLab 图像分类工具箱
Expand Down

0 comments on commit 1468286

Please sign in to comment.