├── .circleci ├── config.yml ├── docker │ └── Dockerfile └── test.yml ├── .coveragerc ├── .dev_scripts ├── benchmark_regression │ ├── 1-benchmark_valid.py │ ├── 2-benchmark_test.py │ ├── 3-benchmark_train.py │ ├── 4-benchmark_speed.py │ ├── bench_test.yml │ ├── bench_train.yml │ └── utils.py ├── check_metafile.py ├── ckpt_tree.py ├── compare_init.py ├── fill_metafile.py └── generate_readme.py ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── 1_bug-report.yml │ ├── 2_feature-request.yml │ ├── 3_bug-report_zh.yml │ ├── 4_feature-request_zh.yml │ └── config.yml ├── pull_request_template.md └── workflows │ ├── lint.yml │ ├── pr_stage_test.yml │ ├── publish-to-pypi.yml │ └── test_mim.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .readthedocs.yml ├── CITATION.cff ├── CONTRIBUTING.md ├── LICENSE ├── MANIFEST.in ├── README.md ├── README_zh-CN.md ├── configs ├── _base_ │ ├── datasets │ │ ├── cifar100_bs16.py │ │ ├── cifar10_bs16.py │ │ ├── coco_caption.py │ │ ├── coco_okvqa.py │ │ ├── coco_retrieval.py │ │ ├── coco_vg_vqa.py │ │ ├── coco_vqa.py │ │ ├── cub_bs8_384.py │ │ ├── cub_bs8_448.py │ │ ├── flickr30k_caption.py │ │ ├── flickr30k_retrieval.py │ │ ├── gqa.py │ │ ├── imagenet21k_bs128.py │ │ ├── imagenet_bs128_mbv3.py │ │ ├── imagenet_bs128_poolformer_medium_224.py │ │ ├── imagenet_bs128_poolformer_small_224.py │ │ ├── imagenet_bs128_revvit_224.py │ │ ├── imagenet_bs128_riformer_medium_384.py │ │ ├── imagenet_bs128_riformer_small_384.py │ │ ├── imagenet_bs128_vig_224.py │ │ ├── imagenet_bs16_eva_196.py │ │ ├── imagenet_bs16_eva_336.py │ │ ├── imagenet_bs16_eva_448.py │ │ ├── imagenet_bs16_eva_560.py │ │ ├── imagenet_bs16_pil_bicubic_384.py │ │ ├── imagenet_bs256_beitv2.py │ │ ├── imagenet_bs256_davit_224.py │ │ ├── imagenet_bs256_itpn.py │ │ ├── imagenet_bs256_levit_224.py │ │ ├── imagenet_bs256_rsb_a12.py │ │ ├── imagenet_bs256_rsb_a3.py │ │ ├── imagenet_bs256_simmim_192.py │ │ ├── imagenet_bs256_swin_192.py │ │ ├── imagenet_bs32.py │ │ ├── imagenet_bs32_byol.py │ │ ├── imagenet_bs32_mocov2.py │ │ ├── imagenet_bs32_pil_bicubic.py │ │ ├── imagenet_bs32_pil_resize.py │ │ ├── imagenet_bs32_simclr.py │ │ ├── imagenet_bs512_mae.py │ │ ├── imagenet_bs512_mocov3.py │ │ ├── imagenet_bs64.py │ │ ├── imagenet_bs64_autoaug.py │ │ ├── imagenet_bs64_clip_224.py │ │ ├── imagenet_bs64_clip_384.py │ │ ├── imagenet_bs64_clip_448.py │ │ ├── imagenet_bs64_convmixer_224.py │ │ ├── imagenet_bs64_deit3_224.py │ │ ├── imagenet_bs64_deit3_384.py │ │ ├── imagenet_bs64_edgenext_256.py │ │ ├── imagenet_bs64_hivit_224.py │ │ ├── imagenet_bs64_mixer_224.py │ │ ├── imagenet_bs64_pil_resize.py │ │ ├── imagenet_bs64_pil_resize_autoaug.py │ │ ├── imagenet_bs64_swin_224.py │ │ ├── imagenet_bs64_swin_256.py │ │ ├── imagenet_bs64_swin_384.py │ │ ├── imagenet_bs64_t2t_224.py │ │ ├── imagenet_bs8_pil_bicubic_320.py │ │ ├── inshop_bs32_448.py │ │ ├── nlvr2.py │ │ ├── nocaps.py │ │ ├── ocrvqa.py │ │ ├── pipelines │ │ │ ├── auto_aug.py │ │ │ └── rand_aug.py │ │ ├── refcoco.py │ │ ├── vizwiz.py │ │ ├── voc_bs16.py │ │ └── vsr.py │ ├── default_runtime.py │ ├── models │ │ ├── conformer │ │ │ ├── base-p16.py │ │ │ ├── small-p16.py │ │ │ ├── small-p32.py │ │ │ └── tiny-p16.py │ │ ├── convmixer │ │ │ ├── convmixer-1024-20.py │ │ │ ├── convmixer-1536-20.py │ │ │ └── convmixer-768-32.py │ │ ├── convnext │ │ │ ├── convnext-base.py │ │ │ ├── convnext-large.py │ │ │ ├── convnext-small.py │ │ │ ├── convnext-tiny.py │ │ │ └── convnext-xlarge.py │ │ ├── convnext_v2 │ │ │ ├── atto.py │ │ │ ├── base.py │ │ │ ├── femto.py │ │ │ ├── huge.py │ │ │ ├── large.py │ │ │ ├── nano.py │ │ │ ├── pico.py │ │ │ └── tiny.py │ │ ├── davit │ │ │ ├── davit-base.py │ │ │ ├── davit-small.py │ │ │ └── davit-tiny.py │ │ ├── deit3 │ │ │ ├── deit3-base-p16-224.py │ │ │ ├── deit3-base-p16-384.py │ │ │ ├── deit3-huge-p14-224.py │ │ │ ├── deit3-large-p16-224.py │ │ │ ├── deit3-large-p16-384.py │ │ │ ├── deit3-medium-p16-224.py │ │ │ ├── deit3-small-p16-224.py │ │ │ └── deit3-small-p16-384.py │ │ ├── densenet │ │ │ ├── densenet121.py │ │ │ ├── densenet161.py │ │ │ ├── densenet169.py │ │ │ └── densenet201.py │ │ ├── edgenext │ │ │ ├── edgenext-base.py │ │ │ ├── edgenext-small.py │ │ │ ├── edgenext-xsmall.py │ │ │ └── edgenext-xxsmall.py │ │ ├── efficientformer-l1.py │ │ ├── efficientnet_b0.py │ │ ├── efficientnet_b1.py │ │ ├── efficientnet_b2.py │ │ ├── efficientnet_b3.py │ │ ├── efficientnet_b4.py │ │ ├── efficientnet_b5.py │ │ ├── efficientnet_b6.py │ │ ├── efficientnet_b7.py │ │ ├── efficientnet_b8.py │ │ ├── efficientnet_em.py │ │ ├── efficientnet_es.py │ │ ├── efficientnet_l2.py │ │ ├── efficientnet_v2 │ │ │ ├── efficientnetv2_b0.py │ │ │ ├── efficientnetv2_b1.py │ │ │ ├── efficientnetv2_b2.py │ │ │ ├── efficientnetv2_b3.py │ │ │ ├── efficientnetv2_l.py │ │ │ ├── efficientnetv2_m.py │ │ │ ├── efficientnetv2_s.py │ │ │ └── efficientnetv2_xl.py │ │ ├── eva │ │ │ ├── eva-g.py │ │ │ └── eva-l.py │ │ ├── hivit │ │ │ ├── base_224.py │ │ │ ├── small_224.py │ │ │ └── tiny_224.py │ │ ├── hornet │ │ │ ├── hornet-base-gf.py │ │ │ ├── hornet-base.py │ │ │ ├── hornet-large-gf.py │ │ │ ├── hornet-large-gf384.py │ │ │ ├── hornet-large.py │ │ │ ├── hornet-small-gf.py │ │ │ ├── hornet-small.py │ │ │ ├── hornet-tiny-gf.py │ │ │ └── hornet-tiny.py │ │ ├── hrnet │ │ │ ├── hrnet-w18.py │ │ │ ├── hrnet-w30.py │ │ │ ├── hrnet-w32.py │ │ │ ├── hrnet-w40.py │ │ │ ├── hrnet-w44.py │ │ │ ├── hrnet-w48.py │ │ │ └── hrnet-w64.py │ │ ├── inception_v3.py │ │ ├── itpn_hivit-base-p16.py │ │ ├── levit-256-p16.py │ │ ├── mae_hivit-base-p16.py │ │ ├── mae_vit-base-p16.py │ │ ├── mixmim │ │ │ └── mixmim_base.py │ │ ├── mlp_mixer_base_patch16.py │ │ ├── mlp_mixer_large_patch16.py │ │ ├── mobilenet_v2_1x.py │ │ ├── mobilenet_v3 │ │ │ ├── mobilenet_v3_large_imagenet.py │ │ │ ├── mobilenet_v3_small_050_imagenet.py │ │ │ ├── mobilenet_v3_small_075_imagenet.py │ │ │ ├── mobilenet_v3_small_cifar.py │ │ │ └── mobilenet_v3_small_imagenet.py │ │ ├── mobileone │ │ │ ├── mobileone_s0.py │ │ │ ├── mobileone_s1.py │ │ │ ├── mobileone_s2.py │ │ │ ├── mobileone_s3.py │ │ │ └── mobileone_s4.py │ │ ├── mobilevit │ │ │ ├── mobilevit_s.py │ │ │ ├── mobilevit_xs.py │ │ │ └── mobilevit_xxs.py │ │ ├── mvit │ │ │ ├── mvitv2-base.py │ │ │ ├── mvitv2-large.py │ │ │ ├── mvitv2-small.py │ │ │ └── mvitv2-tiny.py │ │ ├── poolformer │ │ │ ├── poolformer_m36.py │ │ │ ├── poolformer_m48.py │ │ │ ├── poolformer_s12.py │ │ │ ├── poolformer_s24.py │ │ │ └── poolformer_s36.py │ │ ├── regnet │ │ │ ├── regnetx_1.6gf.py │ │ │ ├── regnetx_12gf.py │ │ │ ├── regnetx_3.2gf.py │ │ │ ├── regnetx_4.0gf.py │ │ │ ├── regnetx_400mf.py │ │ │ ├── regnetx_6.4gf.py │ │ │ ├── regnetx_8.0gf.py │ │ │ └── regnetx_800mf.py │ │ ├── replknet-31B_in1k.py │ │ ├── replknet-31L_in1k.py │ │ ├── replknet-XL_in1k.py │ │ ├── repmlp-base_224.py │ │ ├── repvgg-A0_in1k.py │ │ ├── repvgg-B3_lbs-mixup_in1k.py │ │ ├── res2net101-w26-s4.py │ │ ├── res2net50-w14-s8.py │ │ ├── res2net50-w26-s4.py │ │ ├── res2net50-w26-s6.py │ │ ├── res2net50-w26-s8.py │ │ ├── res2net50-w48-s2.py │ │ ├── resnest101.py │ │ ├── resnest200.py │ │ ├── resnest269.py │ │ ├── resnest50.py │ │ ├── resnet101.py │ │ ├── resnet101_cifar.py │ │ ├── resnet152.py │ │ ├── resnet152_cifar.py │ │ ├── resnet18.py │ │ ├── resnet18_cifar.py │ │ ├── resnet34.py │ │ ├── resnet34_cifar.py │ │ ├── resnet34_gem.py │ │ ├── resnet50.py │ │ ├── resnet50_cifar.py │ │ ├── resnet50_cifar_cutmix.py │ │ ├── resnet50_cifar_mixup.py │ │ ├── resnet50_cutmix.py │ │ ├── resnet50_label_smooth.py │ │ ├── resnet50_mixup.py │ │ ├── resnetv1c50.py │ │ ├── resnetv1d101.py │ │ ├── resnetv1d152.py │ │ ├── resnetv1d50.py │ │ ├── resnext101_32x4d.py │ │ ├── resnext101_32x8d.py │ │ ├── resnext152_32x4d.py │ │ ├── resnext50_32x4d.py │ │ ├── revvit │ │ │ ├── revvit-base.py │ │ │ └── revvit-small.py │ │ ├── seresnet101.py │ │ ├── seresnet50.py │ │ ├── seresnext101_32x4d.py │ │ ├── seresnext50_32x4d.py │ │ ├── shufflenet_v1_1x.py │ │ ├── shufflenet_v2_1x.py │ │ ├── swin_transformer │ │ │ ├── base_224.py │ │ │ ├── base_384.py │ │ │ ├── large_224.py │ │ │ ├── large_384.py │ │ │ ├── small_224.py │ │ │ └── tiny_224.py │ │ ├── swin_transformer_v2 │ │ │ ├── base_256.py │ │ │ ├── base_384.py │ │ │ ├── large_256.py │ │ │ ├── large_384.py │ │ │ ├── small_256.py │ │ │ └── tiny_256.py │ │ ├── t2t-vit-t-14.py │ │ ├── t2t-vit-t-19.py │ │ ├── t2t-vit-t-24.py │ │ ├── tinyvit │ │ │ ├── tinyvit-11m.py │ │ │ ├── tinyvit-21m.py │ │ │ └── tinyvit-5m.py │ │ ├── tnt_s_patch16_224.py │ │ ├── twins_pcpvt_base.py │ │ ├── twins_svt_base.py │ │ ├── van │ │ │ ├── van_base.py │ │ │ ├── van_large.py │ │ │ ├── van_small.py │ │ │ └── van_tiny.py │ │ ├── vgg11.py │ │ ├── vgg11bn.py │ │ ├── vgg13.py │ │ ├── vgg13bn.py │ │ ├── vgg16.py │ │ ├── vgg16bn.py │ │ ├── vgg19.py │ │ ├── vgg19bn.py │ │ ├── vig │ │ │ ├── pyramid_vig_base.py │ │ │ ├── pyramid_vig_medium.py │ │ │ ├── pyramid_vig_small.py │ │ │ ├── pyramid_vig_tiny.py │ │ │ ├── vig_base.py │ │ │ ├── vig_small.py │ │ │ └── vig_tiny.py │ │ ├── vit-base-p16.py │ │ ├── vit-base-p32.py │ │ ├── vit-large-p16.py │ │ ├── vit-large-p32.py │ │ └── wide-resnet50.py │ └── schedules │ │ ├── cifar10_bs128.py │ │ ├── cub_bs64.py │ │ ├── imagenet_bs1024_adamw_conformer.py │ │ ├── imagenet_bs1024_adamw_hivit.py │ │ ├── imagenet_bs1024_adamw_revvit.py │ │ ├── imagenet_bs1024_adamw_swin.py │ │ ├── imagenet_bs1024_coslr.py │ │ ├── imagenet_bs1024_linearlr_bn_nowd.py │ │ ├── imagenet_bs2048.py │ │ ├── imagenet_bs2048_AdamW.py │ │ ├── imagenet_bs2048_adamw_levit.py │ │ ├── imagenet_bs2048_coslr.py │ │ ├── imagenet_bs2048_rsb.py │ │ ├── imagenet_bs256.py │ │ ├── imagenet_bs256_140e.py │ │ ├── imagenet_bs256_200e_coslr_warmup.py │ │ ├── imagenet_bs256_coslr.py │ │ ├── imagenet_bs256_coslr_coswd_300e.py │ │ ├── imagenet_bs256_epochstep.py │ │ ├── imagenet_bs4096_AdamW.py │ │ ├── imagenet_lars_coslr_200e.py │ │ ├── imagenet_lars_coslr_90e.py │ │ ├── imagenet_sgd_coslr_100e.py │ │ ├── imagenet_sgd_coslr_200e.py │ │ └── imagenet_sgd_steplr_100e.py ├── arcface │ ├── README.md │ ├── metafile.yml │ └── resnet50-arcface_8xb32_inshop.py ├── barlowtwins │ ├── README.md │ ├── barlowtwins_resnet50_8xb256-coslr-1000e_in1k.py │ ├── barlowtwins_resnet50_8xb256-coslr-300e_in1k.py │ ├── benchmarks │ │ └── resnet50_8xb32-linear-coslr-100e_in1k.py │ └── metafile.yml ├── beit │ ├── README.md │ ├── beit_beit-base-p16_8xb256-amp-coslr-300e_in1k.py │ ├── benchmarks │ │ ├── beit-base-p16_8xb128-coslr-100e_in1k.py │ │ └── beit-base-p16_8xb64_in1k.py │ └── metafile.yml ├── beitv2 │ ├── README.md │ ├── beitv2_beit-base-p16_8xb256-amp-coslr-1600e_in1k.py │ ├── beitv2_beit-base-p16_8xb256-amp-coslr-300e_in1k.py │ ├── benchmarks │ │ ├── beit-base-p16_8xb128-coslr-100e_in1k.py │ │ └── beit-base-p16_8xb64_in1k.py │ └── metafile.yml ├── blip │ ├── README.md │ ├── blip-base_8xb16_refcoco.py │ ├── blip-base_8xb32_caption.py │ ├── blip-base_8xb32_caption_flickr30k.py │ ├── blip-base_8xb32_nlvr.py │ ├── blip-base_8xb32_nocaps.py │ ├── blip-base_8xb32_ocrvqa.py │ ├── blip-base_8xb32_okvqa.py │ ├── blip-base_8xb32_retrieval.py │ ├── blip-base_8xb32_retrieval_flickr30k.py │ ├── blip-base_8xb32_vqa.py │ └── metafile.yml ├── blip2 │ ├── README.md │ ├── blip2-opt2.7b_8xb16_gqa.py │ ├── blip2-opt2.7b_8xb16_vqa.py │ ├── blip2-opt2.7b_8xb32_caption.py │ ├── blip2_8xb32_retrieval.py │ └── metafile.yml ├── byol │ ├── README.md │ ├── benchmarks │ │ ├── mask-rcnn_r50-c4_ms-1x_coco.py │ │ ├── mask-rcnn_r50_fpn_ms-1x_coco.py │ │ └── resnet50_8xb512-linear-coslr-90e_in1k.py │ ├── byol_resnet50_16xb256-coslr-200e_in1k.py │ └── metafile.yml ├── cae │ ├── README.md │ ├── benchmarks │ │ └── beit-base-p16_8xb128-coslr-100e_in1k.py │ ├── cae_beit-base-p16_8xb256-amp-coslr-300e_in1k.py │ └── metafile.yml ├── chinese_clip │ ├── README.md │ ├── cn-clip_resnet50_zeroshot-cls_cifar100.py │ ├── cn-clip_vit-base-p16_zeroshot-cls_cifar100.py │ ├── cn-clip_vit-huge-p14_zeroshot-cls_cifar100.py │ ├── cn-clip_vit-large-p14_zeroshot-cls_cifar100.py │ └── metafile.yml ├── clip │ ├── README.md │ ├── clip_vit-base-p16_zeroshot-cls_cifar100.py │ ├── clip_vit-base-p16_zeroshot-cls_in1k.py │ ├── clip_vit-large-p14_zeroshot-cls_cifar100.py │ ├── clip_vit-large-p14_zeroshot-cls_in1k.py │ ├── metafile.yml │ ├── vit-base-p16_pt-64xb64_in1k-384px.py │ ├── vit-base-p16_pt-64xb64_in1k-448px.py │ ├── vit-base-p16_pt-64xb64_in1k.py │ ├── vit-base-p32_pt-64xb64_in1k-384px.py │ ├── vit-base-p32_pt-64xb64_in1k-448px.py │ ├── vit-base-p32_pt-64xb64_in1k.py │ └── vit-large-p14_headless.py ├── conformer │ ├── README.md │ ├── conformer-base-p16_8xb128_in1k.py │ ├── conformer-small-p16_8xb128_in1k.py │ ├── conformer-small-p32_8xb128_in1k.py │ ├── conformer-tiny-p16_8xb128_in1k.py │ └── metafile.yml ├── convmixer │ ├── README.md │ ├── convmixer-1024-20_10xb64_in1k.py │ ├── convmixer-1536-20_10xb64_in1k.py │ ├── convmixer-768-32_10xb64_in1k.py │ └── metafile.yml ├── convnext │ ├── README.md │ ├── convnext-base_32xb128_in1k-384px.py │ ├── convnext-base_32xb128_in1k.py │ ├── convnext-base_32xb128_in21k.py │ ├── convnext-large_64xb64_in1k-384px.py │ ├── convnext-large_64xb64_in1k.py │ ├── convnext-large_64xb64_in21k.py │ ├── convnext-small_32xb128_in1k-384px.py │ ├── convnext-small_32xb128_in1k.py │ ├── convnext-tiny_32xb128_in1k-384px.py │ ├── convnext-tiny_32xb128_in1k.py │ ├── convnext-xlarge_64xb64_in1k-384px.py │ ├── convnext-xlarge_64xb64_in1k.py │ ├── convnext-xlarge_64xb64_in21k.py │ └── metafile.yml ├── convnext_v2 │ ├── README.md │ ├── convnext-v2-atto_32xb32_in1k.py │ ├── convnext-v2-base_32xb32_in1k-384px.py │ ├── convnext-v2-base_32xb32_in1k.py │ ├── convnext-v2-femto_32xb32_in1k.py │ ├── convnext-v2-huge_32xb32_in1k-384px.py │ ├── convnext-v2-huge_32xb32_in1k-512px.py │ ├── convnext-v2-huge_32xb32_in1k.py │ ├── convnext-v2-large_32xb32_in1k-384px.py │ ├── convnext-v2-large_32xb32_in1k.py │ ├── convnext-v2-nano_32xb32_in1k-384px.py │ ├── convnext-v2-nano_32xb32_in1k.py │ ├── convnext-v2-pico_32xb32_in1k.py │ ├── convnext-v2-tiny_32xb32_in1k-384px.py │ ├── convnext-v2-tiny_32xb32_in1k.py │ └── metafile.yml ├── cspnet │ ├── README.md │ ├── cspdarknet50_8xb32_in1k.py │ ├── cspresnet50_8xb32_in1k.py │ ├── cspresnext50_8xb32_in1k.py │ └── metafile.yml ├── csra │ ├── README.md │ ├── metafile.yml │ └── resnet101-csra_1xb16_voc07-448px.py ├── davit │ ├── README.md │ ├── davit-base_4xb256_in1k.py │ ├── davit-small_4xb256_in1k.py │ ├── davit-tiny_4xb256_in1k.py │ └── metafile.yml ├── deit │ ├── README.md │ ├── deit-base-distilled_16xb32_in1k-384px.py │ ├── deit-base-distilled_16xb64_in1k.py │ ├── deit-base_16xb32_in1k-384px.py │ ├── deit-base_16xb64_in1k.py │ ├── deit-small-distilled_4xb256_in1k.py │ ├── deit-small_4xb256_in1k.py │ ├── deit-tiny-distilled_4xb256_in1k.py │ ├── deit-tiny_4xb256_in1k.py │ └── metafile.yml ├── deit3 │ ├── README.md │ ├── deit3-base-p16_64xb32_in1k-384px.py │ ├── deit3-base-p16_64xb64_in1k.py │ ├── deit3-huge-p14_64xb32_in1k.py │ ├── deit3-large-p16_64xb16_in1k-384px.py │ ├── deit3-large-p16_64xb64_in1k.py │ ├── deit3-medium-p16_64xb64_in1k.py │ ├── deit3-small-p16_64xb64_in1k-384px.py │ ├── deit3-small-p16_64xb64_in1k.py │ └── metafile.yml ├── densecl │ ├── README.md │ ├── benchmarks │ │ └── resnet50_8xb32-linear-steplr-100e_in1k.py │ ├── densecl_resnet50_8xb32-coslr-200e_in1k.py │ └── metafile.yml ├── densenet │ ├── README.md │ ├── densenet121_4xb256_in1k.py │ ├── densenet161_4xb256_in1k.py │ ├── densenet169_4xb256_in1k.py │ ├── densenet201_4xb256_in1k.py │ └── metafile.yml ├── dinov2 │ ├── README.md │ ├── metafile.yml │ ├── vit-base-p14_dinov2-pre_headless.py │ ├── vit-giant-p14_dinov2-pre_headless.py │ ├── vit-large-p14_dinov2-pre_headless.py │ └── vit-small-p14_dinov2-pre_headless.py ├── edgenext │ ├── README.md │ ├── edgenext-base_8xb256-usi_in1k.py │ ├── edgenext-base_8xb256_in1k.py │ ├── edgenext-small_8xb256-usi_in1k.py │ ├── edgenext-small_8xb256_in1k.py │ ├── edgenext-xsmall_8xb256_in1k.py │ ├── edgenext-xxsmall_8xb256_in1k.py │ └── metafile.yml ├── efficientformer │ ├── README.md │ ├── efficientformer-l1_8xb128_in1k.py │ ├── efficientformer-l3_8xb128_in1k.py │ ├── efficientformer-l7_8xb128_in1k.py │ └── metafile.yml ├── efficientnet │ ├── README.md │ ├── efficientnet-b0_8xb32-01norm_in1k.py │ ├── efficientnet-b0_8xb32_in1k.py │ ├── efficientnet-b1_8xb32-01norm_in1k.py │ ├── efficientnet-b1_8xb32_in1k.py │ ├── efficientnet-b2_8xb32-01norm_in1k.py │ ├── efficientnet-b2_8xb32_in1k.py │ ├── efficientnet-b3_8xb32-01norm_in1k.py │ ├── efficientnet-b3_8xb32_in1k.py │ ├── efficientnet-b4_8xb32-01norm_in1k.py │ ├── efficientnet-b4_8xb32_in1k.py │ ├── efficientnet-b5_8xb32-01norm_in1k.py │ ├── efficientnet-b5_8xb32_in1k.py │ ├── efficientnet-b6_8xb32-01norm_in1k.py │ ├── efficientnet-b6_8xb32_in1k.py │ ├── efficientnet-b7_8xb32-01norm_in1k.py │ ├── efficientnet-b7_8xb32_in1k.py │ ├── efficientnet-b8_8xb32-01norm_in1k.py │ ├── efficientnet-b8_8xb32_in1k.py │ ├── efficientnet-em_8xb32-01norm_in1k.py │ ├── efficientnet-es_8xb32-01norm_in1k.py │ ├── efficientnet-l2_8xb32_in1k-475px.py │ ├── efficientnet-l2_8xb8_in1k-800px.py │ └── metafile.yml ├── efficientnet_v2 │ ├── README.md │ ├── efficientnetv2-b0_8xb32_in1k.py │ ├── efficientnetv2-b1_8xb32_in1k.py │ ├── efficientnetv2-b2_8xb32_in1k.py │ ├── efficientnetv2-b3_8xb32_in1k.py │ ├── efficientnetv2-l_8xb32_in1k-480px.py │ ├── efficientnetv2-l_8xb32_in21k.py │ ├── efficientnetv2-m_8xb32_in1k-480px.py │ ├── efficientnetv2-m_8xb32_in21k.py │ ├── efficientnetv2-s_8xb32_in1k-384px.py │ ├── efficientnetv2-s_8xb32_in21k.py │ ├── efficientnetv2-xl_8xb32_in1k-512px.py │ ├── efficientnetv2-xl_8xb32_in21k.py │ └── metafile.yml ├── eva │ ├── README.md │ ├── benchmarks │ │ ├── vit-base-p16_8xb128-coslr-100e_in1k.py │ │ └── vit-base-p16_8xb2048-linear-coslr-100e_in1k.py │ ├── eva-g-p14_8xb16_in1k-336px.py │ ├── eva-g-p14_8xb16_in1k-560px.py │ ├── eva-g-p14_headless.py │ ├── eva-g-p16_headless.py │ ├── eva-l-p14_8xb16_in1k-196px.py │ ├── eva-l-p14_8xb16_in1k-336px.py │ ├── eva-l-p14_headless.py │ ├── eva-mae-style_vit-base-p16_16xb256-coslr-400e_in1k.py │ └── metafile.yml ├── eva02 │ ├── README.md │ ├── eva02-base-p14_headless.py │ ├── eva02-base-p14_in1k.py │ ├── eva02-large-p14_headless.py │ ├── eva02-large-p14_in1k.py │ ├── eva02-small-p14_headless.py │ ├── eva02-small-p14_in1k.py │ ├── eva02-tiny-p14_headless.py │ ├── eva02-tiny-p14_in1k.py │ └── metafile.yml ├── flamingo │ ├── README.md │ ├── flamingo_fewshot_caption.py │ ├── flamingo_fewshot_vqa.py │ ├── flamingo_zeroshot_caption.py │ ├── flamingo_zeroshot_vqa.py │ └── metafile.yml ├── glip │ ├── README.md │ ├── glip-l_headless.py │ ├── glip-t_headless.py │ └── metafile.yml ├── hivit │ ├── README.md │ ├── hivit-base-p16_16xb64_in1k.py │ ├── hivit-small-p16_16xb64_in1k.py │ ├── hivit-tiny-p16_16xb64_in1k.py │ └── metafile.yml ├── hornet │ ├── README.md │ ├── hornet-base-gf_8xb64_in1k.py │ ├── hornet-base_8xb64_in1k.py │ ├── hornet-small-gf_8xb64_in1k.py │ ├── hornet-small_8xb64_in1k.py │ ├── hornet-tiny-gf_8xb128_in1k.py │ ├── hornet-tiny_8xb128_in1k.py │ └── metafile.yml ├── hrnet │ ├── README.md │ ├── hrnet-w18_4xb32_in1k.py │ ├── hrnet-w30_4xb32_in1k.py │ ├── hrnet-w32_4xb32_in1k.py │ ├── hrnet-w40_4xb32_in1k.py │ ├── hrnet-w44_4xb32_in1k.py │ ├── hrnet-w48_4xb32_in1k.py │ ├── hrnet-w64_4xb32_in1k.py │ └── metafile.yml ├── inception_v3 │ ├── README.md │ ├── inception-v3_8xb32_in1k.py │ └── metafile.yml ├── itpn │ ├── README.md │ ├── itpn-clip-b_hivit-base-p16_8xb256-amp-coslr-300e_in1k.py │ ├── itpn-clip-b_hivit-base-p16_8xb256-amp-coslr-800e_in1k.py │ ├── itpn-pixel_hivit-base-p16_8xb512-amp-coslr-1600e_in1k.py │ ├── itpn-pixel_hivit-base-p16_8xb512-amp-coslr-400e_in1k.py │ ├── itpn-pixel_hivit-base-p16_8xb512-amp-coslr-800e_in1k.py │ ├── itpn-pixel_hivit-large-p16_8xb512-amp-coslr-1600e_in1k.py │ ├── itpn-pixel_hivit-large-p16_8xb512-amp-coslr-400e_in1k.py │ ├── itpn-pixel_hivit-large-p16_8xb512-amp-coslr-800e_in1k.py │ └── metafile.yml ├── lenet │ ├── README.md │ └── lenet5_mnist.py ├── levit │ ├── README.md │ ├── deploy │ │ ├── levit-128_8xb256_in1k.py │ │ ├── levit-128s_8xb256_in1k.py │ │ ├── levit-192_8xb256_in1k.py │ │ ├── levit-256_8xb256_in1k.py │ │ └── levit-384_8xb256_in1k.py │ ├── levit-128_8xb256_in1k.py │ ├── levit-128s_8xb256_in1k.py │ ├── levit-192_8xb256_in1k.py │ ├── levit-256_8xb256_in1k.py │ ├── levit-384_8xb256_in1k.py │ └── metafile.yml ├── llava │ ├── README.md │ ├── llava-7b-v1.5_caption.py │ ├── llava-7b-v1.5_vqa.py │ ├── llava-7b-v1_caption.py │ └── metafile.yml ├── mae │ ├── README.md │ ├── benchmarks │ │ ├── vit-base-p16_8xb128-coslr-100e_in1k.py │ │ ├── vit-base-p16_8xb2048-linear-coslr-90e_in1k.py │ │ ├── vit-huge-p14_32xb8-coslr-50e_in1k-448px.py │ │ ├── vit-huge-p14_8xb128-coslr-50e_in1k.py │ │ ├── vit-huge-p14_8xb128-ds-coslr-50e_in1k.py │ │ ├── vit-huge-p14_8xb128-fsdp-coslr-50e_in1k.py │ │ ├── vit-large-p16_8xb128-coslr-50e_in1k.py │ │ ├── vit-large-p16_8xb128-ds-coslr-50e_in1k.py │ │ ├── vit-large-p16_8xb128-fsdp-coslr-50e_in1k.py │ │ └── vit-large-p16_8xb2048-linear-coslr-90e_in1k.py │ ├── mae_hivit-base-p16_8xb512-amp-coslr-1600e_in1k.py │ ├── mae_hivit-base-p16_8xb512-amp-coslr-400e_in1k.py │ ├── mae_hivit-base-p16_8xb512-amp-coslr-800e_in1k.py │ ├── mae_hivit-large-p16_8xb512-amp-coslr-1600e_in1k.py │ ├── mae_hivit-large-p16_8xb512-amp-coslr-400e_in1k.py │ ├── mae_hivit-large-p16_8xb512-amp-coslr-800e_in1k.py │ ├── mae_vit-base-p16_8xb512-amp-coslr-1600e_in1k.py │ ├── mae_vit-base-p16_8xb512-amp-coslr-300e_in1k.py │ ├── mae_vit-base-p16_8xb512-amp-coslr-400e_in1k.py │ ├── mae_vit-base-p16_8xb512-amp-coslr-800e_in1k.py │ ├── mae_vit-huge-p14_8xb512-amp-coslr-1600e_in1k.py │ ├── mae_vit-large-p16_8xb512-amp-coslr-1600e_in1k.py │ ├── mae_vit-large-p16_8xb512-amp-coslr-300e_in1k.py │ ├── mae_vit-large-p16_8xb512-amp-coslr-400e_in1k.py │ ├── mae_vit-large-p16_8xb512-amp-coslr-800e_in1k.py │ └── metafile.yml ├── maskfeat │ ├── README.md │ ├── benchmarks │ │ └── vit-base-p16_8xb256-coslr-100e_in1k.py │ ├── maskfeat_vit-base-p16_8xb256-amp-coslr-300e_in1k.py │ └── metafile.yml ├── mff │ ├── README.md │ ├── benchmarks │ │ ├── vit-base-p16_8xb128-coslr-100e_in1k.py │ │ └── vit-base-p16_8xb2048-linear-coslr-90e_in1k.py │ ├── metafile.yml │ ├── mff_vit-base-p16_8xb512-amp-coslr-300e_in1k.py │ └── mff_vit-base-p16_8xb512-amp-coslr-800e_in1k.py ├── milan │ ├── README.md │ ├── benchmarks │ │ ├── vit-base-p16_8xb128-coslr-100e_in1k.py │ │ └── vit-base-p16_8xb2048-linear-coslr-100e_in1k.py │ ├── metafile.yml │ └── milan_vit-base-p16_16xb256-amp-coslr-400e_in1k.py ├── minigpt4 │ ├── README.md │ ├── metafile.yml │ ├── minigpt-4_baichuan-7b_caption.py │ └── minigpt-4_vicuna-7b_caption.py ├── mixmim │ ├── README.md │ ├── benchmarks │ │ ├── mixmim-base_8xb128-coslr-100e_in1k.py │ │ └── mixmim-base_8xb64_in1k.py │ ├── metafile.yml │ └── mixmim_mixmim-base_16xb128-coslr-300e_in1k.py ├── mlp_mixer │ ├── README.md │ ├── metafile.yml │ ├── mlp-mixer-base-p16_64xb64_in1k.py │ └── mlp-mixer-large-p16_64xb64_in1k.py ├── mobilenet_v2 │ ├── README.md │ ├── metafile.yml │ └── mobilenet-v2_8xb32_in1k.py ├── mobilenet_v3 │ ├── README.md │ ├── metafile.yml │ ├── mobilenet-v3-large_8xb128_in1k.py │ ├── mobilenet-v3-small-050_8xb128_in1k.py │ ├── mobilenet-v3-small-075_8xb128_in1k.py │ ├── mobilenet-v3-small_8xb128_in1k.py │ └── mobilenet-v3-small_8xb16_cifar10.py ├── mobileone │ ├── README.md │ ├── deploy │ │ ├── mobileone-s0_deploy_8xb32_in1k.py │ │ ├── mobileone-s1_deploy_8xb32_in1k.py │ │ ├── mobileone-s2_deploy_8xb32_in1k.py │ │ ├── mobileone-s3_deploy_8xb32_in1k.py │ │ └── mobileone-s4_deploy_8xb32_in1k.py │ ├── metafile.yml │ ├── mobileone-s0_8xb32_in1k.py │ ├── mobileone-s1_8xb32_in1k.py │ ├── mobileone-s2_8xb32_in1k.py │ ├── mobileone-s3_8xb32_in1k.py │ └── mobileone-s4_8xb32_in1k.py ├── mobilevit │ ├── README.md │ ├── metafile.yml │ ├── mobilevit-small_8xb128_in1k.py │ ├── mobilevit-xsmall_8xb128_in1k.py │ └── mobilevit-xxsmall_8xb128_in1k.py ├── mocov2 │ ├── README.md │ ├── benchmarks │ │ └── resnet50_8xb32-linear-steplr-100e_in1k.py │ ├── metafile.yml │ └── mocov2_resnet50_8xb32-coslr-200e_in1k.py ├── mocov3 │ ├── README.md │ ├── benchmarks │ │ ├── resnet50_8xb128-linear-coslr-90e_in1k.py │ │ ├── vit-base-p16_8xb128-linear-coslr-90e_in1k.py │ │ ├── vit-base-p16_8xb64-coslr-150e_in1k.py │ │ ├── vit-large-p16_8xb64-coslr-100e_in1k.py │ │ └── vit-small-p16_8xb128-linear-coslr-90e_in1k.py │ ├── metafile.yml │ ├── mocov3_resnet50_8xb512-amp-coslr-100e_in1k.py │ ├── mocov3_resnet50_8xb512-amp-coslr-300e_in1k.py │ ├── mocov3_resnet50_8xb512-amp-coslr-800e_in1k.py │ ├── mocov3_vit-base-p16_16xb256-amp-coslr-300e_in1k.py │ ├── mocov3_vit-large-p16_64xb64-amp-coslr-300e_in1k.py │ └── mocov3_vit-small-p16_16xb256-amp-coslr-300e_in1k.py ├── mvit │ ├── README.md │ ├── metafile.yml │ ├── mvitv2-base_8xb256_in1k.py │ ├── mvitv2-large_8xb256_in1k.py │ ├── mvitv2-small_8xb256_in1k.py │ └── mvitv2-tiny_8xb256_in1k.py ├── ofa │ ├── README.md │ ├── metafile.yml │ ├── ofa-base_finetuned_caption.py │ ├── ofa-base_finetuned_refcoco.py │ ├── ofa-base_finetuned_vqa.py │ ├── ofa-base_zeroshot_vqa.py │ └── ofa-large_zeroshot_vqa.py ├── otter │ ├── README.md │ ├── metafile.yml │ ├── otter-9b_caption.py │ └── otter-9b_vqa.py ├── poolformer │ ├── README.md │ ├── metafile.yml │ ├── poolformer-m36_32xb128_in1k.py │ ├── poolformer-m48_32xb128_in1k.py │ ├── poolformer-s12_32xb128_in1k.py │ ├── poolformer-s24_32xb128_in1k.py │ └── poolformer-s36_32xb128_in1k.py ├── regnet │ ├── README.md │ ├── metafile.yml │ ├── regnetx-1.6gf_8xb128_in1k.py │ ├── regnetx-12gf_8xb64_in1k.py │ ├── regnetx-3.2gf_8xb64_in1k.py │ ├── regnetx-4.0gf_8xb64_in1k.py │ ├── regnetx-400mf_8xb128_in1k.py │ ├── regnetx-6.4gf_8xb64_in1k.py │ ├── regnetx-8.0gf_8xb64_in1k.py │ └── regnetx-800mf_8xb128_in1k.py ├── replknet │ ├── README.md │ ├── deploy │ │ ├── replknet-31B-deploy_32xb64_in1k-384px.py │ │ ├── replknet-31B-deploy_32xb64_in1k.py │ │ ├── replknet-31L-deploy_32xb64_in1k-384px.py │ │ └── replknet-XL-deploy_32xb64_in1k-320px.py │ ├── metafile.yml │ ├── replknet-31B_32xb64_in1k-384px.py │ ├── replknet-31B_32xb64_in1k.py │ ├── replknet-31L_32xb64_in1k-384px.py │ └── replknet-XL_32xb64_in1k-320px.py ├── repmlp │ ├── README.md │ ├── metafile.yml │ ├── repmlp-base_8xb64_in1k-256px.py │ ├── repmlp-base_8xb64_in1k.py │ ├── repmlp-base_delopy_8xb64_in1k.py │ └── repmlp-base_deploy_8xb64_in1k-256px.py ├── repvgg │ ├── README.md │ ├── metafile.yml │ ├── repvgg-A0_8xb32_in1k.py │ ├── repvgg-A0_deploy_in1k.py │ ├── repvgg-A1_8xb32_in1k.py │ ├── repvgg-A2_8xb32_in1k.py │ ├── repvgg-B0_8xb32_in1k.py │ ├── repvgg-B1_8xb32_in1k.py │ ├── repvgg-B1g2_8xb32_in1k.py │ ├── repvgg-B1g4_8xb32_in1k.py │ ├── repvgg-B2_8xb32_in1k.py │ ├── repvgg-B2g4_8xb32_in1k.py │ ├── repvgg-B3_8xb32_in1k.py │ ├── repvgg-B3g4_8xb32_in1k.py │ └── repvgg-D2se_8xb32_in1k.py ├── res2net │ ├── README.md │ ├── metafile.yml │ ├── res2net101-w26-s4_8xb32_in1k.py │ ├── res2net50-w14-s8_8xb32_in1k.py │ └── res2net50-w26-s8_8xb32_in1k.py ├── resnest │ ├── README.md │ ├── _randaug_policies.py │ ├── resnest101_32xb64_in1k.py │ ├── resnest200_64xb32_in1k.py │ ├── resnest269_64xb32_in1k.py │ └── resnest50_32xb64_in1k.py ├── resnet │ ├── README.md │ ├── metafile.yml │ ├── resnet101_8xb16_cifar10.py │ ├── resnet101_8xb32_in1k.py │ ├── resnet152_8xb16_cifar10.py │ ├── resnet152_8xb32_in1k.py │ ├── resnet18_8xb16_cifar10.py │ ├── resnet18_8xb32_in1k.py │ ├── resnet34_8xb16_cifar10.py │ ├── resnet34_8xb32_in1k.py │ ├── resnet50_32xb64-warmup-coslr_in1k.py │ ├── resnet50_32xb64-warmup-lbs_in1k.py │ ├── resnet50_32xb64-warmup_in1k.py │ ├── resnet50_8xb128_coslr-90e_in21k.py │ ├── resnet50_8xb16-mixup_cifar10.py │ ├── resnet50_8xb16_cifar10.py │ ├── resnet50_8xb16_cifar100.py │ ├── resnet50_8xb256-rsb-a1-600e_in1k.py │ ├── resnet50_8xb256-rsb-a2-300e_in1k.py │ ├── resnet50_8xb256-rsb-a3-100e_in1k.py │ ├── resnet50_8xb32-coslr-preciseBN_in1k.py │ ├── resnet50_8xb32-coslr_in1k.py │ ├── resnet50_8xb32-cutmix_in1k.py │ ├── resnet50_8xb32-fp16-dynamic_in1k.py │ ├── resnet50_8xb32-fp16_in1k.py │ ├── resnet50_8xb32-lbs_in1k.py │ ├── resnet50_8xb32-mixup_in1k.py │ ├── resnet50_8xb32_in1k.py │ ├── resnet50_8xb8_cub.py │ ├── resnetv1c101_8xb32_in1k.py │ ├── resnetv1c152_8xb32_in1k.py │ ├── resnetv1c50_8xb32_in1k.py │ ├── resnetv1d101_8xb32_in1k.py │ ├── resnetv1d152_8xb32_in1k.py │ └── resnetv1d50_8xb32_in1k.py ├── resnext │ ├── README.md │ ├── metafile.yml │ ├── resnext101-32x4d_8xb32_in1k.py │ ├── resnext101-32x8d_8xb32_in1k.py │ ├── resnext152-32x4d_8xb32_in1k.py │ └── resnext50-32x4d_8xb32_in1k.py ├── revvit │ ├── README.md │ ├── metafile.yml │ ├── revvit-base_8xb256_in1k.py │ └── revvit-small_8xb256_in1k.py ├── riformer │ ├── README.md │ ├── deploy │ │ ├── riformer-m36-deploy_8xb128_in1k.py │ │ ├── riformer-m36-deploy_8xb64_in1k-384px.py │ │ ├── riformer-m48-deploy_8xb64_in1k-384px.py │ │ ├── riformer-m48-deploy_8xb64_in1k.py │ │ ├── riformer-s12-deploy_8xb128_in1k-384px.py │ │ ├── riformer-s12-deploy_8xb128_in1k.py │ │ ├── riformer-s24-deploy_8xb128_in1k-384px.py │ │ ├── riformer-s24-deploy_8xb128_in1k.py │ │ ├── riformer-s36-deploy_8xb128_in1k.py │ │ └── riformer-s36-deploy_8xb64_in1k-384px.py │ ├── metafile.yml │ ├── riformer-m36_8xb128_in1k.py │ ├── riformer-m36_8xb64_in1k-384px.py │ ├── riformer-m48_8xb64_in1k-384px.py │ ├── riformer-m48_8xb64_in1k.py │ ├── riformer-s12_8xb128_in1k-384px.py │ ├── riformer-s12_8xb128_in1k.py │ ├── riformer-s24_8xb128_in1k-384px.py │ ├── riformer-s24_8xb128_in1k.py │ ├── riformer-s36_8xb128_in1k.py │ └── riformer-s36_8xb64_in1k-384px.py ├── sam │ ├── README.md │ ├── metafile.yml │ ├── vit-base-p16_sam_headless.py │ ├── vit-huge-p16_sam_headless.py │ └── vit-large-p16_sam_headless.py ├── seresnet │ ├── README.md │ ├── metafile.yml │ ├── seresnet101_8xb32_in1k.py │ ├── seresnet50_8xb32_in1k.py │ ├── seresnext101-32x4d_8xb32_in1k.py │ └── seresnext50-32x4d_8xb32_in1k.py ├── shufflenet_v1 │ ├── README.md │ ├── metafile.yml │ └── shufflenet-v1-1x_16xb64_in1k.py ├── shufflenet_v2 │ ├── README.md │ ├── metafile.yml │ └── shufflenet-v2-1x_16xb64_in1k.py ├── simclr │ ├── README.md │ ├── benchmarks │ │ └── resnet50_8xb512-linear-coslr-90e_in1k.py │ ├── metafile.yml │ ├── simclr_resnet50_16xb256-coslr-200e_in1k.py │ ├── simclr_resnet50_16xb256-coslr-800e_in1k.py │ └── simclr_resnet50_8xb32-coslr-200e_in1k.py ├── simmim │ ├── README.md │ ├── benchmarks │ │ ├── swin-base-w6_8xb256-coslr-100e_in1k-192px.py │ │ ├── swin-base-w7_8xb256-coslr-100e_in1k.py │ │ └── swin-large-w14_8xb256-coslr-100e_in1k.py │ ├── metafile.yml │ ├── simmim_swin-base-w6_16xb128-amp-coslr-100e_in1k-192px.py │ ├── simmim_swin-base-w6_16xb128-amp-coslr-800e_in1k-192px.py │ ├── simmim_swin-base-w6_8xb256-amp-coslr-100e_in1k-192px.py │ └── simmim_swin-large-w12_16xb128-amp-coslr-800e_in1k-192px.py ├── simsiam │ ├── README.md │ ├── benchmarks │ │ └── resnet50_8xb512-linear-coslr-90e_in1k.py │ ├── metafile.yml │ ├── simsiam_resnet50_8xb32-coslr-100e_in1k.py │ └── simsiam_resnet50_8xb32-coslr-200e_in1k.py ├── spark │ ├── README.md │ ├── benchmarks │ │ ├── convnextv2-tiny_8xb256-coslr-300e_in1k.py │ │ └── resnet50_8xb256-coslr-300e_in1k.py │ ├── metafile.yml │ ├── spark_sparse-convnext-small_16xb256-amp-coslr-800e_in1k.py │ ├── spark_sparse-convnextv2-tiny_16xb256-amp-coslr-800e_in1k.py │ ├── spark_sparse-resnet50_8xb512-amp-coslr-1600e_in1k.py │ └── spark_sparse-resnet50_8xb512-amp-coslr-800e_in1k.py ├── swav │ ├── README.md │ ├── benchmarks │ │ └── resnet50_8xb512-linear-coslr-90e_in1k.py │ ├── metafile.yml │ └── swav_resnet50_8xb32-mcrop-coslr-200e_in1k-224px-96px.py ├── swin_transformer │ ├── README.md │ ├── metafile.yml │ ├── swin-base_16xb64_in1k-384px.py │ ├── swin-base_16xb64_in1k.py │ ├── swin-large_16xb64_in1k-384px.py │ ├── swin-large_16xb64_in1k.py │ ├── swin-large_8xb8_cub-384px.py │ ├── swin-small_16xb64_in1k.py │ └── swin-tiny_16xb64_in1k.py ├── swin_transformer_v2 │ ├── README.md │ ├── metafile.yml │ ├── swinv2-base-w12_8xb128_in21k-192px.py │ ├── swinv2-base-w16_16xb64_in1k-256px.py │ ├── swinv2-base-w16_in21k-pre_16xb64_in1k-256px.py │ ├── swinv2-base-w24_in21k-pre_16xb64_in1k-384px.py │ ├── swinv2-base-w8_16xb64_in1k-256px.py │ ├── swinv2-large-w12_8xb128_in21k-192px.py │ ├── swinv2-large-w16_in21k-pre_16xb64_in1k-256px.py │ ├── swinv2-large-w24_in21k-pre_16xb64_in1k-384px.py │ ├── swinv2-small-w16_16xb64_in1k-256px.py │ ├── swinv2-small-w8_16xb64_in1k-256px.py │ ├── swinv2-tiny-w16_16xb64_in1k-256px.py │ └── swinv2-tiny-w8_16xb64_in1k-256px.py ├── t2t_vit │ ├── README.md │ ├── metafile.yml │ ├── t2t-vit-t-14_8xb64_in1k.py │ ├── t2t-vit-t-19_8xb64_in1k.py │ └── t2t-vit-t-24_8xb64_in1k.py ├── tinyvit │ ├── README.md │ ├── metafile.yml │ ├── tinyvit-11m-distill_8xb256_in1k.py │ ├── tinyvit-11m_8xb256_in1k.py │ ├── tinyvit-21m-distill_8xb256_in1k-384px.py │ ├── tinyvit-21m-distill_8xb256_in1k-512px.py │ ├── tinyvit-21m-distill_8xb256_in1k.py │ ├── tinyvit-21m_8xb256_in1k.py │ ├── tinyvit-5m-distill_8xb256_in1k.py │ └── tinyvit-5m_8xb256_in1k.py ├── tnt │ ├── README.md │ ├── metafile.yml │ └── tnt-s-p16_16xb64_in1k.py ├── twins │ ├── README.md │ ├── metafile.yml │ ├── twins-pcpvt-base_8xb128_in1k.py │ ├── twins-pcpvt-large_16xb64_in1k.py │ ├── twins-pcpvt-small_8xb128_in1k.py │ ├── twins-svt-base_8xb128_in1k.py │ ├── twins-svt-large_16xb64_in1k.py │ └── twins-svt-small_8xb128_in1k.py ├── van │ ├── README.md │ ├── metafile.yml │ ├── van-base_8xb128_in1k.py │ ├── van-large_8xb128_in1k.py │ ├── van-small_8xb128_in1k.py │ └── van-tiny_8xb128_in1k.py ├── vgg │ ├── README.md │ ├── metafile.yml │ ├── vgg11_8xb32_in1k.py │ ├── vgg11bn_8xb32_in1k.py │ ├── vgg13_8xb32_in1k.py │ ├── vgg13bn_8xb32_in1k.py │ ├── vgg16_8xb16_voc.py │ ├── vgg16_8xb32_in1k.py │ ├── vgg16bn_8xb32_in1k.py │ ├── vgg19_8xb32_in1k.py │ └── vgg19bn_8xb32_in1k.py ├── vig │ ├── README.md │ ├── metafile.yml │ ├── pvig-base_8xb128_in1k.py │ ├── pvig-medium_8xb128_in1k.py │ ├── pvig-small_8xb128_in1k.py │ ├── pvig-tiny_8xb128_in1k.py │ ├── vig-base_8xb128_in1k.py │ ├── vig-small_8xb128_in1k.py │ └── vig-tiny_8xb128_in1k.py ├── vision_transformer │ ├── README.md │ ├── metafile.yml │ ├── vit-base-p16_32xb128-mae_in1k.py │ ├── vit-base-p16_4xb544-ipu_in1k.py │ ├── vit-base-p16_64xb64_in1k-384px.py │ ├── vit-base-p16_64xb64_in1k.py │ ├── vit-base-p16_8xb64-lora_in1k-384px.py │ ├── vit-base-p32_64xb64_in1k-384px.py │ ├── vit-base-p32_64xb64_in1k.py │ ├── vit-large-p16_64xb64_in1k-384px.py │ ├── vit-large-p16_64xb64_in1k.py │ ├── vit-large-p32_64xb64_in1k-384px.py │ └── vit-large-p32_64xb64_in1k.py ├── wrn │ ├── README.md │ ├── metafile.yml │ ├── wide-resnet101_8xb32_in1k.py │ ├── wide-resnet50_8xb32_in1k.py │ └── wide-resnet50_timm_8xb32_in1k.py └── xcit │ ├── README.md │ ├── metafile.yml │ ├── xcit-large-24-p16_8xb128_in1k-384px.py │ ├── xcit-large-24-p16_8xb128_in1k.py │ ├── xcit-large-24-p8_8xb128_in1k-384px.py │ ├── xcit-large-24-p8_8xb128_in1k.py │ ├── xcit-medium-24-p16_8xb128_in1k-384px.py │ ├── xcit-medium-24-p16_8xb128_in1k.py │ ├── xcit-medium-24-p8_8xb128_in1k-384px.py │ ├── xcit-medium-24-p8_8xb128_in1k.py │ ├── xcit-nano-12-p16_8xb128_in1k-384px.py │ ├── xcit-nano-12-p16_8xb128_in1k.py │ ├── xcit-nano-12-p8_8xb128_in1k-384px.py │ ├── xcit-nano-12-p8_8xb128_in1k.py │ ├── xcit-small-12-p16_8xb128_in1k-384px.py │ ├── xcit-small-12-p16_8xb128_in1k.py │ ├── xcit-small-12-p8_8xb128_in1k-384px.py │ ├── xcit-small-12-p8_8xb128_in1k.py │ ├── xcit-small-24-p16_8xb128_in1k-384px.py │ ├── xcit-small-24-p16_8xb128_in1k.py │ ├── xcit-small-24-p8_8xb128_in1k-384px.py │ ├── xcit-small-24-p8_8xb128_in1k.py │ ├── xcit-tiny-12-p16_8xb128_in1k-384px.py │ ├── xcit-tiny-12-p16_8xb128_in1k.py │ ├── xcit-tiny-12-p8_8xb128_in1k-384px.py │ ├── xcit-tiny-12-p8_8xb128_in1k.py │ ├── xcit-tiny-24-p16_8xb128_in1k-384px.py │ ├── xcit-tiny-24-p16_8xb128_in1k.py │ ├── xcit-tiny-24-p8_8xb128_in1k-384px.py │ └── xcit-tiny-24-p8_8xb128_in1k.py ├── dataset-index.yml ├── demo ├── bird.JPEG ├── cat-dog.png ├── demo.JPEG ├── dog.jpg ├── image_demo.py └── ipu_train_example.sh ├── docker ├── Dockerfile └── serve │ ├── Dockerfile │ ├── config.properties │ └── entrypoint.sh ├── docs ├── en │ ├── Makefile │ ├── _static │ │ ├── css │ │ │ └── readthedocs.css │ │ ├── image │ │ │ ├── confusion-matrix.png │ │ │ ├── mmpt-logo.png │ │ │ └── tools │ │ │ │ └── analysis │ │ │ │ └── analyze_log.jpg │ │ └── js │ │ │ └── custom.js │ ├── _templates │ │ ├── 404.html │ │ ├── autosummary │ │ │ └── class.rst │ │ ├── callable.rst │ │ └── data_transform.rst │ ├── advanced_guides │ │ ├── convention.md │ │ ├── datasets.md │ │ ├── evaluation.md │ │ ├── modules.md │ │ ├── pipeline.md │ │ ├── runtime.md │ │ └── schedule.md │ ├── api │ │ ├── apis.rst │ │ ├── data_process.rst │ │ ├── datasets.rst │ │ ├── engine.rst │ │ ├── evaluation.rst │ │ ├── models.rst │ │ ├── structures.rst │ │ ├── utils.rst │ │ └── visualization.rst │ ├── conf.py │ ├── device │ │ └── npu.md │ ├── docutils.conf │ ├── get_started.md │ ├── index.rst │ ├── migration.md │ ├── notes │ │ ├── changelog.md │ │ ├── contribution_guide.md │ │ ├── faq.md │ │ ├── finetune_custom_dataset.md │ │ ├── pretrain_custom_dataset.md │ │ └── projects.md │ ├── stat.py │ ├── useful_tools │ │ ├── cam_visualization.md │ │ ├── complexity_analysis.md │ │ ├── confusion_matrix.md │ │ ├── dataset_visualization.md │ │ ├── log_result_analysis.md │ │ ├── model_serving.md │ │ ├── print_config.md │ │ ├── scheduler_visualization.md │ │ ├── shape_bias.md │ │ ├── t-sne_visualization.md │ │ └── verify_dataset.md │ └── user_guides │ │ ├── config.md │ │ ├── dataset_prepare.md │ │ ├── downstream.md │ │ ├── inference.md │ │ ├── test.md │ │ └── train.md └── zh_CN │ ├── Makefile │ ├── _static │ ├── css │ │ └── readthedocs.css │ ├── image │ │ ├── confusion-matrix.png │ │ ├── mmpt-logo.png │ │ └── tools │ │ │ └── analysis │ │ │ └── analyze_log.jpg │ └── js │ │ └── custom.js │ ├── _templates │ ├── 404.html │ ├── autosummary │ │ └── class.rst │ ├── callable.rst │ └── data_transform.rst │ ├── advanced_guides │ ├── convention.md │ ├── datasets.md │ ├── evaluation.md │ ├── modules.md │ ├── pipeline.md │ ├── runtime.md │ └── schedule.md │ ├── api │ ├── conf.py │ ├── device │ └── npu.md │ ├── docutils.conf │ ├── get_started.md │ ├── index.rst │ ├── locales │ └── zh_CN │ │ └── LC_MESSAGES │ │ ├── api.po │ │ └── papers.po │ ├── migration.md │ ├── notes │ ├── changelog.md │ ├── contribution_guide.md │ ├── faq.md │ ├── finetune_custom_dataset.md │ ├── pretrain_custom_dataset.md │ └── projects.md │ ├── stat.py │ ├── useful_tools │ ├── cam_visualization.md │ ├── complexity_analysis.md │ ├── confusion_matrix.md │ ├── dataset_visualization.md │ ├── log_result_analysis.md │ ├── model_serving.md │ ├── print_config.md │ ├── scheduler_visualization.md │ ├── shape_bias.md │ ├── t-sne_visualization.md │ └── verify_dataset.md │ └── user_guides │ ├── config.md │ ├── dataset_prepare.md │ ├── downstream.md │ ├── inference.md │ ├── test.md │ └── train.md ├── mmpretrain ├── __init__.py ├── apis │ ├── __init__.py │ ├── base.py │ ├── feature_extractor.py │ ├── image_caption.py │ ├── image_classification.py │ ├── image_retrieval.py │ ├── model.py │ ├── multimodal_retrieval.py │ ├── nlvr.py │ ├── utils.py │ ├── visual_grounding.py │ └── visual_question_answering.py ├── configs │ ├── _base_ │ │ ├── datasets │ │ │ ├── cifar10_bs16.py │ │ │ ├── cub_bs8_384.py │ │ │ ├── imagenet21k_bs128.py │ │ │ ├── imagenet_bs128_mbv3.py │ │ │ ├── imagenet_bs256_beitv2.py │ │ │ ├── imagenet_bs32.py │ │ │ ├── imagenet_bs32_pil_resize.py │ │ │ ├── imagenet_bs32_simclr.py │ │ │ ├── imagenet_bs512_mae.py │ │ │ ├── imagenet_bs64_pil_resize.py │ │ │ ├── imagenet_bs64_pil_resize_autoaug.py │ │ │ ├── imagenet_bs64_swin_224.py │ │ │ ├── imagenet_bs64_swin_256.py │ │ │ └── imagenet_bs64_swin_384.py │ │ ├── default_runtime.py │ │ ├── models │ │ │ ├── convnext_base.py │ │ │ ├── mae_hivit_base_p16.py │ │ │ ├── mae_vit_base_p16.py │ │ │ ├── mobilenet_v2_1x.py │ │ │ ├── mobilenet_v3_small.py │ │ │ ├── resnet18.py │ │ │ ├── swin_transformer_base.py │ │ │ ├── swin_transformer_v2_base.py │ │ │ └── vit_base_p16.py │ │ └── schedules │ │ │ ├── cifar10_bs128.py │ │ │ ├── cub_bs64.py │ │ │ ├── imagenet_bs1024_adamw_swin.py │ │ │ ├── imagenet_bs256.py │ │ │ ├── imagenet_bs256_epochstep.py │ │ │ ├── imagenet_bs4096_adamw.py │ │ │ └── imagenet_lars_coslr_200e.py │ ├── beit │ │ ├── beit_beit_base_p16_8xb256_amp_coslr_300e_in1k.py │ │ └── benchmarks │ │ │ ├── beit-base-p16_8xb128-coslr-100e_in1k.py │ │ │ └── beit-base-p16_8xb64_in1k.py │ ├── beitv2 │ │ ├── beitv2_beit-base-p16_8xb256-amp-coslr-1600e_in1k.py │ │ ├── beitv2_beit-base-p16_8xb256-amp-coslr-300e_in1k.py │ │ └── benchmarks │ │ │ ├── beit-base-p16_8xb128-coslr-100e_in1k.py │ │ │ └── beit-base-p16_8xb64_in1k.py │ ├── convnext │ │ ├── convnext-base_32xb128_in1k.py │ │ ├── convnext-base_32xb128_in21k.py │ │ ├── convnext-large_64xb64_in1k-384px.py │ │ ├── convnext-large_64xb64_in1k.py │ │ ├── convnext-large_64xb64_in21k.py │ │ ├── convnext-small_32xb128_in1k-384px.py │ │ ├── convnext-small_32xb128_in1k.py │ │ ├── convnext-tiny_32xb128_in1k-384px.py │ │ ├── convnext-tiny_32xb128_in1k.py │ │ ├── convnext-xlarge_64xb64_in1k-384px.py │ │ ├── convnext-xlarge_64xb64_in1k.py │ │ ├── convnext-xlarge_64xb64_in21k.py │ │ └── convnext_base_32xb128_in1k_384px.py │ ├── eva │ │ └── eva_mae_style_vit_base_p16_16xb256_coslr_400e_in1k.py │ ├── mae │ │ ├── mae_hivit_base_p16_8xb512_amp_coslr_1600e_in1k.py │ │ ├── mae_hivit_base_p16_8xb512_amp_coslr_400e_in1k.py │ │ ├── mae_hivit_base_p16_8xb512_amp_coslr_800e_in1k.py │ │ ├── mae_hivit_large_p16_8xb512_amp_coslr_1600e_in1k.py │ │ ├── mae_hivit_large_p16_8xb512_amp_coslr_400e_in1k.py │ │ ├── mae_hivit_large_p16_8xb512_amp_coslr_800e_in1k.py │ │ ├── mae_vit_base_p16_8xb512_amp_coslr_1600e_in1k.py │ │ ├── mae_vit_base_p16_8xb512_amp_coslr_300e_in1k.py │ │ ├── mae_vit_base_p16_8xb512_amp_coslr_400e_in1k.py │ │ ├── mae_vit_base_p16_8xb512_amp_coslr_800e_in1k.py │ │ ├── mae_vit_huge_p14_8xb512_amp_coslr_1600e_in1k.py │ │ ├── mae_vit_large_p16_8xb512_amp_coslr_1600e_in1k.py │ │ ├── mae_vit_large_p16_8xb512_amp_coslr_300e_in1k.py │ │ ├── mae_vit_large_p16_8xb512_amp_coslr_400e_in1k.py │ │ └── mae_vit_large_p16_8xb512_amp_coslr_800e_in1k.py │ ├── mobilenet_v2 │ │ └── mobilenet_v2_8xb32_in1k.py │ ├── mobilenet_v3 │ │ ├── mobilenet_v3_large_8xb128_in1k.py │ │ ├── mobilenet_v3_small_050_8xb128_in1k.py │ │ ├── mobilenet_v3_small_075_8xb128_in1k.py │ │ ├── mobilenet_v3_small_8xb128_in1k.py │ │ └── mobilenet_v3_small_8xb16_cifar10.py │ ├── resnet │ │ └── resnet18_8xb32_in1k.py │ ├── simclr │ │ └── simclr_resnet50_16xb256_coslr_200e_in1k.py │ ├── swin_transformer │ │ ├── swin_base_16xb64_in1k.py │ │ ├── swin_base_16xb64_in1k_384px.py │ │ ├── swin_large_16xb64_in1k.py │ │ ├── swin_large_16xb64_in1k_384px.py │ │ ├── swin_large_8xb8_cub_384px.py │ │ ├── swin_small_16xb64_in1k.py │ │ └── swin_tiny_16xb64_in1k.py │ ├── swin_transformer_v2 │ │ ├── swinv2_base_w12_8xb128_in21k_192px.py │ │ ├── swinv2_base_w16_16xb64_in1k_256px.py │ │ ├── swinv2_base_w16_in21k_pre_16xb64_in1k_256px.py │ │ ├── swinv2_base_w24_in21k_pre_16xb64_in1k_384px.py │ │ ├── swinv2_base_w8_16xb64_in1k_256px.py │ │ ├── swinv2_large_w12_8xb128_in21k_192px.py │ │ ├── swinv2_large_w16_in21k_pre_16xb64_in1k_256px.py │ │ ├── swinv2_large_w24_in21k_pre_16xb64_in1k_384px.py │ │ ├── swinv2_small_w16_16xb64_in1k_256px.py │ │ ├── swinv2_small_w8_16xb64_in1k_256px.py │ │ ├── swinv2_tiny_w16_16xb64_in1k_256px.py │ │ └── swinv2_tiny_w8_16xb64_in1k_256px.py │ └── vision_transformer │ │ ├── vit_base_p16_32xb128_mae_in1k.py │ │ ├── vit_base_p16_64xb64_in1k.py │ │ ├── vit_base_p16_64xb64_in1k_384px.py │ │ ├── vit_base_p32_64xb64_in1k.py │ │ ├── vit_base_p32_64xb64_in1k_384px.py │ │ ├── vit_large_p16_64xb64_in1k.py │ │ ├── vit_large_p16_64xb64_in1k_384px.py │ │ ├── vit_large_p32_64xb64_in1k.py │ │ └── vit_large_p32_64xb64_in1k_384px.py ├── datasets │ ├── __init__.py │ ├── base_dataset.py │ ├── builder.py │ ├── caltech101.py │ ├── categories.py │ ├── cifar.py │ ├── coco_caption.py │ ├── coco_retrieval.py │ ├── coco_vqa.py │ ├── cub.py │ ├── custom.py │ ├── dataset_wrappers.py │ ├── dtd.py │ ├── fgvcaircraft.py │ ├── flamingo.py │ ├── flickr30k_caption.py │ ├── flickr30k_retrieval.py │ ├── flowers102.py │ ├── food101.py │ ├── gqa_dataset.py │ ├── iconqa.py │ ├── imagenet.py │ ├── infographic_vqa.py │ ├── inshop.py │ ├── minigpt4_dataset.py │ ├── mnist.py │ ├── multi_label.py │ ├── multi_task.py │ ├── nlvr2.py │ ├── nocaps.py │ ├── ocr_vqa.py │ ├── oxfordiiitpet.py │ ├── places205.py │ ├── refcoco.py │ ├── samplers │ │ ├── __init__.py │ │ ├── repeat_aug.py │ │ └── sequential.py │ ├── scienceqa.py │ ├── stanfordcars.py │ ├── sun397.py │ ├── textvqa.py │ ├── transforms │ │ ├── __init__.py │ │ ├── auto_augment.py │ │ ├── formatting.py │ │ ├── processing.py │ │ ├── utils.py │ │ └── wrappers.py │ ├── utils.py │ ├── vg_vqa.py │ ├── visual_genome.py │ ├── vizwiz.py │ ├── voc.py │ └── vsr.py ├── engine │ ├── __init__.py │ ├── hooks │ │ ├── __init__.py │ │ ├── class_num_check_hook.py │ │ ├── densecl_hook.py │ │ ├── ema_hook.py │ │ ├── margin_head_hooks.py │ │ ├── precise_bn_hook.py │ │ ├── retriever_hooks.py │ │ ├── simsiam_hook.py │ │ ├── swav_hook.py │ │ ├── switch_recipe_hook.py │ │ ├── visualization_hook.py │ │ └── warmup_param_hook.py │ ├── optimizers │ │ ├── __init__.py │ │ ├── adan_t.py │ │ ├── lamb.py │ │ ├── lars.py │ │ └── layer_decay_optim_wrapper_constructor.py │ ├── runners │ │ ├── __init__.py │ │ └── retrieval_loop.py │ └── schedulers │ │ ├── __init__.py │ │ └── weight_decay_scheduler.py ├── evaluation │ ├── __init__.py │ ├── functional │ │ └── __init__.py │ └── metrics │ │ ├── ANLS.py │ │ ├── __init__.py │ │ ├── caption.py │ │ ├── gqa.py │ │ ├── multi_label.py │ │ ├── multi_task.py │ │ ├── nocaps.py │ │ ├── retrieval.py │ │ ├── scienceqa.py │ │ ├── shape_bias_label.py │ │ ├── single_label.py │ │ ├── visual_grounding_eval.py │ │ ├── voc_multi_label.py │ │ └── vqa.py ├── models │ ├── __init__.py │ ├── backbones │ │ ├── __init__.py │ │ ├── alexnet.py │ │ ├── base_backbone.py │ │ ├── beit.py │ │ ├── conformer.py │ │ ├── convmixer.py │ │ ├── convnext.py │ │ ├── cspnet.py │ │ ├── davit.py │ │ ├── deit.py │ │ ├── deit3.py │ │ ├── densenet.py │ │ ├── edgenext.py │ │ ├── efficientformer.py │ │ ├── efficientnet.py │ │ ├── efficientnet_v2.py │ │ ├── hivit.py │ │ ├── hornet.py │ │ ├── hrnet.py │ │ ├── inception_v3.py │ │ ├── lenet.py │ │ ├── levit.py │ │ ├── mixmim.py │ │ ├── mlp_mixer.py │ │ ├── mobilenet_v2.py │ │ ├── mobilenet_v3.py │ │ ├── mobileone.py │ │ ├── mobilevit.py │ │ ├── mvit.py │ │ ├── poolformer.py │ │ ├── regnet.py │ │ ├── replknet.py │ │ ├── repmlp.py │ │ ├── repvgg.py │ │ ├── res2net.py │ │ ├── resnest.py │ │ ├── resnet.py │ │ ├── resnet_cifar.py │ │ ├── resnext.py │ │ ├── revvit.py │ │ ├── riformer.py │ │ ├── seresnet.py │ │ ├── seresnext.py │ │ ├── shufflenet_v1.py │ │ ├── shufflenet_v2.py │ │ ├── sparse_convnext.py │ │ ├── sparse_resnet.py │ │ ├── swin_transformer.py │ │ ├── swin_transformer_v2.py │ │ ├── t2t_vit.py │ │ ├── timm_backbone.py │ │ ├── tinyvit.py │ │ ├── tnt.py │ │ ├── twins.py │ │ ├── van.py │ │ ├── vgg.py │ │ ├── vig.py │ │ ├── vision_transformer.py │ │ ├── vit_eva02.py │ │ ├── vit_sam.py │ │ └── xcit.py │ ├── builder.py │ ├── classifiers │ │ ├── __init__.py │ │ ├── base.py │ │ ├── hugging_face.py │ │ ├── image.py │ │ └── timm.py │ ├── heads │ │ ├── __init__.py │ │ ├── beitv1_head.py │ │ ├── beitv2_head.py │ │ ├── cae_head.py │ │ ├── cls_head.py │ │ ├── conformer_head.py │ │ ├── contrastive_head.py │ │ ├── deit_head.py │ │ ├── efficientformer_head.py │ │ ├── grounding_head.py │ │ ├── itc_head.py │ │ ├── itm_head.py │ │ ├── itpn_clip_head.py │ │ ├── latent_heads.py │ │ ├── levit_head.py │ │ ├── linear_head.py │ │ ├── mae_head.py │ │ ├── margin_head.py │ │ ├── mim_head.py │ │ ├── mixmim_head.py │ │ ├── mocov3_head.py │ │ ├── multi_label_cls_head.py │ │ ├── multi_label_csra_head.py │ │ ├── multi_label_linear_head.py │ │ ├── multi_task_head.py │ │ ├── seq_gen_head.py │ │ ├── simmim_head.py │ │ ├── spark_head.py │ │ ├── stacked_head.py │ │ ├── swav_head.py │ │ ├── vig_head.py │ │ ├── vision_transformer_head.py │ │ └── vqa_head.py │ ├── losses │ │ ├── __init__.py │ │ ├── asymmetric_loss.py │ │ ├── cae_loss.py │ │ ├── cosine_similarity_loss.py │ │ ├── cross_correlation_loss.py │ │ ├── cross_entropy_loss.py │ │ ├── focal_loss.py │ │ ├── label_smooth_loss.py │ │ ├── reconstruction_loss.py │ │ ├── seesaw_loss.py │ │ ├── swav_loss.py │ │ └── utils.py │ ├── multimodal │ │ ├── __init__.py │ │ ├── blip │ │ │ ├── __init__.py │ │ │ ├── blip_caption.py │ │ │ ├── blip_grounding.py │ │ │ ├── blip_nlvr.py │ │ │ ├── blip_retrieval.py │ │ │ ├── blip_vqa.py │ │ │ └── language_model.py │ │ ├── blip2 │ │ │ ├── Qformer.py │ │ │ ├── __init__.py │ │ │ ├── blip2_caption.py │ │ │ ├── blip2_opt_vqa.py │ │ │ ├── blip2_retriever.py │ │ │ └── modeling_opt.py │ │ ├── chinese_clip │ │ │ ├── __init__.py │ │ │ ├── bert.py │ │ │ ├── chinese_clip.py │ │ │ └── utils.py │ │ ├── clip │ │ │ ├── __init__.py │ │ │ ├── clip.py │ │ │ ├── clip_transformer.py │ │ │ └── utils.py │ │ ├── flamingo │ │ │ ├── __init__.py │ │ │ ├── adapter.py │ │ │ ├── flamingo.py │ │ │ ├── modules.py │ │ │ └── utils.py │ │ ├── llava │ │ │ ├── __init__.py │ │ │ ├── llava.py │ │ │ └── modules.py │ │ ├── minigpt4 │ │ │ ├── __init__.py │ │ │ └── minigpt4.py │ │ ├── ofa │ │ │ ├── __init__.py │ │ │ ├── ofa.py │ │ │ └── ofa_modules.py │ │ ├── otter │ │ │ ├── __init__.py │ │ │ └── otter.py │ │ └── ram │ │ │ ├── __init__.py │ │ │ ├── bert.py │ │ │ ├── config │ │ │ ├── __init__.py │ │ │ └── ram_swin_large_14m.py │ │ │ ├── data │ │ │ ├── ram_tag_list.pickle │ │ │ ├── ram_tag_list_chinese.pickle │ │ │ └── ram_tag_list_threshold.pickle │ │ │ ├── gradio_demo.py │ │ │ ├── openset_utils.py │ │ │ ├── ram.py │ │ │ ├── run │ │ │ ├── __init__.py │ │ │ └── inference.py │ │ │ └── utils.py │ ├── necks │ │ ├── __init__.py │ │ ├── beitv2_neck.py │ │ ├── cae_neck.py │ │ ├── densecl_neck.py │ │ ├── gap.py │ │ ├── gem.py │ │ ├── hr_fuse.py │ │ ├── itpn_neck.py │ │ ├── linear_neck.py │ │ ├── mae_neck.py │ │ ├── milan_neck.py │ │ ├── mixmim_neck.py │ │ ├── mocov2_neck.py │ │ ├── nonlinear_neck.py │ │ ├── simmim_neck.py │ │ ├── spark_neck.py │ │ └── swav_neck.py │ ├── peft │ │ ├── __init__.py │ │ └── lora.py │ ├── retrievers │ │ ├── __init__.py │ │ ├── base.py │ │ └── image2image.py │ ├── selfsup │ │ ├── __init__.py │ │ ├── barlowtwins.py │ │ ├── base.py │ │ ├── beit.py │ │ ├── byol.py │ │ ├── cae.py │ │ ├── densecl.py │ │ ├── eva.py │ │ ├── itpn.py │ │ ├── mae.py │ │ ├── maskfeat.py │ │ ├── mff.py │ │ ├── milan.py │ │ ├── mixmim.py │ │ ├── moco.py │ │ ├── mocov3.py │ │ ├── simclr.py │ │ ├── simmim.py │ │ ├── simsiam.py │ │ ├── spark.py │ │ └── swav.py │ ├── tta │ │ ├── __init__.py │ │ └── score_tta.py │ └── utils │ │ ├── __init__.py │ │ ├── attention.py │ │ ├── batch_augments │ │ ├── __init__.py │ │ ├── cutmix.py │ │ ├── mixup.py │ │ ├── resizemix.py │ │ └── wrapper.py │ │ ├── batch_shuffle.py │ │ ├── box_utils.py │ │ ├── channel_shuffle.py │ │ ├── clip_generator_helper.py │ │ ├── data_preprocessor.py │ │ ├── ema.py │ │ ├── embed.py │ │ ├── helpers.py │ │ ├── huggingface.py │ │ ├── inverted_residual.py │ │ ├── layer_scale.py │ │ ├── make_divisible.py │ │ ├── norm.py │ │ ├── position_encoding.py │ │ ├── res_layer_extra_norm.py │ │ ├── se_layer.py │ │ ├── sparse_modules.py │ │ ├── swiglu_ffn.py │ │ ├── tokenizer.py │ │ └── vector_quantizer.py ├── registry.py ├── structures │ ├── __init__.py │ ├── data_sample.py │ ├── multi_task_data_sample.py │ └── utils.py ├── utils │ ├── __init__.py │ ├── analyze.py │ ├── collect_env.py │ ├── dependency.py │ ├── misc.py │ ├── progress.py │ └── setup_env.py ├── version.py └── visualization │ ├── __init__.py │ ├── utils.py │ └── visualizer.py ├── model-index.yml ├── projects ├── README.md ├── dino │ ├── README.md │ ├── config │ │ └── dino_vit-base-p16_8xb64-amp-coslr-100e_in1k.py │ ├── dataset │ │ ├── __init__.py │ │ └── transform │ │ │ ├── __init__.py │ │ │ └── processing.py │ ├── engine │ │ ├── __init__.py │ │ └── hooks │ │ │ ├── __init__.py │ │ │ └── dino_teacher_temp_warmup_hook.py │ ├── models │ │ ├── __init__.py │ │ ├── algorithm │ │ │ ├── __init__.py │ │ │ └── dino.py │ │ ├── head │ │ │ ├── __init__.py │ │ │ └── dino_head.py │ │ └── neck │ │ │ ├── __init__.py │ │ │ └── dino_neck.py │ └── tools │ │ ├── dist_train.sh │ │ ├── slurm_train.sh │ │ └── train.py ├── example_project │ ├── README.md │ ├── configs │ │ └── examplenet_8xb32_in1k.py │ └── models │ │ ├── __init__.py │ │ └── example_net.py ├── fgia_accv2022_1st │ ├── README.md │ └── config │ │ └── mae_vit-large-p16_8xb512-amp-coslr-1600e_in1k.py ├── gradio_demo │ ├── README.md │ ├── conversation.py │ ├── launch.py │ └── minigpt4_demo.py ├── internimage_classification │ ├── README.md │ ├── configs │ │ ├── _base_.py │ │ ├── internimage-base_8xb128_in1k-224.py │ │ ├── internimage-giant_8xb128_in1k-512.py │ │ ├── internimage-huge_8xb128_in1k-640.py │ │ ├── internimage-large_8xb128_in1k-384.py │ │ ├── internimage-small_8xb128_in1k-224.py │ │ ├── internimage-tiny_8xb128_in1k-224.py │ │ └── internimage-xlagre_8xb128_in1k-384.py │ ├── models │ │ ├── __init__.py │ │ └── intern_image.py │ └── ops_dcnv3 │ │ ├── functions │ │ ├── __init__.py │ │ └── dcnv3_func.py │ │ ├── make.sh │ │ ├── modules │ │ ├── __init__.py │ │ └── dcnv3.py │ │ ├── setup.py │ │ ├── src │ │ ├── cpu │ │ │ ├── dcnv3_cpu.cpp │ │ │ └── dcnv3_cpu.h │ │ ├── cuda │ │ │ ├── dcnv3_cuda.cu │ │ │ ├── dcnv3_cuda.h │ │ │ └── dcnv3_im2col_cuda.cuh │ │ ├── dcnv3.h │ │ └── vision.cpp │ │ └── test.py └── maskfeat_video │ ├── README.md │ ├── configs │ ├── maskfeat_mvit-small_16xb32-amp-coslr-300e_k400.py │ ├── maskfeat_mvit-small_8xb32-amp-coslr-300e_k400.py │ └── mvit-small_ft-8xb16-coslr-100e_k400.py │ ├── models │ ├── __init__.py │ ├── hog_generator_3d.py │ ├── maskfeat.py │ ├── maskfeat_mvit.py │ └── transforms.py │ └── tools │ ├── dist_train.sh │ ├── slurm_train.sh │ └── train.py ├── requirements.txt ├── requirements ├── docs.txt ├── mminstall.txt ├── multimodal.txt ├── optional.txt ├── readthedocs.txt ├── runtime.txt └── tests.txt ├── resources ├── miaomiao_qrcode.jpg ├── mmpt-logo.png ├── xiaozhushou_weixin_qrcode.jpeg └── zhihu_qrcode.jpg ├── setup.cfg ├── setup.py ├── tests ├── __init__.py ├── data │ ├── color.jpg │ ├── dataset │ │ ├── 3.jpeg │ │ ├── a │ │ │ └── 1.JPG │ │ ├── ann.json │ │ ├── ann.txt │ │ ├── ann_without_labels.txt │ │ ├── b │ │ │ ├── 2.jpeg │ │ │ └── subb │ │ │ │ └── 3.jpg │ │ ├── classes.txt │ │ ├── multi-task.json │ │ └── multi_label_ann.json │ ├── gray.jpg │ ├── meta.yml │ ├── retinanet.py │ └── vis_data.json ├── test_apis │ ├── test_inference.py │ └── test_model.py ├── test_datasets │ ├── test_dataset_utils.py │ ├── test_datasets.py │ ├── test_samplers │ │ └── test_repeat_aug.py │ └── test_transforms │ │ ├── test_auto_augment.py │ │ ├── test_formatting.py │ │ ├── test_processing.py │ │ └── test_wrappers.py ├── test_engine │ ├── test_hooks │ │ ├── test_arcface_hooks.py │ │ ├── test_class_num_check_hook.py │ │ ├── test_densecl_hook.py │ │ ├── test_ema_hook.py │ │ ├── test_precise_bn_hook.py │ │ ├── test_retrievers_hooks.py │ │ ├── test_simsiam_hook.py │ │ ├── test_swav_hook.py │ │ ├── test_switch_recipe_hook.py │ │ └── test_visualization_hook.py │ └── test_optimizers │ │ └── test_layer_decay_optim_wrapper_constructor.py ├── test_evaluation │ └── test_metrics │ │ ├── test_gqa.py │ │ ├── test_metric_utils.py │ │ ├── test_multi_label.py │ │ ├── test_multi_task_metrics.py │ │ ├── test_retrieval.py │ │ ├── test_scienceqa.py │ │ ├── test_shape_bias_metric.py │ │ ├── test_single_label.py │ │ └── test_voc_metrics.py ├── test_models │ ├── test_backbones │ │ ├── __init__.py │ │ ├── test_beit.py │ │ ├── test_conformer.py │ │ ├── test_convmixer.py │ │ ├── test_convnext.py │ │ ├── test_cspnet.py │ │ ├── test_davit.py │ │ ├── test_deit.py │ │ ├── test_deit3.py │ │ ├── test_densenet.py │ │ ├── test_edgenext.py │ │ ├── test_efficientformer.py │ │ ├── test_efficientnet.py │ │ ├── test_efficientnet_v2.py │ │ ├── test_eva02.py │ │ ├── test_hornet.py │ │ ├── test_hrnet.py │ │ ├── test_inception_v3.py │ │ ├── test_levit.py │ │ ├── test_mixmim.py │ │ ├── test_mlp_mixer.py │ │ ├── test_mobilenet_v2.py │ │ ├── test_mobilenet_v3.py │ │ ├── test_mobileone.py │ │ ├── test_mobilevit.py │ │ ├── test_mvit.py │ │ ├── test_poolformer.py │ │ ├── test_regnet.py │ │ ├── test_replknet.py │ │ ├── test_repmlp.py │ │ ├── test_repvgg.py │ │ ├── test_res2net.py │ │ ├── test_resnest.py │ │ ├── test_resnet.py │ │ ├── test_resnet_cifar.py │ │ ├── test_resnext.py │ │ ├── test_revvit.py │ │ ├── test_riformer.py │ │ ├── test_seresnet.py │ │ ├── test_seresnext.py │ │ ├── test_shufflenet_v1.py │ │ ├── test_shufflenet_v2.py │ │ ├── test_swin_transformer.py │ │ ├── test_swin_transformer_v2.py │ │ ├── test_t2t_vit.py │ │ ├── test_timm_backbone.py │ │ ├── test_tinyvit.py │ │ ├── test_tnt.py │ │ ├── test_twins.py │ │ ├── test_van.py │ │ ├── test_vgg.py │ │ ├── test_vision_transformer.py │ │ ├── test_xcit.py │ │ └── utils.py │ ├── test_classifiers.py │ ├── test_heads.py │ ├── test_losses.py │ ├── test_models.py │ ├── test_necks.py │ ├── test_peft │ │ └── test_lora.py │ ├── test_retrievers.py │ ├── test_selfsup │ │ ├── test_barlowtwins.py │ │ ├── test_beit.py │ │ ├── test_byol.py │ │ ├── test_cae.py │ │ ├── test_densecl.py │ │ ├── test_eva.py │ │ ├── test_itpn.py │ │ ├── test_mae.py │ │ ├── test_maskfeat.py │ │ ├── test_mff.py │ │ ├── test_milan.py │ │ ├── test_mixmim.py │ │ ├── test_moco.py │ │ ├── test_mocov3.py │ │ ├── test_simclr.py │ │ ├── test_simmim.py │ │ ├── test_simsiam.py │ │ ├── test_spark.py │ │ ├── test_swav.py │ │ └── test_target_generators.py │ ├── test_tta.py │ └── test_utils │ │ ├── test_attention.py │ │ ├── test_batch_augments.py │ │ ├── test_data_preprocessor.py │ │ ├── test_ema.py │ │ ├── test_embed.py │ │ ├── test_inverted_residual.py │ │ ├── test_layer_scale.py │ │ ├── test_misc.py │ │ ├── test_norm.py │ │ ├── test_position_encoding.py │ │ ├── test_se.py │ │ └── test_swiglu_ffn.py ├── test_structures │ ├── test_datasample.py │ └── test_utils.py ├── test_tools.py ├── test_utils │ ├── test_analyze.py │ ├── test_setup_env.py │ └── test_version_utils.py └── test_visualization │ └── test_visualizer.py └── tools ├── analysis_tools ├── analyze_logs.py ├── analyze_results.py ├── confusion_matrix.py ├── eval_metric.py ├── get_flops.py ├── shape_bias.py └── utils.py ├── benchmarks ├── mmdetection │ ├── mim_dist_test.sh │ ├── mim_dist_train_c4.sh │ ├── mim_dist_train_fpn.sh │ ├── mim_slurm_test.sh │ ├── mim_slurm_train_c4.sh │ └── mim_slurm_train_fpn.sh └── mmsegmentation │ ├── mim_dist_test.sh │ ├── mim_dist_train.sh │ ├── mim_slurm_test.sh │ └── mim_slurm_train.sh ├── dataset_converters ├── convert_flickr30k_ann.py ├── convert_imagenet_subsets.py ├── convert_inaturalist.py ├── odl_cub_preprocess.sh └── odl_imagenet1k_preprocess.sh ├── dist_test.sh ├── dist_train.sh ├── kfold-cross-valid.py ├── misc ├── print_config.py └── verify_dataset.py ├── model_converters ├── clip_to_mmpretrain.py ├── convnext_to_mmpretrain.py ├── davit_to_mmpretrain.py ├── deit3_to_mmpretrain.py ├── edgenext_to_mmpretrain.py ├── efficientnet_to_mmpretrain.py ├── efficientnetv2_to_mmpretrain.py ├── eva02_to_mmpretrain.py ├── eva_to_mmpretrain.py ├── glip_to_mmpretrain.py ├── hornet2mmpretrain.py ├── levit2mmpretrain.py ├── llava-delta2mmpre.py ├── merge_lora_weight.py ├── mixmim_to_mmpretrain.py ├── mlpmixer_to_mmpretrain.py ├── mobilenetv2_to_mmpretrain.py ├── ofa.py ├── openai-clip_to_mmpretrain-clip.py ├── otter2mmpre.py ├── publish_model.py ├── ram2mmpretrain.py ├── reparameterize_model.py ├── replknet_to_mmpretrain.py ├── repvgg_to_mmpretrain.py ├── revvit_to_mmpretrain.py ├── shufflenetv2_to_mmpretrain.py ├── tinyvit_to_mmpretrain.py ├── torchvision_to_mmpretrain.py ├── twins2mmpretrain.py ├── van2mmpretrain.py ├── vgg_to_mmpretrain.py └── vig_to_mmpretrain.py ├── slurm_test.sh ├── slurm_train.sh ├── test.py ├── torchserve ├── mmpretrain2torchserve.py ├── mmpretrain_handler.py └── test_torchserver.py ├── train.py └── visualization ├── browse_dataset.py ├── vis_cam.py ├── vis_scheduler.py └── vis_tsne.py /.circleci/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG PYTORCH="1.8.1" 2 | ARG CUDA="10.2" 3 | ARG CUDNN="7" 4 | 5 | FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel 6 | 7 | # To fix GPG key error when running apt-get update 8 | RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub 9 | RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub 10 | 11 | RUN apt-get update && apt-get install -y ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx 12 | -------------------------------------------------------------------------------- /.coveragerc: -------------------------------------------------------------------------------- 1 | [report] 2 | exclude_lines = 3 | @abstractmethod 4 | @abc.abstractmethod 5 | raise NotImplementedError 6 | -------------------------------------------------------------------------------- /.dev_scripts/benchmark_regression/bench_test.yml: -------------------------------------------------------------------------------- 1 | - Name: convnext-base_32xb128_in1k 2 | - Name: convnext-v2-atto_fcmae-pre_3rdparty_in1k 3 | - Name: mobilenet-v2_8xb32_in1k 4 | - Name: mobilenet-v3-small-050_3rdparty_in1k 5 | - Name: swin-tiny_16xb64_in1k 6 | - Name: swinv2-tiny-w8_3rdparty_in1k-256px 7 | - Name: vit-base-p16_32xb128-mae_in1k 8 | - Name: resnet34_8xb32_in1k 9 | - Name: resnext50-32x4d_8xb32_in1k 10 | - Name: shufflenet-v2-1x_16xb64_in1k 11 | - Name: riformer-s12_in1k 12 | - Name: blip-base_3rdparty_retrieval 13 | - Name: blip2-opt2.7b_3rdparty-zeroshot_caption 14 | - Name: ofa-base_3rdparty-finetuned_caption 15 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | docs/** linguist-documentation 2 | docs_zh-CN/** linguist-documentation 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | 3 | contact_links: 4 | - name: 📚 MMPreTrain Documentation (官方文档) 5 | url: https://mmpretrain.readthedocs.io/en/latest/ 6 | about: Check if your question is answered in docs 7 | - name: 💬 General questions (寻求帮助) 8 | url: https://github.com/open-mmlab/mmpretrain/discussions 9 | about: Ask general usage questions and discuss with other MMPreTrain community members 10 | - name: 🌐 Explore OpenMMLab (官网) 11 | url: https://openmmlab.com/ 12 | about: Get know more about OpenMMLab 13 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | # Set the version of Python and other tools you might need 4 | build: 5 | os: ubuntu-22.04 6 | tools: 7 | python: "3.8" 8 | 9 | formats: 10 | - epub 11 | 12 | python: 13 | install: 14 | - requirements: requirements/docs.txt 15 | - requirements: requirements/readthedocs.txt 16 | -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | cff-version: 1.2.0 2 | message: "If you use this software, please cite it as below." 3 | title: "OpenMMLab's Pre-training Toolbox and Benchmark" 4 | authors: 5 | - name: "MMPreTrain Contributors" 6 | version: 0.15.0 7 | date-released: 2023-04-06 8 | repository-code: "https://github.com/open-mmlab/mmpretrain" 9 | license: Apache-2.0 10 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include requirements/*.txt 2 | include mmpretrain/.mim/model-index.yml 3 | include mmpretrain/.mim/dataset-index.yml 4 | recursive-include mmpretrain/.mim/configs *.py *.yml 5 | recursive-include mmpretrain/.mim/tools *.py *.sh 6 | -------------------------------------------------------------------------------- /configs/_base_/models/convmixer/convmixer-1024-20.py: -------------------------------------------------------------------------------- 1 | # Model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='ConvMixer', arch='1024/20'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1024, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | )) 12 | -------------------------------------------------------------------------------- /configs/_base_/models/convmixer/convmixer-1536-20.py: -------------------------------------------------------------------------------- 1 | # Model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='ConvMixer', arch='1536/20'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1536, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | )) 12 | -------------------------------------------------------------------------------- /configs/_base_/models/convmixer/convmixer-768-32.py: -------------------------------------------------------------------------------- 1 | # Model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='ConvMixer', arch='768/32', act_cfg=dict(type='ReLU')), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=768, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | )) 12 | -------------------------------------------------------------------------------- /configs/_base_/models/convnext_v2/atto.py: -------------------------------------------------------------------------------- 1 | # Model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ConvNeXt', 6 | arch='atto', 7 | drop_path_rate=0.1, 8 | layer_scale_init_value=0., 9 | use_grn=True, 10 | ), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=320, 15 | loss=dict(type='LabelSmoothLoss', label_smooth_val=0.2), 16 | init_cfg=None, 17 | ), 18 | init_cfg=dict( 19 | type='TruncNormal', layer=['Conv2d', 'Linear'], std=.02, bias=0.), 20 | ) 21 | -------------------------------------------------------------------------------- /configs/_base_/models/convnext_v2/femto.py: -------------------------------------------------------------------------------- 1 | # Model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ConvNeXt', 6 | arch='femto', 7 | drop_path_rate=0.1, 8 | layer_scale_init_value=0., 9 | use_grn=True, 10 | ), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=384, 15 | loss=dict(type='LabelSmoothLoss', label_smooth_val=0.1), 16 | init_cfg=None, 17 | ), 18 | init_cfg=dict( 19 | type='TruncNormal', layer=['Conv2d', 'Linear'], std=.02, bias=0.), 20 | ) 21 | -------------------------------------------------------------------------------- /configs/_base_/models/convnext_v2/nano.py: -------------------------------------------------------------------------------- 1 | # Model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ConvNeXt', 6 | arch='nano', 7 | drop_path_rate=0.1, 8 | layer_scale_init_value=0., 9 | use_grn=True, 10 | ), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=640, 15 | loss=dict(type='LabelSmoothLoss', label_smooth_val=0.2), 16 | init_cfg=None, 17 | ), 18 | init_cfg=dict( 19 | type='TruncNormal', layer=['Conv2d', 'Linear'], std=.02, bias=0.), 20 | ) 21 | -------------------------------------------------------------------------------- /configs/_base_/models/convnext_v2/pico.py: -------------------------------------------------------------------------------- 1 | # Model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ConvNeXt', 6 | arch='pico', 7 | drop_path_rate=0.1, 8 | layer_scale_init_value=0., 9 | use_grn=True, 10 | ), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=512, 15 | loss=dict(type='LabelSmoothLoss', label_smooth_val=0.1), 16 | init_cfg=None, 17 | ), 18 | init_cfg=dict( 19 | type='TruncNormal', layer=['Conv2d', 'Linear'], std=.02, bias=0.), 20 | ) 21 | -------------------------------------------------------------------------------- /configs/_base_/models/davit/davit-base.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='DaViT', arch='base', out_indices=(3, ), drop_path_rate=0.4), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1024, 10 | loss=dict( 11 | type='LabelSmoothLoss', label_smooth_val=0.1, mode='original'), 12 | ), 13 | train_cfg=dict(augments=[ 14 | dict(type='Mixup', alpha=0.8), 15 | dict(type='CutMix', alpha=1.0) 16 | ])) 17 | -------------------------------------------------------------------------------- /configs/_base_/models/davit/davit-small.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='DaViT', arch='small', out_indices=(3, ), drop_path_rate=0.2), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=768, 10 | loss=dict( 11 | type='LabelSmoothLoss', label_smooth_val=0.1, mode='original'), 12 | ), 13 | train_cfg=dict(augments=[ 14 | dict(type='Mixup', alpha=0.8), 15 | dict(type='CutMix', alpha=1.0) 16 | ])) 17 | -------------------------------------------------------------------------------- /configs/_base_/models/davit/davit-tiny.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='DaViT', arch='t', out_indices=(3, ), drop_path_rate=0.1), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=768, 10 | loss=dict( 11 | type='LabelSmoothLoss', label_smooth_val=0.1, mode='original'), 12 | ), 13 | train_cfg=dict(augments=[ 14 | dict(type='Mixup', alpha=0.8), 15 | dict(type='CutMix', alpha=1.0) 16 | ])) 17 | -------------------------------------------------------------------------------- /configs/_base_/models/densenet/densenet121.py: -------------------------------------------------------------------------------- 1 | # Model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='DenseNet', arch='121'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1024, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | )) 12 | -------------------------------------------------------------------------------- /configs/_base_/models/densenet/densenet161.py: -------------------------------------------------------------------------------- 1 | # Model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='DenseNet', arch='161'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=2208, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | )) 12 | -------------------------------------------------------------------------------- /configs/_base_/models/densenet/densenet169.py: -------------------------------------------------------------------------------- 1 | # Model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='DenseNet', arch='169'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1664, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | )) 12 | -------------------------------------------------------------------------------- /configs/_base_/models/densenet/densenet201.py: -------------------------------------------------------------------------------- 1 | # Model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='DenseNet', arch='201'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1920, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | )) 12 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_b0.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNet', arch='b0'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1280, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_b1.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNet', arch='b1'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1280, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_b2.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNet', arch='b2'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1408, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_b3.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNet', arch='b3'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1536, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_b4.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNet', arch='b4'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1792, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_b5.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNet', arch='b5'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=2048, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_b6.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNet', arch='b6'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=2304, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_b7.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNet', arch='b7'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=2560, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_b8.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNet', arch='b8'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=2816, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_em.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | # `em` means EfficientNet-EdgeTPU-M arch 5 | backbone=dict(type='EfficientNet', arch='em', act_cfg=dict(type='ReLU')), 6 | neck=dict(type='GlobalAveragePooling'), 7 | head=dict( 8 | type='LinearClsHead', 9 | num_classes=1000, 10 | in_channels=1280, 11 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 12 | topk=(1, 5), 13 | )) 14 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_es.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | # `es` means EfficientNet-EdgeTPU-S arch 5 | backbone=dict(type='EfficientNet', arch='es', act_cfg=dict(type='ReLU')), 6 | neck=dict(type='GlobalAveragePooling'), 7 | head=dict( 8 | type='LinearClsHead', 9 | num_classes=1000, 10 | in_channels=1280, 11 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 12 | topk=(1, 5), 13 | )) 14 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_l2.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNet', arch='l2'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=5504, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_v2/efficientnetv2_b0.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNetV2', arch='b0'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1280, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_v2/efficientnetv2_b1.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNetV2', arch='b1'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1280, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_v2/efficientnetv2_b2.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNetV2', arch='b2'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1408, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_v2/efficientnetv2_b3.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNetV2', arch='b3'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1536, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_v2/efficientnetv2_l.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNetV2', arch='l'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1280, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_v2/efficientnetv2_m.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNetV2', arch='m'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1280, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_v2/efficientnetv2_s.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNetV2', arch='s'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1280, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/efficientnet_v2/efficientnetv2_xl.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='EfficientNetV2', arch='xl'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1280, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/hrnet/hrnet-w18.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='HRNet', arch='w18'), 5 | neck=[ 6 | dict(type='HRFuseScales', in_channels=(18, 36, 72, 144)), 7 | dict(type='GlobalAveragePooling'), 8 | ], 9 | head=dict( 10 | type='LinearClsHead', 11 | in_channels=2048, 12 | num_classes=1000, 13 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 14 | topk=(1, 5), 15 | )) 16 | -------------------------------------------------------------------------------- /configs/_base_/models/hrnet/hrnet-w30.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='HRNet', arch='w30'), 5 | neck=[ 6 | dict(type='HRFuseScales', in_channels=(30, 60, 120, 240)), 7 | dict(type='GlobalAveragePooling'), 8 | ], 9 | head=dict( 10 | type='LinearClsHead', 11 | in_channels=2048, 12 | num_classes=1000, 13 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 14 | topk=(1, 5), 15 | )) 16 | -------------------------------------------------------------------------------- /configs/_base_/models/hrnet/hrnet-w32.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='HRNet', arch='w32'), 5 | neck=[ 6 | dict(type='HRFuseScales', in_channels=(32, 64, 128, 256)), 7 | dict(type='GlobalAveragePooling'), 8 | ], 9 | head=dict( 10 | type='LinearClsHead', 11 | in_channels=2048, 12 | num_classes=1000, 13 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 14 | topk=(1, 5), 15 | )) 16 | -------------------------------------------------------------------------------- /configs/_base_/models/hrnet/hrnet-w40.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='HRNet', arch='w40'), 5 | neck=[ 6 | dict(type='HRFuseScales', in_channels=(40, 80, 160, 320)), 7 | dict(type='GlobalAveragePooling'), 8 | ], 9 | head=dict( 10 | type='LinearClsHead', 11 | in_channels=2048, 12 | num_classes=1000, 13 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 14 | topk=(1, 5), 15 | )) 16 | -------------------------------------------------------------------------------- /configs/_base_/models/hrnet/hrnet-w44.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='HRNet', arch='w44'), 5 | neck=[ 6 | dict(type='HRFuseScales', in_channels=(44, 88, 176, 352)), 7 | dict(type='GlobalAveragePooling'), 8 | ], 9 | head=dict( 10 | type='LinearClsHead', 11 | in_channels=2048, 12 | num_classes=1000, 13 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 14 | topk=(1, 5), 15 | )) 16 | -------------------------------------------------------------------------------- /configs/_base_/models/hrnet/hrnet-w48.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='HRNet', arch='w48'), 5 | neck=[ 6 | dict(type='HRFuseScales', in_channels=(48, 96, 192, 384)), 7 | dict(type='GlobalAveragePooling'), 8 | ], 9 | head=dict( 10 | type='LinearClsHead', 11 | in_channels=2048, 12 | num_classes=1000, 13 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 14 | topk=(1, 5), 15 | )) 16 | -------------------------------------------------------------------------------- /configs/_base_/models/hrnet/hrnet-w64.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='HRNet', arch='w64'), 5 | neck=[ 6 | dict(type='HRFuseScales', in_channels=(64, 128, 256, 512)), 7 | dict(type='GlobalAveragePooling'), 8 | ], 9 | head=dict( 10 | type='LinearClsHead', 11 | in_channels=2048, 12 | num_classes=1000, 13 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 14 | topk=(1, 5), 15 | )) 16 | -------------------------------------------------------------------------------- /configs/_base_/models/inception_v3.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='InceptionV3', num_classes=1000, aux_logits=False), 5 | neck=None, 6 | head=dict( 7 | type='ClsHead', 8 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 9 | topk=(1, 5)), 10 | ) 11 | -------------------------------------------------------------------------------- /configs/_base_/models/mobilenet_v2_1x.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='MobileNetV2', widen_factor=1.0), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1280, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/mobilenet_v3/mobilenet_v3_small_cifar.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='MobileNetV3', arch='small'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='StackedLinearClsHead', 8 | num_classes=10, 9 | in_channels=576, 10 | mid_channels=[1280], 11 | act_cfg=dict(type='HSwish'), 12 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 13 | topk=(1, 5))) 14 | -------------------------------------------------------------------------------- /configs/_base_/models/mobileone/mobileone_s0.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='MobileOne', 5 | arch='s0', 6 | out_indices=(3, ), 7 | ), 8 | neck=dict(type='GlobalAveragePooling'), 9 | head=dict( 10 | type='LinearClsHead', 11 | num_classes=1000, 12 | in_channels=1024, 13 | loss=dict( 14 | type='LabelSmoothLoss', 15 | label_smooth_val=0.1, 16 | mode='original', 17 | ), 18 | topk=(1, 5), 19 | )) 20 | -------------------------------------------------------------------------------- /configs/_base_/models/mobileone/mobileone_s1.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='MobileOne', 5 | arch='s1', 6 | out_indices=(3, ), 7 | ), 8 | neck=dict(type='GlobalAveragePooling'), 9 | head=dict( 10 | type='LinearClsHead', 11 | num_classes=1000, 12 | in_channels=1280, 13 | loss=dict( 14 | type='LabelSmoothLoss', 15 | label_smooth_val=0.1, 16 | mode='original', 17 | ), 18 | topk=(1, 5), 19 | )) 20 | -------------------------------------------------------------------------------- /configs/_base_/models/mobileone/mobileone_s2.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='MobileOne', 5 | arch='s2', 6 | out_indices=(3, ), 7 | ), 8 | neck=dict(type='GlobalAveragePooling'), 9 | head=dict( 10 | type='LinearClsHead', 11 | num_classes=1000, 12 | in_channels=2048, 13 | loss=dict( 14 | type='LabelSmoothLoss', 15 | label_smooth_val=0.1, 16 | mode='original', 17 | ), 18 | topk=(1, 5), 19 | )) 20 | -------------------------------------------------------------------------------- /configs/_base_/models/mobileone/mobileone_s3.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='MobileOne', 5 | arch='s3', 6 | out_indices=(3, ), 7 | ), 8 | neck=dict(type='GlobalAveragePooling'), 9 | head=dict( 10 | type='LinearClsHead', 11 | num_classes=1000, 12 | in_channels=2048, 13 | loss=dict( 14 | type='LabelSmoothLoss', 15 | label_smooth_val=0.1, 16 | mode='original', 17 | ), 18 | topk=(1, 5), 19 | )) 20 | -------------------------------------------------------------------------------- /configs/_base_/models/mobileone/mobileone_s4.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='MobileOne', 5 | arch='s4', 6 | out_indices=(3, ), 7 | ), 8 | neck=dict(type='GlobalAveragePooling'), 9 | head=dict( 10 | type='LinearClsHead', 11 | num_classes=1000, 12 | in_channels=2048, 13 | loss=dict( 14 | type='LabelSmoothLoss', 15 | label_smooth_val=0.1, 16 | mode='original', 17 | ), 18 | topk=(1, 5), 19 | )) 20 | -------------------------------------------------------------------------------- /configs/_base_/models/mobilevit/mobilevit_s.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='MobileViT', arch='small'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=640, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/mobilevit/mobilevit_xs.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='MobileViT', arch='x_small'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=384, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/mobilevit/mobilevit_xxs.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='MobileViT', arch='xx_small'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=320, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/regnet/regnetx_1.6gf.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='RegNet', arch='regnetx_1.6gf'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=912, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/regnet/regnetx_12gf.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='RegNet', arch='regnetx_12gf'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=2240, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/regnet/regnetx_3.2gf.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='RegNet', arch='regnetx_3.2gf'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1008, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/regnet/regnetx_4.0gf.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='RegNet', arch='regnetx_4.0gf'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1360, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/regnet/regnetx_400mf.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='RegNet', arch='regnetx_400mf'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=384, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/regnet/regnetx_6.4gf.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='RegNet', arch='regnetx_6.4gf'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1624, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/regnet/regnetx_8.0gf.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='RegNet', arch='regnetx_8.0gf'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1920, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/regnet/regnetx_800mf.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='RegNet', arch='regnetx_800mf'), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=672, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/replknet-31L_in1k.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='RepLKNet', 5 | arch='31L', 6 | out_indices=(3, ), 7 | ), 8 | neck=dict(type='GlobalAveragePooling'), 9 | head=dict( 10 | type='LinearClsHead', 11 | num_classes=1000, 12 | in_channels=1536, 13 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 14 | topk=(1, 5), 15 | )) 16 | -------------------------------------------------------------------------------- /configs/_base_/models/replknet-XL_in1k.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='RepLKNet', 5 | arch='XL', 6 | out_indices=(3, ), 7 | ), 8 | neck=dict(type='GlobalAveragePooling'), 9 | head=dict( 10 | type='LinearClsHead', 11 | num_classes=1000, 12 | in_channels=2048, 13 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 14 | topk=(1, 5), 15 | )) 16 | -------------------------------------------------------------------------------- /configs/_base_/models/repmlp-base_224.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='RepMLPNet', 6 | arch='B', 7 | img_size=224, 8 | out_indices=(3, ), 9 | reparam_conv_kernels=(1, 3), 10 | deploy=False), 11 | neck=dict(type='GlobalAveragePooling'), 12 | head=dict( 13 | type='LinearClsHead', 14 | num_classes=1000, 15 | in_channels=768, 16 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 17 | topk=(1, 5), 18 | )) 19 | -------------------------------------------------------------------------------- /configs/_base_/models/repvgg-A0_in1k.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='RepVGG', 5 | arch='A0', 6 | out_indices=(3, ), 7 | ), 8 | neck=dict(type='GlobalAveragePooling'), 9 | head=dict( 10 | type='LinearClsHead', 11 | num_classes=1000, 12 | in_channels=1280, 13 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 14 | topk=(1, 5), 15 | )) 16 | -------------------------------------------------------------------------------- /configs/_base_/models/res2net101-w26-s4.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='Res2Net', 5 | depth=101, 6 | scales=4, 7 | base_width=26, 8 | deep_stem=False, 9 | avg_down=False, 10 | ), 11 | neck=dict(type='GlobalAveragePooling'), 12 | head=dict( 13 | type='LinearClsHead', 14 | num_classes=1000, 15 | in_channels=2048, 16 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 17 | topk=(1, 5), 18 | )) 19 | -------------------------------------------------------------------------------- /configs/_base_/models/res2net50-w14-s8.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='Res2Net', 5 | depth=50, 6 | scales=8, 7 | base_width=14, 8 | deep_stem=False, 9 | avg_down=False, 10 | ), 11 | neck=dict(type='GlobalAveragePooling'), 12 | head=dict( 13 | type='LinearClsHead', 14 | num_classes=1000, 15 | in_channels=2048, 16 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 17 | topk=(1, 5), 18 | )) 19 | -------------------------------------------------------------------------------- /configs/_base_/models/res2net50-w26-s4.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='Res2Net', 5 | depth=50, 6 | scales=4, 7 | base_width=26, 8 | deep_stem=False, 9 | avg_down=False, 10 | ), 11 | neck=dict(type='GlobalAveragePooling'), 12 | head=dict( 13 | type='LinearClsHead', 14 | num_classes=1000, 15 | in_channels=2048, 16 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 17 | topk=(1, 5), 18 | )) 19 | -------------------------------------------------------------------------------- /configs/_base_/models/res2net50-w26-s6.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='Res2Net', 5 | depth=50, 6 | scales=6, 7 | base_width=26, 8 | deep_stem=False, 9 | avg_down=False, 10 | ), 11 | neck=dict(type='GlobalAveragePooling'), 12 | head=dict( 13 | type='LinearClsHead', 14 | num_classes=1000, 15 | in_channels=2048, 16 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 17 | topk=(1, 5), 18 | )) 19 | -------------------------------------------------------------------------------- /configs/_base_/models/res2net50-w26-s8.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='Res2Net', 5 | depth=50, 6 | scales=8, 7 | base_width=26, 8 | deep_stem=False, 9 | avg_down=False, 10 | ), 11 | neck=dict(type='GlobalAveragePooling'), 12 | head=dict( 13 | type='LinearClsHead', 14 | num_classes=1000, 15 | in_channels=2048, 16 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 17 | topk=(1, 5), 18 | )) 19 | -------------------------------------------------------------------------------- /configs/_base_/models/res2net50-w48-s2.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='Res2Net', 5 | depth=50, 6 | scales=2, 7 | base_width=48, 8 | deep_stem=False, 9 | avg_down=False, 10 | ), 11 | neck=dict(type='GlobalAveragePooling'), 12 | head=dict( 13 | type='LinearClsHead', 14 | num_classes=1000, 15 | in_channels=2048, 16 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 17 | topk=(1, 5), 18 | )) 19 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet101.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet', 6 | depth=101, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5), 17 | )) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet101_cifar.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet_CIFAR', 6 | depth=101, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=10, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | )) 17 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet152.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet', 6 | depth=152, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5), 17 | )) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet152_cifar.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet_CIFAR', 6 | depth=152, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=10, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | )) 17 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet18.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet', 6 | depth=18, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=512, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5), 17 | )) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet18_cifar.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet_CIFAR', 6 | depth=18, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=10, 14 | in_channels=512, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | )) 17 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet34.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet', 6 | depth=34, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=512, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5), 17 | )) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet34_cifar.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet_CIFAR', 6 | depth=34, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=10, 14 | in_channels=512, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | )) 17 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet34_gem.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet', 6 | depth=34, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GeneralizedMeanPooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=512, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5), 17 | )) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet50.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet', 6 | depth=50, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5), 17 | )) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet50_cifar.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet_CIFAR', 6 | depth=50, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=10, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | )) 17 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet50_cifar_mixup.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet_CIFAR', 6 | depth=50, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='MultiLabelLinearClsHead', 13 | num_classes=10, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0, use_soft=True)), 16 | train_cfg=dict(augments=dict(type='Mixup', alpha=1.)), 17 | ) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet50_label_smooth.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet', 6 | depth=50, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=2048, 15 | loss=dict( 16 | type='LabelSmoothLoss', label_smooth_val=0.1, loss_weight=1.0), 17 | topk=(1, 5), 18 | )) 19 | -------------------------------------------------------------------------------- /configs/_base_/models/resnet50_mixup.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet', 6 | depth=50, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='MultiLabelLinearClsHead', 13 | num_classes=1000, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0, use_soft=True)), 16 | train_cfg=dict(augments=dict(type='Mixup', alpha=0.2)), 17 | ) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/resnetv1c50.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNetV1c', 6 | depth=50, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5), 17 | )) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/resnetv1d101.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNetV1d', 6 | depth=101, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5), 17 | )) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/resnetv1d152.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNetV1d', 6 | depth=152, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5), 17 | )) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/resnetv1d50.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNetV1d', 6 | depth=50, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5), 17 | )) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/resnext101_32x4d.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNeXt', 6 | depth=101, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | groups=32, 10 | width_per_group=4, 11 | style='pytorch'), 12 | neck=dict(type='GlobalAveragePooling'), 13 | head=dict( 14 | type='LinearClsHead', 15 | num_classes=1000, 16 | in_channels=2048, 17 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 18 | topk=(1, 5), 19 | )) 20 | -------------------------------------------------------------------------------- /configs/_base_/models/resnext101_32x8d.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNeXt', 6 | depth=101, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | groups=32, 10 | width_per_group=8, 11 | style='pytorch'), 12 | neck=dict(type='GlobalAveragePooling'), 13 | head=dict( 14 | type='LinearClsHead', 15 | num_classes=1000, 16 | in_channels=2048, 17 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 18 | topk=(1, 5), 19 | )) 20 | -------------------------------------------------------------------------------- /configs/_base_/models/resnext152_32x4d.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNeXt', 6 | depth=152, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | groups=32, 10 | width_per_group=4, 11 | style='pytorch'), 12 | neck=dict(type='GlobalAveragePooling'), 13 | head=dict( 14 | type='LinearClsHead', 15 | num_classes=1000, 16 | in_channels=2048, 17 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 18 | topk=(1, 5), 19 | )) 20 | -------------------------------------------------------------------------------- /configs/_base_/models/resnext50_32x4d.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNeXt', 6 | depth=50, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | groups=32, 10 | width_per_group=4, 11 | style='pytorch'), 12 | neck=dict(type='GlobalAveragePooling'), 13 | head=dict( 14 | type='LinearClsHead', 15 | num_classes=1000, 16 | in_channels=2048, 17 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 18 | topk=(1, 5), 19 | )) 20 | -------------------------------------------------------------------------------- /configs/_base_/models/seresnet101.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='SEResNet', 6 | depth=101, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5), 17 | )) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/seresnet50.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='SEResNet', 6 | depth=50, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | style='pytorch'), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=2048, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5), 17 | )) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/seresnext101_32x4d.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='SEResNeXt', 6 | depth=101, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | groups=32, 10 | width_per_group=4, 11 | se_ratio=16, 12 | style='pytorch'), 13 | neck=dict(type='GlobalAveragePooling'), 14 | head=dict( 15 | type='LinearClsHead', 16 | num_classes=1000, 17 | in_channels=2048, 18 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 19 | topk=(1, 5), 20 | )) 21 | -------------------------------------------------------------------------------- /configs/_base_/models/seresnext50_32x4d.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='SEResNeXt', 6 | depth=50, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | groups=32, 10 | width_per_group=4, 11 | se_ratio=16, 12 | style='pytorch'), 13 | neck=dict(type='GlobalAveragePooling'), 14 | head=dict( 15 | type='LinearClsHead', 16 | num_classes=1000, 17 | in_channels=2048, 18 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 19 | topk=(1, 5), 20 | )) 21 | -------------------------------------------------------------------------------- /configs/_base_/models/shufflenet_v1_1x.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='ShuffleNetV1', groups=3), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=960, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/shufflenet_v2_1x.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='ShuffleNetV2', widen_factor=1.0), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=1024, 10 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 11 | topk=(1, 5), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/swin_transformer/base_384.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | # Only for evaluation 3 | model = dict( 4 | type='ImageClassifier', 5 | backbone=dict( 6 | type='SwinTransformer', 7 | arch='base', 8 | img_size=384, 9 | stage_cfgs=dict(block_cfgs=dict(window_size=12))), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=1024, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5))) 17 | -------------------------------------------------------------------------------- /configs/_base_/models/swin_transformer/large_224.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | # Only for evaluation 3 | model = dict( 4 | type='ImageClassifier', 5 | backbone=dict(type='SwinTransformer', arch='large', img_size=224), 6 | neck=dict(type='GlobalAveragePooling'), 7 | head=dict( 8 | type='LinearClsHead', 9 | num_classes=1000, 10 | in_channels=1536, 11 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 12 | topk=(1, 5))) 13 | -------------------------------------------------------------------------------- /configs/_base_/models/swin_transformer/large_384.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | # Only for evaluation 3 | model = dict( 4 | type='ImageClassifier', 5 | backbone=dict( 6 | type='SwinTransformer', 7 | arch='large', 8 | img_size=384, 9 | stage_cfgs=dict(block_cfgs=dict(window_size=12))), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=1536, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5))) 17 | -------------------------------------------------------------------------------- /configs/_base_/models/swin_transformer_v2/base_384.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='SwinTransformerV2', 6 | arch='base', 7 | img_size=384, 8 | drop_path_rate=0.2), 9 | neck=dict(type='GlobalAveragePooling'), 10 | head=dict( 11 | type='LinearClsHead', 12 | num_classes=1000, 13 | in_channels=1024, 14 | init_cfg=None, # suppress the default init_cfg of LinearClsHead. 15 | loss=dict( 16 | type='LabelSmoothLoss', label_smooth_val=0.1, mode='original'), 17 | cal_acc=False)) 18 | -------------------------------------------------------------------------------- /configs/_base_/models/swin_transformer_v2/large_256.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | # Only for evaluation 3 | model = dict( 4 | type='ImageClassifier', 5 | backbone=dict( 6 | type='SwinTransformerV2', 7 | arch='large', 8 | img_size=256, 9 | drop_path_rate=0.2), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=1536, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5))) 17 | -------------------------------------------------------------------------------- /configs/_base_/models/swin_transformer_v2/large_384.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | # Only for evaluation 3 | model = dict( 4 | type='ImageClassifier', 5 | backbone=dict( 6 | type='SwinTransformerV2', 7 | arch='large', 8 | img_size=384, 9 | drop_path_rate=0.2), 10 | neck=dict(type='GlobalAveragePooling'), 11 | head=dict( 12 | type='LinearClsHead', 13 | num_classes=1000, 14 | in_channels=1536, 15 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 16 | topk=(1, 5))) 17 | -------------------------------------------------------------------------------- /configs/_base_/models/van/van_base.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='VAN', arch='base', drop_path_rate=0.1), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=512, 10 | init_cfg=None, # suppress the default init_cfg of LinearClsHead. 11 | loss=dict( 12 | type='LabelSmoothLoss', label_smooth_val=0.1, mode='original'), 13 | cal_acc=False)) 14 | -------------------------------------------------------------------------------- /configs/_base_/models/van/van_large.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='VAN', arch='large', drop_path_rate=0.2), 5 | neck=dict(type='GlobalAveragePooling'), 6 | head=dict( 7 | type='LinearClsHead', 8 | num_classes=1000, 9 | in_channels=512, 10 | init_cfg=None, # suppress the default init_cfg of LinearClsHead. 11 | loss=dict( 12 | type='LabelSmoothLoss', label_smooth_val=0.1, mode='original'), 13 | cal_acc=False)) 14 | -------------------------------------------------------------------------------- /configs/_base_/models/vgg11.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='VGG', depth=11, num_classes=1000), 5 | neck=None, 6 | head=dict( 7 | type='ClsHead', 8 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 9 | topk=(1, 5), 10 | )) 11 | -------------------------------------------------------------------------------- /configs/_base_/models/vgg11bn.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='VGG', depth=11, norm_cfg=dict(type='BN'), num_classes=1000), 6 | neck=None, 7 | head=dict( 8 | type='ClsHead', 9 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 10 | topk=(1, 5), 11 | )) 12 | -------------------------------------------------------------------------------- /configs/_base_/models/vgg13.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='VGG', depth=13, num_classes=1000), 5 | neck=None, 6 | head=dict( 7 | type='ClsHead', 8 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 9 | topk=(1, 5), 10 | )) 11 | -------------------------------------------------------------------------------- /configs/_base_/models/vgg13bn.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='VGG', depth=13, norm_cfg=dict(type='BN'), num_classes=1000), 6 | neck=None, 7 | head=dict( 8 | type='ClsHead', 9 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 10 | topk=(1, 5), 11 | )) 12 | -------------------------------------------------------------------------------- /configs/_base_/models/vgg16.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='VGG', depth=16, num_classes=1000), 5 | neck=None, 6 | head=dict( 7 | type='ClsHead', 8 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 9 | topk=(1, 5), 10 | )) 11 | -------------------------------------------------------------------------------- /configs/_base_/models/vgg16bn.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='VGG', depth=16, norm_cfg=dict(type='BN'), num_classes=1000), 6 | neck=None, 7 | head=dict( 8 | type='ClsHead', 9 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 10 | topk=(1, 5), 11 | )) 12 | -------------------------------------------------------------------------------- /configs/_base_/models/vgg19.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict(type='VGG', depth=19, num_classes=1000), 5 | neck=None, 6 | head=dict( 7 | type='ClsHead', 8 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 9 | topk=(1, 5), 10 | )) 11 | -------------------------------------------------------------------------------- /configs/_base_/models/vgg19bn.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='VGG', depth=19, norm_cfg=dict(type='BN'), num_classes=1000), 6 | neck=None, 7 | head=dict( 8 | type='ClsHead', 9 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 10 | topk=(1, 5), 11 | )) 12 | -------------------------------------------------------------------------------- /configs/_base_/models/wide-resnet50.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ResNet', 6 | depth=50, 7 | num_stages=4, 8 | out_indices=(3, ), 9 | stem_channels=64, 10 | base_channels=128, 11 | expansion=2, 12 | style='pytorch'), 13 | neck=dict(type='GlobalAveragePooling'), 14 | head=dict( 15 | type='LinearClsHead', 16 | num_classes=1000, 17 | in_channels=2048, 18 | loss=dict(type='CrossEntropyLoss', loss_weight=1.0), 19 | topk=(1, 5), 20 | )) 21 | -------------------------------------------------------------------------------- /configs/_base_/schedules/cifar10_bs128.py: -------------------------------------------------------------------------------- 1 | # optimizer 2 | optim_wrapper = dict( 3 | optimizer=dict(type='SGD', lr=0.1, momentum=0.9, weight_decay=0.0001)) 4 | # learning policy 5 | param_scheduler = dict( 6 | type='MultiStepLR', by_epoch=True, milestones=[100, 150], gamma=0.1) 7 | 8 | # train, val, test setting 9 | train_cfg = dict(by_epoch=True, max_epochs=200, val_interval=1) 10 | val_cfg = dict() 11 | test_cfg = dict() 12 | 13 | # NOTE: `auto_scale_lr` is for automatically scaling LR 14 | # based on the actual training batch size. 15 | auto_scale_lr = dict(base_batch_size=128) 16 | -------------------------------------------------------------------------------- /configs/_base_/schedules/imagenet_bs256.py: -------------------------------------------------------------------------------- 1 | # optimizer 2 | optim_wrapper = dict( 3 | optimizer=dict(type='SGD', lr=0.1, momentum=0.9, weight_decay=0.0001)) 4 | 5 | # learning policy 6 | param_scheduler = dict( 7 | type='MultiStepLR', by_epoch=True, milestones=[30, 60, 90], gamma=0.1) 8 | 9 | # train, val, test setting 10 | train_cfg = dict(by_epoch=True, max_epochs=100, val_interval=1) 11 | val_cfg = dict() 12 | test_cfg = dict() 13 | 14 | # NOTE: `auto_scale_lr` is for automatically scaling LR, 15 | # based on the actual training batch size. 16 | auto_scale_lr = dict(base_batch_size=256) 17 | -------------------------------------------------------------------------------- /configs/_base_/schedules/imagenet_bs256_140e.py: -------------------------------------------------------------------------------- 1 | # optimizer 2 | optim_wrapper = dict( 3 | optimizer=dict(type='SGD', lr=0.1, momentum=0.9, weight_decay=0.0001)) 4 | 5 | # learning policy 6 | param_scheduler = dict( 7 | type='MultiStepLR', by_epoch=True, milestones=[40, 80, 120], gamma=0.1) 8 | 9 | # train, val, test setting 10 | train_cfg = dict(by_epoch=True, max_epochs=140, val_interval=1) 11 | val_cfg = dict() 12 | test_cfg = dict() 13 | 14 | # NOTE: `auto_scale_lr` is for automatically scaling LR, 15 | # based on the actual training batch size. 16 | auto_scale_lr = dict(base_batch_size=256) 17 | -------------------------------------------------------------------------------- /configs/_base_/schedules/imagenet_bs256_coslr.py: -------------------------------------------------------------------------------- 1 | # optimizer 2 | optim_wrapper = dict( 3 | optimizer=dict(type='SGD', lr=0.1, momentum=0.9, weight_decay=0.0001)) 4 | 5 | # learning policy 6 | param_scheduler = dict( 7 | type='CosineAnnealingLR', T_max=100, by_epoch=True, begin=0, end=100) 8 | 9 | # train, val, test setting 10 | train_cfg = dict(by_epoch=True, max_epochs=100, val_interval=1) 11 | val_cfg = dict() 12 | test_cfg = dict() 13 | 14 | # NOTE: `auto_scale_lr` is for automatically scaling LR, 15 | # based on the actual training batch size. 16 | auto_scale_lr = dict(base_batch_size=256) 17 | -------------------------------------------------------------------------------- /configs/_base_/schedules/imagenet_bs256_epochstep.py: -------------------------------------------------------------------------------- 1 | # optimizer 2 | optim_wrapper = dict( 3 | optimizer=dict(type='SGD', lr=0.045, momentum=0.9, weight_decay=0.00004)) 4 | 5 | # learning policy 6 | param_scheduler = dict(type='StepLR', by_epoch=True, step_size=1, gamma=0.98) 7 | 8 | # train, val, test setting 9 | train_cfg = dict(by_epoch=True, max_epochs=300, val_interval=1) 10 | val_cfg = dict() 11 | test_cfg = dict() 12 | 13 | # NOTE: `auto_scale_lr` is for automatically scaling LR, 14 | # based on the actual training batch size. 15 | auto_scale_lr = dict(base_batch_size=256) 16 | -------------------------------------------------------------------------------- /configs/_base_/schedules/imagenet_lars_coslr_200e.py: -------------------------------------------------------------------------------- 1 | # optimizer wrapper 2 | optim_wrapper = dict( 3 | type='OptimWrapper', 4 | optimizer=dict(type='LARS', lr=4.8, weight_decay=1e-6, momentum=0.9)) 5 | 6 | # learning rate scheduler 7 | param_scheduler = [ 8 | dict( 9 | type='LinearLR', 10 | start_factor=1e-4, 11 | by_epoch=True, 12 | begin=0, 13 | end=10, 14 | convert_to_iter_based=True), 15 | dict( 16 | type='CosineAnnealingLR', T_max=190, by_epoch=True, begin=10, end=200) 17 | ] 18 | 19 | # runtime settings 20 | train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=200) 21 | -------------------------------------------------------------------------------- /configs/_base_/schedules/imagenet_lars_coslr_90e.py: -------------------------------------------------------------------------------- 1 | # optimizer wrapper 2 | optim_wrapper = dict( 3 | type='OptimWrapper', 4 | optimizer=dict(type='LARS', lr=1.6, momentum=0.9, weight_decay=0.)) 5 | 6 | # learning rate scheduler 7 | param_scheduler = [ 8 | dict(type='CosineAnnealingLR', T_max=90, by_epoch=True, begin=0, end=90) 9 | ] 10 | 11 | # runtime settings 12 | train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=90) 13 | val_cfg = dict() 14 | test_cfg = dict() 15 | -------------------------------------------------------------------------------- /configs/_base_/schedules/imagenet_sgd_coslr_100e.py: -------------------------------------------------------------------------------- 1 | # optimizer wrapper 2 | optim_wrapper = dict( 3 | type='OptimWrapper', 4 | optimizer=dict(type='SGD', lr=0.3, momentum=0.9, weight_decay=1e-6)) 5 | 6 | # learning rate scheduler 7 | param_scheduler = [ 8 | dict(type='CosineAnnealingLR', T_max=100, by_epoch=True, begin=0, end=100) 9 | ] 10 | 11 | # runtime settings 12 | train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=100) 13 | val_cfg = dict() 14 | test_cfg = dict() 15 | -------------------------------------------------------------------------------- /configs/_base_/schedules/imagenet_sgd_coslr_200e.py: -------------------------------------------------------------------------------- 1 | # optimizer wrapper 2 | optim_wrapper = dict( 3 | type='OptimWrapper', 4 | optimizer=dict(type='SGD', lr=0.03, weight_decay=1e-4, momentum=0.9)) 5 | 6 | # learning rate scheduler 7 | param_scheduler = [ 8 | dict(type='CosineAnnealingLR', T_max=200, by_epoch=True, begin=0, end=200) 9 | ] 10 | 11 | # runtime settings 12 | train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=200) 13 | -------------------------------------------------------------------------------- /configs/_base_/schedules/imagenet_sgd_steplr_100e.py: -------------------------------------------------------------------------------- 1 | # optimizer wrapper 2 | optim_wrapper = dict( 3 | type='OptimWrapper', 4 | optimizer=dict(type='SGD', lr=0.1, momentum=0.9, weight_decay=1e-4)) 5 | 6 | # learning rate scheduler 7 | param_scheduler = [ 8 | dict(type='MultiStepLR', by_epoch=True, milestones=[60, 80], gamma=0.1) 9 | ] 10 | 11 | # runtime settings 12 | train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=100) 13 | val_cfg = dict() 14 | test_cfg = dict() 15 | -------------------------------------------------------------------------------- /configs/barlowtwins/benchmarks/resnet50_8xb32-linear-coslr-100e_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../../_base_/models/resnet50.py', 3 | '../../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../../_base_/schedules/imagenet_sgd_coslr_100e.py', 5 | '../../_base_/default_runtime.py', 6 | ] 7 | 8 | model = dict( 9 | backbone=dict( 10 | frozen_stages=4, 11 | init_cfg=dict(type='Pretrained', checkpoint='', prefix='backbone.'))) 12 | 13 | # runtime settings 14 | default_hooks = dict( 15 | checkpoint=dict(type='CheckpointHook', interval=10, max_keep_ckpts=3)) 16 | -------------------------------------------------------------------------------- /configs/conformer/conformer-base-p16_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/conformer/base-p16.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_conformer.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | train_dataloader = dict(batch_size=128) 9 | -------------------------------------------------------------------------------- /configs/conformer/conformer-small-p16_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/conformer/small-p16.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_conformer.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | train_dataloader = dict(batch_size=128) 9 | -------------------------------------------------------------------------------- /configs/conformer/conformer-small-p32_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/conformer/small-p32.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_conformer.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | train_dataloader = dict(batch_size=128) 9 | -------------------------------------------------------------------------------- /configs/conformer/conformer-tiny-p16_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/conformer/tiny-p16.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_conformer.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | train_dataloader = dict(batch_size=128) 9 | -------------------------------------------------------------------------------- /configs/davit/davit-base_4xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/davit/davit-base.py', 3 | '../_base_/datasets/imagenet_bs256_davit_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # data settings 9 | train_dataloader = dict(batch_size=256) 10 | -------------------------------------------------------------------------------- /configs/davit/davit-small_4xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/davit/davit-small.py', 3 | '../_base_/datasets/imagenet_bs256_davit_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # data settings 9 | train_dataloader = dict(batch_size=256) 10 | -------------------------------------------------------------------------------- /configs/davit/davit-tiny_4xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/davit/davit-tiny.py', 3 | '../_base_/datasets/imagenet_bs256_davit_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # data settings 9 | train_dataloader = dict(batch_size=256) 10 | -------------------------------------------------------------------------------- /configs/densenet/densenet121_4xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/densenet/densenet121.py', 3 | '../_base_/datasets/imagenet_bs64.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # dataset settings 9 | train_dataloader = dict(batch_size=256) 10 | 11 | # schedule settings 12 | train_cfg = dict(by_epoch=True, max_epochs=90) 13 | 14 | # NOTE: `auto_scale_lr` is for automatically scaling LR 15 | # based on the actual training batch size. 16 | # base_batch_size = (4 GPUs) x (256 samples per GPU) 17 | auto_scale_lr = dict(base_batch_size=1024) 18 | -------------------------------------------------------------------------------- /configs/densenet/densenet161_4xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/densenet/densenet161.py', 3 | '../_base_/datasets/imagenet_bs64.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # dataset settings 9 | train_dataloader = dict(batch_size=256) 10 | 11 | # schedule settings 12 | train_cfg = dict(by_epoch=True, max_epochs=90) 13 | 14 | # NOTE: `auto_scale_lr` is for automatically scaling LR 15 | # based on the actual training batch size. 16 | # base_batch_size = (4 GPUs) x (256 samples per GPU) 17 | auto_scale_lr = dict(base_batch_size=1024) 18 | -------------------------------------------------------------------------------- /configs/densenet/densenet169_4xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/densenet/densenet169.py', 3 | '../_base_/datasets/imagenet_bs64.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # dataset settings 9 | train_dataloader = dict(batch_size=256) 10 | 11 | # schedule settings 12 | train_cfg = dict(by_epoch=True, max_epochs=90) 13 | 14 | # NOTE: `auto_scale_lr` is for automatically scaling LR 15 | # based on the actual training batch size. 16 | # base_batch_size = (4 GPUs) x (256 samples per GPU) 17 | auto_scale_lr = dict(base_batch_size=1024) 18 | -------------------------------------------------------------------------------- /configs/densenet/densenet201_4xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/densenet/densenet201.py', 3 | '../_base_/datasets/imagenet_bs64.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # dataset settings 9 | train_dataloader = dict(batch_size=256) 10 | 11 | # schedule settings 12 | train_cfg = dict(by_epoch=True, max_epochs=90) 13 | 14 | # NOTE: `auto_scale_lr` is for automatically scaling LR 15 | # based on the actual training batch size. 16 | # base_batch_size = (4 GPUs) x (256 samples per GPU) 17 | auto_scale_lr = dict(base_batch_size=1024) 18 | -------------------------------------------------------------------------------- /configs/dinov2/vit-base-p14_dinov2-pre_headless.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='VisionTransformer', 6 | arch='base', 7 | img_size=518, 8 | patch_size=14, 9 | layer_scale_init_value=1e-5, 10 | ), 11 | neck=None, 12 | head=None) 13 | 14 | data_preprocessor = dict( 15 | # RGB format normalization parameters 16 | mean=[123.675, 116.28, 103.53], 17 | std=[58.395, 57.12, 57.375], 18 | # convert image from BGR to RGB 19 | to_rgb=True, 20 | ) 21 | -------------------------------------------------------------------------------- /configs/dinov2/vit-giant-p14_dinov2-pre_headless.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='VisionTransformer', 6 | arch='dinov2-giant', 7 | img_size=518, 8 | patch_size=14, 9 | layer_scale_init_value=1e-5, 10 | layer_cfgs=dict(ffn_type='swiglu_fused'), 11 | ), 12 | neck=None, 13 | head=None) 14 | 15 | data_preprocessor = dict( 16 | # RGB format normalization parameters 17 | mean=[123.675, 116.28, 103.53], 18 | std=[58.395, 57.12, 57.375], 19 | # convert image from BGR to RGB 20 | to_rgb=True, 21 | ) 22 | -------------------------------------------------------------------------------- /configs/dinov2/vit-large-p14_dinov2-pre_headless.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='VisionTransformer', 6 | arch='large', 7 | img_size=518, 8 | patch_size=14, 9 | layer_scale_init_value=1e-5, 10 | ), 11 | neck=None, 12 | head=None) 13 | 14 | data_preprocessor = dict( 15 | # RGB format normalization parameters 16 | mean=[123.675, 116.28, 103.53], 17 | std=[58.395, 57.12, 57.375], 18 | # convert image from BGR to RGB 19 | to_rgb=True, 20 | ) 21 | -------------------------------------------------------------------------------- /configs/dinov2/vit-small-p14_dinov2-pre_headless.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='VisionTransformer', 6 | arch='dinov2-small', 7 | img_size=518, 8 | patch_size=14, 9 | layer_scale_init_value=1e-5, 10 | ), 11 | neck=None, 12 | head=None) 13 | 14 | data_preprocessor = dict( 15 | # RGB format normalization parameters 16 | mean=[123.675, 116.28, 103.53], 17 | std=[58.395, 57.12, 57.375], 18 | # convert image from BGR to RGB 19 | to_rgb=True, 20 | ) 21 | -------------------------------------------------------------------------------- /configs/edgenext/edgenext-base_8xb256-usi_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./edgenext-base_8xb256_in1k.py'] 2 | 3 | # dataset setting 4 | 5 | test_pipeline = [ 6 | dict(type='LoadImageFromFile'), 7 | dict( 8 | type='ResizeEdge', 9 | scale=269, 10 | edge='short', 11 | backend='pillow', 12 | interpolation='bicubic'), 13 | dict(type='CenterCrop', crop_size=256), 14 | dict(type='PackInputs') 15 | ] 16 | 17 | val_dataloader = dict(dataset=dict(pipeline=test_pipeline)) 18 | 19 | test_dataloader = val_dataloader 20 | -------------------------------------------------------------------------------- /configs/edgenext/edgenext-small_8xb256-usi_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./edgenext-small_8xb256_in1k.py'] 2 | 3 | # dataset setting 4 | 5 | test_pipeline = [ 6 | dict(type='LoadImageFromFile'), 7 | dict( 8 | type='ResizeEdge', 9 | scale=269, 10 | edge='short', 11 | backend='pillow', 12 | interpolation='bicubic'), 13 | dict(type='CenterCrop', crop_size=256), 14 | dict(type='PackInputs') 15 | ] 16 | 17 | val_dataloader = dict(dataset=dict(pipeline=test_pipeline)) 18 | 19 | test_dataloader = val_dataloader 20 | -------------------------------------------------------------------------------- /configs/efficientformer/efficientformer-l1_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/efficientformer-l1.py', 3 | '../_base_/datasets/imagenet_bs128_poolformer_small_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/efficientformer/efficientformer-l3_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = './efficientformer-l1_8xb128_in1k.py' 2 | 3 | model = dict(backbone=dict(arch='l3'), head=dict(in_channels=512)) 4 | -------------------------------------------------------------------------------- /configs/efficientformer/efficientformer-l7_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = './efficientformer-l1_8xb128_in1k.py' 2 | 3 | model = dict(backbone=dict(arch='l7'), head=dict(in_channels=768)) 4 | -------------------------------------------------------------------------------- /configs/efficientnet_v2/efficientnetv2-l_8xb32_in21k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./efficientnetv2-s_8xb32_in21k.py'] 2 | 3 | # model setting 4 | model = dict(backbone=dict(arch='l'), ) 5 | -------------------------------------------------------------------------------- /configs/efficientnet_v2/efficientnetv2-m_8xb32_in21k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./efficientnetv2-s_8xb32_in21k.py'] 2 | 3 | # model setting 4 | model = dict(backbone=dict(arch='m'), ) 5 | -------------------------------------------------------------------------------- /configs/efficientnet_v2/efficientnetv2-xl_8xb32_in21k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./efficientnetv2-s_8xb32_in21k.py'] 2 | 3 | # model setting 4 | model = dict(backbone=dict(arch='xl'), ) 5 | -------------------------------------------------------------------------------- /configs/eva/eva-g-p14_8xb16_in1k-336px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/eva/eva-g.py', 3 | '../_base_/datasets/imagenet_bs16_eva_336.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # model settings 9 | model = dict(backbone=dict(img_size=336)) 10 | -------------------------------------------------------------------------------- /configs/eva/eva-g-p14_8xb16_in1k-560px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/eva/eva-g.py', 3 | '../_base_/datasets/imagenet_bs16_eva_560.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # model settings 9 | model = dict(backbone=dict(img_size=560)) 10 | -------------------------------------------------------------------------------- /configs/eva/eva-l-p14_8xb16_in1k-196px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/eva/eva-l.py', 3 | '../_base_/datasets/imagenet_bs16_eva_196.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # model settings 9 | model = dict(backbone=dict(img_size=196)) 10 | -------------------------------------------------------------------------------- /configs/eva/eva-l-p14_8xb16_in1k-336px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/eva/eva-l.py', 3 | '../_base_/datasets/imagenet_bs16_eva_336.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # model settings 9 | model = dict(backbone=dict(img_size=336)) 10 | -------------------------------------------------------------------------------- /configs/eva02/eva02-base-p14_headless.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='ViTEVA02', 5 | arch='b', 6 | img_size=224, 7 | patch_size=14, 8 | sub_ln=True, 9 | final_norm=False, 10 | out_type='avg_featmap'), 11 | neck=None, 12 | head=None, 13 | ) 14 | 15 | data_preprocessor = dict( 16 | # RGB format normalization parameters 17 | mean=[0.48145466 * 255, 0.4578275 * 255, 0.40821073 * 255], 18 | std=[0.26862954 * 255, 0.26130258 * 255, 0.27577711 * 255], 19 | # convert image from BGR to RGB 20 | to_rgb=True, 21 | ) 22 | -------------------------------------------------------------------------------- /configs/eva02/eva02-large-p14_headless.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='ViTEVA02', 5 | arch='l', 6 | img_size=224, 7 | patch_size=14, 8 | sub_ln=True, 9 | final_norm=False, 10 | out_type='avg_featmap'), 11 | neck=None, 12 | head=None, 13 | ) 14 | 15 | data_preprocessor = dict( 16 | # RGB format normalization parameters 17 | mean=[0.48145466 * 255, 0.4578275 * 255, 0.40821073 * 255], 18 | std=[0.26862954 * 255, 0.26130258 * 255, 0.27577711 * 255], 19 | # convert image from BGR to RGB 20 | to_rgb=True, 21 | ) 22 | -------------------------------------------------------------------------------- /configs/eva02/eva02-small-p14_headless.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='ViTEVA02', 5 | arch='s', 6 | img_size=224, 7 | patch_size=14, 8 | final_norm=False, 9 | out_type='avg_featmap'), 10 | neck=None, 11 | head=None, 12 | ) 13 | 14 | data_preprocessor = dict( 15 | # RGB format normalization parameters 16 | mean=[0.48145466 * 255, 0.4578275 * 255, 0.40821073 * 255], 17 | std=[0.26862954 * 255, 0.26130258 * 255, 0.27577711 * 255], 18 | # convert image from BGR to RGB 19 | to_rgb=True, 20 | ) 21 | -------------------------------------------------------------------------------- /configs/eva02/eva02-tiny-p14_headless.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='ViTEVA02', 5 | arch='t', 6 | img_size=224, 7 | patch_size=14, 8 | final_norm=False, 9 | out_type='avg_featmap'), 10 | neck=None, 11 | head=None, 12 | ) 13 | 14 | data_preprocessor = dict( 15 | # RGB format normalization parameters 16 | mean=[0.48145466 * 255, 0.4578275 * 255, 0.40821073 * 255], 17 | std=[0.26862954 * 255, 0.26130258 * 255, 0.27577711 * 255], 18 | # convert image from BGR to RGB 19 | to_rgb=True, 20 | ) 21 | -------------------------------------------------------------------------------- /configs/glip/glip-l_headless.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='SwinTransformer', 5 | arch='large', 6 | img_size=384, 7 | out_indices=(1, 2, 3), # original weight is for detection 8 | stage_cfgs=dict(block_cfgs=dict(window_size=12))), 9 | neck=None, 10 | head=None) 11 | 12 | data_preprocessor = dict( 13 | # RGB format normalization parameters 14 | mean=[103.53, 116.28, 123.675], 15 | std=[57.375, 57.12, 58.395], 16 | # convert image from BGR to RGB 17 | to_rgb=False, 18 | ) 19 | -------------------------------------------------------------------------------- /configs/glip/glip-t_headless.py: -------------------------------------------------------------------------------- 1 | model = dict( 2 | type='ImageClassifier', 3 | backbone=dict( 4 | type='SwinTransformer', 5 | arch='tiny', 6 | img_size=224, 7 | out_indices=(1, 2, 3), # original weight is for detection 8 | ), 9 | neck=None, 10 | head=None) 11 | 12 | data_preprocessor = dict( 13 | # RGB format normalization parameters 14 | mean=[103.53, 116.28, 123.675], 15 | std=[57.375, 57.12, 58.395], 16 | # convert image from BGR to RGB 17 | to_rgb=False, 18 | ) 19 | -------------------------------------------------------------------------------- /configs/hivit/hivit-base-p16_16xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hivit/base_224.py', 3 | '../_base_/datasets/imagenet_bs64_hivit_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_hivit.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(clip_grad=dict(max_norm=5.0)) 10 | -------------------------------------------------------------------------------- /configs/hivit/hivit-small-p16_16xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hivit/small_224.py', 3 | '../_base_/datasets/imagenet_bs64_hivit_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_hivit.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(clip_grad=dict(max_norm=5.0)) 10 | -------------------------------------------------------------------------------- /configs/hivit/hivit-tiny-p16_16xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hivit/tiny_224.py', 3 | '../_base_/datasets/imagenet_bs64_hivit_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_hivit.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(clip_grad=dict(max_norm=5.0)) 10 | -------------------------------------------------------------------------------- /configs/hornet/hornet-base-gf_8xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hornet/hornet-base-gf.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | data = dict(samples_per_gpu=64) 9 | 10 | optim_wrapper = dict(optimizer=dict(lr=4e-3), clip_grad=dict(max_norm=1.0)) 11 | 12 | custom_hooks = [dict(type='EMAHook', momentum=4e-5, priority='ABOVE_NORMAL')] 13 | -------------------------------------------------------------------------------- /configs/hornet/hornet-base_8xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hornet/hornet-base.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | data = dict(samples_per_gpu=64) 9 | 10 | optim_wrapper = dict(optimizer=dict(lr=4e-3), clip_grad=dict(max_norm=5.0)) 11 | 12 | custom_hooks = [dict(type='EMAHook', momentum=4e-5, priority='ABOVE_NORMAL')] 13 | -------------------------------------------------------------------------------- /configs/hornet/hornet-small-gf_8xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hornet/hornet-small-gf.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | data = dict(samples_per_gpu=64) 9 | 10 | optim_wrapper = dict(optimizer=dict(lr=4e-3), clip_grad=dict(max_norm=1.0)) 11 | 12 | custom_hooks = [dict(type='EMAHook', momentum=4e-5, priority='ABOVE_NORMAL')] 13 | -------------------------------------------------------------------------------- /configs/hornet/hornet-small_8xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hornet/hornet-small.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | data = dict(samples_per_gpu=64) 9 | 10 | optim_wrapper = dict(optimizer=dict(lr=4e-3), clip_grad=dict(max_norm=5.0)) 11 | 12 | custom_hooks = [dict(type='EMAHook', momentum=4e-5, priority='ABOVE_NORMAL')] 13 | -------------------------------------------------------------------------------- /configs/hornet/hornet-tiny-gf_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hornet/hornet-tiny-gf.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | data = dict(samples_per_gpu=128) 9 | 10 | optim_wrapper = dict(optimizer=dict(lr=4e-3), clip_grad=dict(max_norm=1.0)) 11 | 12 | custom_hooks = [dict(type='EMAHook', momentum=4e-5, priority='ABOVE_NORMAL')] 13 | -------------------------------------------------------------------------------- /configs/hornet/hornet-tiny_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hornet/hornet-tiny.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | data = dict(samples_per_gpu=128) 9 | 10 | optim_wrapper = dict(optimizer=dict(lr=4e-3), clip_grad=dict(max_norm=100.0)) 11 | 12 | custom_hooks = [dict(type='EMAHook', momentum=4e-5, priority='ABOVE_NORMAL')] 13 | -------------------------------------------------------------------------------- /configs/hrnet/hrnet-w18_4xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hrnet/hrnet-w18.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256_coslr.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # NOTE: `auto_scale_lr` is for automatically scaling LR 9 | # based on the actual training batch size. 10 | # base_batch_size = (4 GPUs) x (32 samples per GPU) 11 | auto_scale_lr = dict(base_batch_size=128) 12 | -------------------------------------------------------------------------------- /configs/hrnet/hrnet-w30_4xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hrnet/hrnet-w30.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256_coslr.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # NOTE: `auto_scale_lr` is for automatically scaling LR 9 | # based on the actual training batch size. 10 | # base_batch_size = (4 GPUs) x (32 samples per GPU) 11 | auto_scale_lr = dict(base_batch_size=128) 12 | -------------------------------------------------------------------------------- /configs/hrnet/hrnet-w32_4xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hrnet/hrnet-w32.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256_coslr.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # NOTE: `auto_scale_lr` is for automatically scaling LR 9 | # based on the actual training batch size. 10 | # base_batch_size = (4 GPUs) x (32 samples per GPU) 11 | auto_scale_lr = dict(base_batch_size=128) 12 | -------------------------------------------------------------------------------- /configs/hrnet/hrnet-w40_4xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hrnet/hrnet-w40.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256_coslr.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # NOTE: `auto_scale_lr` is for automatically scaling LR 9 | # based on the actual training batch size. 10 | # base_batch_size = (4 GPUs) x (32 samples per GPU) 11 | auto_scale_lr = dict(base_batch_size=128) 12 | -------------------------------------------------------------------------------- /configs/hrnet/hrnet-w44_4xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hrnet/hrnet-w44.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256_coslr.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # NOTE: `auto_scale_lr` is for automatically scaling LR 9 | # based on the actual training batch size. 10 | # base_batch_size = (4 GPUs) x (32 samples per GPU) 11 | auto_scale_lr = dict(base_batch_size=128) 12 | -------------------------------------------------------------------------------- /configs/hrnet/hrnet-w48_4xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hrnet/hrnet-w48.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256_coslr.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # NOTE: `auto_scale_lr` is for automatically scaling LR 9 | # based on the actual training batch size. 10 | # base_batch_size = (4 GPUs) x (32 samples per GPU) 11 | auto_scale_lr = dict(base_batch_size=128) 12 | -------------------------------------------------------------------------------- /configs/hrnet/hrnet-w64_4xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/hrnet/hrnet-w64.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256_coslr.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # NOTE: `auto_scale_lr` is for automatically scaling LR 9 | # based on the actual training batch size. 10 | # base_batch_size = (4 GPUs) x (32 samples per GPU) 11 | auto_scale_lr = dict(base_batch_size=128) 12 | -------------------------------------------------------------------------------- /configs/levit/deploy/levit-128_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = '../levit-128_8xb256_in1k.py' 2 | 3 | model = dict(backbone=dict(deploy=True), head=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/levit/deploy/levit-128s_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = '../levit-128s_8xb256_in1k.py' 2 | 3 | model = dict(backbone=dict(deploy=True), head=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/levit/deploy/levit-192_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = '../levit-192_8xb256_in1k.py' 2 | 3 | model = dict(backbone=dict(deploy=True), head=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/levit/deploy/levit-256_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = '../levit-256_8xb256_in1k.py' 2 | 3 | model = dict(backbone=dict(deploy=True), head=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/levit/deploy/levit-384_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = '../levit-384_8xb256_in1k.py' 2 | 3 | model = dict(backbone=dict(deploy=True), head=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/levit/levit-128_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/levit-256-p16.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs2048_adamw_levit.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # model settings 9 | model = dict(backbone=dict(arch='128'), head=dict(in_channels=384)) 10 | 11 | # dataset settings 12 | train_dataloader = dict(batch_size=256) 13 | -------------------------------------------------------------------------------- /configs/levit/levit-128s_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/levit-256-p16.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs2048_adamw_levit.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # model settings 9 | model = dict(backbone=dict(arch='128s'), head=dict(in_channels=384)) 10 | 11 | # dataset settings 12 | train_dataloader = dict(batch_size=256) 13 | -------------------------------------------------------------------------------- /configs/levit/levit-192_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/levit-256-p16.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs2048_adamw_levit.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # model settings 9 | model = dict(backbone=dict(arch='192'), head=dict(in_channels=384)) 10 | 11 | # dataset settings 12 | train_dataloader = dict(batch_size=256) 13 | -------------------------------------------------------------------------------- /configs/levit/levit-256_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/levit-256-p16.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs2048_adamw_levit.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # dataset settings 9 | train_dataloader = dict(batch_size=256) 10 | -------------------------------------------------------------------------------- /configs/levit/levit-384_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/levit-256-p16.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs2048_adamw_levit.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # model settings 9 | model = dict( 10 | backbone=dict(arch='384', drop_path_rate=0.1), 11 | head=dict(in_channels=768), 12 | ) 13 | 14 | # dataset settings 15 | train_dataloader = dict(batch_size=256) 16 | -------------------------------------------------------------------------------- /configs/mae/benchmarks/vit-huge-p14_8xb128-fsdp-coslr-50e_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./vit-huge-p14_8xb128-coslr-50e_in1k.py'] 2 | 3 | strategy = dict( 4 | type='FSDPStrategy', 5 | model_wrapper=dict( 6 | auto_wrap_policy=dict( 7 | type='torch.distributed.fsdp.wrap.size_based_auto_wrap_policy', 8 | min_num_params=1e7))) 9 | 10 | optim_wrapper = dict(type='AmpOptimWrapper') 11 | 12 | # runner which supports strategies 13 | runner_type = 'FlexibleRunner' 14 | -------------------------------------------------------------------------------- /configs/mae/benchmarks/vit-large-p16_8xb128-fsdp-coslr-50e_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./vit-large-p16_8xb128-coslr-50e_in1k.py'] 2 | 3 | strategy = dict( 4 | type='FSDPStrategy', 5 | model_wrapper=dict( 6 | auto_wrap_policy=dict( 7 | type='torch.distributed.fsdp.wrap.size_based_auto_wrap_policy', 8 | min_num_params=1e7))) 9 | 10 | optim_wrapper = dict(type='AmpOptimWrapper') 11 | 12 | # runner which supports strategies 13 | runner_type = 'FlexibleRunner' 14 | -------------------------------------------------------------------------------- /configs/mixmim/benchmarks/mixmim-base_8xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../../_base_/models/mixmim/mixmim_base.py', 3 | '../../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../../_base_/schedules/imagenet_bs256.py', 5 | '../../_base_/default_runtime.py' 6 | ] 7 | -------------------------------------------------------------------------------- /configs/mlp_mixer/mlp-mixer-base-p16_64xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/mlp_mixer_base_patch16.py', 3 | '../_base_/datasets/imagenet_bs64_mixer_224.py', 4 | '../_base_/schedules/imagenet_bs4096_AdamW.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | optim_wrapper = dict(clip_grad=dict(max_norm=1.0)) 9 | -------------------------------------------------------------------------------- /configs/mlp_mixer/mlp-mixer-large-p16_64xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/mlp_mixer_large_patch16.py', 3 | '../_base_/datasets/imagenet_bs64_mixer_224.py', 4 | '../_base_/schedules/imagenet_bs4096_AdamW.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | optim_wrapper = dict(clip_grad=dict(max_norm=1.0)) 9 | -------------------------------------------------------------------------------- /configs/mobilenet_v2/mobilenet-v2_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/mobilenet_v2_1x.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256_epochstep.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | -------------------------------------------------------------------------------- /configs/mobilenet_v3/mobilenet-v3-small_8xb16_cifar10.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/mobilenet_v3/mobilenet_v3_small_cifar.py', 3 | '../_base_/datasets/cifar10_bs16.py', 4 | '../_base_/schedules/cifar10_bs128.py', '../_base_/default_runtime.py' 5 | ] 6 | 7 | # schedule settings 8 | param_scheduler = dict( 9 | type='MultiStepLR', 10 | by_epoch=True, 11 | milestones=[120, 170], 12 | gamma=0.1, 13 | ) 14 | 15 | train_cfg = dict(by_epoch=True, max_epochs=200) 16 | -------------------------------------------------------------------------------- /configs/mobileone/deploy/mobileone-s0_deploy_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['../mobileone-s0_8xb32_in1k.py'] 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/mobileone/deploy/mobileone-s1_deploy_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['../mobileone-s1_8xb32_in1k.py'] 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/mobileone/deploy/mobileone-s2_deploy_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['../mobileone-s2_8xb32_in1k.py'] 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/mobileone/deploy/mobileone-s3_deploy_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['../mobileone-s3_8xb32_in1k.py'] 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/mobileone/deploy/mobileone-s4_deploy_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['../mobileone-s4_8xb32_in1k.py'] 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/mobileone/mobileone-s0_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/mobileone/mobileone_s0.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256_coslr_coswd_300e.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(paramwise_cfg=dict(norm_decay_mult=0.)) 10 | 11 | val_dataloader = dict(batch_size=256) 12 | test_dataloader = dict(batch_size=256) 13 | 14 | custom_hooks = [ 15 | dict( 16 | type='EMAHook', 17 | momentum=5e-4, 18 | priority='ABOVE_NORMAL', 19 | update_buffers=True) 20 | ] 21 | -------------------------------------------------------------------------------- /configs/regnet/regnetx-1.6gf_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./regnetx-400mf_8xb128_in1k.py'] 2 | 3 | # model settings 4 | model = dict( 5 | backbone=dict(type='RegNet', arch='regnetx_1.6gf'), 6 | head=dict(in_channels=912, )) 7 | -------------------------------------------------------------------------------- /configs/regnet/regnetx-12gf_8xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./regnetx-400mf_8xb128_in1k.py'] 2 | 3 | # model settings 4 | model = dict( 5 | backbone=dict(type='RegNet', arch='regnetx_12gf'), 6 | head=dict(in_channels=2240, )) 7 | 8 | # dataset settings 9 | train_dataloader = dict(batch_size=64) 10 | 11 | # schedule settings 12 | # for batch_size 512, use lr = 0.4 13 | optim_wrapper = dict(optimizer=dict(lr=0.4)) 14 | 15 | # NOTE: `auto_scale_lr` is for automatically scaling LR 16 | # based on the actual training batch size. 17 | # base_batch_size = (8 GPUs) x (64 samples per GPU) 18 | auto_scale_lr = dict(base_batch_size=512) 19 | -------------------------------------------------------------------------------- /configs/regnet/regnetx-3.2gf_8xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./regnetx-400mf_8xb128_in1k.py'] 2 | 3 | # model settings 4 | model = dict( 5 | backbone=dict(type='RegNet', arch='regnetx_3.2gf'), 6 | head=dict(in_channels=1008, )) 7 | 8 | # dataset settings 9 | train_dataloader = dict(batch_size=64) 10 | 11 | # schedule settings 12 | # for batch_size 512, use lr = 0.4 13 | optim_wrapper = dict(optimizer=dict(lr=0.4)) 14 | 15 | # NOTE: `auto_scale_lr` is for automatically scaling LR 16 | # based on the actual training batch size. 17 | # base_batch_size = (8 GPUs) x (64 samples per GPU) 18 | auto_scale_lr = dict(base_batch_size=512) 19 | -------------------------------------------------------------------------------- /configs/regnet/regnetx-4.0gf_8xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./regnetx-400mf_8xb128_in1k.py'] 2 | 3 | # model settings 4 | model = dict( 5 | backbone=dict(type='RegNet', arch='regnetx_4.0gf'), 6 | head=dict(in_channels=1360, )) 7 | 8 | # dataset settings 9 | train_dataloader = dict(batch_size=64) 10 | 11 | # schedule settings 12 | # for batch_size 512, use lr = 0.4 13 | optim_wrapper = dict(optimizer=dict(lr=0.4)) 14 | 15 | # NOTE: `auto_scale_lr` is for automatically scaling LR 16 | # based on the actual training batch size. 17 | # base_batch_size = (8 GPUs) x (64 samples per GPU) 18 | auto_scale_lr = dict(base_batch_size=512) 19 | -------------------------------------------------------------------------------- /configs/regnet/regnetx-6.4gf_8xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./regnetx-400mf_8xb128_in1k.py'] 2 | 3 | # model settings 4 | model = dict( 5 | backbone=dict(type='RegNet', arch='regnetx_6.4gf'), 6 | head=dict(in_channels=1624, )) 7 | 8 | # dataset settings 9 | train_dataloader = dict(batch_size=64) 10 | 11 | # schedule settings 12 | # for batch_size 512, use lr = 0.4 13 | optim_wrapper = dict(optimizer=dict(lr=0.4)) 14 | 15 | # NOTE: `auto_scale_lr` is for automatically scaling LR 16 | # based on the actual training batch size. 17 | # base_batch_size = (8 GPUs) x (64 samples per GPU) 18 | auto_scale_lr = dict(base_batch_size=512) 19 | -------------------------------------------------------------------------------- /configs/regnet/regnetx-8.0gf_8xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./regnetx-400mf_8xb128_in1k.py'] 2 | 3 | # model settings 4 | model = dict( 5 | backbone=dict(type='RegNet', arch='regnetx_8.0gf'), 6 | head=dict(in_channels=1920, )) 7 | 8 | # dataset settings 9 | train_dataloader = dict(batch_size=64) 10 | 11 | # schedule settings 12 | # for batch_size 512, use lr = 0.4 13 | optim_wrapper = dict(optimizer=dict(lr=0.4)) 14 | 15 | # NOTE: `auto_scale_lr` is for automatically scaling LR 16 | # based on the actual training batch size. 17 | # base_batch_size = (8 GPUs) x (64 samples per GPU) 18 | auto_scale_lr = dict(base_batch_size=512) 19 | -------------------------------------------------------------------------------- /configs/regnet/regnetx-800mf_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./regnetx-400mf_8xb128_in1k.py'] 2 | 3 | # model settings 4 | model = dict( 5 | backbone=dict(type='RegNet', arch='regnetx_800mf'), 6 | head=dict(in_channels=672, )) 7 | -------------------------------------------------------------------------------- /configs/replknet/deploy/replknet-31B-deploy_32xb64_in1k-384px.py: -------------------------------------------------------------------------------- 1 | _base_ = '../replknet-31B_32xb64_in1k-384px.py' 2 | 3 | model = dict(backbone=dict(small_kernel_merged=True)) 4 | -------------------------------------------------------------------------------- /configs/replknet/deploy/replknet-31B-deploy_32xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = '../replknet-31B_32xb64_in1k.py' 2 | 3 | model = dict(backbone=dict(small_kernel_merged=True)) 4 | -------------------------------------------------------------------------------- /configs/replknet/deploy/replknet-31L-deploy_32xb64_in1k-384px.py: -------------------------------------------------------------------------------- 1 | _base_ = '../replknet-31L_32xb64_in1k-384px.py' 2 | 3 | model = dict(backbone=dict(small_kernel_merged=True)) 4 | -------------------------------------------------------------------------------- /configs/replknet/deploy/replknet-XL-deploy_32xb64_in1k-320px.py: -------------------------------------------------------------------------------- 1 | _base_ = '../replknet-XL_32xb64_in1k-320px.py' 2 | 3 | model = dict(backbone=dict(small_kernel_merged=True)) 4 | -------------------------------------------------------------------------------- /configs/replknet/replknet-31B_32xb64_in1k-384px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/replknet-31B_in1k.py', 3 | '../_base_/datasets/imagenet_bs16_pil_bicubic_384.py', 4 | '../_base_/schedules/imagenet_bs256_coslr.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | param_scheduler = dict( 10 | type='CosineAnnealingLR', T_max=300, by_epoch=True, begin=0, end=300) 11 | 12 | train_cfg = dict(by_epoch=True, max_epochs=300) 13 | -------------------------------------------------------------------------------- /configs/replknet/replknet-31B_32xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/replknet-31B_in1k.py', 3 | '../_base_/datasets/imagenet_bs32_pil_bicubic.py', 4 | '../_base_/schedules/imagenet_bs256_coslr.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | param_scheduler = dict( 10 | type='CosineAnnealingLR', T_max=300, by_epoch=True, begin=0, end=300) 11 | 12 | train_cfg = dict(by_epoch=True, max_epochs=300) 13 | -------------------------------------------------------------------------------- /configs/replknet/replknet-31L_32xb64_in1k-384px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/replknet-31L_in1k.py', 3 | '../_base_/datasets/imagenet_bs16_pil_bicubic_384.py', 4 | '../_base_/schedules/imagenet_bs256_coslr.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | param_scheduler = dict( 10 | type='CosineAnnealingLR', T_max=300, by_epoch=True, begin=0, end=300) 11 | 12 | train_cfg = dict(by_epoch=True, max_epochs=300) 13 | -------------------------------------------------------------------------------- /configs/replknet/replknet-XL_32xb64_in1k-320px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/replknet-XL_in1k.py', 3 | '../_base_/datasets/imagenet_bs8_pil_bicubic_320.py', 4 | '../_base_/schedules/imagenet_bs256_coslr.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | param_scheduler = dict( 10 | type='CosineAnnealingLR', T_max=300, by_epoch=True, begin=0, end=300) 11 | 12 | train_cfg = dict(by_epoch=True, max_epochs=300) 13 | -------------------------------------------------------------------------------- /configs/repmlp/repmlp-base_delopy_8xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./repmlp-base_8xb64_in1k.py'] 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/repmlp/repmlp-base_deploy_8xb64_in1k-256px.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./repmlp-base_8xb64_in1k-256px.py'] 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/repvgg/repvgg-A0_deploy_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = './repvgg-A0_8xb32_in1k.py' 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/repvgg/repvgg-A1_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = './repvgg-A0_8xb32_in1k.py' 2 | 3 | model = dict(backbone=dict(arch='A1')) 4 | -------------------------------------------------------------------------------- /configs/repvgg/repvgg-A2_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = './repvgg-A0_8xb32_in1k.py' 2 | 3 | model = dict(backbone=dict(arch='A2'), head=dict(in_channels=1408)) 4 | -------------------------------------------------------------------------------- /configs/repvgg/repvgg-B0_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = './repvgg-A0_8xb32_in1k.py' 2 | 3 | model = dict(backbone=dict(arch='B0'), head=dict(in_channels=1280)) 4 | -------------------------------------------------------------------------------- /configs/repvgg/repvgg-B1_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = './repvgg-A0_8xb32_in1k.py' 2 | 3 | model = dict(backbone=dict(arch='B1'), head=dict(in_channels=2048)) 4 | -------------------------------------------------------------------------------- /configs/repvgg/repvgg-B1g2_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = './repvgg-A0_8xb32_in1k.py' 2 | 3 | model = dict(backbone=dict(arch='B1g2'), head=dict(in_channels=2048)) 4 | -------------------------------------------------------------------------------- /configs/repvgg/repvgg-B1g4_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = './repvgg-A0_8xb32_in1k.py' 2 | 3 | model = dict(backbone=dict(arch='B1g4'), head=dict(in_channels=2048)) 4 | -------------------------------------------------------------------------------- /configs/repvgg/repvgg-B2_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = './repvgg-A0_8xb32_in1k.py' 2 | 3 | model = dict(backbone=dict(arch='B2'), head=dict(in_channels=2560)) 4 | -------------------------------------------------------------------------------- /configs/repvgg/repvgg-B2g4_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = './repvgg-B3_8xb32_in1k.py' 2 | 3 | model = dict(backbone=dict(arch='B2g4'), head=dict(in_channels=2560)) 4 | -------------------------------------------------------------------------------- /configs/repvgg/repvgg-B3g4_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = './repvgg-B3_8xb32_in1k.py' 2 | 3 | model = dict(backbone=dict(arch='B3g4')) 4 | -------------------------------------------------------------------------------- /configs/res2net/res2net101-w26-s4_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/res2net101-w26-s4.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/res2net/res2net50-w14-s8_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/res2net50-w14-s8.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/res2net/res2net50-w26-s8_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/res2net50-w26-s8.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnet/resnet101_8xb16_cifar10.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet101_cifar.py', 3 | '../_base_/datasets/cifar10_bs16.py', 4 | '../_base_/schedules/cifar10_bs128.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnet/resnet101_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet101.py', '../_base_/datasets/imagenet_bs32.py', 3 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 4 | ] 5 | -------------------------------------------------------------------------------- /configs/resnet/resnet152_8xb16_cifar10.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet152_cifar.py', 3 | '../_base_/datasets/cifar10_bs16.py', 4 | '../_base_/schedules/cifar10_bs128.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnet/resnet152_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet152.py', '../_base_/datasets/imagenet_bs32.py', 3 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 4 | ] 5 | -------------------------------------------------------------------------------- /configs/resnet/resnet18_8xb16_cifar10.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet18_cifar.py', '../_base_/datasets/cifar10_bs16.py', 3 | '../_base_/schedules/cifar10_bs128.py', '../_base_/default_runtime.py' 4 | ] 5 | -------------------------------------------------------------------------------- /configs/resnet/resnet18_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet18.py', '../_base_/datasets/imagenet_bs32.py', 3 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 4 | ] 5 | -------------------------------------------------------------------------------- /configs/resnet/resnet34_8xb16_cifar10.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet34_cifar.py', '../_base_/datasets/cifar10_bs16.py', 3 | '../_base_/schedules/cifar10_bs128.py', '../_base_/default_runtime.py' 4 | ] 5 | -------------------------------------------------------------------------------- /configs/resnet/resnet34_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet34.py', '../_base_/datasets/imagenet_bs32.py', 3 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 4 | ] 5 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_32xb64-warmup-coslr_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet50.py', '../_base_/datasets/imagenet_bs64.py', 3 | '../_base_/schedules/imagenet_bs2048_coslr.py', 4 | '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_32xb64-warmup-lbs_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./resnet50_32xb64-warmup_in1k.py'] 2 | model = dict( 3 | head=dict( 4 | type='LinearClsHead', 5 | num_classes=1000, 6 | in_channels=2048, 7 | loss=dict( 8 | type='LabelSmoothLoss', 9 | loss_weight=1.0, 10 | label_smooth_val=0.1, 11 | num_classes=1000), 12 | )) 13 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_32xb64-warmup_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet50.py', '../_base_/datasets/imagenet_bs64.py', 3 | '../_base_/schedules/imagenet_bs2048.py', '../_base_/default_runtime.py' 4 | ] 5 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_8xb128_coslr-90e_in21k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet50.py', '../_base_/datasets/imagenet21k_bs128.py', 3 | '../_base_/schedules/imagenet_bs1024_coslr.py', 4 | '../_base_/default_runtime.py' 5 | ] 6 | 7 | # model settings 8 | model = dict(head=dict(num_classes=21843)) 9 | 10 | # runtime settings 11 | train_cfg = dict(by_epoch=True, max_epochs=90) 12 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_8xb16-mixup_cifar10.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet50_cifar_mixup.py', 3 | '../_base_/datasets/cifar10_bs16.py', 4 | '../_base_/schedules/cifar10_bs128.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_8xb16_cifar10.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet50_cifar.py', '../_base_/datasets/cifar10_bs16.py', 3 | '../_base_/schedules/cifar10_bs128.py', '../_base_/default_runtime.py' 4 | ] 5 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_8xb16_cifar100.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet50_cifar.py', 3 | '../_base_/datasets/cifar100_bs16.py', 4 | '../_base_/schedules/cifar10_bs128.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # model settings 9 | model = dict(head=dict(num_classes=100)) 10 | 11 | # schedule settings 12 | optim_wrapper = dict(optimizer=dict(weight_decay=0.0005)) 13 | 14 | param_scheduler = dict( 15 | type='MultiStepLR', 16 | by_epoch=True, 17 | milestones=[60, 120, 160], 18 | gamma=0.2, 19 | ) 20 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_8xb32-coslr-preciseBN_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = 'resnet50_8xb32-coslr_in1k.py' 2 | 3 | # Precise BN hook will update the bn stats, so this hook should be executed 4 | # before CheckpointHook(priority of 'VERY_LOW') and 5 | # EMAHook(priority of 'NORMAL') So set the priority of PreciseBNHook to 6 | # 'ABOVENORMAL' here. 7 | custom_hooks = [ 8 | dict( 9 | type='PreciseBNHook', 10 | num_samples=8192, 11 | interval=1, 12 | priority='ABOVE_NORMAL') 13 | ] 14 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_8xb32-coslr_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet50.py', '../_base_/datasets/imagenet_bs32.py', 3 | '../_base_/schedules/imagenet_bs256_coslr.py', 4 | '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_8xb32-cutmix_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet50_cutmix.py', 3 | '../_base_/datasets/imagenet_bs32.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_8xb32-fp16-dynamic_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./resnet50_8xb32_in1k.py'] 2 | 3 | # schedule settings 4 | optim_wrapper = dict(type='AmpOptimWrapper', loss_scale='dynamic') 5 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_8xb32-fp16_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['./resnet50_8xb32_in1k.py'] 2 | 3 | # schedule settings 4 | optim_wrapper = dict(type='AmpOptimWrapper', loss_scale=512.) 5 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_8xb32-lbs_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet50_label_smooth.py', 3 | '../_base_/datasets/imagenet_bs32.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_8xb32-mixup_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet50_mixup.py', 3 | '../_base_/datasets/imagenet_bs32.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnet/resnet50_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnet50.py', '../_base_/datasets/imagenet_bs32.py', 3 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 4 | ] 5 | -------------------------------------------------------------------------------- /configs/resnet/resnetv1c101_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnetv1c50.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | 7 | model = dict(backbone=dict(depth=101)) 8 | -------------------------------------------------------------------------------- /configs/resnet/resnetv1c152_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnetv1c50.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | 7 | model = dict(backbone=dict(depth=152)) 8 | -------------------------------------------------------------------------------- /configs/resnet/resnetv1c50_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnetv1c50.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnet/resnetv1d101_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnetv1d101.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnet/resnetv1d152_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnetv1d152.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnet/resnetv1d50_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnetv1d50.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnext/resnext101-32x4d_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnext101_32x4d.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnext/resnext101-32x8d_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnext101_32x8d.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnext/resnext152-32x4d_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnext152_32x4d.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/resnext/resnext50-32x4d_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/resnext50_32x4d.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/revvit/revvit-base_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/revvit/revvit-base.py', 3 | '../_base_/datasets/imagenet_bs128_revvit_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_revvit.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | -------------------------------------------------------------------------------- /configs/revvit/revvit-small_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/revvit/revvit-small.py', 3 | '../_base_/datasets/imagenet_bs128_revvit_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_revvit.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | -------------------------------------------------------------------------------- /configs/riformer/deploy/riformer-m36-deploy_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = '../riformer-m36_8xb128_in1k.py' 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/riformer/deploy/riformer-m36-deploy_8xb64_in1k-384px.py: -------------------------------------------------------------------------------- 1 | _base_ = '../riformer-m36_8xb64_in1k-384px.py' 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/riformer/deploy/riformer-m48-deploy_8xb64_in1k-384px.py: -------------------------------------------------------------------------------- 1 | _base_ = '../riformer-m48_8xb64_in1k-384px.py' 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/riformer/deploy/riformer-m48-deploy_8xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = '../riformer-m48_8xb64_in1k.py' 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/riformer/deploy/riformer-s12-deploy_8xb128_in1k-384px.py: -------------------------------------------------------------------------------- 1 | _base_ = '../riformer-s12_8xb128_in1k-384px.py' 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/riformer/deploy/riformer-s12-deploy_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = '../riformer-s12_8xb128_in1k.py' 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/riformer/deploy/riformer-s24-deploy_8xb128_in1k-384px.py: -------------------------------------------------------------------------------- 1 | _base_ = '../riformer-s24_8xb128_in1k-384px.py' 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/riformer/deploy/riformer-s24-deploy_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = '../riformer-s24_8xb128_in1k.py' 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/riformer/deploy/riformer-s36-deploy_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = '../riformer-s36_8xb128_in1k.py' 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/riformer/deploy/riformer-s36-deploy_8xb64_in1k-384px.py: -------------------------------------------------------------------------------- 1 | _base_ = '../riformer-s36_8xb64_in1k-384px.py' 2 | 3 | model = dict(backbone=dict(deploy=True)) 4 | -------------------------------------------------------------------------------- /configs/sam/vit-base-p16_sam_headless.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ViTSAM', 6 | arch='base', 7 | img_size=1024, 8 | patch_size=16, 9 | out_channels=256, 10 | use_abs_pos=True, 11 | use_rel_pos=True, 12 | window_size=14, 13 | ), 14 | neck=None, 15 | head=None, 16 | ) 17 | 18 | data_preprocessor = dict( 19 | # RGB format normalization parameters 20 | mean=[123.675, 116.28, 103.53], 21 | std=[58.395, 57.12, 57.375], 22 | # convert image from BGR to RGB 23 | to_rgb=True, 24 | ) 25 | -------------------------------------------------------------------------------- /configs/sam/vit-huge-p16_sam_headless.py: -------------------------------------------------------------------------------- 1 | # model settings 2 | model = dict( 3 | type='ImageClassifier', 4 | backbone=dict( 5 | type='ViTSAM', 6 | arch='huge', 7 | img_size=1024, 8 | patch_size=16, 9 | out_channels=256, 10 | use_abs_pos=True, 11 | use_rel_pos=True, 12 | window_size=14, 13 | ), 14 | neck=None, 15 | head=None, 16 | ) 17 | 18 | data_preprocessor = dict( 19 | # RGB format normalization parameters 20 | mean=[123.675, 116.28, 103.53], 21 | std=[58.395, 57.12, 57.375], 22 | # convert image from BGR to RGB 23 | to_rgb=True, 24 | ) 25 | -------------------------------------------------------------------------------- /configs/seresnet/seresnet101_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/seresnet101.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/seresnet/seresnet50_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/seresnet50.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256_140e.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | -------------------------------------------------------------------------------- /configs/seresnet/seresnext101-32x4d_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/seresnext101_32x4d.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/seresnet/seresnext50-32x4d_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/seresnext50_32x4d.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/shufflenet_v1/shufflenet-v1-1x_16xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/shufflenet_v1_1x.py', 3 | '../_base_/datasets/imagenet_bs64_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs1024_linearlr_bn_nowd.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | -------------------------------------------------------------------------------- /configs/shufflenet_v2/shufflenet-v2-1x_16xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/shufflenet_v2_1x.py', 3 | '../_base_/datasets/imagenet_bs64_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs1024_linearlr_bn_nowd.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | -------------------------------------------------------------------------------- /configs/simmim/simmim_swin-base-w6_16xb128-amp-coslr-100e_in1k-192px.py: -------------------------------------------------------------------------------- 1 | _base_ = 'simmim_swin-base-w6_8xb256-amp-coslr-100e_in1k-192px.py' 2 | 3 | # dataset 16 GPUs x 128 4 | train_dataloader = dict(batch_size=128) 5 | -------------------------------------------------------------------------------- /configs/swin_transformer/swin-base_16xb64_in1k-384px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer/base_384.py', 3 | '../_base_/datasets/imagenet_bs64_swin_384.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(clip_grad=dict(max_norm=5.0)) 10 | -------------------------------------------------------------------------------- /configs/swin_transformer/swin-base_16xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer/base_224.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(clip_grad=dict(max_norm=5.0)) 10 | -------------------------------------------------------------------------------- /configs/swin_transformer/swin-large_16xb64_in1k-384px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer/large_384.py', 3 | '../_base_/datasets/imagenet_bs64_swin_384.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(clip_grad=dict(max_norm=5.0)) 10 | -------------------------------------------------------------------------------- /configs/swin_transformer/swin-large_16xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer/large_224.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(clip_grad=dict(max_norm=5.0)) 10 | -------------------------------------------------------------------------------- /configs/swin_transformer/swin-small_16xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer/small_224.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(clip_grad=dict(max_norm=5.0)) 10 | -------------------------------------------------------------------------------- /configs/swin_transformer/swin-tiny_16xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer/tiny_224.py', 3 | '../_base_/datasets/imagenet_bs64_swin_224.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(clip_grad=dict(max_norm=5.0)) 10 | -------------------------------------------------------------------------------- /configs/swin_transformer_v2/swinv2-base-w16_16xb64_in1k-256px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer_v2/base_256.py', 3 | '../_base_/datasets/imagenet_bs64_swin_256.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | model = dict(backbone=dict(window_size=[16, 16, 16, 8])) 9 | -------------------------------------------------------------------------------- /configs/swin_transformer_v2/swinv2-base-w16_in21k-pre_16xb64_in1k-256px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer_v2/base_256.py', 3 | '../_base_/datasets/imagenet_bs64_swin_256.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | model = dict( 9 | type='ImageClassifier', 10 | backbone=dict( 11 | window_size=[16, 16, 16, 8], 12 | drop_path_rate=0.2, 13 | pretrained_window_sizes=[12, 12, 12, 6])) 14 | -------------------------------------------------------------------------------- /configs/swin_transformer_v2/swinv2-base-w24_in21k-pre_16xb64_in1k-384px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer_v2/base_384.py', 3 | '../_base_/datasets/imagenet_bs64_swin_384.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | model = dict( 9 | type='ImageClassifier', 10 | backbone=dict( 11 | img_size=384, 12 | window_size=[24, 24, 24, 12], 13 | drop_path_rate=0.2, 14 | pretrained_window_sizes=[12, 12, 12, 6])) 15 | -------------------------------------------------------------------------------- /configs/swin_transformer_v2/swinv2-base-w8_16xb64_in1k-256px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer_v2/base_256.py', 3 | '../_base_/datasets/imagenet_bs64_swin_256.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | -------------------------------------------------------------------------------- /configs/swin_transformer_v2/swinv2-large-w16_in21k-pre_16xb64_in1k-256px.py: -------------------------------------------------------------------------------- 1 | # Only for evaluation 2 | _base_ = [ 3 | '../_base_/models/swin_transformer_v2/large_256.py', 4 | '../_base_/datasets/imagenet_bs64_swin_256.py', 5 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 6 | '../_base_/default_runtime.py' 7 | ] 8 | 9 | model = dict( 10 | type='ImageClassifier', 11 | backbone=dict( 12 | window_size=[16, 16, 16, 8], pretrained_window_sizes=[12, 12, 12, 6]), 13 | ) 14 | -------------------------------------------------------------------------------- /configs/swin_transformer_v2/swinv2-large-w24_in21k-pre_16xb64_in1k-384px.py: -------------------------------------------------------------------------------- 1 | # Only for evaluation 2 | _base_ = [ 3 | '../_base_/models/swin_transformer_v2/large_384.py', 4 | '../_base_/datasets/imagenet_bs64_swin_384.py', 5 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 6 | '../_base_/default_runtime.py' 7 | ] 8 | 9 | model = dict( 10 | type='ImageClassifier', 11 | backbone=dict( 12 | img_size=384, 13 | window_size=[24, 24, 24, 12], 14 | pretrained_window_sizes=[12, 12, 12, 6]), 15 | ) 16 | -------------------------------------------------------------------------------- /configs/swin_transformer_v2/swinv2-small-w16_16xb64_in1k-256px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer_v2/small_256.py', 3 | '../_base_/datasets/imagenet_bs64_swin_256.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | model = dict(backbone=dict(window_size=[16, 16, 16, 8])) 9 | -------------------------------------------------------------------------------- /configs/swin_transformer_v2/swinv2-small-w8_16xb64_in1k-256px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer_v2/small_256.py', 3 | '../_base_/datasets/imagenet_bs64_swin_256.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | -------------------------------------------------------------------------------- /configs/swin_transformer_v2/swinv2-tiny-w16_16xb64_in1k-256px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer_v2/tiny_256.py', 3 | '../_base_/datasets/imagenet_bs64_swin_256.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | model = dict(backbone=dict(window_size=[16, 16, 16, 8])) 9 | -------------------------------------------------------------------------------- /configs/swin_transformer_v2/swinv2-tiny-w8_16xb64_in1k-256px.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/swin_transformer_v2/tiny_256.py', 3 | '../_base_/datasets/imagenet_bs64_swin_256.py', 4 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | -------------------------------------------------------------------------------- /configs/tinyvit/tinyvit-11m-distill_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | './tinyvit-11m_8xb256_in1k.py', 3 | ] 4 | -------------------------------------------------------------------------------- /configs/tinyvit/tinyvit-11m_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/datasets/imagenet_bs32_pil_bicubic.py', 3 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 4 | '../_base_/default_runtime.py', 5 | '../_base_/models/tinyvit/tinyvit-11m.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/tinyvit/tinyvit-21m-distill_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | './tinyvit-21m_8xb256_in1k.py', 3 | ] 4 | -------------------------------------------------------------------------------- /configs/tinyvit/tinyvit-21m_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/datasets/imagenet_bs32_pil_bicubic.py', 3 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 4 | '../_base_/default_runtime.py', 5 | '../_base_/models/tinyvit/tinyvit-21m.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/tinyvit/tinyvit-5m-distill_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | './tinyvit-5m_8xb256_in1k.py', 3 | ] 4 | -------------------------------------------------------------------------------- /configs/tinyvit/tinyvit-5m_8xb256_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/datasets/imagenet_bs32_pil_bicubic.py', 3 | '../_base_/schedules/imagenet_bs1024_adamw_swin.py', 4 | '../_base_/default_runtime.py', 5 | '../_base_/models/tinyvit/tinyvit-5m.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/twins/twins-pcpvt-large_16xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['twins-pcpvt-base_8xb128_in1k.py'] 2 | 3 | # model settings 4 | model = dict(backbone=dict(arch='large'), head=dict(in_channels=512)) 5 | 6 | # dataset settings 7 | train_dataloader = dict(batch_size=64) 8 | -------------------------------------------------------------------------------- /configs/twins/twins-pcpvt-small_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['twins-pcpvt-base_8xb128_in1k.py'] 2 | 3 | # model settings 4 | model = dict(backbone=dict(arch='small'), head=dict(in_channels=512)) 5 | -------------------------------------------------------------------------------- /configs/twins/twins-svt-large_16xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['twins-svt-base_8xb128_in1k.py'] 2 | 3 | # model settings 4 | model = dict(backbone=dict(arch='large'), head=dict(in_channels=1024)) 5 | 6 | # dataset settings 7 | train_dataloader = dict(batch_size=64) 8 | -------------------------------------------------------------------------------- /configs/twins/twins-svt-small_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = ['twins-svt-base_8xb128_in1k.py'] 2 | 3 | # model settings 4 | model = dict(backbone=dict(arch='small'), head=dict(in_channels=512)) 5 | -------------------------------------------------------------------------------- /configs/vgg/vgg11_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vgg11.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(optimizer=dict(lr=0.01)) 10 | -------------------------------------------------------------------------------- /configs/vgg/vgg11bn_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vgg11bn.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/vgg/vgg13_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vgg13.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(optimizer=dict(lr=0.01)) 10 | -------------------------------------------------------------------------------- /configs/vgg/vgg13bn_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vgg13bn.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/vgg/vgg16_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vgg16.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(optimizer=dict(lr=0.01)) 10 | -------------------------------------------------------------------------------- /configs/vgg/vgg16bn_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vgg16bn.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/vgg/vgg19_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vgg19.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | 8 | # schedule settings 9 | optim_wrapper = dict(optimizer=dict(lr=0.01)) 10 | -------------------------------------------------------------------------------- /configs/vgg/vgg19bn_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vgg19bn.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/vig/pvig-medium_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vig/pyramid_vig_medium.py', 3 | '../_base_/datasets/imagenet_bs128_vig_224.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/vig/pvig-small_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vig/pyramid_vig_small.py', 3 | '../_base_/datasets/imagenet_bs128_vig_224.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/vig/pvig-tiny_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vig/pyramid_vig_tiny.py', 3 | '../_base_/datasets/imagenet_bs128_vig_224.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/vig/vig-base_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vig/vig_base.py', 3 | '../_base_/datasets/imagenet_bs128_vig_224.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/vig/vig-small_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vig/vig_small.py', 3 | '../_base_/datasets/imagenet_bs128_vig_224.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/vig/vig-tiny_8xb128_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vig/vig_tiny.py', 3 | '../_base_/datasets/imagenet_bs128_vig_224.py', 4 | '../_base_/schedules/imagenet_bs256.py', 5 | '../_base_/default_runtime.py', 6 | ] 7 | -------------------------------------------------------------------------------- /configs/vision_transformer/vit-base-p16_64xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vit-base-p16.py', 3 | '../_base_/datasets/imagenet_bs64_pil_resize_autoaug.py', 4 | '../_base_/schedules/imagenet_bs4096_AdamW.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # model setting 9 | model = dict( 10 | head=dict(hidden_dim=3072), 11 | train_cfg=dict(augments=dict(type='Mixup', alpha=0.2)), 12 | ) 13 | 14 | # schedule setting 15 | optim_wrapper = dict(clip_grad=dict(max_norm=1.0)) 16 | -------------------------------------------------------------------------------- /configs/vision_transformer/vit-base-p32_64xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vit-base-p32.py', 3 | '../_base_/datasets/imagenet_bs64_pil_resize_autoaug.py', 4 | '../_base_/schedules/imagenet_bs4096_AdamW.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # model setting 9 | model = dict( 10 | head=dict(hidden_dim=3072), 11 | train_cfg=dict(augments=dict(type='Mixup', alpha=0.2)), 12 | ) 13 | 14 | # schedule setting 15 | optim_wrapper = dict(clip_grad=dict(max_norm=1.0)) 16 | -------------------------------------------------------------------------------- /configs/vision_transformer/vit-large-p16_64xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vit-large-p16.py', 3 | '../_base_/datasets/imagenet_bs64_pil_resize_autoaug.py', 4 | '../_base_/schedules/imagenet_bs4096_AdamW.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # model setting 9 | model = dict( 10 | head=dict(hidden_dim=3072), 11 | train_cfg=dict(augments=dict(type='Mixup', alpha=0.2)), 12 | ) 13 | 14 | # schedule setting 15 | optim_wrapper = dict(clip_grad=dict(max_norm=1.0)) 16 | -------------------------------------------------------------------------------- /configs/vision_transformer/vit-large-p32_64xb64_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/vit-large-p32.py', 3 | '../_base_/datasets/imagenet_bs64_pil_resize_autoaug.py', 4 | '../_base_/schedules/imagenet_bs4096_AdamW.py', 5 | '../_base_/default_runtime.py' 6 | ] 7 | 8 | # model setting 9 | model = dict( 10 | head=dict(hidden_dim=3072), 11 | train_cfg=dict(augments=dict(type='Mixup', alpha=0.2)), 12 | ) 13 | 14 | # schedule setting 15 | optim_wrapper = dict(clip_grad=dict(max_norm=1.0)) 16 | -------------------------------------------------------------------------------- /configs/wrn/wide-resnet101_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/wide-resnet50.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | 7 | model = dict(backbone=dict(depth=101)) 8 | -------------------------------------------------------------------------------- /configs/wrn/wide-resnet50_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/wide-resnet50.py', 3 | '../_base_/datasets/imagenet_bs32_pil_resize.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /configs/wrn/wide-resnet50_timm_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | _base_ = [ 2 | '../_base_/models/wide-resnet50.py', 3 | '../_base_/datasets/imagenet_bs32_pil_bicubic.py', 4 | '../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py' 5 | ] 6 | -------------------------------------------------------------------------------- /dataset-index.yml: -------------------------------------------------------------------------------- 1 | imagenet1k: 2 | dataset: OpenDataLab/ImageNet-1K 3 | download_root: data 4 | data_root: data/imagenet 5 | script: tools/dataset_converters/odl_imagenet1k_preprocess.sh 6 | 7 | cub: 8 | dataset: OpenDataLab/CUB-200-2011 9 | download_root: data 10 | data_root: data/CUB_200_2011 11 | script: tools/dataset_converters/odl_cub_preprocess.sh 12 | -------------------------------------------------------------------------------- /demo/bird.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/demo/bird.JPEG -------------------------------------------------------------------------------- /demo/cat-dog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/demo/cat-dog.png -------------------------------------------------------------------------------- /demo/demo.JPEG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/demo/demo.JPEG -------------------------------------------------------------------------------- /demo/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/demo/dog.jpg -------------------------------------------------------------------------------- /docker/serve/config.properties: -------------------------------------------------------------------------------- 1 | inference_address=http://0.0.0.0:8080 2 | management_address=http://0.0.0.0:8081 3 | metrics_address=http://0.0.0.0:8082 4 | model_store=/home/model-server/model-store 5 | load_models=all 6 | -------------------------------------------------------------------------------- /docker/serve/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [[ "$1" = "serve" ]]; then 5 | shift 1 6 | torchserve --start --ts-config /home/model-server/config.properties 7 | else 8 | eval "$@" 9 | fi 10 | 11 | # prevent docker exit 12 | tail -f /dev/null 13 | -------------------------------------------------------------------------------- /docs/en/_static/image/confusion-matrix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/docs/en/_static/image/confusion-matrix.png -------------------------------------------------------------------------------- /docs/en/_static/image/mmpt-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/docs/en/_static/image/mmpt-logo.png -------------------------------------------------------------------------------- /docs/en/_static/image/tools/analysis/analyze_log.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/docs/en/_static/image/tools/analysis/analyze_log.jpg -------------------------------------------------------------------------------- /docs/en/_static/js/custom.js: -------------------------------------------------------------------------------- 1 | var collapsedSections = ['Advanced Guides', 'Model Zoo', 'Visualization', 'Analysis Tools', 'Deployment', 'Notes']; 2 | 3 | $(document).ready(function () { 4 | $('.model-summary').DataTable({ 5 | "stateSave": false, 6 | "lengthChange": false, 7 | "pageLength": 20, 8 | "order": [] 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /docs/en/_templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block body %} 4 | 5 |

