fix links and typos (#58)
* fix init * fix test api fix test api bug * add metarcnn fsdetview config * fix link and typospull/1/head
parent
789e4c1e14
commit
4788be07bb
14
README.md
14
README.md
|
@ -9,17 +9,11 @@
|
||||||
English | [简体中文](README_zh-CN.md)
|
English | [简体中文](README_zh-CN.md)
|
||||||
|
|
||||||
[](https://mmfewshot.readthedocs.io/en/latest/?badge=latest)
|
[](https://mmfewshot.readthedocs.io/en/latest/?badge=latest)
|
||||||
|
|
||||||
[](https://github.com/open-mmlab/mmfewshot/actions)
|
[](https://github.com/open-mmlab/mmfewshot/actions)
|
||||||
|
|
||||||
[](https://codecov.io/gh/open-mmlab/mmfewshot)
|
[](https://codecov.io/gh/open-mmlab/mmfewshot)
|
||||||
|
|
||||||
[](https://pypi.org/project/mmedit/)
|
[](https://pypi.org/project/mmedit/)
|
||||||
|
|
||||||
[](https://github.com/open-mmlab/mmfewshot/blob/master/LICENSE)
|
[](https://github.com/open-mmlab/mmfewshot/blob/master/LICENSE)
|
||||||
|
|
||||||
[](https://github.com/open-mmlab/mmfewshot/issues)
|
[](https://github.com/open-mmlab/mmfewshot/issues)
|
||||||
|
|
||||||
[](https://github.com/open-mmlab/mmfewshot/issues)
|
[](https://github.com/open-mmlab/mmfewshot/issues)
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,7 +107,7 @@ If you find this project useful in your research, please consider cite:
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
We appreciate all contributions to improve mmfewshot. Please refer to [CONTRIBUTING.md in MMFewShot](https://github.com/open-mmlab/mmcv/blob/master/.github/CONTRIBUTING.md) for the contributing guideline.
|
We appreciate all contributions to improve mmfewshot. Please refer to [CONTRIBUTING.md in MMFewShot](https://github.com/open-mmlab/mmfewshot/blob/main/.github/CONTRIBUTING.md) for the contributing guideline.
|
||||||
|
|
||||||
## Acknowledgement
|
## Acknowledgement
|
||||||
|
|
||||||
|
@ -130,6 +124,8 @@ mmfewshot is an open source project that is contributed by researchers and engin
|
||||||
- [MMAction2](https://github.com/open-mmlab/mmaction2): OpenMMLab's next-generation action understanding toolbox and benchmark.
|
- [MMAction2](https://github.com/open-mmlab/mmaction2): OpenMMLab's next-generation action understanding toolbox and benchmark.
|
||||||
- [MMTracking](https://github.com/open-mmlab/mmtracking): OpenMMLab video perception toolbox and benchmark.
|
- [MMTracking](https://github.com/open-mmlab/mmtracking): OpenMMLab video perception toolbox and benchmark.
|
||||||
- [MMPose](https://github.com/open-mmlab/mmpose): OpenMMLab pose estimation toolbox and benchmark.
|
- [MMPose](https://github.com/open-mmlab/mmpose): OpenMMLab pose estimation toolbox and benchmark.
|
||||||
- [MMEditing](https://github.com/open-mmlab/mmfewshot): OpenMMLab image and video editing toolbox.
|
- [MMEditing](https://github.com/open-mmlab/mmediting): OpenMMLab image and video editing toolbox.
|
||||||
- [MMOCR](https://github.com/open-mmlab/mmocr): A Comprehensive Toolbox for Text Detection, Recognition and Understanding.
|
- [MMOCR](https://github.com/open-mmlab/mmocr): A Comprehensive Toolbox for Text Detection, Recognition and Understanding.
|
||||||
- [MMGeneration](https://github.com/open-mmlab/mmgeneration): A powerful toolkit for generative models.
|
- [MMGeneration](https://github.com/open-mmlab/mmgeneration): OpenMMLab image and video generative models toolbox.
|
||||||
|
- [MMFlow](https://github.com/open-mmlab/mmflow): OpenMMLab optical flow toolbox and benchmark.
|
||||||
|
- [MMFewShot](https://github.com/open-mmlab/mmfewshot): OpenMMLab FewShot Learning Toolbox and Benchmark.
|
||||||
|
|
|
@ -7,19 +7,12 @@
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
[English](README.md) | 简体中文
|
[English](README.md) | 简体中文
|
||||||
|
|
||||||
[](https://mmfewshot.readthedocs.io/en/latest/?badge=latest)
|
[](https://mmfewshot.readthedocs.io/en/latest/?badge=latest)
|
||||||
|
|
||||||
[](https://github.com/open-mmlab/mmfewshot/actions)
|
[](https://github.com/open-mmlab/mmfewshot/actions)
|
||||||
|
|
||||||
[](https://codecov.io/gh/open-mmlab/mmfewshot)
|
[](https://codecov.io/gh/open-mmlab/mmfewshot)
|
||||||
|
|
||||||
[](https://pypi.org/project/mmedit/)
|
[](https://pypi.org/project/mmedit/)
|
||||||
|
|
||||||
[](https://github.com/open-mmlab/mmfewshot/blob/master/LICENSE)
|
[](https://github.com/open-mmlab/mmfewshot/blob/master/LICENSE)
|
||||||
|
|
||||||
[](https://github.com/open-mmlab/mmfewshot/issues)
|
[](https://github.com/open-mmlab/mmfewshot/issues)
|
||||||
|
|
||||||
[](https://github.com/open-mmlab/mmfewshot/issues)
|
[](https://github.com/open-mmlab/mmfewshot/issues)
|
||||||
|
|
||||||
MMFewShot 是一款基于 PyTorch 的少样本学习代码库,是 [OpenMMLab](http://openmmlab.org/) 项目的成员之一。
|
MMFewShot 是一款基于 PyTorch 的少样本学习代码库,是 [OpenMMLab](http://openmmlab.org/) 项目的成员之一。
|
||||||
|
@ -113,7 +106,7 @@ MMFewShot 也提供了其他更详细的教程,包括:
|
||||||
|
|
||||||
## 贡献指南
|
## 贡献指南
|
||||||
|
|
||||||
我们感谢所有的贡献者为改进和提升 MMFewShot 所作出的努力。请参考[贡献指南](https://github.com/open-mmlab/mmcv/blob/master/CONTRIBUTING.md)来了解参与项目贡献的相关指引。
|
我们感谢所有的贡献者为改进和提升 MMFewShot 所作出的努力。请参考[贡献指南](https://github.com/open-mmlab/mmfewshot/blob/main/.github/CONTRIBUTING.md)来了解参与项目贡献的相关指引。
|
||||||
|
|
||||||
|
|
||||||
## 致谢
|
## 致谢
|
||||||
|
@ -151,6 +144,7 @@ MMFewShot 是一款由不同学校和公司共同贡献的开源项目。我们
|
||||||
- [MMOCR](https://github.com/open-mmlab/mmocr): OpenMMLab 全流程文字检测识别理解工具包
|
- [MMOCR](https://github.com/open-mmlab/mmocr): OpenMMLab 全流程文字检测识别理解工具包
|
||||||
- [MMGeneration](https://github.com/open-mmlab/mmgeneration): OpenMMLab 新一代生成模型工具箱
|
- [MMGeneration](https://github.com/open-mmlab/mmgeneration): OpenMMLab 新一代生成模型工具箱
|
||||||
- [MMFlow](https://github.com/open-mmlab/mmflow): OpenMMLab 光流估计工具箱与测试基准
|
- [MMFlow](https://github.com/open-mmlab/mmflow): OpenMMLab 光流估计工具箱与测试基准
|
||||||
|
- [MMFewShot](https://github.com/open-mmlab/mmfewshot): OpenMMLab 少样本学习工具箱与测试基准
|
||||||
|
|
||||||
## 欢迎加入 OpenMMLab 社区
|
## 欢迎加入 OpenMMLab 社区
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
## Get Started
|
## Get Started
|
||||||
If you're new of mmfewshot, you can check out [Get Started](https://mmfewshot.readthedocs.io/en/latest/index.html)
|
If you're new of mmfewshot, you can check out [Get Started](https://mmfewshot.readthedocs.io/en/latest/index.html)
|
||||||
and [Classification Tutorials]() to try out MMFewShot.
|
and [Classification Tutorials](https://mmfewshot.readthedocs.io/en/latest/classification/index.html) to try out MMFewShot.
|
||||||
|
|
||||||
## Data Preparation
|
## Data Preparation
|
||||||
Please follow [DATA Preparation](https://github.com/open-mmlab/mmfewshot/tree/master/tools/data/classification) to prepare data.
|
Please follow [DATA Preparation](https://github.com/open-mmlab/mmfewshot/tree/master/tools/data/classification) to prepare data.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Get Started
|
## Get Started
|
||||||
If you're new of mmfewshot, you can check out [Get Started](https://mmfewshot.readthedocs.io/en/latest/index.html)
|
If you're new of mmfewshot, you can check out [Get Started](https://mmfewshot.readthedocs.io/en/latest/index.html)
|
||||||
and [Detection Tutorials](https://mmfewshot.readthedocs.io/en/latest) to try out MMFewShot.
|
and [Detection Tutorials](https://mmfewshot.readthedocs.io/en/latest/detection/index.html) to try out MMFewShot.
|
||||||
|
|
||||||
## Data Preparation
|
## Data Preparation
|
||||||
Please follow [DATA Preparation](https://github.com/open-mmlab/mmfewshot/tree/master/tools/data/detection) to prepare data.
|
Please follow [DATA Preparation](https://github.com/open-mmlab/mmfewshot/tree/master/tools/data/detection) to prepare data.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
We incorporate modular and inheritance design into our config system, which is convenient to conduct various experiments.
|
We incorporate modular and inheritance design into our config system, which is convenient to conduct various experiments.
|
||||||
If you wish to inspect the config file, you may run `python tools/misc/print_config.py /PATH/TO/CONFIG` to see the complete config.
|
If you wish to inspect the config file, you may run `python tools/misc/print_config.py /PATH/TO/CONFIG` to see the complete config.
|
||||||
The classification part of mmfewshot is built upon the [mmcls](https://mmcv.readthedocs.io/en/latest/understand_mmcv/config.html),
|
The classification part of mmfewshot is built upon the [mmcls](https://github.com/open-mmlab/mmclassification),
|
||||||
thus it is highly recommended learning the basic of mmcls.
|
thus it is highly recommended learning the basic of mmcls.
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,6 @@ We follow the below style to name config files. Contributors are advised to foll
|
||||||
- `{dataset}`: dataset like `cub`, `mini-imagenet` and `tiered-imagenet`.
|
- `{dataset}`: dataset like `cub`, `mini-imagenet` and `tiered-imagenet`.
|
||||||
- `{meta test setting}`: n way k shot setting like `5way_1shot` or `5way_5shot`.
|
- `{meta test setting}`: n way k shot setting like `5way_1shot` or `5way_5shot`.
|
||||||
|
|
||||||
We follow the config structure of [mmdet](https://mmcv.readthedocs.io/en/latest/understand_mmcv/config.html)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
### Customize loading annotations
|
### Customize loading annotations
|
||||||
|
|
||||||
You can write a new Dataset class inherited from `BaseFewShotDataset`, and overwrite `load_annotations(self)`,
|
You can write a new Dataset class inherited from `BaseFewShotDataset`, and overwrite `load_annotations(self)`,
|
||||||
like [CUB](https://github.com/open-mmlab/mmfewshot/blob/master/mmfewshot/classification/datasets/cub.py) and [MiniImageNet](https://github.com/open-mmlab/mmfewshot/blob/master/mmfewshot/classification/datasets/mini_imagenet.py).
|
like [CUB](https://github.com/open-mmlab/mmfewshot/blob/main/mmfewshot/classification/datasets/cub.py) and [MiniImageNet](https://github.com/open-mmlab/mmfewshot/blob/main/mmfewshot/classification/datasets/mini_imagenet.py).
|
||||||
Typically, this function returns a list, where each sample is a dict, containing necessary data information, e.g., `img` and `gt_label`.
|
Typically, this function returns a list, where each sample is a dict, containing necessary data information, e.g., `img` and `gt_label`.
|
||||||
|
|
||||||
Assume we are going to implement a `Filelist` dataset, which takes filelists for both training and testing. The format of annotation list is as follows:
|
Assume we are going to implement a `Filelist` dataset, which takes filelists for both training and testing. The format of annotation list is as follows:
|
||||||
|
|
|
@ -114,7 +114,7 @@ Tricks not implemented by the optimizer should be implemented through optimizer
|
||||||
|
|
||||||
- __Use momentum schedule to accelerate model convergence__:
|
- __Use momentum schedule to accelerate model convergence__:
|
||||||
We support momentum scheduler to modify model's momentum according to learning rate, which could make the model converge in a faster way.
|
We support momentum scheduler to modify model's momentum according to learning rate, which could make the model converge in a faster way.
|
||||||
Momentum scheduler is usually used with LR scheduler, for example, the following config is used in 3D classification to accelerate convergence.
|
Momentum scheduler is usually used with LR scheduler, for example, the following config is used in 3D detection to accelerate convergence.
|
||||||
For more details, please refer to the implementation of [CyclicLrUpdater](https://github.com/open-mmlab/mmcv/blob/f48241a65aebfe07db122e9db320c31b685dc674/mmcv/runner/hooks/lr_updater.py#L327) and [CyclicMomentumUpdater](https://github.com/open-mmlab/mmcv/blob/f48241a65aebfe07db122e9db320c31b685dc674/mmcv/runner/hooks/momentum_updater.py#L130).
|
For more details, please refer to the implementation of [CyclicLrUpdater](https://github.com/open-mmlab/mmcv/blob/f48241a65aebfe07db122e9db320c31b685dc674/mmcv/runner/hooks/lr_updater.py#L327) and [CyclicMomentumUpdater](https://github.com/open-mmlab/mmcv/blob/f48241a65aebfe07db122e9db320c31b685dc674/mmcv/runner/hooks/momentum_updater.py#L130).
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
We incorporate modular and inheritance design into our config system, which is convenient to conduct various experiments.
|
We incorporate modular and inheritance design into our config system, which is convenient to conduct various experiments.
|
||||||
If you wish to inspect the config file, you may run `python tools/misc/print_config.py /PATH/TO/CONFIG` to see the complete config.
|
If you wish to inspect the config file, you may run `python tools/misc/print_config.py /PATH/TO/CONFIG` to see the complete config.
|
||||||
The detection part of mmfewshot is built upon the [mmdet](https://mmcv.readthedocs.io/en/latest/understand_mmcv/config.html),
|
The detection part of mmfewshot is built upon the [mmdet](https://github.com/open-mmlab/mmdetection),
|
||||||
thus it is highly recommended learning the basic of [mmdet](https://mmcv.readthedocs.io/en/latest/understand_mmcv/config.html).
|
thus it is highly recommended learning the basic of [mmdet](https://mmdetection.readthedocs.io/en/latest/).
|
||||||
|
|
||||||
|
|
||||||
## Modify a config through script arguments
|
## Modify a config through script arguments
|
||||||
|
|
|
@ -32,7 +32,7 @@ Unlike few shot classification can test on thousands of tasks in a short time,
|
||||||
it is hard to follow the same protocol in few shot detection because of the computation cost.
|
it is hard to follow the same protocol in few shot detection because of the computation cost.
|
||||||
Thus, we provide the predefined data split for reproducibility.
|
Thus, we provide the predefined data split for reproducibility.
|
||||||
These data splits directly use the files released from TFA [repo](https://github.com/ucbdrive/few-shot-object-detection).
|
These data splits directly use the files released from TFA [repo](https://github.com/ucbdrive/few-shot-object-detection).
|
||||||
The details of data preparation can refer to [here](https://github.com/open-mmlab/mmfewshot/tree/master/tools/data/detection).
|
The details of data preparation can refer to [here](https://github.com/open-mmlab/mmfewshot/tree/main/tools/data/detection).
|
||||||
|
|
||||||
To load these predefined data splits, the type of dataset need to be set to
|
To load these predefined data splits, the type of dataset need to be set to
|
||||||
`FewShotVOCDefaultDataset` or `FewShotCocoDefaultDataset`.
|
`FewShotVOCDefaultDataset` or `FewShotCocoDefaultDataset`.
|
||||||
|
|
|
@ -165,16 +165,18 @@ conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=10
|
||||||
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.7.0/index.html
|
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.7.0/index.html
|
||||||
|
|
||||||
# install mmcls
|
# install mmcls
|
||||||
git clone https://github.com/open-mmlab/mmdetection.git
|
git clone https://github.com/open-mmlab/mmclassification.git
|
||||||
cd mmdetection
|
cd mmclassification
|
||||||
pip install -r requirements/build.txt
|
pip install -r requirements/build.txt
|
||||||
python setup.py install
|
python setup.py install
|
||||||
|
cd ..
|
||||||
|
|
||||||
# install mmdetection
|
# install mmdetection
|
||||||
git clone https://github.com/open-mmlab/mmdetection.git
|
git clone https://github.com/open-mmlab/mmdetection.git
|
||||||
cd mmdetection
|
cd mmdetection
|
||||||
pip install -r requirements/build.txt
|
pip install -r requirements/build.txt
|
||||||
python setup.py install
|
python setup.py install
|
||||||
|
cd ..
|
||||||
|
|
||||||
# install mmfewshot
|
# install mmfewshot
|
||||||
git clone https://github.com/open-mmlab/mmfewshot.git
|
git clone https://github.com/open-mmlab/mmfewshot.git
|
||||||
|
@ -188,6 +190,6 @@ pip install -v -e . # or "python setup.py develop"
|
||||||
|
|
||||||
To verify whether MMFewShot is installed correctly, we can run the demo code and inference a demo image.
|
To verify whether MMFewShot is installed correctly, we can run the demo code and inference a demo image.
|
||||||
|
|
||||||
Please refer to [few shot classification demo](https://github.com/open-mmlab/mmfewshot/demo/#Few-Shot-Classification-Demo)
|
Please refer to [few shot classification demo](https://github.com/open-mmlab/mmfewshot/tree/main/demo#few-shot-classification-demo)
|
||||||
or [few shot detection demo](https://github.com/open-mmlab/mmfewshot/demo/#Few-Shot-Detection-Demo)
|
or [few shot detection demo](https://github.com/open-mmlab/mmfewshot/tree/main/demo#few-shot-detection-demo)
|
||||||
for more details. The demo code is supposed to run successfully upon you finish the installation.
|
for more details. The demo code is supposed to run successfully upon you finish the installation.
|
||||||
|
|
|
@ -6,35 +6,35 @@
|
||||||
|
|
||||||
#### Baseline
|
#### Baseline
|
||||||
|
|
||||||
Please refer to [Baseline](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/baseline) for details.
|
Please refer to [Baseline](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/baseline) for details.
|
||||||
|
|
||||||
#### Baseline++
|
#### Baseline++
|
||||||
|
|
||||||
Please refer to [Baseline++](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/baseline_plus) for details.
|
Please refer to [Baseline++](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/baseline_plus) for details.
|
||||||
|
|
||||||
#### ProtoNet
|
#### ProtoNet
|
||||||
|
|
||||||
Please refer to [ProtoNet](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/proto_net) for details.
|
Please refer to [ProtoNet](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/proto_net) for details.
|
||||||
|
|
||||||
#### RelationNet
|
#### RelationNet
|
||||||
|
|
||||||
Please refer to [RelationNet](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/relation_net) for details.
|
Please refer to [RelationNet](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/relation_net) for details.
|
||||||
|
|
||||||
#### MatchingNet
|
#### MatchingNet
|
||||||
|
|
||||||
Please refer to [MatchingNet](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/matching_net) for details.
|
Please refer to [MatchingNet](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/matching_net) for details.
|
||||||
|
|
||||||
#### MAML
|
#### MAML
|
||||||
|
|
||||||
Please refer to [MAML](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/maml) for details.
|
Please refer to [MAML](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/maml) for details.
|
||||||
|
|
||||||
#### NegMargin
|
#### NegMargin
|
||||||
|
|
||||||
Please refer to [NegMargin](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/neg_margin) for details.
|
Please refer to [NegMargin](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/neg_margin) for details.
|
||||||
|
|
||||||
#### Meta Baseline
|
#### Meta Baseline
|
||||||
|
|
||||||
Please refer to [Meta Baseline](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/meta_baseline) for details.
|
Please refer to [Meta Baseline](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/meta_baseline) for details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,24 +42,24 @@ Please refer to [Meta Baseline](https://github.com/open-mmlab/mmfewshot/tree/mas
|
||||||
|
|
||||||
#### TFA
|
#### TFA
|
||||||
|
|
||||||
Please refer to [TFA](https://github.com/open-mmlab/mmfewshot/tree/master/configs/detection/tfa) for details.
|
Please refer to [TFA](https://github.com/open-mmlab/mmfewshot/tree/main/configs/detection/tfa) for details.
|
||||||
|
|
||||||
#### FSCE
|
#### FSCE
|
||||||
|
|
||||||
Please refer to [FSCE](https://github.com/open-mmlab/mmfewshot/tree/master/configs/detection/fsce) for details.
|
Please refer to [FSCE](https://github.com/open-mmlab/mmfewshot/tree/main/configs/detection/fsce) for details.
|
||||||
|
|
||||||
#### Meta RCNN
|
#### Meta RCNN
|
||||||
|
|
||||||
Please refer to [Meta RCNN](https://github.com/open-mmlab/mmfewshot/tree/master/configs/detection/meta_rcnn) for details.
|
Please refer to [Meta RCNN](https://github.com/open-mmlab/mmfewshot/tree/main/configs/detection/meta_rcnn) for details.
|
||||||
|
|
||||||
#### FSDetView
|
#### FSDetView
|
||||||
|
|
||||||
Please refer to [FSDetView](https://github.com/open-mmlab/mmfewshot/tree/master/configs/detection/fsdetview) for details.
|
Please refer to [FSDetView](https://github.com/open-mmlab/mmfewshot/tree/main/configs/detection/fsdetview) for details.
|
||||||
|
|
||||||
#### Attention RPN
|
#### Attention RPN
|
||||||
|
|
||||||
Please refer to [Attention RPN](https://github.com/open-mmlab/mmfewshot/tree/master/configs/detection/attention_rpn) for details.
|
Please refer to [Attention RPN](https://github.com/open-mmlab/mmfewshot/tree/main/configs/detection/attention_rpn) for details.
|
||||||
|
|
||||||
#### MPSR
|
#### MPSR
|
||||||
|
|
||||||
Please refer to [MPSR](https://github.com/open-mmlab/mmfewshot/tree/master/configs/detection/mpsr) for details.
|
Please refer to [MPSR](https://github.com/open-mmlab/mmfewshot/tree/main/configs/detection/mpsr) for details.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
We incorporate modular and inheritance design into our config system, which is convenient to conduct various experiments.
|
We incorporate modular and inheritance design into our config system, which is convenient to conduct various experiments.
|
||||||
If you wish to inspect the config file, you may run `python tools/misc/print_config.py /PATH/TO/CONFIG` to see the complete config.
|
If you wish to inspect the config file, you may run `python tools/misc/print_config.py /PATH/TO/CONFIG` to see the complete config.
|
||||||
The classification part of mmfewshot is built upon the [mmcls](https://mmcv.readthedocs.io/en/latest/understand_mmcv/config.html),
|
The classification part of mmfewshot is built upon the [mmcls](https://github.com/open-mmlab/mmclassification),
|
||||||
thus it is highly recommended learning the basic of mmcls.
|
thus it is highly recommended learning the basic of mmcls.
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,6 @@ We follow the below style to name config files. Contributors are advised to foll
|
||||||
- `{dataset}`: dataset like `cub`, `mini-imagenet` and `tiered-imagenet`.
|
- `{dataset}`: dataset like `cub`, `mini-imagenet` and `tiered-imagenet`.
|
||||||
- `{meta test setting}`: n way k shot setting like `5way_1shot` or `5way_5shot`.
|
- `{meta test setting}`: n way k shot setting like `5way_1shot` or `5way_5shot`.
|
||||||
|
|
||||||
We follow the config structure of [mmdet](https://mmcv.readthedocs.io/en/latest/understand_mmcv/config.html)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
### Customize loading annotations
|
### Customize loading annotations
|
||||||
|
|
||||||
You can write a new Dataset class inherited from `BaseFewShotDataset`, and overwrite `load_annotations(self)`,
|
You can write a new Dataset class inherited from `BaseFewShotDataset`, and overwrite `load_annotations(self)`,
|
||||||
like [CUB](https://github.com/open-mmlab/mmfewshot/blob/master/mmfewshot/classification/datasets/cub.py) and [MiniImageNet](https://github.com/open-mmlab/mmfewshot/blob/master/mmfewshot/classification/datasets/mini_imagenet.py).
|
like [CUB](https://github.com/open-mmlab/mmfewshot/blob/main/mmfewshot/classification/datasets/cub.py) and [MiniImageNet](https://github.com/open-mmlab/mmfewshot/blob/main/mmfewshot/classification/datasets/mini_imagenet.py).
|
||||||
Typically, this function returns a list, where each sample is a dict, containing necessary data information, e.g., `img` and `gt_label`.
|
Typically, this function returns a list, where each sample is a dict, containing necessary data information, e.g., `img` and `gt_label`.
|
||||||
|
|
||||||
Assume we are going to implement a `Filelist` dataset, which takes filelists for both training and testing. The format of annotation list is as follows:
|
Assume we are going to implement a `Filelist` dataset, which takes filelists for both training and testing. The format of annotation list is as follows:
|
||||||
|
|
|
@ -114,7 +114,7 @@ Tricks not implemented by the optimizer should be implemented through optimizer
|
||||||
|
|
||||||
- __Use momentum schedule to accelerate model convergence__:
|
- __Use momentum schedule to accelerate model convergence__:
|
||||||
We support momentum scheduler to modify model's momentum according to learning rate, which could make the model converge in a faster way.
|
We support momentum scheduler to modify model's momentum according to learning rate, which could make the model converge in a faster way.
|
||||||
Momentum scheduler is usually used with LR scheduler, for example, the following config is used in 3D classification to accelerate convergence.
|
Momentum scheduler is usually used with LR scheduler, for example, the following config is used in 3D detection to accelerate convergence.
|
||||||
For more details, please refer to the implementation of [CyclicLrUpdater](https://github.com/open-mmlab/mmcv/blob/f48241a65aebfe07db122e9db320c31b685dc674/mmcv/runner/hooks/lr_updater.py#L327) and [CyclicMomentumUpdater](https://github.com/open-mmlab/mmcv/blob/f48241a65aebfe07db122e9db320c31b685dc674/mmcv/runner/hooks/momentum_updater.py#L130).
|
For more details, please refer to the implementation of [CyclicLrUpdater](https://github.com/open-mmlab/mmcv/blob/f48241a65aebfe07db122e9db320c31b685dc674/mmcv/runner/hooks/lr_updater.py#L327) and [CyclicMomentumUpdater](https://github.com/open-mmlab/mmcv/blob/f48241a65aebfe07db122e9db320c31b685dc674/mmcv/runner/hooks/momentum_updater.py#L130).
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
We incorporate modular and inheritance design into our config system, which is convenient to conduct various experiments.
|
We incorporate modular and inheritance design into our config system, which is convenient to conduct various experiments.
|
||||||
If you wish to inspect the config file, you may run `python tools/misc/print_config.py /PATH/TO/CONFIG` to see the complete config.
|
If you wish to inspect the config file, you may run `python tools/misc/print_config.py /PATH/TO/CONFIG` to see the complete config.
|
||||||
The detection part of mmfewshot is built upon the [mmdet](https://mmcv.readthedocs.io/en/latest/understand_mmcv/config.html),
|
The detection part of mmfewshot is built upon the [mmdet](https://github.com/open-mmlab/mmdetection),
|
||||||
thus it is highly recommended learning the basic of [mmdet](https://mmcv.readthedocs.io/en/latest/understand_mmcv/config.html).
|
thus it is highly recommended learning the basic of [mmdet](https://mmdetection.readthedocs.io/en/latest/).
|
||||||
|
|
||||||
|
|
||||||
## Modify a config through script arguments
|
## Modify a config through script arguments
|
||||||
|
|
|
@ -32,7 +32,7 @@ Unlike few shot classification can test on thousands of tasks in a short time,
|
||||||
it is hard to follow the same protocol in few shot detection because of the computation cost.
|
it is hard to follow the same protocol in few shot detection because of the computation cost.
|
||||||
Thus, we provide the predefined data split for reproducibility.
|
Thus, we provide the predefined data split for reproducibility.
|
||||||
These data splits directly use the files released from TFA [repo](https://github.com/ucbdrive/few-shot-object-detection).
|
These data splits directly use the files released from TFA [repo](https://github.com/ucbdrive/few-shot-object-detection).
|
||||||
The details of data preparation can refer to [here](https://github.com/open-mmlab/mmfewshot/tree/master/tools/data/detection).
|
The details of data preparation can refer to [here](https://github.com/open-mmlab/mmfewshot/tree/main/tools/data/detection).
|
||||||
|
|
||||||
To load these predefined data splits, the type of dataset need to be set to
|
To load these predefined data splits, the type of dataset need to be set to
|
||||||
`FewShotVOCDefaultDataset` or `FewShotCocoDefaultDataset`.
|
`FewShotVOCDefaultDataset` or `FewShotCocoDefaultDataset`.
|
||||||
|
|
|
@ -29,5 +29,3 @@ by `QuerySupportEvalHook`. More implementation details can refer to `mmfewshot.d
|
||||||

|

|
||||||
|
|
||||||
More usage details and customization can refer to [Tutorial 2: Adding New Dataset](https://mmfewshot.readthedocs.io/en/latest/detection/customize_dataset.html)
|
More usage details and customization can refer to [Tutorial 2: Adding New Dataset](https://mmfewshot.readthedocs.io/en/latest/detection/customize_dataset.html)
|
||||||
|
|
||||||
## Design of data flow
|
|
||||||
|
|
|
@ -171,16 +171,18 @@ conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=10
|
||||||
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.7.0/index.html
|
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.7.0/index.html
|
||||||
|
|
||||||
# 安装 mmcls
|
# 安装 mmcls
|
||||||
git clone https://github.com/open-mmlab/mmdetection.git
|
git clone https://github.com/open-mmlab/mmclassification.git
|
||||||
cd mmdetection
|
cd mmclassification
|
||||||
pip install -r requirements/build.txt
|
pip install -r requirements/build.txt
|
||||||
python setup.py install
|
python setup.py install
|
||||||
|
cd ..
|
||||||
|
|
||||||
# 安装 mmdetection
|
# 安装 mmdetection
|
||||||
git clone https://github.com/open-mmlab/mmdetection.git
|
git clone https://github.com/open-mmlab/mmdetection.git
|
||||||
cd mmdetection
|
cd mmdetection
|
||||||
pip install -r requirements/build.txt
|
pip install -r requirements/build.txt
|
||||||
python setup.py install
|
python setup.py install
|
||||||
|
cd ..
|
||||||
|
|
||||||
# 安装 mmfewshot
|
# 安装 mmfewshot
|
||||||
git clone https://github.com/open-mmlab/mmfewshot.git
|
git clone https://github.com/open-mmlab/mmfewshot.git
|
||||||
|
@ -194,6 +196,6 @@ pip install -v -e . # or "python setup.py develop"
|
||||||
|
|
||||||
为了验证是否正确安装了 MMFewShot 和所需的环境,我们可以运行示例的 Python 代码在示例图像进行推理:
|
为了验证是否正确安装了 MMFewShot 和所需的环境,我们可以运行示例的 Python 代码在示例图像进行推理:
|
||||||
|
|
||||||
具体的细节可以参考 [few shot classification demo](https://github.com/open-mmlab/mmfewshot/demo/#Few-Shot-Classification-Demo)
|
具体的细节可以参考 [few shot classification demo](https://github.com/open-mmlab/mmfewshot/tree/main/demo#few-shot-classification-demo)
|
||||||
以及 [few shot detection demo](https://github.com/open-mmlab/mmfewshot/demo/#Few-Shot-Detection-Demo) 。
|
以及 [few shot detection demo](https://github.com/open-mmlab/mmfewshot/tree/main/demo#few-shot-detection-demo) 。
|
||||||
如果成功安装 MMFewShot,则上面的代码可以完整地运行。
|
如果成功安装 MMFewShot,则上面的代码可以完整地运行。
|
||||||
|
|
|
@ -6,35 +6,35 @@
|
||||||
|
|
||||||
#### Baseline
|
#### Baseline
|
||||||
|
|
||||||
Please refer to [Baseline](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/baseline) for details.
|
Please refer to [Baseline](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/baseline) for details.
|
||||||
|
|
||||||
#### Baseline++
|
#### Baseline++
|
||||||
|
|
||||||
Please refer to [Baseline++](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/baseline_plus) for details.
|
Please refer to [Baseline++](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/baseline_plus) for details.
|
||||||
|
|
||||||
#### ProtoNet
|
#### ProtoNet
|
||||||
|
|
||||||
Please refer to [ProtoNet](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/proto_net) for details.
|
Please refer to [ProtoNet](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/proto_net) for details.
|
||||||
|
|
||||||
#### RelationNet
|
#### RelationNet
|
||||||
|
|
||||||
Please refer to [RelationNet](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/relation_net) for details.
|
Please refer to [RelationNet](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/relation_net) for details.
|
||||||
|
|
||||||
#### MatchingNet
|
#### MatchingNet
|
||||||
|
|
||||||
Please refer to [MatchingNet](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/matching_net) for details.
|
Please refer to [MatchingNet](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/matching_net) for details.
|
||||||
|
|
||||||
#### MAML
|
#### MAML
|
||||||
|
|
||||||
Please refer to [MAML](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/maml) for details.
|
Please refer to [MAML](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/maml) for details.
|
||||||
|
|
||||||
#### NegMargin
|
#### NegMargin
|
||||||
|
|
||||||
Please refer to [NegMargin](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/neg_margin) for details.
|
Please refer to [NegMargin](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/neg_margin) for details.
|
||||||
|
|
||||||
#### Meta Baseline
|
#### Meta Baseline
|
||||||
|
|
||||||
Please refer to [Meta Baseline](https://github.com/open-mmlab/mmfewshot/tree/master/configs/classification/meta_baseline) for details.
|
Please refer to [Meta Baseline](https://github.com/open-mmlab/mmfewshot/tree/main/configs/classification/meta_baseline) for details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,24 +42,24 @@ Please refer to [Meta Baseline](https://github.com/open-mmlab/mmfewshot/tree/mas
|
||||||
|
|
||||||
#### TFA
|
#### TFA
|
||||||
|
|
||||||
Please refer to [TFA](https://github.com/open-mmlab/mmfewshot/tree/master/configs/detection/tfa) for details.
|
Please refer to [TFA](https://github.com/open-mmlab/mmfewshot/tree/main/configs/detection/tfa) for details.
|
||||||
|
|
||||||
#### FSCE
|
#### FSCE
|
||||||
|
|
||||||
Please refer to [FSCE](https://github.com/open-mmlab/mmfewshot/tree/master/configs/detection/fsce) for details.
|
Please refer to [FSCE](https://github.com/open-mmlab/mmfewshot/tree/main/configs/detection/fsce) for details.
|
||||||
|
|
||||||
#### Meta RCNN
|
#### Meta RCNN
|
||||||
|
|
||||||
Please refer to [Meta RCNN](https://github.com/open-mmlab/mmfewshot/tree/master/configs/detection/meta_rcnn) for details.
|
Please refer to [Meta RCNN](https://github.com/open-mmlab/mmfewshot/tree/main/configs/detection/meta_rcnn) for details.
|
||||||
|
|
||||||
#### FSDetView
|
#### FSDetView
|
||||||
|
|
||||||
Please refer to [FSDetView](https://github.com/open-mmlab/mmfewshot/tree/master/configs/detection/fsdetview) for details.
|
Please refer to [FSDetView](https://github.com/open-mmlab/mmfewshot/tree/main/configs/detection/fsdetview) for details.
|
||||||
|
|
||||||
#### Attention RPN
|
#### Attention RPN
|
||||||
|
|
||||||
Please refer to [Attention RPN](https://github.com/open-mmlab/mmfewshot/tree/master/configs/detection/attention_rpn) for details.
|
Please refer to [Attention RPN](https://github.com/open-mmlab/mmfewshot/tree/main/configs/detection/attention_rpn) for details.
|
||||||
|
|
||||||
#### MPSR
|
#### MPSR
|
||||||
|
|
||||||
Please refer to [MPSR](https://github.com/open-mmlab/mmfewshot/tree/master/configs/detection/mpsr) for details.
|
Please refer to [MPSR](https://github.com/open-mmlab/mmfewshot/tree/main/configs/detection/mpsr) for details.
|
||||||
|
|
Loading…
Reference in New Issue