Skip to content

Commit

Permalink
Merge pull request #2 from linyq17/lyq-docs
Browse files Browse the repository at this point in the history
[Docs] unify title format
  • Loading branch information
linyq17 committed Nov 23, 2021
2 parents 29284a8 + c6daca4 commit cd56b00
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 100 deletions.
6 changes: 3 additions & 3 deletions demo/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/classification/customize_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/classification/customize_dataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions docs/classification/customize_runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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`
Expand Down
6 changes: 3 additions & 3 deletions docs/classification/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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)

Expand Down Expand Up @@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions docs/detection/customize_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions docs/detection/customize_dataset.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
48 changes: 6 additions & 42 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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
Expand Down
48 changes: 6 additions & 42 deletions docs_zh-CN/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cd56b00

Please sign in to comment.