[Docs] Fix some unconsistency (#51)
* del ceph setting in configs * fix some unconsistency between algo's README and configspull/56/head
parent
721abc4a42
commit
1f55e234b3
|
@ -2,17 +2,8 @@
|
||||||
dataset_type = 'ImageNet'
|
dataset_type = 'ImageNet'
|
||||||
img_norm_cfg = dict(
|
img_norm_cfg = dict(
|
||||||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
||||||
file_client_args = dict(
|
|
||||||
backend='petrel',
|
|
||||||
path_mapping=dict({
|
|
||||||
'data/imagenet/':
|
|
||||||
'openmmlab:s3://openmmlab/datasets/classification/imagenet/',
|
|
||||||
'data/imagenet/':
|
|
||||||
'openmmlab:s3://openmmlab/datasets/classification/imagenet/'
|
|
||||||
}))
|
|
||||||
|
|
||||||
train_pipeline = [
|
train_pipeline = [
|
||||||
dict(type='LoadImageFromFile', file_client_args=file_client_args),
|
dict(type='LoadImageFromFile'),
|
||||||
dict(type='RandomResizedCrop', size=224),
|
dict(type='RandomResizedCrop', size=224),
|
||||||
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
dict(type='ColorJitter', brightness=0.4, contrast=0.4, saturation=0.4),
|
||||||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
||||||
|
@ -22,7 +13,7 @@ train_pipeline = [
|
||||||
dict(type='Collect', keys=['img', 'gt_label'])
|
dict(type='Collect', keys=['img', 'gt_label'])
|
||||||
]
|
]
|
||||||
test_pipeline = [
|
test_pipeline = [
|
||||||
dict(type='LoadImageFromFile', file_client_args=file_client_args),
|
dict(type='LoadImageFromFile'),
|
||||||
dict(type='Resize', size=(256, -1)),
|
dict(type='Resize', size=(256, -1)),
|
||||||
dict(type='CenterCrop', crop_size=224),
|
dict(type='CenterCrop', crop_size=224),
|
||||||
dict(type='Normalize', **img_norm_cfg),
|
dict(type='Normalize', **img_norm_cfg),
|
||||||
|
|
|
@ -32,15 +32,15 @@ Object detectors are usually equipped with backbone networks designed for image
|
||||||
## Getting Started
|
## Getting Started
|
||||||
### Step 1: Supernet pre-training on ImageNet
|
### Step 1: Supernet pre-training on ImageNet
|
||||||
```bash
|
```bash
|
||||||
python ./tools/mmdet/train_mmdet.py \
|
python ./tools/mmcls/train_mmcls.py \
|
||||||
configs/nas/detnas/detnas_shufflenet_supernet_imagenet.py \
|
configs/nas/detnas/detnas_supernet_shufflenetv2_8xb128_in1k.py \
|
||||||
--work-dir $WORK_DIR
|
--work-dir $WORK_DIR
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 2: Supernet fine-tuning on COCO
|
### Step 2: Supernet fine-tuning on COCO
|
||||||
```bash
|
```bash
|
||||||
python ./tools/mmdet/train_mmdet.py \
|
python ./tools/mmdet/train_mmdet.py \
|
||||||
configs/nas/detnas/detnas_frcnn_shufflenet_fpn_supernet_coco_1x.py \
|
configs/nas/detnas/detnas_supernet_frcnn_shufflenetv2_fpn_1x_coco.py \
|
||||||
--work-dir $WORK_DIR \
|
--work-dir $WORK_DIR \
|
||||||
--cfg-options load_from=$STEP1_CKPT
|
--cfg-options load_from=$STEP1_CKPT
|
||||||
```
|
```
|
||||||
|
@ -48,15 +48,15 @@ python ./tools/mmdet/train_mmdet.py \
|
||||||
### Step 3: Search for subnet on the trained supernet
|
### Step 3: Search for subnet on the trained supernet
|
||||||
```
|
```
|
||||||
python ./tools/mmdet/search_mmdet.py \
|
python ./tools/mmdet/search_mmdet.py \
|
||||||
configs/nas/detnas/detnas_frcnn_shufflenet_fpn_evolution_search_coco.py \
|
configs/nas/detnas/detnas_evolution_search_frcnn_shufflenetv2_fpn_coco.py \
|
||||||
$STEP2_CKPT \
|
$STEP2_CKPT \
|
||||||
--work-dir $WORK_DIR
|
--work-dir $WORK_DIR
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 4: Subnet retraining on ImageNet
|
### Step 4: Subnet retraining on ImageNet
|
||||||
```
|
```
|
||||||
python ./tools/mmdet/train_mmdet.py \
|
python ./tools/mmcls/train_mmcls.py \
|
||||||
configs/nas/detnas/detnas_shufflenet_subnet_imagenet.py \
|
configs/nas/detnas/detnas_subnet_shufflenetv2_8xb128_in1k.py \
|
||||||
--work-dir $WORK_DIR \
|
--work-dir $WORK_DIR \
|
||||||
--cfg-options algorithm.mutable_cfg=$STEP3_SUBNET_YAML
|
--cfg-options algorithm.mutable_cfg=$STEP3_SUBNET_YAML
|
||||||
```
|
```
|
||||||
|
@ -64,7 +64,7 @@ python ./tools/mmdet/train_mmdet.py \
|
||||||
### Step 5: Subnet fine-tuning on COCO
|
### Step 5: Subnet fine-tuning on COCO
|
||||||
```
|
```
|
||||||
python ./tools/mmdet/train_mmdet.py \
|
python ./tools/mmdet/train_mmdet.py \
|
||||||
configs/nas/detnas/detnas_frcnn_shufflenet_fpn_subnet_coco_1x.py \
|
configs/nas/detnas/detnas_subnet_frcnn_shufflenetv2_fpn_1x_coco.py \
|
||||||
--work-dir $WORK_DIR \
|
--work-dir $WORK_DIR \
|
||||||
--cfg-options algorithm.mutable_cfg=$STEP3_SUBNET_YAML load_from=$STEP$_CKPT
|
--cfg-options algorithm.mutable_cfg=$STEP3_SUBNET_YAML load_from=$STEP4_CKPT
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
_base_ = ['./detnas_frcnn_shufflenet_fpn_supernet_coco_1x.py']
|
_base_ = ['./detnas_supernet_frcnn_shufflenetv2_fpn_1x_coco.py']
|
||||||
|
|
||||||
data = dict(
|
data = dict(
|
||||||
samples_per_gpu=128,
|
samples_per_gpu=128,
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
_base_ = [
|
_base_ = [
|
||||||
'../spos/spos_shufflenetv2_subnet_8xb128_in1k.py',
|
'../spos/spos_subnet_shufflenetv2_8xb128_in1k.py',
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
_base_ = [
|
_base_ = [
|
||||||
'../spos/spos_shufflenetv2_supernet_8xb128_in1k.py',
|
'../spos/spos_supernet_shufflenetv2_8xb128_in1k.py',
|
||||||
]
|
]
|
||||||
|
|
||||||
runner = dict(max_iters=300000)
|
runner = dict(max_iters=300000)
|
||||||
|
|
|
@ -24,7 +24,7 @@ Comprehensive experiments verify that our approach is flexible and effective. It
|
||||||
## Results and models
|
## Results and models
|
||||||
|Dataset| Supernet | Subnet | Params(M) | Flops(G) | Top-1 (%) | Top-5 (%) | Config | Download | Remarks |
|
|Dataset| Supernet | Subnet | Params(M) | Flops(G) | Top-1 (%) | Top-5 (%) | Config | Download | Remarks |
|
||||||
|:---------------------:|:---------------------:|:------:|:---------:|:--------:|:---------:|:---------:|:------:|:---------|:---------:|
|
|:---------------------:|:---------------------:|:------:|:---------:|:--------:|:---------:|:---------:|:------:|:---------|:---------:|
|
||||||
|ImageNet| ShuffleNetV2 |[mutable](https://openmmlab-share.oss-cn-hangzhou.aliyuncs.com/mmrazor/v0.1/nas/spos/spos_shufflenetv2_subnet_8xb128_in1k/spos_shufflenetv2_subnet_8xb128_in1k_flops_0.33M_acc_73.87_20211222-454627be_mutable_cfg.yaml?versionId=CAEQHxiBgICw5b6I7xciIGY5MjVmNWFhY2U5MjQzN2M4NDViYzI2YWRmYWE1YzQx)| 3.35 | 0.33 | 73.87 | 91.6 |[config](./spos_shufflenetv2_subnet_8xb128_in1k.py)|[model](https://openmmlab-share.oss-cn-hangzhou.aliyuncs.com/mmrazor/v0.1/nas/spos/spos_shufflenetv2_subnet_8xb128_in1k/spos_shufflenetv2_subnet_8xb128_in1k_flops_0.33M_acc_73.87_20211222-1f0a0b4d.pth?versionId=CAEQHxiBgIDK5b6I7xciIDM1YjIwZjQxN2UyMDRjYjA5YTM5NTBlMGNhMTdkNjI2) | [log](https://openmmlab-share.oss-cn-hangzhou.aliyuncs.com/mmrazor/v0.1/nas/spos/spos_shufflenetv2_subnet_8xb128_in1k/spos_shufflenetv2_subnet_8xb128_in1k_flops_0.33M_acc_73.87_20211222-1f0a0b4d.log.json?versionId=CAEQHxiBgIDr9cuL7xciIDBmOTZiZGUyYjRiMDQ5NzhhZjY0NWUxYmUzNDlmNTg5)| MMRazor searched
|
|ImageNet| ShuffleNetV2 |[mutable](https://openmmlab-share.oss-cn-hangzhou.aliyuncs.com/mmrazor/v0.1/nas/spos/spos_shufflenetv2_subnet_8xb128_in1k/spos_shufflenetv2_subnet_8xb128_in1k_flops_0.33M_acc_73.87_20211222-454627be_mutable_cfg.yaml?versionId=CAEQHxiBgICw5b6I7xciIGY5MjVmNWFhY2U5MjQzN2M4NDViYzI2YWRmYWE1YzQx)| 3.35 | 0.33 | 73.87 | 91.6 |[config](./spos_subnet_shufflenetv2_8xb128_in1k.py)|[model](https://openmmlab-share.oss-cn-hangzhou.aliyuncs.com/mmrazor/v0.1/nas/spos/spos_shufflenetv2_subnet_8xb128_in1k/spos_shufflenetv2_subnet_8xb128_in1k_flops_0.33M_acc_73.87_20211222-1f0a0b4d.pth?versionId=CAEQHxiBgIDK5b6I7xciIDM1YjIwZjQxN2UyMDRjYjA5YTM5NTBlMGNhMTdkNjI2) | [log](https://openmmlab-share.oss-cn-hangzhou.aliyuncs.com/mmrazor/v0.1/nas/spos/spos_shufflenetv2_subnet_8xb128_in1k/spos_shufflenetv2_subnet_8xb128_in1k_flops_0.33M_acc_73.87_20211222-1f0a0b4d.log.json?versionId=CAEQHxiBgIDr9cuL7xciIDBmOTZiZGUyYjRiMDQ5NzhhZjY0NWUxYmUzNDlmNTg5)| MMRazor searched
|
||||||
|
|
||||||
**Note**:
|
**Note**:
|
||||||
1. There are some small differences in our experiment in order to be consistent with other repos in OpenMMLab. For example,
|
1. There are some small differences in our experiment in order to be consistent with other repos in OpenMMLab. For example,
|
||||||
|
@ -34,13 +34,13 @@ normalize images in data preprocessing; resize by cv2 rather than PIL in trainin
|
||||||
### Supernet pre-training on ImageNet
|
### Supernet pre-training on ImageNet
|
||||||
```bash
|
```bash
|
||||||
python ./tools/mmcls/train_mmcls.py \
|
python ./tools/mmcls/train_mmcls.py \
|
||||||
configs/nas/spos/spos_shufflenet_supernet_imagenet.py \
|
configs/nas/spos/spos_supernet_shufflenetv2_8xb128_in1k.py \
|
||||||
--work-dir $WORK_DIR
|
--work-dir $WORK_DIR
|
||||||
```
|
```
|
||||||
### Search for subnet on the trained supernet
|
### Search for subnet on the trained supernet
|
||||||
```bash
|
```bash
|
||||||
python ./tools/mmcls/search_mmcls.py \
|
python ./tools/mmcls/search_mmcls.py \
|
||||||
configs/nas/spos/spos_shufflenet_evolution_search_imagenet.py \
|
configs/nas/spos/spos_evolution_search_shufflenetv2_8xb2048_in1k.py \
|
||||||
$STEP1_CKPT \
|
$STEP1_CKPT \
|
||||||
--work-dir $WORK_DIR
|
--work-dir $WORK_DIR
|
||||||
```
|
```
|
||||||
|
@ -48,7 +48,7 @@ python ./tools/mmcls/search_mmcls.py \
|
||||||
### Subnet retraining on ImageNet
|
### Subnet retraining on ImageNet
|
||||||
```bash
|
```bash
|
||||||
python ./tools/mmcls/train_mmcls.py \
|
python ./tools/mmcls/train_mmcls.py \
|
||||||
configs/nas/spos/spos_shufflenet_subnet_imagenet.py \
|
configs/nas/spos/spos_subnet_shufflenetv2_8xb128_in1k.py \
|
||||||
--work-dir $WORK_DIR \
|
--work-dir $WORK_DIR \
|
||||||
--cfg-options algorithm.mutable_cfg=$STEP2_SUBNET_YAML
|
--cfg-options algorithm.mutable_cfg=$STEP2_SUBNET_YAML
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
_base_ = ['./spos_shufflenetv2_supernet_8xb128_in1k.py']
|
_base_ = ['./spos_supernet_shufflenetv2_8xb128_in1k.py']
|
||||||
|
|
||||||
data = dict(
|
data = dict(
|
||||||
samples_per_gpu=2048,
|
samples_per_gpu=2048,
|
|
@ -1,5 +1,5 @@
|
||||||
_base_ = [
|
_base_ = [
|
||||||
'./spos_shufflenetv2_supernet_8xb128_in1k.py',
|
'./spos_supernet_shufflenetv2_8xb128_in1k.py',
|
||||||
]
|
]
|
||||||
|
|
||||||
algorithm = dict(retraining=True)
|
algorithm = dict(retraining=True)
|
Loading…
Reference in New Issue