forked from open-mmlab/mmselfsup
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump version to v0.8.0 (open-mmlab#269)
* [Fix]: Fix mmcls upgrade bug (open-mmlab#235) * [Feature]: Add multi machine dist_train (open-mmlab#232) * [Feature]: Add multi machine dist_train * [Fix]: Change bash to sh * [Fix]: Fix missing sh suffix * [Refactor]: Change bash to sh * [Refactor] Add unit test (open-mmlab#234) * [Refactor] add unit test * update workflow * update * [Fix] fix lint * update test * refactor moco and densecl unit test * fix lint * add unit test * update unit test * remove modification * [Feature]: Add MAE metafile (open-mmlab#238) * [Feature]: Add MAE metafile * [Fix]: Fix lint * [Fix]: Change LARS to AdamW in the metafile of MAE * [Fix] fix codecov bug (open-mmlab#241) * [Fix] fix codecov bug * update comment * [Refactor] Using MMCls backbones (open-mmlab#233) * [Refactor] using backbones from MMCls * [Refactor] modify the unit test * [Fix] modify default setting of out_indices * [Docs] fix lint * [Refactor] modify super init * [Refactore] remove res_layer.py * using mmcv PatchEmbed * [Fix]: Fix outdated problem (open-mmlab#249) * [Fix]: Fix outdated problem * [Fix]: Update MoCov3 bibtex * [Fix]: Use abs path in README * [Fix]: Reformat MAE bibtex * [Fix]: Reformat MoCov3 bibtex * [Feature] Resume from the latest checkpoint automatically. (open-mmlab#245) * [Feature] Resume from the latest checkpoint automatically. * fix windows path problem * fix lint * add code reference * [Docs] add docstring for ResNet and ResNeXt (open-mmlab#252) * [Feature] support KNN benchmark (open-mmlab#243) * [Feature] support KNN benchmark * [Fix] add docstring and multi-machine testing * [Fix] fix lint * [Fix] change args format and check init_cfg * [Docs] add benchmark tutorial * [Docs] add benchmark results * [Feature]: SimMIM supported (open-mmlab#239) * [Feature]: SimMIM Pretrain * [Feature]: Add mix precision and 16x128 config * [Fix]: Fix config import bug * [Fix]: Fix config bug * [Feature]: Simim Finetune * [Fix]: Log every 100 * [Fix]: Fix eval problem * [Feature]: Add docstring for simmim * [Refactor]: Merge layer wise lr decay to Default constructor * [Fix]:Fix simmim evaluation bug * [Fix]: Change model to be compatible to latest version of mmcls * [Fix]: Fix lint * [Fix]: Rewrite forward_train for classification cls * [Feature]: Add UT * [Fix]: Fix lint * [Feature]: Add 32 gpus training for simmim ft * [Fix]: Rename mmcls classifier wrapper * [Fix]: Add docstring to SimMIMNeck * [Feature]: Generate docstring for the forward function of simmim encoder * [Fix]: Rewrite the class docstring for constructor * [Fix]: Fix lint * [Fix]: Fix UT * [Fix]: Reformat config * [Fix]: Add img resolution * [Feature]: Add readme and metafile * [Fix]: Fix typo in README.md * [Fix]: Change BlackMaskGen to BlockwiseMaskGenerator * [Fix]: Change the name of SwinForSimMIM * [Fix]: Delete irrelevant files * [Feature]: Create extra transformerfinetuneconstructor * [Fix]: Fix lint * [Fix]: Update SimMIM README * [Fix]: Change SimMIMPretrainHead to SimMIMHead * [Fix]: Fix the docstring of ft constructor * [Fix]: Fix UT * [Fix]: Recover deletion Co-authored-by: Your <you@example.com> * [Fix] add seed to distributed sampler (open-mmlab#250) * [Fix] add seed to distributed sampler * fix lint * [Feature] Add ImageNet21k (open-mmlab#225) * solve memory leak by limited implementation * fix lint problem Co-authored-by: liming <liming.ai@bytedance.com> * [Refactor] change args format to '--a-b' (open-mmlab#253) * [Refactor] change args format to `--a-b` * modify tsne script * modify 'sh' files * modify getting_started.md * modify getting_started.md * [Fix] fix 'mkdir' error in prepare_voc07_cls.sh (open-mmlab#261) * [Fix] fix positional parameter error (open-mmlab#260) * [Fix] fix command errors in benchmarks tutorial (open-mmlab#263) * [Docs] add brief installation steps in README.md (open-mmlab#265) * [Docs] add colab tutorial (open-mmlab#247) * [Docs] add colab tutorial * fix lint * modify the colab tutorial, using API to train the model * modify the description * remove # * modify the command * [Docs] translate 6_benchmarks.md into Chinese (open-mmlab#262) * [Docs] translate 6_benchmarks.md into Chinese * Update 6_benchmarks.md change 基准 to 基准评测 * Update 6_benchmarks.md (1) Add Chinese translation of ‘1 folder for ImageNet nearest-neighbor classification task’ (2) 数据预准备 -> 数据准备 * [Docs] remove install scripts in README (open-mmlab#267) * [Docs] Update version information in dev branch (open-mmlab#268) * update version to v0.8.0 * fix lint * [Fix]: Install the latest mmcls * [Fix]: Add SimMIM in RAEDME Co-authored-by: Yuan Liu <30762564+YuanLiuuuuuu@users.noreply.github.com> Co-authored-by: Jiahao Xie <52497952+Jiahao000@users.noreply.github.com> Co-authored-by: Your <you@example.com> Co-authored-by: Ming Li <73068772+mitming@users.noreply.github.com> Co-authored-by: liming <liming.ai@bytedance.com> Co-authored-by: RenQin <45731309+soonera@users.noreply.github.com> Co-authored-by: YuanLiuuuuuu <3463423099@qq.com>
- Loading branch information
1 parent
16d9bf2
commit df907e5
Showing
121 changed files
with
5,294 additions
and
1,064 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
configs/benchmarks/classification/_base_/models/swin-base.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# model settings | ||
|
||
custom_imports = dict(imports='mmcls.models', allow_failed_imports=False) | ||
|
||
model = dict( | ||
type='MMClsImageClassifierWrapper', | ||
backbone=dict( | ||
type='mmcls.SwinTransformer', | ||
arch='base', | ||
img_size=192, | ||
drop_path_rate=0.1, | ||
stage_cfgs=dict(block_cfgs=dict(window_size=6))), | ||
neck=dict(type='mmcls.GlobalAveragePooling'), | ||
head=dict( | ||
type='mmcls.LinearClsHead', | ||
num_classes=1000, | ||
in_channels=1024, | ||
init_cfg=None, # suppress the default init_cfg of LinearClsHead. | ||
loss=dict( | ||
type='mmcls.LabelSmoothLoss', | ||
label_smooth_val=0.1, | ||
mode='original'), | ||
cal_acc=False), | ||
init_cfg=[ | ||
dict(type='TruncNormal', layer='Linear', std=0.02, bias=0.), | ||
dict(type='Constant', layer='LayerNorm', val=1., bias=0.) | ||
], | ||
train_cfg=dict(augments=[ | ||
dict(type='BatchMixup', alpha=0.8, num_classes=1000, prob=0.5), | ||
dict(type='BatchCutMix', alpha=1.0, num_classes=1000, prob=0.5) | ||
])) |
3 changes: 3 additions & 0 deletions
3
configs/benchmarks/classification/imagenet/swin-base_ft-32xb64-coslr-100e_in1k.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
_base_ = 'swin-base_ft-8xb256-coslr-100e_in1k.py' | ||
|
||
data = dict(samples_per_gpu=64, workers_per_gpu=8) |
74 changes: 74 additions & 0 deletions
74
configs/benchmarks/classification/imagenet/swin-base_ft-8xb256-coslr-100e_in1k.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
_base_ = [ | ||
'../_base_/models/swin-base.py', | ||
'../_base_/datasets/imagenet.py', | ||
'../_base_/schedules/adamw_coslr-100e_in1k.py', | ||
'../_base_/default_runtime.py', | ||
] | ||
|
||
# dataset | ||
img_norm_cfg = dict(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) | ||
train_pipeline = [ | ||
dict( | ||
type='RandomAug', | ||
input_size=192, | ||
color_jitter=0.4, | ||
auto_augment='rand-m9-mstd0.5-inc1', | ||
interpolation='bicubic', | ||
re_prob=0.25, | ||
re_mode='pixel', | ||
re_count=1, | ||
mean=(0.485, 0.456, 0.406), | ||
std=(0.229, 0.224, 0.225)) | ||
] | ||
test_pipeline = [ | ||
dict(type='Resize', size=219, interpolation=3), | ||
dict(type='CenterCrop', size=192), | ||
dict(type='ToTensor'), | ||
dict(type='Normalize', **img_norm_cfg) | ||
] | ||
data = dict( | ||
samples_per_gpu=256, | ||
drop_last=False, | ||
workers_per_gpu=32, | ||
train=dict(pipeline=train_pipeline), | ||
val=dict(pipeline=test_pipeline)) | ||
|
||
# model | ||
model = dict(backbone=dict(init_cfg=dict())) | ||
|
||
# optimizer | ||
optimizer = dict( | ||
lr=1.25e-3 * 2048 / 512, | ||
paramwise_options={ | ||
'norm': dict(weight_decay=0.), | ||
'bias': dict(weight_decay=0.), | ||
'absolute_pos_embed': dict(weight_decay=0.), | ||
'relative_position_bias_table': dict(weight_decay=0.) | ||
}, | ||
constructor='TransformerFinetuneConstructor', | ||
model_type='swin', | ||
layer_decay=0.9) | ||
|
||
# clip gradient | ||
optimizer_config = dict(grad_clip=dict(max_norm=5.0)) | ||
|
||
# learning policy | ||
lr_config = dict( | ||
policy='CosineAnnealing', | ||
min_lr=2.5e-7 * 2048 / 512, | ||
warmup='linear', | ||
warmup_iters=20, | ||
warmup_ratio=2.5e-7 / 1.25e-3, | ||
warmup_by_epoch=True, | ||
by_epoch=False) | ||
|
||
# mixed precision | ||
fp16 = dict(loss_scale='dynamic') | ||
|
||
# runtime | ||
checkpoint_config = dict(interval=1, max_keep_ckpts=3, out_dir='') | ||
persistent_workers = True | ||
log_config = dict( | ||
interval=100, hooks=[ | ||
dict(type='TextLoggerHook'), | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
data_source = 'ImageNet' | ||
dataset_type = 'SingleViewDataset' | ||
img_norm_cfg = dict(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) | ||
pipeline = [ | ||
dict(type='Resize', size=256), | ||
dict(type='CenterCrop', size=224), | ||
dict(type='ToTensor'), | ||
dict(type='Normalize', **img_norm_cfg), | ||
] | ||
|
||
data = dict( | ||
samples_per_gpu=256, | ||
workers_per_gpu=8, | ||
train=dict( | ||
type=dataset_type, | ||
data_source=dict( | ||
type=data_source, | ||
data_prefix='data/imagenet/train', | ||
ann_file='data/imagenet/meta/train.txt', | ||
), | ||
pipeline=pipeline), | ||
val=dict( | ||
type=dataset_type, | ||
data_source=dict( | ||
type=data_source, | ||
data_prefix='data/imagenet/val', | ||
ann_file='data/imagenet/meta/val.txt', | ||
), | ||
pipeline=pipeline)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# dataset settings | ||
data_source = 'ImageNet' | ||
dataset_type = 'SingleViewDataset' | ||
img_norm_cfg = dict(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) | ||
train_pipeline = [ | ||
dict( | ||
type='RandomResizedCrop', | ||
size=192, | ||
scale=(0.67, 1.0), | ||
ratio=(3. / 4., 4. / 3.)), | ||
dict(type='RandomHorizontalFlip') | ||
] | ||
|
||
# prefetch | ||
prefetch = False | ||
if not prefetch: | ||
train_pipeline.extend( | ||
[dict(type='ToTensor'), | ||
dict(type='Normalize', **img_norm_cfg)]) | ||
|
||
train_pipeline.append( | ||
dict( | ||
type='BlockwiseMaskGenerator', | ||
input_size=192, | ||
mask_patch_size=32, | ||
model_patch_size=4, | ||
mask_ratio=0.6)) | ||
|
||
# dataset summary | ||
data = dict( | ||
samples_per_gpu=256, | ||
workers_per_gpu=8, | ||
train=dict( | ||
type=dataset_type, | ||
data_source=dict( | ||
type=data_source, | ||
data_prefix='data/imagenet/train', | ||
ann_file='data/imagenet/meta/train.txt', | ||
), | ||
pipeline=train_pipeline, | ||
prefetch=prefetch)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# model settings | ||
model = dict( | ||
type='SimMIM', | ||
backbone=dict( | ||
type='SimMIMSwinTransformer', | ||
arch='B', | ||
img_size=192, | ||
stage_cfgs=dict(block_cfgs=dict(window_size=6))), | ||
neck=dict(type='SimMIMNeck', in_channels=128 * 2**3, encoder_stride=32), | ||
head=dict(type='SimMIMHead', patch_size=4, encoder_in_channels=3)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.