Page Not Found

6 |

7 | The page you are looking for cannot be found. 8 |

9 |

10 | If you just switched documentation versions, it is likely that the page you were on is moved. You can look for it in 11 | the content table left, or go to the homepage. 12 |

13 |

14 | If you cannot find documentation you want, please open an issue to tell us! 16 |

17 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /docs/en/_templates/autosummary/class.rst: -------------------------------------------------------------------------------- 1 | .. role:: hidden 2 | :class: hidden-section 3 | .. currentmodule:: {{ module }} 4 | 5 | 6 | {{ name | underline}} 7 | 8 | .. autoclass:: {{ name }} 9 | :members: 10 | 11 | .. 12 | autogenerated from _templates/autosummary/class.rst 13 | note it does not have :inherited-members: 14 | -------------------------------------------------------------------------------- /docs/en/_templates/callable.rst: -------------------------------------------------------------------------------- 1 | .. role:: hidden 2 | :class: hidden-section 3 | .. currentmodule:: {{ module }} 4 | 5 | 6 | {{ name | underline}} 7 | 8 | .. autoclass:: {{ name }} 9 | :members: 10 | :special-members: __call__ 11 | 12 | .. 13 | autogenerated from _templates/callable.rst 14 | note it does not have :inherited-members: 15 | -------------------------------------------------------------------------------- /docs/en/_templates/data_transform.rst: -------------------------------------------------------------------------------- 1 | .. role:: hidden 2 | :class: hidden-section 3 | .. currentmodule:: {{ module }} 4 | 5 | 6 | {{ name | underline}} 7 | 8 | .. autoclass:: {{ name }} 9 | :members: transform 10 | 11 | .. 12 | autogenerated from _templates/callable.rst 13 | note it does not have :inherited-members: 14 | -------------------------------------------------------------------------------- /docs/en/api/structures.rst: -------------------------------------------------------------------------------- 1 | .. role:: hidden 2 | :class: hidden-section 3 | 4 | .. module:: mmpretrain.structures 5 | 6 | mmpretrain.structures 7 | =================================== 8 | 9 | This package includes basic data structures. 10 | 11 | DataSample 12 | ------------- 13 | .. autoclass:: DataSample 14 | -------------------------------------------------------------------------------- /docs/en/api/utils.rst: -------------------------------------------------------------------------------- 1 | .. role:: hidden 2 | :class: hidden-section 3 | 4 | .. module:: mmpretrain.utils 5 | 6 | mmpretrain.utils 7 | =================================== 8 | 9 | This package includes some useful helper functions for developing. 10 | 11 | .. autosummary:: 12 | :toctree: generated 13 | :nosignatures: 14 | 15 | collect_env 16 | register_all_modules 17 | load_json_log 18 | track_on_main_process 19 | get_ori_model 20 | -------------------------------------------------------------------------------- /docs/en/api/visualization.rst: -------------------------------------------------------------------------------- 1 | .. role:: hidden 2 | :class: hidden-section 3 | 4 | .. module:: mmpretrain.visualization 5 | 6 | mmpretrain.visualization 7 | =================================== 8 | 9 | This package includes visualizer and some helper functions for visualization. 10 | 11 | Visualizer 12 | ------------- 13 | .. autoclass:: UniversalVisualizer 14 | :members: 15 | -------------------------------------------------------------------------------- /docs/en/docutils.conf: -------------------------------------------------------------------------------- 1 | [html writers] 2 | table_style: colwidths-auto 3 | -------------------------------------------------------------------------------- /docs/en/notes/contribution_guide.md: -------------------------------------------------------------------------------- 1 | ../../../CONTRIBUTING.md -------------------------------------------------------------------------------- /docs/zh_CN/_static/image/confusion-matrix.png: -------------------------------------------------------------------------------- 1 | ../../../en/_static/image/confusion-matrix.png -------------------------------------------------------------------------------- /docs/zh_CN/_static/image/mmpt-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/docs/zh_CN/_static/image/mmpt-logo.png -------------------------------------------------------------------------------- /docs/zh_CN/_static/image/tools/analysis/analyze_log.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/docs/zh_CN/_static/image/tools/analysis/analyze_log.jpg -------------------------------------------------------------------------------- /docs/zh_CN/_static/js/custom.js: -------------------------------------------------------------------------------- 1 | var collapsedSections = ['进阶教程', '模型库', '可视化', '分析工具', '部署', '其他说明']; 2 | 3 | $(document).ready(function () { 4 | $('.model-summary').DataTable({ 5 | "stateSave": false, 6 | "lengthChange": false, 7 | "pageLength": 20, 8 | "order": [], 9 | "language": { 10 | "info": "显示 _START_ 至 _END_ 条目(总计 _TOTAL_ )", 11 | "infoFiltered": "(筛选自 _MAX_ 条目)", 12 | "search": "搜索:", 13 | "zeroRecords": "没有找到任何条目", 14 | "paginate": { 15 | "next": "下一页", 16 | "previous": "上一页" 17 | }, 18 | } 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /docs/zh_CN/_templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block body %} 4 | 5 |

未找到页面

6 |

7 | 未找到你要打开的页面。 8 |

9 |

10 | 如果你是从旧版本文档跳转至此,可能是对应的页面被移动了。请从左侧的目录中寻找新版本文档,或者跳转至首页。 11 |

12 |

13 | 如果你找不到希望打开的文档,欢迎在 Issue 中告诉我们! 14 |

15 | 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /docs/zh_CN/_templates/autosummary/class.rst: -------------------------------------------------------------------------------- 1 | .. role:: hidden 2 | :class: hidden-section 3 | .. currentmodule:: {{ module }} 4 | 5 | 6 | {{ name | underline}} 7 | 8 | .. autoclass:: {{ name }} 9 | :members: 10 | 11 | .. 12 | autogenerated from _templates/autosummary/class.rst 13 | note it does not have :inherited-members: 14 | -------------------------------------------------------------------------------- /docs/zh_CN/_templates/callable.rst: -------------------------------------------------------------------------------- 1 | .. role:: hidden 2 | :class: hidden-section 3 | .. currentmodule:: {{ module }} 4 | 5 | 6 | {{ name | underline}} 7 | 8 | .. autoclass:: {{ name }} 9 | :members: 10 | :special-members: __call__ 11 | 12 | .. 13 | autogenerated from _templates/callable.rst 14 | note it does not have :inherited-members: 15 | -------------------------------------------------------------------------------- /docs/zh_CN/_templates/data_transform.rst: -------------------------------------------------------------------------------- 1 | .. role:: hidden 2 | :class: hidden-section 3 | .. currentmodule:: {{ module }} 4 | 5 | 6 | {{ name | underline}} 7 | 8 | .. autoclass:: {{ name }} 9 | :members: transform 10 | 11 | .. 12 | autogenerated from _templates/callable.rst 13 | note it does not have :inherited-members: 14 | -------------------------------------------------------------------------------- /docs/zh_CN/api: -------------------------------------------------------------------------------- 1 | ../en/api -------------------------------------------------------------------------------- /docs/zh_CN/docutils.conf: -------------------------------------------------------------------------------- 1 | [html writers] 2 | table_style: colwidths-auto 3 | -------------------------------------------------------------------------------- /docs/zh_CN/notes/changelog.md: -------------------------------------------------------------------------------- 1 | ../../en/notes/changelog.md -------------------------------------------------------------------------------- /docs/zh_CN/notes/projects.md: -------------------------------------------------------------------------------- 1 | # 基于 MMPretrain 的项目列表(待更新) 2 | -------------------------------------------------------------------------------- /mmpretrain/configs/mobilenet_v2/mobilenet_v2_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | # This is a BETA new format config file, and the usage may change recently. 3 | from mmengine.config import read_base 4 | 5 | with read_base(): 6 | from .._base_.datasets.imagenet_bs32_pil_resize import * 7 | from .._base_.default_runtime import * 8 | from .._base_.models.mobilenet_v2_1x import * 9 | from .._base_.schedules.imagenet_bs256_epochstep import * 10 | -------------------------------------------------------------------------------- /mmpretrain/configs/resnet/resnet18_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | # This is a BETA new format config file, and the usage may change recently. 3 | from mmengine.config import read_base 4 | 5 | with read_base(): 6 | from .._base_.datasets.imagenet_bs32 import * 7 | from .._base_.default_runtime import * 8 | from .._base_.models.resnet18 import * 9 | from .._base_.schedules.imagenet_bs256 import * 10 | -------------------------------------------------------------------------------- /mmpretrain/configs/swin_transformer/swin_base_16xb64_in1k_384px.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | # This is a BETA new format config file, and the usage may change recently. 3 | from mmengine.config import read_base 4 | 5 | with read_base(): 6 | from .._base_.datasets.imagenet_bs64_swin_384 import * 7 | from .._base_.default_runtime import * 8 | from .._base_.models.swin_transformer_base import * 9 | from .._base_.schedules.imagenet_bs1024_adamw_swin import * 10 | 11 | # schedule settings 12 | optim_wrapper = dict(clip_grad=dict(max_norm=5.0)) 13 | -------------------------------------------------------------------------------- /mmpretrain/datasets/samplers/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .repeat_aug import RepeatAugSampler 3 | from .sequential import SequentialSampler 4 | 5 | __all__ = ['RepeatAugSampler', 'SequentialSampler'] 6 | -------------------------------------------------------------------------------- /mmpretrain/engine/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .hooks import * # noqa: F401, F403 3 | from .optimizers import * # noqa: F401, F403 4 | from .runners import * # noqa: F401, F403 5 | from .schedulers import * # noqa: F401, F403 6 | -------------------------------------------------------------------------------- /mmpretrain/engine/optimizers/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .adan_t import Adan 3 | from .lamb import Lamb 4 | from .lars import LARS 5 | from .layer_decay_optim_wrapper_constructor import \ 6 | LearningRateDecayOptimWrapperConstructor 7 | 8 | __all__ = ['Lamb', 'Adan', 'LARS', 'LearningRateDecayOptimWrapperConstructor'] 9 | -------------------------------------------------------------------------------- /mmpretrain/engine/runners/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .retrieval_loop import RetrievalTestLoop, RetrievalValLoop 3 | 4 | __all__ = ['RetrievalTestLoop', 'RetrievalValLoop'] 5 | -------------------------------------------------------------------------------- /mmpretrain/engine/schedulers/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .weight_decay_scheduler import CosineAnnealingWeightDecay 3 | 4 | __all__ = ['CosineAnnealingWeightDecay'] 5 | -------------------------------------------------------------------------------- /mmpretrain/evaluation/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .functional import * # noqa: F401,F403 3 | from .metrics import * # noqa: F401,F403 4 | -------------------------------------------------------------------------------- /mmpretrain/evaluation/functional/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | -------------------------------------------------------------------------------- /mmpretrain/models/classifiers/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .base import BaseClassifier 3 | from .hugging_face import HuggingFaceClassifier 4 | from .image import ImageClassifier 5 | from .timm import TimmClassifier 6 | 7 | __all__ = [ 8 | 'BaseClassifier', 'ImageClassifier', 'TimmClassifier', 9 | 'HuggingFaceClassifier' 10 | ] 11 | -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/blip/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .blip_caption import BlipCaption 3 | from .blip_grounding import BlipGrounding 4 | from .blip_nlvr import BlipNLVR 5 | from .blip_retrieval import BlipRetrieval 6 | from .blip_vqa import BlipVQA 7 | from .language_model import BertLMHeadModel, XBertEncoder, XBertLMHeadDecoder 8 | 9 | __all__ = [ 10 | 'BertLMHeadModel', 'BlipCaption', 'BlipGrounding', 'BlipNLVR', 11 | 'BlipRetrieval', 'BlipVQA', 'XBertEncoder', 'XBertLMHeadDecoder' 12 | ] 13 | -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/blip2/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .blip2_caption import Blip2Caption 3 | from .blip2_opt_vqa import Blip2VQA 4 | from .blip2_retriever import Blip2Retrieval 5 | from .modeling_opt import OPTForCausalLM 6 | from .Qformer import Qformer 7 | 8 | __all__ = [ 9 | 'Blip2Caption', 'Blip2Retrieval', 'Blip2VQA', 'OPTForCausalLM', 'Qformer' 10 | ] 11 | -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/chinese_clip/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .bert import BertModelCN 3 | from .chinese_clip import ChineseCLIP, ModifiedResNet 4 | 5 | __all__ = ['ChineseCLIP', 'ModifiedResNet', 'BertModelCN'] 6 | -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/clip/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from ..clip.clip import CLIP, CLIPZeroShot 3 | from ..clip.clip_transformer import CLIPProjection, CLIPTransformer 4 | 5 | __all__ = ['CLIP', 'CLIPZeroShot', 'CLIPTransformer', 'CLIPProjection'] 6 | -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/flamingo/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .adapter import FlamingoLMAdapter 3 | from .flamingo import Flamingo 4 | 5 | __all__ = ['Flamingo', 'FlamingoLMAdapter'] 6 | -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/llava/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .llava import Llava 3 | from .modules import LlavaLlamaForCausalLM 4 | 5 | __all__ = ['Llava', 'LlavaLlamaForCausalLM'] 6 | -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/minigpt4/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .minigpt4 import MiniGPT4 3 | 4 | __all__ = ['MiniGPT4'] 5 | -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/ofa/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .ofa import OFA 3 | from .ofa_modules import OFADecoder, OFAEncoder, OFAEncoderDecoder 4 | 5 | __all__ = ['OFAEncoderDecoder', 'OFA', 'OFAEncoder', 'OFADecoder'] 6 | -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/otter/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .otter import Otter 3 | 4 | __all__ = ['Otter'] 5 | -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/ram/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .ram import RAM, RAMNormal, RAMOpenset 3 | 4 | __all__ = ['RAM', 'RAMNormal', 'RAMOpenset'] 5 | -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/ram/config/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/ram/data/ram_tag_list.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/mmpretrain/models/multimodal/ram/data/ram_tag_list.pickle -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/ram/data/ram_tag_list_chinese.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/mmpretrain/models/multimodal/ram/data/ram_tag_list_chinese.pickle -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/ram/data/ram_tag_list_threshold.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/mmpretrain/models/multimodal/ram/data/ram_tag_list_threshold.pickle -------------------------------------------------------------------------------- /mmpretrain/models/multimodal/ram/run/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | -------------------------------------------------------------------------------- /mmpretrain/models/peft/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .lora import LoRAModel 3 | 4 | __all__ = [ 5 | 'LoRAModel', 6 | ] 7 | -------------------------------------------------------------------------------- /mmpretrain/models/retrievers/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .base import BaseRetriever 3 | from .image2image import ImageToImageRetriever 4 | 5 | __all__ = ['BaseRetriever', 'ImageToImageRetriever'] 6 | -------------------------------------------------------------------------------- /mmpretrain/models/tta/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .score_tta import AverageClsScoreTTA 3 | 4 | __all__ = ['AverageClsScoreTTA'] 5 | -------------------------------------------------------------------------------- /mmpretrain/models/utils/batch_augments/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .cutmix import CutMix 3 | from .mixup import Mixup 4 | from .resizemix import ResizeMix 5 | from .wrapper import RandomBatchAugment 6 | 7 | __all__ = ('RandomBatchAugment', 'CutMix', 'Mixup', 'ResizeMix') 8 | -------------------------------------------------------------------------------- /mmpretrain/structures/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .data_sample import DataSample 3 | from .multi_task_data_sample import MultiTaskDataSample 4 | from .utils import (batch_label_to_onehot, cat_batch_labels, format_label, 5 | format_score, label_to_onehot, tensor_split) 6 | 7 | __all__ = [ 8 | 'DataSample', 'batch_label_to_onehot', 'cat_batch_labels', 'tensor_split', 9 | 'MultiTaskDataSample', 'label_to_onehot', 'format_label', 'format_score' 10 | ] 11 | -------------------------------------------------------------------------------- /mmpretrain/structures/multi_task_data_sample.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | 3 | from mmengine.structures import BaseDataElement 4 | 5 | 6 | class MultiTaskDataSample(BaseDataElement): 7 | 8 | @property 9 | def tasks(self): 10 | return self._data_fields 11 | -------------------------------------------------------------------------------- /mmpretrain/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .analyze import load_json_log 3 | from .collect_env import collect_env 4 | from .dependency import require 5 | from .misc import get_ori_model 6 | from .progress import track, track_on_main_process 7 | from .setup_env import register_all_modules 8 | 9 | __all__ = [ 10 | 'collect_env', 'register_all_modules', 'track_on_main_process', 11 | 'load_json_log', 'get_ori_model', 'track', 'require' 12 | ] 13 | -------------------------------------------------------------------------------- /mmpretrain/utils/misc.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | import torch.nn as nn 3 | from mmengine.model import is_model_wrapper 4 | 5 | 6 | def get_ori_model(model: nn.Module) -> nn.Module: 7 | """Get original model if the input model is a model wrapper. 8 | 9 | Args: 10 | model (nn.Module): A model may be a model wrapper. 11 | 12 | Returns: 13 | nn.Module: The model without model wrapper. 14 | """ 15 | if is_model_wrapper(model): 16 | return model.module 17 | else: 18 | return model 19 | -------------------------------------------------------------------------------- /mmpretrain/visualization/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .utils import create_figure, get_adaptive_scale 3 | from .visualizer import UniversalVisualizer 4 | 5 | __all__ = ['UniversalVisualizer', 'get_adaptive_scale', 'create_figure'] 6 | -------------------------------------------------------------------------------- /projects/dino/dataset/__init__.py: -------------------------------------------------------------------------------- 1 | from .transform import * # noqa: F401,F403 2 | -------------------------------------------------------------------------------- /projects/dino/dataset/transform/__init__.py: -------------------------------------------------------------------------------- 1 | from .processing import DINOMultiCrop 2 | 3 | __all__ = ['DINOMultiCrop'] 4 | -------------------------------------------------------------------------------- /projects/dino/engine/__init__.py: -------------------------------------------------------------------------------- 1 | from .hooks import * # noqa 2 | -------------------------------------------------------------------------------- /projects/dino/engine/hooks/__init__.py: -------------------------------------------------------------------------------- 1 | from .dino_teacher_temp_warmup_hook import DINOTeacherTempWarmupHook 2 | 3 | __all__ = ['DINOTeacherTempWarmupHook'] 4 | -------------------------------------------------------------------------------- /projects/dino/models/__init__.py: -------------------------------------------------------------------------------- 1 | from .algorithm import * # noqa 2 | from .head import * # noqa 3 | from .neck import * # noqa 4 | -------------------------------------------------------------------------------- /projects/dino/models/algorithm/__init__.py: -------------------------------------------------------------------------------- 1 | from .dino import DINO 2 | 3 | __all__ = ['DINO'] 4 | -------------------------------------------------------------------------------- /projects/dino/models/head/__init__.py: -------------------------------------------------------------------------------- 1 | from .dino_head import DINOHead 2 | 3 | __all__ = ['DINOHead'] 4 | -------------------------------------------------------------------------------- /projects/dino/models/neck/__init__.py: -------------------------------------------------------------------------------- 1 | from .dino_neck import DINONeck 2 | 3 | __all__ = ['DINONeck'] 4 | -------------------------------------------------------------------------------- /projects/dino/tools/dist_train.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CONFIG=$1 4 | GPUS=$2 5 | NNODES=${NNODES:-1} 6 | NODE_RANK=${NODE_RANK:-0} 7 | PORT=${PORT:-29500} 8 | MASTER_ADDR=${MASTER_ADDR:-"127.0.0.1"} 9 | 10 | PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ 11 | python -m torch.distributed.launch \ 12 | --nnodes=$NNODES \ 13 | --node_rank=$NODE_RANK \ 14 | --master_addr=$MASTER_ADDR \ 15 | --nproc_per_node=$GPUS \ 16 | --master_port=$PORT \ 17 | $(dirname "$0")/train.py \ 18 | $CONFIG \ 19 | --launcher pytorch ${@:3} 20 | -------------------------------------------------------------------------------- /projects/example_project/configs/examplenet_8xb32_in1k.py: -------------------------------------------------------------------------------- 1 | # Directly inherit the entire recipe you want to use. 2 | _base_ = 'mmpretrain::resnet/resnet50_8xb32_in1k.py' 3 | 4 | # This line is to import your own modules. 5 | custom_imports = dict(imports='models') 6 | 7 | # Modify the backbone to use your own backbone. 8 | _base_['model']['backbone'] = dict(type='ExampleNet', depth=18) 9 | # Modify the in_channels of classifier head to fit your backbone. 10 | _base_['model']['head']['in_channels'] = 512 11 | -------------------------------------------------------------------------------- /projects/example_project/models/__init__.py: -------------------------------------------------------------------------------- 1 | from .example_net import ExampleNet 2 | 3 | __all__ = ['ExampleNet'] 4 | -------------------------------------------------------------------------------- /projects/internimage_classification/configs/internimage-base_8xb128_in1k-224.py: -------------------------------------------------------------------------------- 1 | _base_ = './_base_.py' 2 | 3 | model = dict( 4 | backbone=dict( 5 | stem_channels=112, 6 | drop_path_rate=0.5, 7 | stage_blocks=[4, 4, 21, 4], 8 | groups=[7, 14, 28, 56], 9 | layer_scale=1e-5, 10 | post_norm=True), 11 | head=dict(in_channels=1344)) 12 | 13 | optim_wrapper = dict(optimizer=dict(lr=0.0005)) 14 | -------------------------------------------------------------------------------- /projects/internimage_classification/configs/internimage-small_8xb128_in1k-224.py: -------------------------------------------------------------------------------- 1 | _base_ = './_base_.py' 2 | 3 | model = dict( 4 | backbone=dict( 5 | stem_channels=80, 6 | drop_path_rate=0.4, 7 | stage_blocks=[4, 4, 21, 4], 8 | groups=[5, 10, 20, 40], 9 | layer_scale=1e-5, 10 | post_norm=True), 11 | head=dict(in_channels=960)) 12 | -------------------------------------------------------------------------------- /projects/internimage_classification/configs/internimage-tiny_8xb128_in1k-224.py: -------------------------------------------------------------------------------- 1 | _base_ = './_base_.py' 2 | 3 | model = dict( 4 | backbone=dict( 5 | stem_channels=64, 6 | drop_path_rate=0.1, 7 | stage_blocks=[4, 4, 18, 4], 8 | groups=[4, 8, 16, 32])) 9 | -------------------------------------------------------------------------------- /projects/internimage_classification/models/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | from .intern_image import InternImage 3 | 4 | __all__ = ['InternImage'] 5 | -------------------------------------------------------------------------------- /projects/internimage_classification/ops_dcnv3/functions/__init__.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------- 2 | # InternImage 3 | # Copyright (c) 2022 OpenGVLab 4 | # Licensed under The MIT License [see LICENSE for details] 5 | # -------------------------------------------------------- 6 | 7 | # Copied from 8 | # https://github.com/OpenGVLab/InternImage/blob/master/classification/models/ 9 | 10 | from .dcnv3_func import DCNv3Function, dcnv3_core_pytorch # noqa 11 | -------------------------------------------------------------------------------- /projects/internimage_classification/ops_dcnv3/make.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # -------------------------------------------------------- 3 | # InternImage 4 | # Copyright (c) 2022 OpenGVLab 5 | # Licensed under The MIT License [see LICENSE for details] 6 | # -------------------------------------------------------- 7 | 8 | # Copied from 9 | # https://github.com/OpenGVLab/InternImage/blob/master/classification/models/ 10 | 11 | python setup.py build install 12 | -------------------------------------------------------------------------------- /projects/internimage_classification/ops_dcnv3/modules/__init__.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------- 2 | # InternImage 3 | # Copyright (c) 2022 OpenGVLab 4 | # Licensed under The MIT License [see LICENSE for details] 5 | # -------------------------------------------------------- 6 | 7 | # Copied from 8 | # https://github.com/OpenGVLab/InternImage/blob/master/classification/models/ 9 | 10 | from .dcnv3 import DCNv3, DCNv3_pytorch # noqa 11 | -------------------------------------------------------------------------------- /projects/maskfeat_video/configs/maskfeat_mvit-small_8xb32-amp-coslr-300e_k400.py: -------------------------------------------------------------------------------- 1 | _base_ = './maskfeat_mvit-small_16xb32-amp-coslr-300e_k400.py' 2 | 3 | optim_wrapper = dict( 4 | optimizer=dict( 5 | type='AdamW', lr=8e-4, betas=(0.9, 0.999), weight_decay=0.05)) 6 | -------------------------------------------------------------------------------- /projects/maskfeat_video/models/__init__.py: -------------------------------------------------------------------------------- 1 | from .hog_generator_3d import HOGGenerator3d 2 | from .maskfeat import VideoMaskFeat 3 | from .maskfeat_mvit import MaskFeatMViT 4 | from .transforms import MaskFeatMaskGenerator3D 5 | 6 | __all__ = [ 7 | 'HOGGenerator3d', 'VideoMaskFeat', 'MaskFeatMViT', 8 | 'MaskFeatMaskGenerator3D' 9 | ] 10 | -------------------------------------------------------------------------------- /projects/maskfeat_video/tools/dist_train.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CONFIG=$1 4 | GPUS=$2 5 | NNODES=${NNODES:-1} 6 | NODE_RANK=${NODE_RANK:-0} 7 | PORT=${PORT:-29500} 8 | MASTER_ADDR=${MASTER_ADDR:-"127.0.0.1"} 9 | 10 | PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ 11 | python -m torch.distributed.launch \ 12 | --nnodes=$NNODES \ 13 | --node_rank=$NODE_RANK \ 14 | --master_addr=$MASTER_ADDR \ 15 | --nproc_per_node=$GPUS \ 16 | --master_port=$PORT \ 17 | $(dirname "$0")/train.py \ 18 | $CONFIG \ 19 | --launcher pytorch ${@:3} 20 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | -r requirements/optional.txt 2 | -r requirements/runtime.txt 3 | -r requirements/tests.txt 4 | -------------------------------------------------------------------------------- /requirements/docs.txt: -------------------------------------------------------------------------------- 1 | docutils==0.18.1 2 | modelindex 3 | myst-parser 4 | git+https://github.com/mzr1996/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme 5 | sphinx==6.1.3 6 | sphinx-copybutton 7 | sphinx-notfound-page 8 | sphinx-tabs 9 | sphinxcontrib-jquery 10 | tabulate 11 | -------------------------------------------------------------------------------- /requirements/mminstall.txt: -------------------------------------------------------------------------------- 1 | mmcv>=2.0.0,<2.4.0 2 | mmengine>=0.8.3,<1.0.0 3 | -------------------------------------------------------------------------------- /requirements/multimodal.txt: -------------------------------------------------------------------------------- 1 | pycocotools 2 | transformers>=4.28.0 3 | -------------------------------------------------------------------------------- /requirements/optional.txt: -------------------------------------------------------------------------------- 1 | albumentations>=0.3.2 --no-binary qudida,albumentations # For Albumentations data transform 2 | grad-cam >= 1.3.7,<1.5.0 # For CAM visualization 3 | requests # For torchserve 4 | scikit-learn # For t-SNE visualization and unit tests. 5 | -------------------------------------------------------------------------------- /requirements/readthedocs.txt: -------------------------------------------------------------------------------- 1 | --extra-index-url https://download.pytorch.org/whl/cpu 2 | mmcv-lite>=2.0.0rc4 3 | mmengine 4 | pycocotools 5 | torch 6 | torchvision 7 | transformers 8 | -------------------------------------------------------------------------------- /requirements/runtime.txt: -------------------------------------------------------------------------------- 1 | einops 2 | importlib-metadata 3 | mat4py 4 | matplotlib 5 | modelindex 6 | numpy 7 | rich 8 | -------------------------------------------------------------------------------- /requirements/tests.txt: -------------------------------------------------------------------------------- 1 | coverage 2 | interrogate 3 | pytest 4 | -------------------------------------------------------------------------------- /resources/miaomiao_qrcode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/resources/miaomiao_qrcode.jpg -------------------------------------------------------------------------------- /resources/mmpt-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/resources/mmpt-logo.png -------------------------------------------------------------------------------- /resources/xiaozhushou_weixin_qrcode.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/resources/xiaozhushou_weixin_qrcode.jpeg -------------------------------------------------------------------------------- /resources/zhihu_qrcode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/resources/zhihu_qrcode.jpg -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | -------------------------------------------------------------------------------- /tests/data/color.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/tests/data/color.jpg -------------------------------------------------------------------------------- /tests/data/dataset/3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/tests/data/dataset/3.jpeg -------------------------------------------------------------------------------- /tests/data/dataset/a/1.JPG: -------------------------------------------------------------------------------- 1 | ../../color.jpg -------------------------------------------------------------------------------- /tests/data/dataset/ann.json: -------------------------------------------------------------------------------- 1 | { 2 | "metainfo": { 3 | "categories": [ 4 | { 5 | "category_name": "first", 6 | "id": 0 7 | }, 8 | { 9 | "category_name": "second", 10 | "id": 1 11 | } 12 | ] 13 | }, 14 | "data_list": [ 15 | { 16 | "img_path": "a/1.JPG", 17 | "gt_label": 0 18 | }, 19 | { 20 | "img_path": "b/2.jpeg", 21 | "gt_label": 1 22 | }, 23 | { 24 | "img_path": "b/subb/2.jpeg", 25 | "gt_label": 1 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /tests/data/dataset/ann.txt: -------------------------------------------------------------------------------- 1 | a/1.JPG 0 2 | b/2.jpeg 1 3 | b/subb/3.jpg 1 4 | -------------------------------------------------------------------------------- /tests/data/dataset/ann_without_labels.txt: -------------------------------------------------------------------------------- 1 | a/1.JPG 2 | b/2.jpeg 3 | b/subb/3.jpg 4 | -------------------------------------------------------------------------------- /tests/data/dataset/b/2.jpeg: -------------------------------------------------------------------------------- 1 | ../../color.jpg -------------------------------------------------------------------------------- /tests/data/dataset/b/subb/3.jpg: -------------------------------------------------------------------------------- 1 | ../../../color.jpg -------------------------------------------------------------------------------- /tests/data/dataset/classes.txt: -------------------------------------------------------------------------------- 1 | bus 2 | car 3 | -------------------------------------------------------------------------------- /tests/data/dataset/multi_label_ann.json: -------------------------------------------------------------------------------- 1 | { 2 | "metainfo": { 3 | "categories": [ 4 | { 5 | "category_name": "first", 6 | "id": 0 7 | }, 8 | { 9 | "category_name": "second", 10 | "id": 1 11 | } 12 | ] 13 | }, 14 | "data_list": [ 15 | { 16 | "img_path": "a/1.JPG", 17 | "gt_label": [0] 18 | }, 19 | { 20 | "img_path": "b/2.jpeg", 21 | "gt_label": [1] 22 | }, 23 | { 24 | "img_path": "b/subb/2.jpeg", 25 | "gt_label": [0, 1] 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /tests/data/gray.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/open-mmlab/mmpretrain/ee7f2e88501f61aa95c742dd5f429f039935ee90/tests/data/gray.jpg -------------------------------------------------------------------------------- /tests/data/meta.yml: -------------------------------------------------------------------------------- 1 | Models: 2 | - Name: test_model 3 | Metadata: 4 | FLOPs: 319000000 5 | Parameters: 3500000 6 | Results: 7 | - Dataset: ImageNet-1k 8 | Metrics: 9 | Top 1 Accuracy: 71.86 10 | Top 5 Accuracy: 90.42 11 | Task: Image Classification 12 | Weights: test_weight.pth 13 | Config: test_config.py 14 | -------------------------------------------------------------------------------- /tests/test_evaluation/test_metrics/test_shape_bias_metric.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | import torch 3 | 4 | from mmpretrain.evaluation import ShapeBiasMetric 5 | 6 | 7 | def test_shape_bias_metric(): 8 | data_sample = dict() 9 | data_sample['pred_score'] = torch.rand(1000, ) 10 | data_sample['pred_label'] = torch.tensor(1) 11 | data_sample['gt_label'] = torch.tensor(1) 12 | data_sample['img_path'] = 'tests/airplane/test.JPEG' 13 | evaluator = ShapeBiasMetric( 14 | csv_dir='tests/data', dataset_name='test', model_name='test') 15 | evaluator.process(None, [data_sample]) 16 | -------------------------------------------------------------------------------- /tests/test_models/test_backbones/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) OpenMMLab. All rights reserved. 2 | -------------------------------------------------------------------------------- /tools/benchmarks/mmdetection/mim_dist_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | 5 | CFG=$1 6 | CHECKPOINT=$2 7 | GPUS=$3 8 | PY_ARGS=${@:4} 9 | 10 | PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ 11 | mim test mmdet \ 12 | $CFG \ 13 | --checkpoint $CHECKPOINT \ 14 | --launcher pytorch \ 15 | -G $GPUS \ 16 | $PY_ARGS 17 | -------------------------------------------------------------------------------- /tools/benchmarks/mmdetection/mim_dist_train_fpn.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | 5 | CFG=$1 6 | PRETRAIN=$2 # pretrained model 7 | GPUS=$3 8 | PY_ARGS=${@:4} 9 | 10 | PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ 11 | mim train mmdet $CFG \ 12 | --launcher pytorch -G $GPUS \ 13 | --cfg-options model.backbone.init_cfg.type=Pretrained \ 14 | model.backbone.init_cfg.checkpoint=$PRETRAIN \ 15 | model.backbone.init_cfg.prefix="backbone." \ 16 | $PY_ARGS 17 | -------------------------------------------------------------------------------- /tools/benchmarks/mmdetection/mim_slurm_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | 5 | PARTITION=$1 6 | CFG=$2 7 | CHECKPOINT=$3 8 | GPUS=${GPUS:-8} 9 | GPUS_PER_NODE=${GPUS_PER_NODE:-8} 10 | CPUS_PER_TASK=${CPUS_PER_TASK:-5} 11 | SRUN_ARGS=${SRUN_ARGS:-""} 12 | PY_ARGS=${@:4} 13 | 14 | PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ 15 | mim test mmdet \ 16 | $CFG \ 17 | --checkpoint $CHECKPOINT \ 18 | --launcher slurm -G $GPUS \ 19 | --gpus-per-node $GPUS_PER_NODE \ 20 | --cpus-per-task $CPUS_PER_TASK \ 21 | --partition $PARTITION \ 22 | --srun-args "$SRUN_ARGS" \ 23 | $PY_ARGS 24 | -------------------------------------------------------------------------------- /tools/benchmarks/mmsegmentation/mim_dist_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | 5 | CFG=$1 6 | CHECKPOINT=$2 7 | GPUS=$3 8 | PY_ARGS=${@:4} 9 | 10 | PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ 11 | mim test mmseg \ 12 | $CFG \ 13 | --checkpoint $CHECKPOINT \ 14 | --launcher pytorch \ 15 | -G $GPUS \ 16 | $PY_ARGS 17 | -------------------------------------------------------------------------------- /tools/benchmarks/mmsegmentation/mim_dist_train.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | 5 | CFG=$1 6 | PRETRAIN=$2 # pretrained model 7 | GPUS=$3 8 | PY_ARGS=${@:4} 9 | 10 | PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ 11 | mim train mmseg $CFG \ 12 | --launcher pytorch -G $GPUS \ 13 | --cfg-options model.backbone.init_cfg.type=Pretrained \ 14 | model.backbone.init_cfg.checkpoint=$PRETRAIN \ 15 | model.backbone.init_cfg.prefix="backbone." \ 16 | model.pretrained=None \ 17 | $PY_ARGS 18 | -------------------------------------------------------------------------------- /tools/benchmarks/mmsegmentation/mim_slurm_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | 5 | PARTITION=$1 6 | CFG=$2 7 | CHECKPOINT=$3 8 | GPUS=${GPUS:-4} 9 | GPUS_PER_NODE=${GPUS_PER_NODE:-4} 10 | CPUS_PER_TASK=${CPUS_PER_TASK:-5} 11 | SRUN_ARGS=${SRUN_ARGS:-""} 12 | PY_ARGS=${@:4} 13 | 14 | PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ 15 | mim test mmseg \ 16 | $CFG \ 17 | --checkpoint $CHECKPOINT \ 18 | --launcher slurm -G $GPUS \ 19 | --gpus-per-node $GPUS_PER_NODE \ 20 | --cpus-per-task $CPUS_PER_TASK \ 21 | --partition $PARTITION \ 22 | --srun-args "$SRUN_ARGS" \ 23 | $PY_ARGS 24 | -------------------------------------------------------------------------------- /tools/dataset_converters/odl_cub_preprocess.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -x 4 | 5 | DOWNLOAD_DIR=$1 6 | DATA_ROOT=$2 7 | 8 | # unzip all of data 9 | cat $DOWNLOAD_DIR/CUB-200-2011/raw/*.tar.gz | tar -xvz -C $DOWNLOAD_DIR 10 | 11 | # move data into DATA_ROOT 12 | mv -f $DOWNLOAD_DIR/CUB-200-2011/CUB-200-2011/* $DATA_ROOT/ 13 | 14 | # remove useless data file 15 | rm -R $DOWNLOAD_DIR/CUB-200-2011/ 16 | -------------------------------------------------------------------------------- /tools/dist_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CONFIG=$1 4 | CHECKPOINT=$2 5 | GPUS=$3 6 | NNODES=${NNODES:-1} 7 | NODE_RANK=${NODE_RANK:-0} 8 | PORT=${PORT:-29500} 9 | MASTER_ADDR=${MASTER_ADDR:-"127.0.0.1"} 10 | 11 | PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ 12 | python -m torch.distributed.launch \ 13 | --nnodes=$NNODES \ 14 | --node_rank=$NODE_RANK \ 15 | --master_addr=$MASTER_ADDR \ 16 | --nproc_per_node=$GPUS \ 17 | --master_port=$PORT \ 18 | $(dirname "$0")/test.py \ 19 | $CONFIG \ 20 | $CHECKPOINT \ 21 | --launcher pytorch \ 22 | ${@:4} 23 | -------------------------------------------------------------------------------- /tools/dist_train.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CONFIG=$1 4 | GPUS=$2 5 | NNODES=${NNODES:-1} 6 | NODE_RANK=${NODE_RANK:-0} 7 | PORT=${PORT:-29500} 8 | MASTER_ADDR=${MASTER_ADDR:-"127.0.0.1"} 9 | 10 | PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ 11 | python -m torch.distributed.launch \ 12 | --nnodes=$NNODES \ 13 | --node_rank=$NODE_RANK \ 14 | --master_addr=$MASTER_ADDR \ 15 | --nproc_per_node=$GPUS \ 16 | --master_port=$PORT \ 17 | $(dirname "$0")/train.py \ 18 | $CONFIG \ 19 | --launcher pytorch ${@:3} 20 | --------------------------------------------------------------------------------