From c6daca4293c1eba57b4425f56069d6e15a576093 Mon Sep 17 00:00:00 2001 From: linyiqi Date: Tue, 23 Nov 2021 22:35:41 +0800 Subject: [PATCH] [Docs] unify title format --- demo/README.md | 6 +-- docs/classification/customize_config.md | 4 +- docs/classification/customize_dataset.md | 2 +- docs/classification/customize_runtime.md | 4 +- docs/classification/overview.md | 6 +-- docs/detection/customize_config.md | 4 +- docs/detection/customize_dataset.md | 6 +-- docs/install.md | 48 +++--------------------- docs_zh-CN/install.md | 48 +++--------------------- 9 files changed, 28 insertions(+), 100 deletions(-) diff --git a/demo/README.md b/demo/README.md index f840c37..ec5e463 100644 --- a/demo/README.md +++ b/demo/README.md @@ -1,8 +1,8 @@ # Few Shot Classification Demo -## 1 shot classification Demo (Metric Based Model) +## One Shot Classification Demo (Metric Based Model) -We provide a demo script to test a single query image, given directory of 1shot support images. +We provide a demo script to test a single query image given the directory of one shot support images. The file names of support images will be used as class names. ```shell @@ -35,7 +35,7 @@ python demo/demo_metric_classifier_1shot_inference.py \ # Few Shot Detection Demo -## Attention RPN inference with support instances Demo +## Attention RPN Inference with Support Instances Demo We provide a demo script to test a single query image, given directory of support instance images. The file names of support images will be used as class names. diff --git a/docs/classification/customize_config.md b/docs/classification/customize_config.md index 91c597a..bbbb55a 100644 --- a/docs/classification/customize_config.md +++ b/docs/classification/customize_config.md @@ -27,7 +27,7 @@ When submitting jobs using "tools/classification/train.py" or "tools/classificat change this key, you may specify `--cfg-options workflow="[(train,1),(val,1)]"`. Note that the quotation mark \" is necessary to support list/tuple data types, and that **NO** white space is allowed inside the quotation marks in the specified value. -## Config Name Style +## Config name style We follow the below style to name config files. Contributors are advised to follow the same style. @@ -50,7 +50,7 @@ We follow the below style to name config files. Contributors are advised to foll -## An Example of Baseline +## An example of Baseline To help the users have a basic idea of a complete config and the modules in a modern classification system, we make brief comments on the config of Baseline for MiniImageNet in 5 way 1 shot setting as the following. diff --git a/docs/classification/customize_dataset.md b/docs/classification/customize_dataset.md index db4be88..62ec138 100644 --- a/docs/classification/customize_dataset.md +++ b/docs/classification/customize_dataset.md @@ -205,7 +205,7 @@ class MyClassifier(BaseFewShotClassifier): raise ValueError() ``` -#### using customize dataset wrapper in config +#### Using customize dataset wrapper in config Then in the config, to use `MyDatasetWrapper` you can modify the config as the following, ```python dataset_A_train = dict( diff --git a/docs/classification/customize_runtime.md b/docs/classification/customize_runtime.md index c7c5b01..3422657 100644 --- a/docs/classification/customize_runtime.md +++ b/docs/classification/customize_runtime.md @@ -2,7 +2,7 @@ ## Customize optimization settings -### Customize optimizer supported by Pytorch +### Customize an optimizer supported by Pytorch We already support to use all the optimizers implemented by PyTorch, and the only modification is to change the `optimizer` field of config files. For example, if you want to use `ADAM` (note that the performance could drop a lot), the modification could be as the following. @@ -347,7 +347,7 @@ evaluation = dict(interval=1, metric='bbox') ``` -## Customize Meta Testing +## Customize meta testing We already support two ways to handle the support data, fine-tuning and straight forwarding. To customize the code for a meta test task, we need to add a new function `test_my_single_task` diff --git a/docs/classification/overview.md b/docs/classification/overview.md index 72b4dde..d0a4952 100644 --- a/docs/classification/overview.md +++ b/docs/classification/overview.md @@ -6,7 +6,7 @@ Therefore, the design of MMFewShot target at data sampling, meta test and models Additionally, the modules in [mmcls](https://github.com/open-mmlab/mmclassification) can be imported and reused in the code or config. -## Design of Data Sampling +## Design of data sampling In MMFewShot, we suggest customizing the data pipeline using a dataset wrapper and modify the arguments in forward function when returning the dict with customize keys. @@ -29,7 +29,7 @@ class CustomizeDataset: More details can refer to [Tutorial 2: Adding New Dataset](https://mmfewshot.readthedocs.io/en/latest/classification/customize_dataset.html) -## Design of Models API +## Design of model APIs Each model in MMFewShot should implement following functions to support meta testing. More details can refer to [Tutorial 3: Customize Models](https://mmfewshot.readthedocs.io/en/latest/classification/customize_models.html) @@ -68,7 +68,7 @@ class BaseFewShotClassifier(BaseModule): ``` -## Design of Meta Testing +## Design of meta testing Meta testing performs prediction on random sampled tasks multiple times. Each task contains support and query data. More details can refer to `mmfewshot/classification/apis/test.py`. diff --git a/docs/detection/customize_config.md b/docs/detection/customize_config.md index 39e8852..cb47467 100644 --- a/docs/detection/customize_config.md +++ b/docs/detection/customize_config.md @@ -27,7 +27,7 @@ When submitting jobs using "tools/train.py" or "tools/test.py", you may specify change this key, you may specify `--cfg-options workflow="[(train,1),(val,1)]"`. Note that the quotation mark \" is necessary to support list/tuple data types, and that **NO** white space is allowed inside the quotation marks in the specified value. -## Config File Naming Convention +## Config file naming convention We follow the below style to name config files. Contributors are advised to follow the same style. @@ -48,7 +48,7 @@ We follow the below style to name config files. Contributors are advised to foll - `{dataset}`: dataset like `coco`, `voc-split1`, `voc-split2` and `voc-split3`. - `{data setting}`: like `base-training` or `1shot-fine-tuning`. -## An Example of TFA +## An example of TFA To help the users have a basic idea of a complete config and the modules in a modern classification system, we make brief comments on the config of TFA in coco 10 shot fine-tuning setting as the following. diff --git a/docs/detection/customize_dataset.md b/docs/detection/customize_dataset.md index 4dab66b..59ff6de 100644 --- a/docs/detection/customize_dataset.md +++ b/docs/detection/customize_dataset.md @@ -1,7 +1,7 @@ # Tutorial 2: Adding New Dataset -## Customize Dataset +## Customize dataset ### Load annotations from file Different from the config in mmdet using `ann_file` to load a single dataset, we use `ann_cfg` to support the complex few shot setting. @@ -153,7 +153,7 @@ dataset.prepare_train_img(self, idx, 'query') ``` -## Customize Dataset Wrapper +## Customize a new dataset wrapper In few shot setting, the various sampling logic is implemented by dataset wrapper. An example of customizing query-support data sampling logic for training: @@ -263,7 +263,7 @@ dataset_A_train = dict( ``` -## Customize Dataloader Wrapper +## Customize a dataloader wrapper We also support to iterate two different dataset simultaneously by dataloader wrapper. An example of customizing dataloader wrapper for query and support dataset: diff --git a/docs/install.md b/docs/install.md index 733485a..935df76 100644 --- a/docs/install.md +++ b/docs/install.md @@ -75,40 +75,15 @@ Or you can still install MMFewShot manually: Optionally you can compile mmcv from source if you need to develop both mmcv and mmdet. Refer to the [guide](https://github.com/open-mmlab/mmcv#installation) for details. -2. Install MMClassification. +2. Install MMClassification and MMDetection. - You can simply install mmclassification with the following command: + You can simply install mmclassification and mmdetection with the following command: ```shell - pip install mmcls + pip install mmcls mmdet ``` - or clone the repository and then install it: - - ```shell - git clone https://github.com/open-mmlab/mmclassification.git - cd mmclassification - pip install -r requirements/build.txt - python setup.py install - ``` - -3. Install MMDetection. - - You can simply install mmdetection with the following command: - - ```shell - pip install mmdet - ``` - - or clone the repository and then install it: - - ```shell - git clone https://github.com/open-mmlab/mmdetection.git - cd mmdetection - pip install -r requirements/build.txt - python setup.py install - ``` -4. Install MMFewShot. +3. Install MMFewShot. You can simply install mmfewshot with the following command: @@ -164,19 +139,8 @@ conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=10 # install the latest mmcv pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.7.0/index.html -# install mmcls -git clone https://github.com/open-mmlab/mmclassification.git -cd mmclassification -pip install -r requirements/build.txt -python setup.py install -cd .. - -# install mmdetection -git clone https://github.com/open-mmlab/mmdetection.git -cd mmdetection -pip install -r requirements/build.txt -python setup.py install -cd .. +# install mmclassification mmdetection +pip install mmcls mmdet # install mmfewshot git clone https://github.com/open-mmlab/mmfewshot.git diff --git a/docs_zh-CN/install.md b/docs_zh-CN/install.md index 6a44dc0..af9ccfa 100644 --- a/docs_zh-CN/install.md +++ b/docs_zh-CN/install.md @@ -84,40 +84,15 @@ MIM 能够自动地安装 OpenMMLab 的项目以及对应的依赖包。 pip install mmcv-full ``` -2. 安装 MMClassification. +2. 安装 MMClassification 和 MMDetection. - 你可以直接通过如下命令从 pip 安装使用 mmclassification: + 你可以直接通过如下命令从 pip 安装使用 mmclassification 和 mmdetection: ```shell - pip install mmcls + pip install mmcls mmdet ``` - 或者从 git 仓库编译源码: - - ```shell - git clone https://github.com/open-mmlab/mmclassification.git - cd mmclassification - pip install -r requirements/build.txt - python setup.py install - ``` - -3. 安装 MMDetection. - - 你可以直接通过如下命令从 pip 安装使用 mmdetection: - - ```shell - pip install mmdet - ``` - - 或者从 git 仓库编译源码: - - ```shell - git clone https://github.com/open-mmlab/mmdetection.git - cd mmdetection - pip install -r requirements/build.txt - python setup.py install - ``` -4. 安装 MMFewShot. +3. 安装 MMFewShot. 你可以直接通过如下命令从 pip 安装使用 mmfewshot: @@ -170,19 +145,8 @@ conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=10 # 安装最新版本的 mmcv pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.7.0/index.html -# 安装 mmcls -git clone https://github.com/open-mmlab/mmclassification.git -cd mmclassification -pip install -r requirements/build.txt -python setup.py install -cd .. - -# 安装 mmdetection -git clone https://github.com/open-mmlab/mmdetection.git -cd mmdetection -pip install -r requirements/build.txt -python setup.py install -cd .. +# 安装 mmclassification mmdetection +pip install mmcls mmdet # 安装 mmfewshot git clone https://github.com/open-mmlab/mmfewshot.git