Reformat config files (#46)
* fix init * fix test api fix test api bug * add metarcnn fsdetview config * update pr * update meta file * fix CIpull/1/head
parent
37cd8a1f7d
commit
3508afca93
|
@ -93,11 +93,6 @@ jobs:
|
|||
torch_version: torch1.6.0
|
||||
torchvision: 0.7.0+cu101
|
||||
mmcv: "latest+torch1.6.0+cu101"
|
||||
- torch: 1.6.0+cu101
|
||||
torch_version: torch1.6.0
|
||||
torchvision: 0.7.0+cu101
|
||||
mmcv: "latest+torch1.6.0+cu101"
|
||||
python-version: 3.6
|
||||
- torch: 1.6.0+cu101
|
||||
torch_version: torch1.6.0
|
||||
torchvision: 0.7.0+cu101
|
||||
|
|
|
@ -38,3 +38,8 @@ repos:
|
|||
hooks:
|
||||
- id: docformatter
|
||||
args: ["--in-place", "--wrap-descriptions", "79"]
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.1.0
|
||||
hooks:
|
||||
- id: codespell
|
||||
args: [ "--skip", "*.ipynb", "-L", "confectionary"]
|
||||
|
|
122
README.md
122
README.md
|
@ -0,0 +1,122 @@
|
|||
[comment]: <> (<div align="center">)
|
||||
|
||||
[comment]: <> ( <img src="resources/mmfewshot-logo.png" width="500px"/>)
|
||||
|
||||
[comment]: <> (</div>)
|
||||
|
||||
## Introduction
|
||||
|
||||
[comment]: <> (English | [简体中文](/README_zh-CN.md))
|
||||
|
||||
[comment]: <> ([](https://mmfewshot.readthedocs.io/en/latest/?badge=latest))
|
||||
|
||||
[comment]: <> ([](https://github.com/open-mmlab/mmfewshot/actions))
|
||||
|
||||
[comment]: <> ([](https://codecov.io/gh/open-mmlab/mmfewshot))
|
||||
|
||||
[comment]: <> ([](https://pypi.org/project/mmedit/))
|
||||
|
||||
[comment]: <> ([](https://github.com/open-mmlab/mmfewshot/blob/master/LICENSE))
|
||||
|
||||
[comment]: <> ([](https://github.com/open-mmlab/mmfewshot/issues))
|
||||
|
||||
[comment]: <> ([](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.7+**.
|
||||
The compatibility to earlier versions of PyTorch is not fully tested.
|
||||
|
||||
Documentation: https://mmfewshot.readthedocs.io/en/latest/.
|
||||
|
||||
|
||||
### Major features
|
||||
|
||||
|
||||
## Model Zoo
|
||||
|
||||
Supported algorithms:
|
||||
|
||||
<details open>
|
||||
<summary>classification</summary>
|
||||
|
||||
- [x] [Baseline](configs/classification/baseline/README.md) (ICLR'2019)
|
||||
- [x] [Baseline++](configs/classification/baseline_plus/README.md) (ICLR'2019)
|
||||
- [x] [NegMargin](configs/classification/neg_margin/README.md) (ECCV'2020)
|
||||
- [x] [MatchingNet](configs/classification/matching_net/README.md) (NeurIPS'2016)
|
||||
- [x] [ProtoNet](configs/classification/proto_net/README.md) (NeurIPS'2017)
|
||||
- [x] [RelationNet](configs/classification/relation_net/README.md) (CVPR'2018)
|
||||
- [x] [MetaBaseline](configs/classification/meta_baseline/README.md) (ICCV'2021)
|
||||
- [x] [MAML](configs/classification/maml/README.md) (ICML'2017)
|
||||
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>Detection</summary>
|
||||
|
||||
- [x] [TFA](configs/detection/tfa/README.md) (ICML'2020)
|
||||
- [x] [FSCE](configs/detection/fsce/README.md) (CVPR'2021)
|
||||
- [x] [AttentionRPN](configs/detection/attention_rpn/README.md) (CVPR'2020)
|
||||
- [x] [MetaRCNN](configs/detection/meta_rcnn/README.md) (ICCV'2019)
|
||||
- [x] [FSDetView](configs/detection/fsdetview/README.md) (ECCV'2020)
|
||||
- [x] [MPSR](configs/detection/mpsr/README.md) (ECCV'2020)
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
Please refer to [model_zoo](https://mmfewshot.readthedocs.io/en/latest/modelzoo.html) for more details.
|
||||
|
||||
## License
|
||||
|
||||
This project is released under the [Apache 2.0 license](LICENSE).
|
||||
|
||||
## Changelog
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Please refer to [install.md](docs/get_started.md) for installation.
|
||||
|
||||
## Get Started
|
||||
|
||||
Please see [getting_started.md](docs/get_started.md) for the basic usage of mmfewshot.
|
||||
|
||||
|
||||
|
||||
## Citation
|
||||
|
||||
If you find this project useful in your research, please consider cite:
|
||||
|
||||
```bibtex
|
||||
@misc{mmfewshot2020,
|
||||
title={OpenMMLab Few Shot Learning Toolbox and Benchmark},
|
||||
author={mmfewshot Contributors},
|
||||
howpublished = {\url{https://github.com/open-mmlab/mmfewshot}},
|
||||
year={2021}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## 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.
|
||||
|
||||
## Acknowledgement
|
||||
|
||||
mmfewshot is an open source project that is contributed by researchers and engineers from various colleges and companies. We appreciate all the contributors who implement their methods or add new features, as well as users who give valuable feedbacks. We wish that the toolbox and benchmark could serve the growing research community by providing a flexible toolkit to reimplement existing methods and develop their own new methods.
|
||||
|
||||
## Projects in OpenMMLab
|
||||
|
||||
- [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.
|
||||
- [MMDetection](https://github.com/open-mmlab/mmdetection): OpenMMLab detection toolbox and benchmark.
|
||||
- [MMDetection3D](https://github.com/open-mmlab/mmdetection3d): OpenMMLab's next-generation platform for general 3D object detection.
|
||||
- [MMSegmentation](https://github.com/open-mmlab/mmsegmentation): OpenMMLab semantic segmentation 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.
|
||||
- [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.
|
||||
- [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.
|
|
@ -0,0 +1,11 @@
|
|||
# Few Shot Classification
|
||||
|
||||
|
||||
## Get Started
|
||||
To be done.
|
||||
|
||||
## Data Preparation
|
||||
To be done.
|
||||
|
||||
## Model Zoo
|
||||
To be done.
|
|
@ -31,7 +31,7 @@ data = dict(
|
|||
# testing acceleration.
|
||||
fast_test=True,
|
||||
test_set=dict(batch_size=16, num_workers=2),
|
||||
# initialize worker is a time consuming operation
|
||||
# worker initialization is a time consuming operation
|
||||
support=dict(batch_size=num_ways * num_shots, num_workers=0),
|
||||
query=dict(batch_size=num_ways * num_queries, num_workers=0))),
|
||||
test=dict(
|
||||
|
@ -42,7 +42,7 @@ data = dict(
|
|||
data_prefix='data/CUB_200_2011',
|
||||
pipeline=test_pipeline),
|
||||
meta_test_cfg=dict(
|
||||
num_episodes=1000,
|
||||
num_episodes=2000,
|
||||
num_ways=num_ways,
|
||||
num_shots=num_shots,
|
||||
num_queries=num_queries,
|
||||
|
@ -50,6 +50,6 @@ data = dict(
|
|||
# testing acceleration.
|
||||
fast_test=True,
|
||||
test_set=dict(batch_size=16, num_workers=2),
|
||||
# initialize worker is a time consuming operation
|
||||
# worker initialization is a time consuming operation
|
||||
support=dict(batch_size=num_ways * num_shots, num_workers=0),
|
||||
query=dict(batch_size=num_ways * num_queries, num_workers=0))))
|
|
@ -31,7 +31,7 @@ data = dict(
|
|||
# testing acceleration.
|
||||
fast_test=True,
|
||||
test_set=dict(batch_size=16, num_workers=2),
|
||||
# initialize worker is a time consuming operation
|
||||
# worker initialization is a time consuming operation
|
||||
support=dict(batch_size=num_ways * num_shots, num_workers=0),
|
||||
query=dict(batch_size=num_ways * num_queries, num_workers=0))),
|
||||
test=dict(
|
||||
|
@ -42,7 +42,7 @@ data = dict(
|
|||
data_prefix='data/CUB_200_2011',
|
||||
pipeline=test_pipeline),
|
||||
meta_test_cfg=dict(
|
||||
num_episodes=1000,
|
||||
num_episodes=2000,
|
||||
num_ways=num_ways,
|
||||
num_shots=num_shots,
|
||||
num_queries=num_queries,
|
||||
|
@ -50,6 +50,6 @@ data = dict(
|
|||
# testing acceleration.
|
||||
fast_test=True,
|
||||
test_set=dict(batch_size=16, num_workers=2),
|
||||
# initialize worker is a time consuming operation
|
||||
# worker initialization is a time consuming operation
|
||||
support=dict(batch_size=num_ways * num_shots, num_workers=0),
|
||||
query=dict(batch_size=num_ways * num_queries, num_workers=0))))
|
|
@ -31,7 +31,7 @@ data = dict(
|
|||
# testing acceleration.
|
||||
fast_test=True,
|
||||
test_set=dict(batch_size=16, num_workers=2),
|
||||
# initialize worker is a time consuming operation
|
||||
# worker initialization is a time consuming operation
|
||||
support=dict(batch_size=num_ways * num_shots, num_workers=0),
|
||||
query=dict(batch_size=num_ways * num_queries, num_workers=0))),
|
||||
test=dict(
|
||||
|
@ -42,7 +42,7 @@ data = dict(
|
|||
data_prefix='data/mini_imagenet',
|
||||
pipeline=test_pipeline),
|
||||
meta_test_cfg=dict(
|
||||
num_episodes=1000,
|
||||
num_episodes=2000,
|
||||
num_ways=num_ways,
|
||||
num_shots=num_shots,
|
||||
num_queries=num_queries,
|
||||
|
@ -50,6 +50,6 @@ data = dict(
|
|||
# testing acceleration.
|
||||
fast_test=True,
|
||||
test_set=dict(batch_size=16, num_workers=2),
|
||||
# initialize worker is a time consuming operation
|
||||
# worker initialization is a time consuming operation
|
||||
support=dict(batch_size=num_ways * num_shots, num_workers=0),
|
||||
query=dict(batch_size=num_ways * num_queries, num_workers=0))))
|
|
@ -31,7 +31,7 @@ data = dict(
|
|||
# testing acceleration.
|
||||
fast_test=True,
|
||||
test_set=dict(batch_size=16, num_workers=2),
|
||||
# initialize worker is a time consuming operation
|
||||
# worker initialization is a time consuming operation
|
||||
support=dict(batch_size=num_ways * num_shots, num_workers=0),
|
||||
query=dict(batch_size=num_ways * num_queries, num_workers=0))),
|
||||
test=dict(
|
||||
|
@ -42,7 +42,7 @@ data = dict(
|
|||
data_prefix='data/mini_imagenet',
|
||||
pipeline=test_pipeline),
|
||||
meta_test_cfg=dict(
|
||||
num_episodes=1000,
|
||||
num_episodes=2000,
|
||||
num_ways=num_ways,
|
||||
num_shots=num_shots,
|
||||
num_queries=num_queries,
|
||||
|
@ -50,6 +50,6 @@ data = dict(
|
|||
# testing acceleration.
|
||||
fast_test=True,
|
||||
test_set=dict(batch_size=16, num_workers=2),
|
||||
# initialize worker is a time consuming operation
|
||||
# worker initialization is a time consuming operation
|
||||
support=dict(batch_size=num_ways * num_shots, num_workers=0),
|
||||
query=dict(batch_size=num_ways * num_queries, num_workers=0))))
|
|
@ -31,7 +31,7 @@ data = dict(
|
|||
# testing acceleration.
|
||||
fast_test=True,
|
||||
test_set=dict(batch_size=16, num_workers=2),
|
||||
# initialize worker is a time consuming operation
|
||||
# worker initialization is a time consuming operation
|
||||
support=dict(batch_size=num_ways * num_shots, num_workers=0),
|
||||
query=dict(batch_size=num_ways * num_queries, num_workers=0))),
|
||||
test=dict(
|
||||
|
@ -42,7 +42,7 @@ data = dict(
|
|||
data_prefix='data/tiered_imagenet',
|
||||
pipeline=test_pipeline),
|
||||
meta_test_cfg=dict(
|
||||
num_episodes=1000,
|
||||
num_episodes=2000,
|
||||
num_ways=num_ways,
|
||||
num_shots=num_shots,
|
||||
num_queries=num_queries,
|
||||
|
@ -50,6 +50,6 @@ data = dict(
|
|||
# testing acceleration.
|
||||
fast_test=True,
|
||||
test_set=dict(batch_size=16, num_workers=2),
|
||||
# initialize worker is a time consuming operation
|
||||
# worker initialization is a time consuming operation
|
||||
support=dict(batch_size=num_ways * num_shots, num_workers=0),
|
||||
query=dict(batch_size=num_ways * num_queries, num_workers=0))))
|
|
@ -31,7 +31,7 @@ data = dict(
|
|||
# testing acceleration.
|
||||
fast_test=True,
|
||||
test_set=dict(batch_size=16, num_workers=2),
|
||||
# initialize worker is a time consuming operation
|
||||
# worker initialization is a time consuming operation
|
||||
support=dict(batch_size=num_ways * num_shots, num_workers=0),
|
||||
query=dict(batch_size=num_ways * num_queries, num_workers=0))),
|
||||
test=dict(
|
||||
|
@ -42,7 +42,7 @@ data = dict(
|
|||
data_prefix='data/tiered_imagenet',
|
||||
pipeline=test_pipeline),
|
||||
meta_test_cfg=dict(
|
||||
num_episodes=1000,
|
||||
num_episodes=2000,
|
||||
num_ways=num_ways,
|
||||
num_shots=num_shots,
|
||||
num_queries=num_queries,
|
||||
|
@ -50,6 +50,6 @@ data = dict(
|
|||
# testing acceleration.
|
||||
fast_test=True,
|
||||
test_set=dict(batch_size=16, num_workers=2),
|
||||
# initialize worker is a time consuming operation
|
||||
# worker initialization is a time consuming operation
|
||||
support=dict(batch_size=num_ways * num_shots, num_workers=0),
|
||||
query=dict(batch_size=num_ways * num_queries, num_workers=0))))
|
|
@ -3,7 +3,6 @@ log_config = dict(
|
|||
interval=50,
|
||||
hooks=[
|
||||
dict(type='TextLoggerHook'),
|
||||
# dict(type='TensorboardLoggerHook')
|
||||
])
|
||||
# yapf:enable
|
||||
checkpoint_config = dict(interval=50)
|
||||
|
@ -15,3 +14,4 @@ resume_from = None
|
|||
workflow = [('train', 1)]
|
||||
pin_memory = True
|
||||
use_infinite_sampler = True
|
||||
seed = 0
|
||||
|
|
|
@ -3,7 +3,6 @@ log_config = dict(
|
|||
interval=50,
|
||||
hooks=[
|
||||
dict(type='TextLoggerHook'),
|
||||
# dict(type='TensorboardLoggerHook')
|
||||
])
|
||||
# yapf:enable
|
||||
checkpoint_config = dict(interval=4000)
|
||||
|
@ -15,3 +14,4 @@ resume_from = None
|
|||
workflow = [('train', 1)]
|
||||
pin_memory = True
|
||||
use_infinite_sampler = True
|
||||
seed = 0
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
runner = dict(type='EpochBasedRunner', max_epochs=200)
|
||||
optimizer = dict(type='Adam', lr=0.001)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
lr_config = dict(policy='fixed', warmup=None)
|
|
@ -1,4 +1,4 @@
|
|||
runner = dict(type='IterBasedRunner', max_iters=60000)
|
||||
runner = dict(type='IterBasedRunner', max_iters=100000)
|
||||
optimizer = dict(type='SGD', lr=0.001, momentum=0.9, weight_decay=0.0001)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
|
@ -0,0 +1,69 @@
|
|||
<!-- [ALGORITHM] -->
|
||||
|
||||
# <summary><a href="https://arxiv.org/abs/1904.04232"> Baseline (ICLR'2019)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{chen2019closerfewshot,
|
||||
title={A Closer Look at Few-shot Classification},
|
||||
author={Chen, Wei-Yu and Liu, Yen-Cheng and Kira, Zsolt and Wang, Yu-Chiang and Huang, Jia-Bin},
|
||||
booktitle={International Conference on Learning Representations},
|
||||
year={2019}
|
||||
}
|
||||
```
|
||||
|
||||
## How to Reproduce Baseline
|
||||
|
||||
It consists of two steps:
|
||||
- **Step1: Base training**
|
||||
- use all the images of base classes to train a base model.
|
||||
- use validation set to select the best model.
|
||||
|
||||
- **Step2: Meta Testing**:
|
||||
- use best model from step1.
|
||||
|
||||
|
||||
### An example of CUB dataset with Conv4
|
||||
```bash
|
||||
# base training
|
||||
python ./tools/classification/train.py \
|
||||
configs/classification/baseline/cub/baseline_conv4_1xb64_cub_5way-1shot.py
|
||||
|
||||
# meta testing
|
||||
python ./tools/classification/test.py \
|
||||
configs/classification/baseline/cub/baseline_conv4_1xb64_cub_5way-1shot.py \
|
||||
work_dir/baseline_conv4_1xb64_cub_5way-1shot/best_accuracy_mean.pth
|
||||
```
|
||||
|
||||
**Note**:
|
||||
- All the result are trained with single gpu.
|
||||
- The base training of 1 shot and 5 shot use same training setting,
|
||||
but different validation setting.
|
||||
|
||||
|
||||
|
||||
## Results on CUB dataset of 2000 episodes
|
||||
|
||||
| Arch | Input Size | Batch Size | way | shot | mean Acc | std | ckpt | log |
|
||||
| :-------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [conv4](/configs/classification/baseline/cub/baseline_conv4_1xb64_cub_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [conv4](/configs/classification/baseline/cub/baseline_conv4_1xb64_cub_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/baseline/cub/baseline_resnet12_1xb64_cub_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/baseline/cub/baseline_resnet12_1xb64_cub_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
|
||||
## Results on Mini-ImageNet dataset of 2000 episodes
|
||||
|
||||
| Arch | Input Size | Batch Size | way | shot | mean Acc | std | ckpt | log |
|
||||
| :-------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [conv4](/configs/classification/baseline/mini_imagenet/baseline_conv4_1xb64_mini-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [conv4](/configs/classification/baseline/mini_imagenet/baseline_conv4_1xb64_mini-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/baseline/mini_imagenet/baseline_resnet12_1xb64_mini-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/baseline/mini_imagenet/baseline_resnet12_1xb64_mini-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
|
||||
## Results on Tiered-ImageNet of 2000 episodes
|
||||
|
||||
| Arch | Input Size | Batch Size | way | shot | mean Acc | std | ckpt | log |
|
||||
| :-------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [conv4](/configs/classification/baseline/tiered_imagenet/baseline_conv4_1xb64_tiered-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [conv4](/configs/classification/baseline/tiered_imagenet/baseline_conv4_1xb64_tiered-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/baseline/tiered_imagenet/baseline_resnet12_1xb64_tiered-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/baseline/tiered_imagenet/baseline_resnet12_1xb64_tiered-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/cub_meta_test_5way_1shot_84x84.py',
|
||||
'../../_base_/meta_test/cub_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
@ -25,7 +25,7 @@ meta_finetune_cfg = dict(
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='CUBDataset',
|
||||
data_prefix='data/CUB_200_2011',
|
||||
|
@ -39,3 +39,9 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=100, in_channels=1600),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/cub_meta_test_5way_5shot_84x84.py',
|
||||
'../../_base_/meta_test/cub_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
@ -25,7 +25,7 @@ meta_finetune_cfg = dict(
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='CUBDataset',
|
||||
data_prefix='data/CUB_200_2011',
|
||||
|
@ -39,3 +39,9 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=100, in_channels=1600),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,7 +0,0 @@
|
|||
_base_ = ['baseline_cub_5way_1shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=100, in_channels=1600),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,7 +0,0 @@
|
|||
_base_ = ['baseline_cub_5way_5shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=100, in_channels=1600),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/cub_meta_test_5way_1shot_84x84.py',
|
||||
'../../_base_/meta_test/cub_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
@ -25,7 +25,7 @@ meta_finetune_cfg = dict(
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='CUBDataset',
|
||||
data_prefix='data/CUB_200_2011',
|
||||
|
@ -39,3 +39,9 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=100, in_channels=640),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/cub_meta_test_5way_5shot_84x84.py',
|
||||
'../../_base_/meta_test/cub_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
@ -25,7 +25,7 @@ meta_finetune_cfg = dict(
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='CUBDataset',
|
||||
data_prefix='data/CUB_200_2011',
|
||||
|
@ -39,3 +39,9 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=100, in_channels=640),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -1,6 +0,0 @@
|
|||
_base_ = ['baseline_cub_5way_1shot_84x84_aug.py']
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=100, in_channels=640),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -1,6 +0,0 @@
|
|||
_base_ = ['baseline_cub_5way_5shot_84x84_aug.py']
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=100, in_channels=640),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -0,0 +1,64 @@
|
|||
Collections:
|
||||
- Name: Baseline
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Training Techniques:
|
||||
- SGD with Momentum
|
||||
- Weight Decay
|
||||
Training Resources: 1x V100 GPUs
|
||||
Paper: https://arxiv.org/abs/1904.04232
|
||||
README: configs/classification/baseline/README.md
|
||||
|
||||
Models:
|
||||
- Name: baseline_conv4_1xb64_cub_5way-1shot
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: CUB
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline/cub/baseline_conv4_1xb64_cub_5way-1shot.py
|
||||
- Name: baseline_conv4_1xb64_cub_5way-5shot
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: CUB
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline/cub/baseline_conv4_1xb64_cub_5way-5shot.py
|
||||
- Name: baseline_resnet12_1xb64_cub_5way-1shot
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: CUB
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline/cub/baseline_resnet12_1xb64_cub_5way-1shot.py
|
||||
- Name: baseline_resnet12_1xb64_cub_5way-5shot
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: CUB
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline/cub/baseline_resnet12_1xb64_cub_5way-5shot.py
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/mini_imagenet_meta_test_5way_1shot_84x84.py',
|
||||
'../../_base_/meta_test/mini-imagenet_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
@ -25,7 +25,7 @@ meta_finetune_cfg = dict(
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='MiniImageNetDataset',
|
||||
data_prefix='data/mini_imagenet',
|
||||
|
@ -39,3 +39,9 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=64, in_channels=1600),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/mini_imagenet_meta_test_5way_5shot_84x84.py',
|
||||
'../../_base_/meta_test/mini-imagenet_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
@ -25,7 +25,7 @@ meta_finetune_cfg = dict(
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='MiniImageNetDataset',
|
||||
data_prefix='data/mini_imagenet',
|
||||
|
@ -39,3 +39,9 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=64, in_channels=1600),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,6 +0,0 @@
|
|||
_base_ = ['baseline_mini_imagenet_5way_1shot_84x84_aug.py']
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=64, in_channels=1600),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,6 +0,0 @@
|
|||
_base_ = ['baseline_mini_imagenet_5way_5shot_84x84_aug.py']
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=64, in_channels=1600),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/mini_imagenet_meta_test_5way_1shot_84x84.py',
|
||||
'../../_base_/meta_test/mini-imagenet_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
@ -25,7 +25,7 @@ meta_finetune_cfg = dict(
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='MiniImageNetDataset',
|
||||
data_prefix='data/mini_imagenet',
|
||||
|
@ -39,3 +39,9 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=64, in_channels=640),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/mini_imagenet_meta_test_5way_5shot_84x84.py',
|
||||
'../../_base_/meta_test/mini-imagenet_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
@ -25,7 +25,7 @@ meta_finetune_cfg = dict(
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='MiniImageNetDataset',
|
||||
data_prefix='data/mini_imagenet',
|
||||
|
@ -39,3 +39,9 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=64, in_channels=640),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -1,6 +0,0 @@
|
|||
_base_ = ['baseline_mini_imagenet_5way_1shot_84x84_aug.py']
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=64, in_channels=640),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -1,6 +0,0 @@
|
|||
_base_ = ['baseline_mini_imagenet_5way_5shot_84x84_aug.py']
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=64, in_channels=640),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -0,0 +1,64 @@
|
|||
Collections:
|
||||
- Name: Baseline
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Training Techniques:
|
||||
- SGD with Momentum
|
||||
- Weight Decay
|
||||
Training Resources: 1x V100 GPUs
|
||||
Paper: https://arxiv.org/abs/1904.04232
|
||||
README: configs/classification/baseline/README.md
|
||||
|
||||
Models:
|
||||
- Name: baseline_conv4_1xb64_mini-imagenet_5way-1shot
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Mini-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline/mini_imagenet/baseline_conv4_1xb64_mini-imagenet_5way-1shot.py
|
||||
- Name: baseline_conv4_1xb64_mini-imagenet_5way-5shot
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Mini-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline/mini_imagenet/baseline_conv4_1xb64_mini-imagenet_5way-5shot.py
|
||||
- Name: baseline_resnet12_1xb64_mini-imagenet_5way-1shot
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Mini-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline/mini_imagenet/baseline_resnet12_1xb64_mini-imagenet_5way-1shot.py
|
||||
- Name: baseline_resnet12_1xb64_mini-imagenet_5way-5shot
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Mini-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline/mini_imagenet/baseline_resnet12_1xb64_mini-imagenet_5way-5shot.py
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/tiered_imagenet_meta_test_5way_1shot_84x84.py',
|
||||
'../../_base_/meta_test/tiered-imagenet_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_100epoch.py'
|
||||
]
|
||||
|
@ -25,7 +25,7 @@ meta_finetune_cfg = dict(
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=8,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='TieredImageNetDataset',
|
||||
data_prefix='data/tiered_imagenet',
|
||||
|
@ -39,4 +39,9 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
pin_memory = True
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=351, in_channels=1600),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/tiered_imagenet_meta_test_5way_5shot_84x84.py',
|
||||
'../../_base_/meta_test/tiered-imagenet_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_100epoch.py'
|
||||
]
|
||||
|
@ -25,7 +25,7 @@ meta_finetune_cfg = dict(
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=8,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='TieredImageNetDataset',
|
||||
data_prefix='data/tiered_imagenet',
|
||||
|
@ -39,4 +39,9 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
pin_memory = True
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=351, in_channels=1600),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,7 +0,0 @@
|
|||
_base_ = ['baseline_tiered_imagenet_5way_1shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=351, in_channels=1600),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,7 +0,0 @@
|
|||
_base_ = ['baseline_tiered_imagenet_5way_5shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=351, in_channels=1600),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -0,0 +1,47 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/tiered-imagenet_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_100epoch.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromBytes'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
meta_finetune_cfg = dict(
|
||||
num_steps=150,
|
||||
optimizer=dict(
|
||||
type='SGD', lr=0.01, momentum=0.9, dampening=0.9, weight_decay=0.001))
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='TieredImageNetDataset',
|
||||
data_prefix='data/tiered_imagenet',
|
||||
subset='train',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=351, in_channels=640),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -0,0 +1,47 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/tiered-imagenet_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_100epoch.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromBytes'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
meta_finetune_cfg = dict(
|
||||
num_steps=600,
|
||||
optimizer=dict(
|
||||
type='SGD', lr=0.01, momentum=0.9, dampening=0.9, weight_decay=0.001))
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='TieredImageNetDataset',
|
||||
data_prefix='data/tiered_imagenet',
|
||||
subset='train',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=351, in_channels=640),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -1,7 +0,0 @@
|
|||
_base_ = ['baseline_tiered_imagenet_5way_1shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=351, in_channels=640),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -1,7 +0,0 @@
|
|||
_base_ = ['baseline_tiered_imagenet_5way_5shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselineClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=351, in_channels=640),
|
||||
meta_test_head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -0,0 +1,64 @@
|
|||
Collections:
|
||||
- Name: Baseline
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Training Techniques:
|
||||
- SGD with Momentum
|
||||
- Weight Decay
|
||||
Training Resources: 1x V100 GPUs
|
||||
Paper: https://arxiv.org/abs/1904.04232
|
||||
README: configs/classification/baseline/README.md
|
||||
|
||||
Models:
|
||||
- Name: baseline_conv4_1xb64_tiered-imagenet_5way-1shot
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Epochs: 100
|
||||
Batch Size: 64
|
||||
In Collection: Baseline
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Tiered-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline/tiered_imagenet/baseline_conv4_1xb64_tiered-imagenet_5way-1shot.py
|
||||
- Name: baseline_conv4_1xb64_tiered-imagenet_5way-5shot
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Epochs: 100
|
||||
Batch Size: 64
|
||||
In Collection: Baseline
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Tiered-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline/tiered_imagenet/baseline_conv4_1xb64_tiered-imagenet_5way-5shot.py
|
||||
- Name: baseline_resnet12_1xb64_tiered-imagenet_5way-1shot
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Epochs: 100
|
||||
Batch Size: 64
|
||||
In Collection: Baseline
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Tiered-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline/tiered_imagenet/baseline_resnet12_1xb64_tiered-imagenet_5way-1shot.py
|
||||
- Name: baseline_resnet12_1xb64_tiered-imagenet_5way-5shot
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Epochs: 100
|
||||
Batch Size: 64
|
||||
In Collection: Baseline
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Tiered-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline/tiered_imagenet/baseline_resnet12_1xb64_tiered-imagenet_5way-5shot.py
|
|
@ -0,0 +1,67 @@
|
|||
<!-- [ALGORITHM] -->
|
||||
|
||||
#<summary><a href="https://arxiv.org/abs/1904.04232"> Baseline++ (ICLR'2019)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{chen2019closerfewshot,
|
||||
title={A Closer Look at Few-shot Classification},
|
||||
author={Chen, Wei-Yu and Liu, Yen-Cheng and Kira, Zsolt and Wang, Yu-Chiang and Huang, Jia-Bin},
|
||||
booktitle={International Conference on Learning Representations},
|
||||
year={2019}
|
||||
}
|
||||
```
|
||||
|
||||
## How to Reproduce Baseline++
|
||||
|
||||
It consists of two steps:
|
||||
- **Step1: Base training**
|
||||
- use all the images of base classes to train a base model.
|
||||
- use validation set to select the best model.
|
||||
|
||||
- **Step2: Meta Testing**:
|
||||
- use best model from step1.
|
||||
|
||||
|
||||
### An example of CUB dataset with Conv4
|
||||
```bash
|
||||
# base training
|
||||
python ./tools/classification/train.py \
|
||||
configs/classification/baseline_plus/cub/baseline-plus_conv4_1xb64_cub_5way-1shot.py
|
||||
|
||||
# meta testing
|
||||
python ./tools/classification/test.py \
|
||||
configs/classification/baseline_plus/cub/baseline-plus_conv4_1xb64_cub_5way-1shot.py \
|
||||
work_dir/baseline-plus_conv4_1xb64_cub_5way-1shot/best_accuracy_mean.pth
|
||||
```
|
||||
|
||||
**Note**:
|
||||
- All the result are trained with single gpu.
|
||||
- The base training of 1 shot and 5 shot use same training setting,
|
||||
but different validation setting.
|
||||
|
||||
## Results on CUB dataset of 1000 episodes
|
||||
|
||||
| Arch | Input Size | Batch Size | way | shot | mean Acc | std | ckpt | log |
|
||||
| :-------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [conv4](/configs/classification/baseline_plus/cub/baseline-plus_conv4_1xb64_cub_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [conv4](/configs/classification/baseline_plus/cub/baseline-plus_conv4_1xb64_cub_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/baseline_plus/cub/baseline-plus_resnet12_1xb64_cub_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/baseline_plus/cub/baseline-plus_resnet12_1xb64_cub_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
|
||||
## Results on Mini-ImageNet dataset of 1000 episodes
|
||||
|
||||
| Arch | Input Size | Batch Size | way | shot | mean Acc | std | ckpt | log |
|
||||
| :-------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [conv4](/configs/classification/baseline_plus/mini_imagenet/baseline-plus_conv4_1xb64_mini-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [conv4](/configs/classification/baseline_plus/mini_imagenet/baseline-plus_conv4_1xb64_mini-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/baseline_plus/mini_imagenet/baseline-plus_resnet12_1xb64_mini-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/baseline_plus/mini_imagenet/baseline-plus_resnet12_1xb64_mini-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
|
||||
## Results on Tiered-ImageNet of 1000 episodes
|
||||
|
||||
| Arch | Input Size | Batch Size | way | shot | mean Acc | std | ckpt | log |
|
||||
| :-------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [conv4](/configs/classification/baseline_plus/tiered_imagenet/baseline-plus_conv4_1xb64_tiered-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [conv4](/configs/classification/baseline_plus/tiered_imagenet/baseline-plus_conv4_1xb64_tiered-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/baseline_plus/tiered_imagenet/baseline-plus_resnet12_1xb64_tiered-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/baseline_plus/tiered_imagenet/baseline-plus_resnet12_1xb64_tiered-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
|
@ -0,0 +1,48 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/cub_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
meta_finetune_cfg = dict(
|
||||
num_steps=150,
|
||||
optimizer=dict(
|
||||
type='SGD', lr=0.01, momentum=0.9, dampening=0.9, weight_decay=0.001))
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='CUBDataset',
|
||||
data_prefix='data/CUB_200_2011',
|
||||
subset='train',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='CosineDistanceHead', num_classes=100, in_channels=1600),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead', num_classes=5, in_channels=1600))
|
|
@ -0,0 +1,48 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/cub_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
meta_finetune_cfg = dict(
|
||||
num_steps=600,
|
||||
optimizer=dict(
|
||||
type='SGD', lr=0.01, momentum=0.9, dampening=0.9, weight_decay=0.001))
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='CUBDataset',
|
||||
data_prefix='data/CUB_200_2011',
|
||||
subset='train',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='CosineDistanceHead', num_classes=100, in_channels=1600),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead', num_classes=5, in_channels=1600))
|
|
@ -0,0 +1,55 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/cub_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
meta_finetune_cfg = dict(
|
||||
num_steps=150,
|
||||
optimizer=dict(
|
||||
type='SGD', lr=0.01, momentum=0.9, dampening=0.9, weight_decay=0.001))
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='CUBDataset',
|
||||
data_prefix='data/CUB_200_2011',
|
||||
subset='train',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=100,
|
||||
in_channels=640,
|
||||
temperature=10.0),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=5,
|
||||
in_channels=640,
|
||||
temperature=5.0))
|
|
@ -0,0 +1,55 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/cub_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
meta_finetune_cfg = dict(
|
||||
num_steps=600,
|
||||
optimizer=dict(
|
||||
type='SGD', lr=0.01, momentum=0.9, dampening=0.9, weight_decay=0.001))
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='CUBDataset',
|
||||
data_prefix='data/CUB_200_2011',
|
||||
subset='train',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=100,
|
||||
in_channels=640,
|
||||
temperature=10.0),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=5,
|
||||
in_channels=640,
|
||||
temperature=5.0))
|
|
@ -1,8 +0,0 @@
|
|||
_base_ = ['baseline_pp_cub_5way_1shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='CosineDistanceHead', num_classes=100, in_channels=1600),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead', num_classes=5, in_channels=1600))
|
|
@ -1,8 +0,0 @@
|
|||
_base_ = ['baseline_pp_cub_5way_5shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='CosineDistanceHead', num_classes=100, in_channels=1600),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead', num_classes=5, in_channels=1600))
|
|
@ -1,15 +0,0 @@
|
|||
_base_ = ['baseline_pp_cub_5way_1shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=100,
|
||||
in_channels=640,
|
||||
temperature=10.0),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=5,
|
||||
in_channels=640,
|
||||
temperature=5.0))
|
|
@ -1,15 +0,0 @@
|
|||
_base_ = ['baseline_pp_cub_5way_5shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=100,
|
||||
in_channels=640,
|
||||
temperature=10.0),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=5,
|
||||
in_channels=640,
|
||||
temperature=5.0))
|
|
@ -0,0 +1,64 @@
|
|||
Collections:
|
||||
- Name: Baseline_Plus
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Training Techniques:
|
||||
- SGD with Momentum
|
||||
- Weight Decay
|
||||
Training Resources: 1x V100 GPUs
|
||||
Paper: https://arxiv.org/abs/1904.04232
|
||||
README: configs/classification/baseline_plus/README.md
|
||||
|
||||
Models:
|
||||
- Name: baseline-plus_conv4_1xb64_cub_5way-1shot
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline_Plus
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: CUB
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline_plus/cub/baseline-plus_conv4_1xb64_cub_5way-1shot.py
|
||||
- Name: baseline-plus_conv4_1xb64_cub_5way-5shot
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline_Plus
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: CUB
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline_plus/cub/baseline-plus_conv4_1xb64_cub_5way-5shot.py
|
||||
- Name: baseline-plus_resnet12_1xb64_cub_5way-1shot
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline_Plus
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: CUB
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline_plus/cub/baseline-plus_resnet12_1xb64_cub_5way-1shot.py
|
||||
- Name: baseline-plus_resnet12_1xb64_cub_5way-5shot
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline_Plus
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: CUB
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline_plus/cub/baseline-plus_resnet12_1xb64_cub_5way-5shot.py
|
|
@ -0,0 +1,48 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/mini-imagenet_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
meta_finetune_cfg = dict(
|
||||
num_steps=150,
|
||||
optimizer=dict(
|
||||
type='SGD', lr=0.01, momentum=0.9, dampening=0.9, weight_decay=0.001))
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='MiniImageNetDataset',
|
||||
data_prefix='data/mini_imagenet',
|
||||
subset='train',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='CosineDistanceHead', num_classes=100, in_channels=1600),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead', num_classes=5, in_channels=1600))
|
|
@ -0,0 +1,48 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/mini-imagenet_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
meta_finetune_cfg = dict(
|
||||
num_steps=600,
|
||||
optimizer=dict(
|
||||
type='SGD', lr=0.01, momentum=0.9, dampening=0.9, weight_decay=0.001))
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='MiniImageNetDataset',
|
||||
data_prefix='data/mini_imagenet',
|
||||
subset='train',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='CosineDistanceHead', num_classes=100, in_channels=1600),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead', num_classes=5, in_channels=1600))
|
|
@ -0,0 +1,55 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/mini-imagenet_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
meta_finetune_cfg = dict(
|
||||
num_steps=150,
|
||||
optimizer=dict(
|
||||
type='SGD', lr=0.01, momentum=0.9, dampening=0.9, weight_decay=0.001))
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='MiniImageNetDataset',
|
||||
data_prefix='data/mini_imagenet',
|
||||
subset='train',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=100,
|
||||
in_channels=640,
|
||||
temperature=10.0),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=5,
|
||||
in_channels=640,
|
||||
temperature=5.0))
|
|
@ -0,0 +1,55 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/mini-imagenet_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
meta_finetune_cfg = dict(
|
||||
num_steps=600,
|
||||
optimizer=dict(
|
||||
type='SGD', lr=0.01, momentum=0.9, dampening=0.9, weight_decay=0.001))
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='MiniImageNetDataset',
|
||||
data_prefix='data/mini_imagenet',
|
||||
subset='train',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=100,
|
||||
in_channels=640,
|
||||
temperature=10.0),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=5,
|
||||
in_channels=640,
|
||||
temperature=5.0))
|
|
@ -1,8 +0,0 @@
|
|||
_base_ = ['baseline_pp_mini_imagenet_5way_1shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='CosineDistanceHead', num_classes=100, in_channels=1600),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead', num_classes=5, in_channels=1600))
|
|
@ -1,8 +0,0 @@
|
|||
_base_ = ['baseline_pp_mini_imagenet_5way_5shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='CosineDistanceHead', num_classes=100, in_channels=1600),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead', num_classes=5, in_channels=1600))
|
|
@ -1,15 +0,0 @@
|
|||
_base_ = ['baseline_pp_mini_imagenet_5way_1shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=100,
|
||||
in_channels=640,
|
||||
temperature=10.0),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=5,
|
||||
in_channels=640,
|
||||
temperature=5.0))
|
|
@ -1,15 +0,0 @@
|
|||
_base_ = ['baseline_pp_mini_imagenet_5way_5shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=100,
|
||||
in_channels=640,
|
||||
temperature=10.0),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=5,
|
||||
in_channels=640,
|
||||
temperature=5.0))
|
|
@ -0,0 +1,64 @@
|
|||
Collections:
|
||||
- Name: Baseline_Plus
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Training Techniques:
|
||||
- SGD with Momentum
|
||||
- Weight Decay
|
||||
Training Resources: 1x V100 GPUs
|
||||
Paper: https://arxiv.org/abs/1904.04232
|
||||
README: configs/classification/baseline_plus/README.md
|
||||
|
||||
Models:
|
||||
- Name: baseline-plus_conv4_1xb64_mini-imagenet_5way-1shot
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline_Plus
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Mini-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline_plus/mini_imagenet/baseline-plus_conv4_1xb64_mini-imagenet_5way-1shot.py
|
||||
- Name: baseline-plus_conv4_1xb64_mini-imagenet_5way-5shot
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline_Plus
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Mini-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline_plus/mini_imagenet/baseline-plus_conv4_1xb64_mini-imagenet_5way-5shot.py
|
||||
- Name: baseline-plus_resnet12_1xb64_mini-imagenet_5way-1shot
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline_Plus
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Mini-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline_plus/mini_imagenet/baseline-plus_resnet12_1xb64_mini-imagenet_5way-1shot.py
|
||||
- Name: baseline-plus_resnet12_1xb64_mini-imagenet_5way-5shot
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Epochs: 200
|
||||
Batch Size: 64
|
||||
In Collection: Baseline_Plus
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Mini-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline_plus/mini_imagenet/baseline-plus_resnet12_1xb64_mini-imagenet_5way-5shot.py
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/tiered_imagenet_meta_test_5way_1shot_84x84.py',
|
||||
'../../_base_/meta_test/tiered-imagenet_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_100epoch.py'
|
||||
]
|
||||
|
@ -25,7 +25,7 @@ meta_finetune_cfg = dict(
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=8,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='TieredImageNetDataset',
|
||||
data_prefix='data/tiered_imagenet',
|
||||
|
@ -39,4 +39,10 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
pin_memory = True
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='CosineDistanceHead', num_classes=351, in_channels=1600),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead', num_classes=5, in_channels=1600))
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/tiered_imagenet_meta_test_5way_5shot_84x84.py',
|
||||
'../../_base_/meta_test/tiered-imagenet_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
@ -25,7 +25,7 @@ meta_finetune_cfg = dict(
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=8,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='TieredImageNetDataset',
|
||||
data_prefix='data/tiered_imagenet',
|
||||
|
@ -39,4 +39,10 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
pin_memory = True
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='CosineDistanceHead', num_classes=351, in_channels=1600),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead', num_classes=5, in_channels=1600))
|
|
@ -0,0 +1,55 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/tiered-imagenet_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_100epoch.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
meta_finetune_cfg = dict(
|
||||
num_steps=150,
|
||||
optimizer=dict(
|
||||
type='SGD', lr=0.01, momentum=0.9, dampening=0.9, weight_decay=0.001))
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='TieredImageNetDataset',
|
||||
data_prefix='data/tiered_imagenet',
|
||||
subset='train',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=351,
|
||||
in_channels=640,
|
||||
temperature=10.0),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=5,
|
||||
in_channels=640,
|
||||
temperature=5.0))
|
|
@ -0,0 +1,55 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/tiered-imagenet_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/epoch_based_runtime.py',
|
||||
'../../_base_/schedules/sgd_200epoch.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
meta_finetune_cfg = dict(
|
||||
num_steps=600,
|
||||
optimizer=dict(
|
||||
type='SGD', lr=0.01, momentum=0.9, dampening=0.9, weight_decay=0.001))
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='TieredImageNetDataset',
|
||||
data_prefix='data/tiered_imagenet',
|
||||
subset='train',
|
||||
pipeline=train_pipeline),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
support=dict(
|
||||
batch_size=4, drop_last=True, train=meta_finetune_cfg))))
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=351,
|
||||
in_channels=640,
|
||||
temperature=10.0),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=5,
|
||||
in_channels=640,
|
||||
temperature=5.0))
|
|
@ -1,8 +0,0 @@
|
|||
_base_ = ['baseline_pp_tiered_imagenet_5way_1shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='CosineDistanceHead', num_classes=351, in_channels=1600),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead', num_classes=5, in_channels=1600))
|
|
@ -1,8 +0,0 @@
|
|||
_base_ = ['baseline_pp_tiered_imagenet_5way_5shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='CosineDistanceHead', num_classes=351, in_channels=1600),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead', num_classes=5, in_channels=1600))
|
|
@ -1,15 +0,0 @@
|
|||
_base_ = ['baseline_pp_tiered_imagenet_5way_1shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=351,
|
||||
in_channels=640,
|
||||
temperature=10.0),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=5,
|
||||
in_channels=640,
|
||||
temperature=5.0))
|
|
@ -1,15 +0,0 @@
|
|||
_base_ = ['baseline_pp_tiered_imagenet_5way_5shot_84x84_aug.py']
|
||||
|
||||
model = dict(
|
||||
type='BaselinePlusClassifier',
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=351,
|
||||
in_channels=640,
|
||||
temperature=10.0),
|
||||
meta_test_head=dict(
|
||||
type='CosineDistanceHead',
|
||||
num_classes=5,
|
||||
in_channels=640,
|
||||
temperature=5.0))
|
|
@ -0,0 +1,64 @@
|
|||
Collections:
|
||||
- Name: Baseline_Plus
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Training Techniques:
|
||||
- SGD with Momentum
|
||||
- Weight Decay
|
||||
Training Resources: 1x V100 GPUs
|
||||
Paper: https://arxiv.org/abs/1904.04232
|
||||
README: configs/classification/baseline_plus/README.md
|
||||
|
||||
Models:
|
||||
- Name: baseline-plus_conv4_1xb64_tiered-imagenet_5way-1shot
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Epochs: 100
|
||||
Batch Size: 64
|
||||
In Collection: Baseline_Plus
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Tiered-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline_plus/tiered_imagenet/baseline-plus_conv4_1xb64_tiered-imagenet_5way-1shot.py
|
||||
- Name: baseline-plus_conv4_1xb64_tiered-imagenet_5way-5shot
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Epochs: 100
|
||||
Batch Size: 64
|
||||
In Collection: Baseline_Plus
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Tiered-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline_plus/tiered_imagenet/baseline-plus_conv4_1xb64_tiered-imagenet_5way-5shot.py
|
||||
- Name: baseline-plus_resnet12_1xb64_tiered-imagenet_5way-1shot
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Epochs: 100
|
||||
Batch Size: 64
|
||||
In Collection: Baseline_Plus
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Tiered-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline_plus/tiered_imagenet/baseline-plus_resnet12_1xb64_tiered-imagenet_5way-1shot.py
|
||||
- Name: baseline-plus_resnet12_1xb64_tiered-imagenet_5way-5shot
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Epochs: 100
|
||||
Batch Size: 64
|
||||
In Collection: Baseline_Plus
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Tiered-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/baseline_plus/tiered_imagenet/baseline-plus_resnet12_1xb64_tiered-imagenet_5way-5shot.py
|
|
@ -0,0 +1,66 @@
|
|||
<!-- [ALGORITHM] -->
|
||||
|
||||
# <summary><a href="https://arxiv.org/abs/1703.03400"> MAML (ICML'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{FinnAL17,
|
||||
title={Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks},
|
||||
author={Chelsea Finn and Pieter Abbeel and Sergey Levine},
|
||||
booktitle={Proceedings of the 34th International Conference on Machine Learning},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
## How to Reproduce MAML
|
||||
|
||||
It consists of two steps:
|
||||
- **Step1: Base training**
|
||||
- use all the images of base classes to train a base model.
|
||||
- use validation set to select the best model.
|
||||
|
||||
- **Step2: Meta Testing**:
|
||||
- use best model from step1.
|
||||
|
||||
|
||||
### An example of CUB dataset with Conv4
|
||||
```bash
|
||||
# base training
|
||||
python ./tools/classification/train.py \
|
||||
configs/classification/maml/cub/maml_conv4_1xb105_cub_5way-1shot.py
|
||||
|
||||
# meta testing
|
||||
python ./tools/classification/test.py \
|
||||
configs/classification/maml/cub/maml_conv4_1xb105_cub_5way-1shot.py \
|
||||
work_dir/maml_conv4_1xb105_cub_5way-1shot/best_accuracy_mean.pth
|
||||
```
|
||||
|
||||
**Note**:
|
||||
- All the result are trained with single gpu.
|
||||
- The base training of 1 shot and 5 shot use same training setting,
|
||||
but different validation setting.
|
||||
|
||||
## Results on CUB dataset of 1000 episodes
|
||||
|
||||
| Arch | Input Size | Batch Size | way | shot | mean Acc | std | ckpt | log |
|
||||
| :-------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [conv4](/configs/classification/maml/cub/maml_conv4_1xb105_cub_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [conv4](/configs/classification/maml/cub/maml_conv4_1xb105_cub_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/maml/cub/maml_resnet12_1xb105_cub_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/maml/cub/maml_resnet12_1xb105_cub_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
|
||||
## Results on Mini-ImageNet dataset of 1000 episodes
|
||||
|
||||
| Arch | Input Size | Batch Size | way | shot | mean Acc | std | ckpt | log |
|
||||
| :-------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [conv4](/configs/classification/maml/mini_imagenet/maml_conv4_1xb105_mini-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [conv4](/configs/classification/maml/mini_imagenet/maml_conv4_1xb105_mini-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/maml/mini_imagenet/maml_resnet12_1xb105_mini-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/maml/mini_imagenet/maml_resnet12_1xb105_mini-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
|
||||
## Results on Tiered-ImageNet of 1000 episodes
|
||||
|
||||
| Arch | Input Size | Batch Size | way | shot | mean Acc | std | ckpt | log |
|
||||
| :-------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [conv4](/configs/classification/maml/tiered_imagenet/maml_conv4_1xb105_tiered-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [conv4](/configs/classification/maml/tiered_imagenet/maml_conv4_1xb105_tiered-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/maml/tiered_imagenet/maml_resnet12_1xb105_tiered-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/maml/tiered_imagenet/maml_resnet12_1xb105_tiered-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
|
@ -1,7 +1,7 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/cub_meta_test_5way_1shot_84x84.py',
|
||||
'../../_base_/meta_test/cub_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/iter_based_runtime.py',
|
||||
'../../_base_/schedules/adam_100000iter.py'
|
||||
'../../_base_/schedules/adam_100k_iter.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
|
@ -20,7 +20,7 @@ train_pipeline = [
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=1,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='EpisodicDataset',
|
||||
num_episodes=100000,
|
||||
|
@ -39,6 +39,14 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=5, num_inner_steps=5))))
|
||||
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
||||
|
||||
optimizer_config = dict(
|
||||
type='GradientCumulativeOptimizerHook', cumulative_iters=8, grad_clip=None)
|
||||
optimizer = dict(type='Adam', lr=0.001)
|
|
@ -1,7 +1,7 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/cub_meta_test_5way_5shot_84x84.py',
|
||||
'../../_base_/meta_test/cub_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/iter_based_runtime.py',
|
||||
'../../_base_/schedules/adam_100000iter.py'
|
||||
'../../_base_/schedules/adam_100k_iter.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
|
@ -20,7 +20,7 @@ train_pipeline = [
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=1,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='EpisodicDataset',
|
||||
num_episodes=100000,
|
||||
|
@ -39,6 +39,14 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=25, num_inner_steps=5))))
|
||||
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
||||
|
||||
optimizer_config = dict(
|
||||
type='GradientCumulativeOptimizerHook', cumulative_iters=8, grad_clip=None)
|
||||
optimizer = dict(type='Adam', lr=0.001)
|
|
@ -1,10 +0,0 @@
|
|||
_base_ = [
|
||||
'maml_cub_5way_1shot_84x84_aug.py',
|
||||
]
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,10 +0,0 @@
|
|||
_base_ = [
|
||||
'maml_cub_5way_5shot_84x84_aug.py',
|
||||
]
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -0,0 +1,52 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/cub_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/iter_based_runtime.py',
|
||||
'../../_base_/schedules/adam_100k_iter.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=1,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='EpisodicDataset',
|
||||
num_episodes=100000,
|
||||
num_ways=5,
|
||||
num_shots=5,
|
||||
num_queries=16,
|
||||
dataset=dict(
|
||||
type='CUBDataset',
|
||||
data_prefix='data/CUB_200_2011',
|
||||
subset='train',
|
||||
pipeline=train_pipeline)),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=5, num_inner_steps=5))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=5, num_inner_steps=5))))
|
||||
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
||||
|
||||
optimizer_config = dict(
|
||||
type='GradientCumulativeOptimizerHook', cumulative_iters=8, grad_clip=None)
|
||||
optimizer = dict(type='Adam', lr=0.001)
|
|
@ -0,0 +1,52 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/cub_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/iter_based_runtime.py',
|
||||
'../../_base_/schedules/adam_100k_iter.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=1,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='EpisodicDataset',
|
||||
num_episodes=100000,
|
||||
num_ways=5,
|
||||
num_shots=5,
|
||||
num_queries=16,
|
||||
dataset=dict(
|
||||
type='CUBDataset',
|
||||
data_prefix='data/CUB_200_2011',
|
||||
subset='train',
|
||||
pipeline=train_pipeline)),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=25, num_inner_steps=5))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=25, num_inner_steps=5))))
|
||||
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
||||
|
||||
optimizer_config = dict(
|
||||
type='GradientCumulativeOptimizerHook', cumulative_iters=8, grad_clip=None)
|
||||
optimizer = dict(type='Adam', lr=0.001)
|
|
@ -1,10 +0,0 @@
|
|||
_base_ = [
|
||||
'maml_cub_5way_1shot_84x84_aug.py',
|
||||
]
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -1,10 +0,0 @@
|
|||
_base_ = [
|
||||
'maml_cub_5way_5shot_84x84_aug.py',
|
||||
]
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -0,0 +1,59 @@
|
|||
Collections:
|
||||
- Name: MAML
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Training Techniques:
|
||||
- Adam
|
||||
Training Resources: 1x V100 GPUs
|
||||
Paper: https://arxiv.org/abs/1703.03400
|
||||
README: configs/classification/maml/README.md
|
||||
|
||||
Models:
|
||||
- Name: maml_conv4_1xb105_cub_5way-1shot
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Batch Size: 105
|
||||
In Collection: MAML
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: CUB
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/maml/cub/maml_conv4_1xb105_cub_5way-1shot.py
|
||||
- Name: maml_conv4_1xb105_cub_5way-5shot
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Batch Size: 105
|
||||
In Collection: MAML
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: CUB
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/maml/cub/maml_conv4_1xb105_cub_5way-5shot.py
|
||||
- Name: maml_resnet12_1xb105_cub_5way-1shot
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Batch Size: 105
|
||||
In Collection: MAML
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: CUB
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/maml/cub/maml_resnet12_1xb105_cub_5way-1shot.py
|
||||
- Name: maml_resnet12_1xb105_cub_5way-5shot
|
||||
Metadata:
|
||||
Training Data: CUB
|
||||
Batch Size: 105
|
||||
In Collection: MAML
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: CUB
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/maml/cub/maml_resnet12_1xb105_cub_5way-5shot.py
|
|
@ -1,7 +1,7 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/mini_imagenet_meta_test_5way_1shot_84x84.py',
|
||||
'../../_base_/meta_test/mini-imagenet_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/iter_based_runtime.py',
|
||||
'../../_base_/schedules/adam_100000iter.py'
|
||||
'../../_base_/schedules/adam_100k_iter.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
|
@ -20,7 +20,7 @@ train_pipeline = [
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=1,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='EpisodicDataset',
|
||||
num_episodes=100000,
|
||||
|
@ -39,6 +39,14 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=5, num_inner_steps=5))))
|
||||
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
||||
|
||||
optimizer_config = dict(
|
||||
type='GradientCumulativeOptimizerHook', cumulative_iters=8, grad_clip=None)
|
||||
optimizer = dict(type='Adam', lr=0.001)
|
|
@ -1,7 +1,7 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/mini_imagenet_meta_test_5way_5shot_84x84.py',
|
||||
'../../_base_/meta_test/mini-imagenet_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/iter_based_runtime.py',
|
||||
'../../_base_/schedules/adam_100000iter.py'
|
||||
'../../_base_/schedules/adam_100k_iter.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
|
@ -20,7 +20,7 @@ train_pipeline = [
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=1,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='EpisodicDataset',
|
||||
num_episodes=100000,
|
||||
|
@ -39,6 +39,14 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=25, num_inner_steps=5))))
|
||||
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
||||
|
||||
optimizer_config = dict(
|
||||
type='GradientCumulativeOptimizerHook', cumulative_iters=8, grad_clip=None)
|
||||
optimizer = dict(type='Adam', lr=0.001)
|
|
@ -1,10 +0,0 @@
|
|||
_base_ = [
|
||||
'maml_mini_imagenet_5way_1shot_84x84_aug.py',
|
||||
]
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,10 +0,0 @@
|
|||
_base_ = [
|
||||
'maml_mini_imagenet_5way_5shot_84x84_aug.py',
|
||||
]
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -0,0 +1,52 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/mini-imagenet_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/iter_based_runtime.py',
|
||||
'../../_base_/schedules/adam_100k_iter.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=1,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='EpisodicDataset',
|
||||
num_episodes=100000,
|
||||
num_ways=5,
|
||||
num_shots=5,
|
||||
num_queries=16,
|
||||
dataset=dict(
|
||||
type='MiniImageNetDataset',
|
||||
data_prefix='data/mini_imagenet',
|
||||
subset='train',
|
||||
pipeline=train_pipeline)),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=5, num_inner_steps=5))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=5, num_inner_steps=5))))
|
||||
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
||||
|
||||
optimizer = dict(type='Adam', lr=0.001)
|
||||
optimizer_config = dict(
|
||||
type='GradientCumulativeOptimizerHook', cumulative_iters=8, grad_clip=None)
|
|
@ -0,0 +1,52 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/mini-imagenet_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/iter_based_runtime.py',
|
||||
'../../_base_/schedules/adam_100k_iter.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=1,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='EpisodicDataset',
|
||||
num_episodes=100000,
|
||||
num_ways=5,
|
||||
num_shots=5,
|
||||
num_queries=16,
|
||||
dataset=dict(
|
||||
type='MiniImageNetDataset',
|
||||
data_prefix='data/mini_imagenet',
|
||||
subset='train',
|
||||
pipeline=train_pipeline)),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=25, num_inner_steps=5))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=25, num_inner_steps=5))))
|
||||
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
||||
|
||||
optimizer_config = dict(
|
||||
type='GradientCumulativeOptimizerHook', cumulative_iters=8, grad_clip=None)
|
||||
optimizer = dict(type='Adam', lr=0.001)
|
|
@ -1,10 +0,0 @@
|
|||
_base_ = [
|
||||
'maml_mini_imagenet_5way_1shot_84x84_aug.py',
|
||||
]
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -1,10 +0,0 @@
|
|||
_base_ = [
|
||||
'maml_mini_imagenet_5way_5shot_84x84_aug.py',
|
||||
]
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -0,0 +1,59 @@
|
|||
Collections:
|
||||
- Name: MAML
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Training Techniques:
|
||||
- Adam
|
||||
Training Resources: 1x V100 GPUs
|
||||
Paper: https://arxiv.org/abs/1703.03400
|
||||
README: configs/classification/maml/README.md
|
||||
|
||||
Models:
|
||||
- Name: maml_conv4_1xb105_mini-imagenet_5way-1shot
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Batch Size: 105
|
||||
In Collection: MAML
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Mini-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/maml/mini_imagenet/maml_conv4_1xb105_mini-imagenet_5way-1shot.py
|
||||
- Name: maml_conv4_1xb105_mini-imagenet_5way-5shot
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Batch Size: 105
|
||||
In Collection: MAML
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Mini-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/maml/mini_imagenet/maml_conv4_1xb105_mini-imagenet_5way-5shot.py
|
||||
- Name: maml_resnet12_1xb105_mini-imagenet_5way-1shot
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Batch Size: 105
|
||||
In Collection: MAML
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Mini-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/maml/mini_imagenet/maml_resnet12_1xb105_mini-imagenet_5way-1shot.py
|
||||
- Name: maml_resnet12_1xb105_mini-imagenet_5way-5shot
|
||||
Metadata:
|
||||
Training Data: Mini-ImageNet
|
||||
Batch Size: 105
|
||||
In Collection: MAML
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Mini-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/maml/mini_imagenet/maml_resnet12_1xb105_mini-imagenet_5way-5shot.py
|
|
@ -1,7 +1,7 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/tiered_imagenet_meta_test_5way_1shot_84x84.py',
|
||||
'../../_base_/meta_test/tiered-imagenet_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/iter_based_runtime.py',
|
||||
'../../_base_/schedules/adam_100000iter.py'
|
||||
'../../_base_/schedules/adam_100k_iter.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
|
@ -20,7 +20,7 @@ train_pipeline = [
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=1,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='EpisodicDataset',
|
||||
num_episodes=100000,
|
||||
|
@ -39,7 +39,14 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=5, num_inner_steps=5))))
|
||||
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
||||
|
||||
optimizer_config = dict(
|
||||
type='GradientCumulativeOptimizerHook', cumulative_iters=8, grad_clip=None)
|
||||
optimizer = dict(type='Adam', lr=0.001)
|
||||
pin_memory = True
|
|
@ -1,7 +1,7 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/tiered_imagenet_meta_test_5way_5shot_84x84.py',
|
||||
'../../_base_/meta_test/tiered-imagenet_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/iter_based_runtime.py',
|
||||
'../../_base_/schedules/adam_100000iter.py'
|
||||
'../../_base_/schedules/adam_100k_iter.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
|
@ -20,7 +20,7 @@ train_pipeline = [
|
|||
|
||||
data = dict(
|
||||
samples_per_gpu=1,
|
||||
workers_per_gpu=6,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='EpisodicDataset',
|
||||
num_episodes=100000,
|
||||
|
@ -39,7 +39,14 @@ data = dict(
|
|||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=25, num_inner_steps=5))))
|
||||
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
||||
|
||||
optimizer_config = dict(
|
||||
type='GradientCumulativeOptimizerHook', cumulative_iters=8, grad_clip=None)
|
||||
optimizer = dict(type='Adam', lr=0.001)
|
||||
pin_memory = True
|
|
@ -1,10 +0,0 @@
|
|||
_base_ = [
|
||||
'maml_tiered_imagenet_5way_1shot_84x84_aug.py',
|
||||
]
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -1,10 +0,0 @@
|
|||
_base_ = [
|
||||
'maml_tiered_imagenet_5way_5shot_84x84_aug.py',
|
||||
]
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='Conv4'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=1600))
|
|
@ -0,0 +1,52 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/tiered-imagenet_meta-test_5way-1shot.py',
|
||||
'../../_base_/runtime/iter_based_runtime.py',
|
||||
'../../_base_/schedules/adam_100k_iter.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromBytes'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=1,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='EpisodicDataset',
|
||||
num_episodes=100000,
|
||||
num_ways=5,
|
||||
num_shots=5,
|
||||
num_queries=16,
|
||||
dataset=dict(
|
||||
type='TieredImageNetDataset',
|
||||
data_prefix='data/tiered_imagenet',
|
||||
subset='train',
|
||||
pipeline=train_pipeline)),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=5, num_inner_steps=5))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=5, num_inner_steps=5))))
|
||||
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
||||
|
||||
optimizer_config = dict(
|
||||
type='GradientCumulativeOptimizerHook', cumulative_iters=8, grad_clip=None)
|
||||
optimizer = dict(type='Adam', lr=0.001)
|
|
@ -0,0 +1,52 @@
|
|||
_base_ = [
|
||||
'../../_base_/meta_test/tiered-imagenet_meta-test_5way-5shot.py',
|
||||
'../../_base_/runtime/iter_based_runtime.py',
|
||||
'../../_base_/schedules/adam_100k_iter.py'
|
||||
]
|
||||
|
||||
img_size = 84
|
||||
img_norm_cfg = dict(
|
||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromBytes'),
|
||||
dict(type='RandomResizedCrop', size=img_size),
|
||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||
dict(type='Normalize', **img_norm_cfg),
|
||||
dict(type='ImageToTensor', keys=['img']),
|
||||
dict(type='ToTensor', keys=['gt_label']),
|
||||
dict(type='Collect', keys=['img', 'gt_label'])
|
||||
]
|
||||
|
||||
data = dict(
|
||||
samples_per_gpu=1,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='EpisodicDataset',
|
||||
num_episodes=100000,
|
||||
num_ways=5,
|
||||
num_shots=5,
|
||||
num_queries=16,
|
||||
dataset=dict(
|
||||
type='TieredImageNetDataset',
|
||||
data_prefix='data/tiered_imagenet',
|
||||
subset='train',
|
||||
pipeline=train_pipeline)),
|
||||
val=dict(
|
||||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=25, num_inner_steps=5))),
|
||||
test=dict(
|
||||
meta_test_cfg=dict(
|
||||
fast_test=False, support=dict(batch_size=25, num_inner_steps=5))))
|
||||
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
||||
|
||||
optimizer_config = dict(
|
||||
type='GradientCumulativeOptimizerHook', cumulative_iters=8, grad_clip=None)
|
||||
optimizer = dict(type='Adam', lr=0.001)
|
|
@ -1,10 +0,0 @@
|
|||
_base_ = [
|
||||
'maml_tiered_imagenet_5way_1shot_84x84_aug.py',
|
||||
]
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -1,10 +0,0 @@
|
|||
_base_ = [
|
||||
'maml_tiered_imagenet_5way_5shot_84x84_aug.py',
|
||||
]
|
||||
model = dict(
|
||||
type='MAMLClassifier',
|
||||
num_inner_steps=2,
|
||||
inner_lr=0.01,
|
||||
first_order=False,
|
||||
backbone=dict(type='ResNet12'),
|
||||
head=dict(type='LinearHead', num_classes=5, in_channels=640))
|
|
@ -0,0 +1,59 @@
|
|||
Collections:
|
||||
- Name: MAML
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Training Techniques:
|
||||
- Adam
|
||||
Training Resources: 1x V100 GPUs
|
||||
Paper: https://arxiv.org/abs/1703.03400
|
||||
README: configs/classification/maml/README.md
|
||||
|
||||
Models:
|
||||
- Name: maml_conv4_1xb105_tiered-imagenet_5way-1shot
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Batch Size: 105
|
||||
In Collection: MAML
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Tiered-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/maml/tiered_imagenet/maml_conv4_1xb105_tiered-imagenet_5way-1shot.py
|
||||
- Name: maml_conv4_1xb105_tiered-imagenet_5way-5shot
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Batch Size: 105
|
||||
In Collection: MAML
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Tiered-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/maml/tiered_imagenet/maml_conv4_1xb105_tiered-imagenet_5way-5shot.py
|
||||
- Name: maml_resnet12_1xb105_tiered-imagenet_5way-1shot
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Batch Size: 105
|
||||
In Collection: MAML
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Tiered-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/maml/tiered_imagenet/maml_resnet12_1xb105_tiered-imagenet_5way-1shot.py
|
||||
- Name: maml_resnet12_1xb105_tiered-imagenet_5way-5shot
|
||||
Metadata:
|
||||
Training Data: Tiered-ImageNet
|
||||
Batch Size: 105
|
||||
In Collection: MAML
|
||||
Results:
|
||||
- Task: Few Shot Image Classification
|
||||
Dataset: Tiered-ImageNet
|
||||
Metrics:
|
||||
Accuracy: none
|
||||
Weights: none
|
||||
Config: configs/classification/maml/tiered_imagenet/maml_resnet12_1xb105_tiered-imagenet_5way-5shot.py
|
|
@ -0,0 +1,68 @@
|
|||
<!-- [ALGORITHM] -->
|
||||
|
||||
# <summary><a href="https://arxiv.org/abs/1606.04080"> MatchingNet (NeurIPS'2016)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{vinyals2016matching,
|
||||
title={Matching networks for one shot learning},
|
||||
author={Vinyals, Oriol and Blundell, Charles and Lillicrap, Tim and Wierstra, Daan and others},
|
||||
booktitle={Advances in Neural Information Processing Systems},
|
||||
pages={3630--3638},
|
||||
year={2016}
|
||||
}
|
||||
```
|
||||
## How to Reproduce MatchingNet
|
||||
|
||||
It consists of two steps:
|
||||
- **Step1: Base training**
|
||||
- use all the images of base classes to train a base model.
|
||||
- use validation set to select the best model.
|
||||
|
||||
- **Step2: Meta Testing**:
|
||||
- use best model from step1.
|
||||
|
||||
|
||||
### An example of CUB dataset with Conv4
|
||||
```bash
|
||||
# base training
|
||||
python ./tools/classification/train.py \
|
||||
configs/classification/matching_net/cub/matching-net_conv4_1xb105_cub_5way-1shot.py
|
||||
|
||||
# meta testing
|
||||
python ./tools/classification/test.py \
|
||||
configs/classification/matching_net/cub/matching-net_conv4_1xb105_cub_5way-1shot.py \
|
||||
work_dir/matching-net_conv4_1xb105_cub_5way-1shot/best_accuracy_mean.pth
|
||||
```
|
||||
|
||||
**Note**:
|
||||
- All the result are trained with single gpu.
|
||||
- The base training of 1 shot and 5 shot use same training setting,
|
||||
but different validation setting.
|
||||
|
||||
|
||||
## Results on CUB dataset of 1000 episodes
|
||||
|
||||
| Arch | Input Size | Batch Size | way | shot | mean Acc | std | ckpt | log |
|
||||
| :-------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [conv4](/configs/classification/matching_net/cub/matching-net_conv4_1xb105_cub_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [conv4](/configs/classification/matching_net/cub/matching-net_conv4_1xb105_cub_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/matching_net/cub/matching-net_resnet12_1xb105_cub_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/matching_net/cub/matching-net_resnet12_1xb105_cub_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
|
||||
## Results on Mini-ImageNet dataset of 1000 episodes
|
||||
|
||||
| Arch | Input Size | Batch Size | way | shot | mean Acc | std | ckpt | log |
|
||||
| :-------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [conv4](/configs/classification/matching_net/mini_imagenet/matching-net_conv4_1xb105_mini-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [conv4](/configs/classification/matching_net/mini_imagenet/matching-net_conv4_1xb105_mini-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/matching_net/mini_imagenet/matching-net_resnet12_1xb105_mini-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/matching_net/mini_imagenet/matching-net_resnet12_1xb105_mini-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
|
||||
## Results on Tiered-ImageNet of 1000 episodes
|
||||
|
||||
| Arch | Input Size | Batch Size | way | shot | mean Acc | std | ckpt | log |
|
||||
| :-------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [conv4](/configs/classification/matching_net/tiered_imagenet/matching-net_conv4_1xb105_tiered-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [conv4](/configs/classification/matching_net/tiered_imagenet/matching-net_conv4_1xb105_tiered-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/matching_net/tiered_imagenet/matching-net_resnet12_1xb105_tiered-imagenet_5way-1shot.py) | 84x84 | 64 | 5 | 1 | - | - | [ckpt]() | [log]() |
|
||||
| [resnet12](/configs/classification/matching_net/tiered_imagenet/matching-net_resnet12_1xb105_tiered-imagenet_5way-5shot.py) | 84x84 | 64 | 5 | 5 | - | - | [ckpt]() | [log]() |
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue