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

[Docs] Replace markdownlint with mdformat for avoiding installing ruby #86

Merged
merged 2 commits into from
May 18, 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
30 changes: 15 additions & 15 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,7 +70,7 @@ 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

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

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

[homepage]: https://www.contributor-covenant.org
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/error-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

Thanks for your error report and we appreciate it a lot.
Expand Down Expand Up @@ -33,8 +32,8 @@ A placeholder for the command.

1. Please run `python mmfewshot/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.)
- 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 trackback here.
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Describe the feature**

**Motivation**
A clear and concise description of the motivation of the feature.
Ex1. It is inconvenient when [....].
Ex2. There is a recent paper [....], which is very helpful for [....].
Ex1. It is inconvenient when \[....\].
Ex2. There is a recent paper \[....\], which is very helpful for \[....\].

**Related resources**
If there is an official code release or third-party implementations, please also provide the information here, which would be very helpful.
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/general_questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ about: Ask general questions to get help
title: ''
labels: ''
assignees: ''

---
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/reimplementation_questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name: Reimplementation Questions
about: Ask about questions during model reimplementation
title: ''
labels: 'reimplementation'
labels: reimplementation
assignees: ''

---

**Notice**
Expand Down Expand Up @@ -52,7 +51,7 @@ A placeholder for the config.

1. Please run `python mmfewshot/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
1. How you installed PyTorch [e.g., pip, conda, source]
1. How you installed PyTorch \[e.g., pip, conda, source\]
2. Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)

**Results**
Expand Down
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

## Motivation

Please describe the motivation of this PR and the goal you want to achieve through this PR.

## Modification

Please briefly describe what modification is made in this PR.

## BC-breaking (Optional)

Does the modification introduce changes that break the back-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

## Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

## Checklist
Expand Down
16 changes: 10 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repos:
- repo: https://gitlab.com/pycqa/flake8.git
- repo: https://github.com/PyCQA/flake8
rev: 3.8.3
hooks:
- id: flake8
Expand All @@ -24,11 +24,6 @@ repos:
args: ["--remove"]
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/markdownlint/markdownlint
rev: v0.11.0
hooks:
- id: markdownlint
args: ["-r", "~MD002,~MD013,~MD024,~MD029,~MD033,~MD034,~MD036", "-t", "allow_different_nesting"]
- repo: https://github.com/myint/docformatter
rev: v1.3.1
hooks:
Expand All @@ -45,3 +40,12 @@ repos:
- id: check-algo-readme
- id: check-copyright
args: [ "mmfewshot", "tools" ] # replace the dir_to_check with your expected directory to check
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
hooks:
- id: mdformat
args: ["--number"]
additional_dependencies:
- mdformat-gfm
- mdformat_frontmatter
- linkify-it-py
30 changes: 13 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ English | [简体中文](README_zh-CN.md)
[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/open-mmlab/mmfewshot.svg)](https://github.com/open-mmlab/mmfewshot/issues)
[![Percentage of issues still open](https://isitmaintained.com/badge/open/open-mmlab/mmfewshot.svg)](https://github.com/open-mmlab/mmfewshot/issues)


mmfewshot is an open source few shot learning toolbox based on PyTorch. It is a part of the [OpenMMLab](https://open-mmlab.github.io/) project.

The master branch works with **PyTorch 1.5+**.
Expand All @@ -44,6 +43,7 @@ Documentation: https://mmfewshot.readthedocs.io/en/latest/.
</div>

### Major features

- **Support multiple tasks in Few Shot Learning**

MMFewShot provides unified implementation and evaluation of few shot classification and detection.
Expand All @@ -57,12 +57,10 @@ Documentation: https://mmfewshot.readthedocs.io/en/latest/.

The toolbox provides strong baselines and state-of-the-art methods in few shot classification and detection.


## License

This project is released under the [Apache 2.0 license](LICENSE).


## Model Zoo

Supported algorithms:
Expand Down Expand Up @@ -93,10 +91,8 @@ Supported algorithms:

</details>


## Changelog


## Installation & Dataset Preparation

MMFewShot depends on [PyTorch](https://pytorch.org/) and [MMCV](https://github.com/open-mmlab/mmcv).
Expand All @@ -107,22 +103,23 @@ Please refer to [install.md](/docs/en/install.md) for installation of MMFewShot
If you are new of few shot learning, you can start with [learn the basics](docs/en/intro.md).
If you are familiar with it, check out [getting_started.md](docs/en/get_started.md) for the basic usage of mmfewshot.


Refer to the below tutorials to dive deeper:

- Few Shot Classification
- [Overview](docs/classification/overview.md)
- [Config](docs/classification/customize_config.md)
- [Customize Dataset](docs/classification/customize_dataset.md)
- [Customize Model](docs/classification/customize_models.md)
- [Customize Runtime](docs/classification/customize_runtime.md)

- [Overview](docs/classification/overview.md)
- [Config](docs/classification/customize_config.md)
- [Customize Dataset](docs/classification/customize_dataset.md)
- [Customize Model](docs/classification/customize_models.md)
- [Customize Runtime](docs/classification/customize_runtime.md)

- Few Shot Detection
- [Overview](docs/detection/overview.md)
- [Config](docs/detection/customize_config.md)
- [Customize Dataset](docs/detection/customize_dataset.md)
- [Customize Model](docs/detection/customize_models.md)
- [Customize Runtime](docs/detection/customize_runtime.md)

- [Overview](docs/detection/overview.md)
- [Config](docs/detection/customize_config.md)
- [Customize Dataset](docs/detection/customize_dataset.md)
- [Customize Model](docs/detection/customize_models.md)
- [Customize Runtime](docs/detection/customize_runtime.md)

## Citation

Expand All @@ -137,7 +134,6 @@ If you find this project useful in your research, please consider cite:
}
```


## Contributing

We appreciate all contributions to improve mmfewshot. Please refer to [CONTRIBUTING.md](https://github.com/open-mmlab/mmfewshot/blob/main/.github/CONTRIBUTING.md) in MMFewShot for the contributing guideline.
Expand Down
32 changes: 14 additions & 18 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,10 @@ MMFewShot 是一款基于 PyTorch 的少样本学习代码库,是 [OpenMMLab](
<img src="resources/demo.png"/>
</div>



## 开源许可证

该项目采用 [Apache 2.0 开源许可证](LICENSE)



## 基准测试和模型库

测试结果和模型可以在[模型库](docs/model_zoo.md)中找到。
Expand Down Expand Up @@ -101,39 +97,40 @@ MMFewShot 依赖 [PyTorch](https://pytorch.org/) 和 [MMCV](https://github.com/o
请参考[安装文档](docs/zh_cn/install.md)进行安装和参考[数据准备](tools/data/README.md)准备数据集。

## 快速入门

如果初次了解少样本学习,你可以从[基础介绍](docs/en/intro.md)开始了解少样本学习的基本概念和 MMFewShot 的框架。
如果对少样本学习很熟悉,请参考[使用教程](docs/en/get_started.md)获取MMFewShot的基本用法。

MMFewShot 也提供了其他更详细的教程,包括:

- 少样本分类
- [概览](docs/classification/overview.md)
- [配置文件](docs/classification/customize_config.md)
- [添加数据集](docs/classification/customize_dataset.md)
- [添加新模型](docs/classification/customize_models.md)
- [自定义模型运行环境](docs/classification/customize_runtime.md)。

- [概览](docs/classification/overview.md)
- [配置文件](docs/classification/customize_config.md)
- [添加数据集](docs/classification/customize_dataset.md)
- [添加新模型](docs/classification/customize_models.md)
- [自定义模型运行环境](docs/classification/customize_runtime.md)。

- 少样本检测
- [概览](docs/detection/overview.md)
- [配置文件](docs/detection/customize_config.md)
- [添加数据集](docs/detection/customize_dataset.md)
- [添加新模型](docs/detection/customize_models.md)
- [自定义模型运行环境](docs/detection/customize_runtime.md)。

- [概览](docs/detection/overview.md)
- [配置文件](docs/detection/customize_config.md)
- [添加数据集](docs/detection/customize_dataset.md)
- [添加新模型](docs/detection/customize_models.md)
- [自定义模型运行环境](docs/detection/customize_runtime.md)。

## 贡献指南

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


## 致谢

MMFewShot 是一款由不同学校和公司共同贡献的开源项目。我们感谢所有为项目提供算法复现和新功能支持的贡献者,以及提供宝贵反馈的用户。

我们希望该工具箱和基准测试可以为社区提供灵活的代码工具,供用户复现现有算法并开发自己的新模型,从而不断为开源社区提供贡献。


## 引用

如果您发现此项目对您的研究有用,请考虑引用:

```bibtex
Expand All @@ -145,7 +142,6 @@ MMFewShot 是一款由不同学校和公司共同贡献的开源项目。我们
}
```


## OpenMMLab 的其他项目

- [MIM](https://github.com/open-mmlab/mim): MIM 是 OpenMMlab 项目、算法、模型的统一入口
Expand All @@ -169,7 +165,7 @@ MMFewShot 是一款由不同学校和公司共同贡献的开源项目。我们

## 欢迎加入 OpenMMLab 社区

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

<div align="center">
<img src="resources/zhihu_qrcode.jpg" height="400" /> <img src="resources/qq_group_qrcode.jpg" height="400" />
Expand Down
3 changes: 2 additions & 1 deletion configs/classification/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Few Shot Classification


## Get Started

If you're new of mmfewshot, you can check out [Get Started](https://mmfewshot.readthedocs.io/en/latest/index.html)
and [Classification Tutorials](https://mmfewshot.readthedocs.io/en/latest/classification/index.html) to try out MMFewShot.

## Data Preparation

Please follow [DATA Preparation](https://github.com/open-mmlab/mmfewshot/tree/main/tools/data/classification) to prepare data.
Loading