Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMPretrain-MMCV
Commits
dff2c686
Commit
dff2c686
authored
Sep 03, 2024
by
renzhc
Browse files
first commit
parent
8f9dd0ed
Pipeline
#1665
canceled with stages
Changes
1000
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1329 additions
and
0 deletions
+1329
-0
configs/_base_/datasets/imagenet_bs32_pil_bicubic.py
configs/_base_/datasets/imagenet_bs32_pil_bicubic.py
+60
-0
configs/_base_/datasets/imagenet_bs32_pil_resize.py
configs/_base_/datasets/imagenet_bs32_pil_resize.py
+51
-0
configs/_base_/datasets/imagenet_bs32_simclr.py
configs/_base_/datasets/imagenet_bs32_simclr.py
+52
-0
configs/_base_/datasets/imagenet_bs512_mae.py
configs/_base_/datasets/imagenet_bs512_mae.py
+32
-0
configs/_base_/datasets/imagenet_bs512_mocov3.py
configs/_base_/datasets/imagenet_bs512_mocov3.py
+90
-0
configs/_base_/datasets/imagenet_bs64.py
configs/_base_/datasets/imagenet_bs64.py
+51
-0
configs/_base_/datasets/imagenet_bs64_autoaug.py
configs/_base_/datasets/imagenet_bs64_autoaug.py
+59
-0
configs/_base_/datasets/imagenet_bs64_clip_224.py
configs/_base_/datasets/imagenet_bs64_clip_224.py
+73
-0
configs/_base_/datasets/imagenet_bs64_clip_384.py
configs/_base_/datasets/imagenet_bs64_clip_384.py
+73
-0
configs/_base_/datasets/imagenet_bs64_clip_448.py
configs/_base_/datasets/imagenet_bs64_clip_448.py
+74
-0
configs/_base_/datasets/imagenet_bs64_convmixer_224.py
configs/_base_/datasets/imagenet_bs64_convmixer_224.py
+80
-0
configs/_base_/datasets/imagenet_bs64_deit3_224.py
configs/_base_/datasets/imagenet_bs64_deit3_224.py
+80
-0
configs/_base_/datasets/imagenet_bs64_deit3_384.py
configs/_base_/datasets/imagenet_bs64_deit3_384.py
+60
-0
configs/_base_/datasets/imagenet_bs64_edgenext_256.py
configs/_base_/datasets/imagenet_bs64_edgenext_256.py
+80
-0
configs/_base_/datasets/imagenet_bs64_hivit_224.py
configs/_base_/datasets/imagenet_bs64_hivit_224.py
+83
-0
configs/_base_/datasets/imagenet_bs64_mixer_224.py
configs/_base_/datasets/imagenet_bs64_mixer_224.py
+52
-0
configs/_base_/datasets/imagenet_bs64_pil_resize.py
configs/_base_/datasets/imagenet_bs64_pil_resize.py
+51
-0
configs/_base_/datasets/imagenet_bs64_pil_resize_autoaug.py
configs/_base_/datasets/imagenet_bs64_pil_resize_autoaug.py
+68
-0
configs/_base_/datasets/imagenet_bs64_swin_224.py
configs/_base_/datasets/imagenet_bs64_swin_224.py
+80
-0
configs/_base_/datasets/imagenet_bs64_swin_256.py
configs/_base_/datasets/imagenet_bs64_swin_256.py
+80
-0
No files found.
Too many changes to show.
To preserve performance only
1000 of 1000+
files are displayed.
Plain diff
Email patch
configs/_base_/datasets/imagenet_bs32_pil_bicubic.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
256
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
32
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
32
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
configs/_base_/datasets/imagenet_bs32_pil_resize.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
,
backend
=
'pillow'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
256
,
edge
=
'short'
,
backend
=
'pillow'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
32
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
32
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
configs/_base_/datasets/imagenet_bs32_simclr.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_root
=
'data/imagenet/'
data_preprocessor
=
dict
(
type
=
'SelfSupDataPreprocessor'
,
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_rgb
=
True
)
view_pipeline
=
[
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
,
backend
=
'pillow'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'RandomApply'
,
transforms
=
[
dict
(
type
=
'ColorJitter'
,
brightness
=
0.8
,
contrast
=
0.8
,
saturation
=
0.8
,
hue
=
0.2
)
],
prob
=
0.8
),
dict
(
type
=
'RandomGrayscale'
,
prob
=
0.2
,
keep_channels
=
True
,
channel_weights
=
(
0.114
,
0.587
,
0.2989
)),
dict
(
type
=
'GaussianBlur'
,
magnitude_range
=
(
0.1
,
2.0
),
magnitude_std
=
'inf'
,
prob
=
0.5
),
]
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'MultiView'
,
num_views
=
2
,
transforms
=
[
view_pipeline
]),
dict
(
type
=
'PackInputs'
)
]
train_dataloader
=
dict
(
batch_size
=
32
,
num_workers
=
4
,
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
collate_fn
=
dict
(
type
=
'default_collate'
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
split
=
'train'
,
pipeline
=
train_pipeline
))
configs/_base_/datasets/imagenet_bs512_mae.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_root
=
'data/imagenet/'
data_preprocessor
=
dict
(
type
=
'SelfSupDataPreprocessor'
,
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_rgb
=
True
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
,
crop_ratio_range
=
(
0.2
,
1.0
),
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'PackInputs'
)
]
train_dataloader
=
dict
(
batch_size
=
512
,
num_workers
=
8
,
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
collate_fn
=
dict
(
type
=
'default_collate'
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
split
=
'train'
,
pipeline
=
train_pipeline
))
configs/_base_/datasets/imagenet_bs512_mocov3.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_root
=
'data/imagenet/'
data_preprocessor
=
dict
(
type
=
'SelfSupDataPreprocessor'
,
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_rgb
=
True
)
view_pipeline1
=
[
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
,
crop_ratio_range
=
(
0.2
,
1.
),
backend
=
'pillow'
),
dict
(
type
=
'RandomApply'
,
transforms
=
[
dict
(
type
=
'ColorJitter'
,
brightness
=
0.4
,
contrast
=
0.4
,
saturation
=
0.2
,
hue
=
0.1
)
],
prob
=
0.8
),
dict
(
type
=
'RandomGrayscale'
,
prob
=
0.2
,
keep_channels
=
True
,
channel_weights
=
(
0.114
,
0.587
,
0.2989
)),
dict
(
type
=
'GaussianBlur'
,
magnitude_range
=
(
0.1
,
2.0
),
magnitude_std
=
'inf'
,
prob
=
1.
),
dict
(
type
=
'Solarize'
,
thr
=
128
,
prob
=
0.
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
]
view_pipeline2
=
[
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
,
crop_ratio_range
=
(
0.2
,
1.
),
backend
=
'pillow'
),
dict
(
type
=
'RandomApply'
,
transforms
=
[
dict
(
type
=
'ColorJitter'
,
brightness
=
0.4
,
contrast
=
0.4
,
saturation
=
0.2
,
hue
=
0.1
)
],
prob
=
0.8
),
dict
(
type
=
'RandomGrayscale'
,
prob
=
0.2
,
keep_channels
=
True
,
channel_weights
=
(
0.114
,
0.587
,
0.2989
)),
dict
(
type
=
'GaussianBlur'
,
magnitude_range
=
(
0.1
,
2.0
),
magnitude_std
=
'inf'
,
prob
=
0.1
),
dict
(
type
=
'Solarize'
,
thr
=
128
,
prob
=
0.2
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
]
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'MultiView'
,
num_views
=
[
1
,
1
],
transforms
=
[
view_pipeline1
,
view_pipeline2
]),
dict
(
type
=
'PackInputs'
)
]
train_dataloader
=
dict
(
batch_size
=
512
,
num_workers
=
8
,
persistent_workers
=
True
,
pin_memory
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
collate_fn
=
dict
(
type
=
'default_collate'
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
split
=
'train'
,
pipeline
=
train_pipeline
))
configs/_base_/datasets/imagenet_bs64.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
256
,
edge
=
'short'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
configs/_base_/datasets/imagenet_bs64_autoaug.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
bgr_mean
=
data_preprocessor
[
'mean'
][::
-
1
]
bgr_std
=
data_preprocessor
[
'std'
][::
-
1
]
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'AutoAugment'
,
policies
=
'imagenet'
,
hparams
=
dict
(
pad_val
=
[
round
(
x
)
for
x
in
bgr_mean
],
interpolation
=
'bicubic'
)),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
256
,
edge
=
'short'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
configs/_base_/datasets/imagenet_bs64_clip_224.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
img_norm_cfg
=
dict
(
mean
=
[
0.48145466
*
255
,
0.4578275
*
255
,
0.40821073
*
255
],
std
=
[
0.26862954
*
255
,
0.26130258
*
255
,
0.27577711
*
255
],
to_rgb
=
True
)
image_size
=
224
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
size
=
image_size
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
flip_prob
=
0.5
,
direction
=
'horizontal'
),
# dict(
# type='RandAugment',
# policies={{_base_.rand_increasing_policies}},
# num_policies=2,
# total_level=10,
# magnitude_level=9,
# magnitude_std=0.5,
# hparams=dict(
# pad_val=[round(x) for x in img_norm_cfg['mean'][::-1]],
# interpolation='bicubic')),
dict
(
type
=
'RandomErasing'
,
erase_prob
=
0.25
,
mode
=
'rand'
,
min_area_ratio
=
0.02
,
max_area_ratio
=
1
/
3
,
fill_color
=
img_norm_cfg
[
'mean'
][::
-
1
],
fill_std
=
img_norm_cfg
[
'std'
][::
-
1
]),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'ToTensor'
,
keys
=
[
'gt_label'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
,
'gt_label'
])
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'Resize'
,
size
=
(
image_size
,
-
1
),
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
image_size
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
])
]
data
=
dict
(
samples_per_gpu
=
64
,
workers_per_gpu
=
8
,
train
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
val
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
test
=
dict
(
# replace `data/val` with `data/test` for standard test
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
))
evaluation
=
dict
(
interval
=
10
,
metric
=
'accuracy'
)
configs/_base_/datasets/imagenet_bs64_clip_384.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
img_norm_cfg
=
dict
(
mean
=
[
0.48145466
*
255
,
0.4578275
*
255
,
0.40821073
*
255
],
std
=
[
0.26862954
*
255
,
0.26130258
*
255
,
0.27577711
*
255
],
to_rgb
=
True
)
image_size
=
384
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
size
=
image_size
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
flip_prob
=
0.5
,
direction
=
'horizontal'
),
# dict(
# type='RandAugment',
# policies={{_base_.rand_increasing_policies}},
# num_policies=2,
# total_level=10,
# magnitude_level=9,
# magnitude_std=0.5,
# hparams=dict(
# pad_val=[round(x) for x in img_norm_cfg['mean'][::-1]],
# interpolation='bicubic')),
dict
(
type
=
'RandomErasing'
,
erase_prob
=
0.25
,
mode
=
'rand'
,
min_area_ratio
=
0.02
,
max_area_ratio
=
1
/
3
,
fill_color
=
img_norm_cfg
[
'mean'
][::
-
1
],
fill_std
=
img_norm_cfg
[
'std'
][::
-
1
]),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'ToTensor'
,
keys
=
[
'gt_label'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
,
'gt_label'
])
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'Resize'
,
size
=
(
image_size
,
-
1
),
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
image_size
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
])
]
data
=
dict
(
samples_per_gpu
=
64
,
workers_per_gpu
=
8
,
train
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
val
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
test
=
dict
(
# replace `data/val` with `data/test` for standard test
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
))
evaluation
=
dict
(
interval
=
10
,
metric
=
'accuracy'
)
configs/_base_/datasets/imagenet_bs64_clip_448.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
img_norm_cfg
=
dict
(
mean
=
[
0.48145466
*
255
,
0.4578275
*
255
,
0.40821073
*
255
],
std
=
[
0.26862954
*
255
,
0.26130258
*
255
,
0.27577711
*
255
],
to_rgb
=
True
)
image_size
=
448
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
size
=
image_size
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
flip_prob
=
0.5
,
direction
=
'horizontal'
),
# dict(
# type='RandAugment',
# policies={{_base_.rand_increasing_policies}},
# num_policies=2,
# total_level=10,
# magnitude_level=9,
# magnitude_std=0.5,
# hparams=dict(
# pad_val=[round(x) for x in img_norm_cfg['mean'][::-1]],
# interpolation='bicubic')),
dict
(
type
=
'RandomErasing'
,
erase_prob
=
0.25
,
mode
=
'rand'
,
min_area_ratio
=
0.02
,
max_area_ratio
=
1
/
3
,
fill_color
=
img_norm_cfg
[
'mean'
][::
-
1
],
fill_std
=
img_norm_cfg
[
'std'
][::
-
1
]),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'ToTensor'
,
keys
=
[
'gt_label'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
,
'gt_label'
])
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'Resize'
,
size
=
(
image_size
,
-
1
),
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
image_size
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
dict
(
type
=
'ImageToTensor'
,
keys
=
[
'img'
]),
dict
(
type
=
'Collect'
,
keys
=
[
'img'
])
]
data
=
dict
(
samples_per_gpu
=
64
,
workers_per_gpu
=
8
,
train
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
val
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
test
=
dict
(
# replace `data/val` with `data/test` for standard test
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
))
evaluation
=
dict
(
interval
=
10
,
metric
=
'accuracy'
)
configs/_base_/datasets/imagenet_bs64_convmixer_224.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
bgr_mean
=
data_preprocessor
[
'mean'
][::
-
1
]
bgr_std
=
data_preprocessor
[
'std'
][::
-
1
]
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'RandAugment'
,
policies
=
'timm_increasing'
,
num_policies
=
2
,
total_level
=
10
,
magnitude_level
=
9
,
magnitude_std
=
0.5
,
hparams
=
dict
(
pad_val
=
[
round
(
x
)
for
x
in
bgr_mean
],
interpolation
=
'bicubic'
)),
dict
(
type
=
'RandomErasing'
,
erase_prob
=
0.25
,
mode
=
'rand'
,
min_area_ratio
=
0.02
,
max_area_ratio
=
1
/
3
,
fill_color
=
bgr_mean
,
fill_std
=
bgr_std
),
dict
(
type
=
'PackInputs'
)
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
233
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
)
]
train_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
configs/_base_/datasets/imagenet_bs64_deit3_224.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
bgr_mean
=
data_preprocessor
[
'mean'
][::
-
1
]
bgr_std
=
data_preprocessor
[
'std'
][::
-
1
]
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'RandAugment'
,
policies
=
'timm_increasing'
,
num_policies
=
2
,
total_level
=
10
,
magnitude_level
=
9
,
magnitude_std
=
0.5
,
hparams
=
dict
(
pad_val
=
[
round
(
x
)
for
x
in
bgr_mean
],
interpolation
=
'bicubic'
)),
dict
(
type
=
'RandomErasing'
,
erase_prob
=
0.25
,
mode
=
'rand'
,
min_area_ratio
=
0.02
,
max_area_ratio
=
1
/
3
,
fill_color
=
bgr_mean
,
fill_std
=
bgr_std
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
224
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
configs/_base_/datasets/imagenet_bs64_deit3_384.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
384
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
384
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
384
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
configs/_base_/datasets/imagenet_bs64_edgenext_256.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
bgr_mean
=
data_preprocessor
[
'mean'
][::
-
1
]
bgr_std
=
data_preprocessor
[
'std'
][::
-
1
]
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
256
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'RandAugment'
,
policies
=
'timm_increasing'
,
num_policies
=
2
,
total_level
=
10
,
magnitude_level
=
9
,
magnitude_std
=
0.5
,
hparams
=
dict
(
pad_val
=
[
round
(
x
)
for
x
in
bgr_mean
],
interpolation
=
'bicubic'
)),
dict
(
type
=
'RandomErasing'
,
erase_prob
=
0.25
,
mode
=
'rand'
,
min_area_ratio
=
0.02
,
max_area_ratio
=
1
/
3
,
fill_color
=
bgr_mean
,
fill_std
=
bgr_std
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
292
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
256
),
dict
(
type
=
'PackInputs'
)
]
train_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
configs/_base_/datasets/imagenet_bs64_hivit_224.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_root
=
'data/imagenet/'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
bgr_mean
=
data_preprocessor
[
'mean'
][::
-
1
]
bgr_std
=
data_preprocessor
[
'std'
][::
-
1
]
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'RandAugment'
,
policies
=
'timm_increasing'
,
num_policies
=
2
,
total_level
=
10
,
magnitude_level
=
9
,
magnitude_std
=
0.5
,
hparams
=
dict
(
pad_val
=
[
round
(
x
)
for
x
in
bgr_mean
],
interpolation
=
'bicubic'
)),
dict
(
type
=
'RandomErasing'
,
erase_prob
=
0.25
,
mode
=
'rand'
,
min_area_ratio
=
0.02
,
max_area_ratio
=
1
/
3
,
fill_color
=
bgr_mean
,
fill_std
=
bgr_std
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
256
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'meta/train.txt'
,
data_prefix
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
ann_file
=
'meta/val.txt'
,
data_prefix
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
configs/_base_/datasets/imagenet_bs64_mixer_224.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
# Google research usually use the below normalization setting.
data_preprocessor
=
dict
(
num_classes
=
1000
,
mean
=
[
127.5
,
127.5
,
127.5
],
std
=
[
127.5
,
127.5
,
127.5
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
256
,
edge
=
'short'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
configs/_base_/datasets/imagenet_bs64_pil_resize.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
,
backend
=
'pillow'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
256
,
edge
=
'short'
,
backend
=
'pillow'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
configs/_base_/datasets/imagenet_bs64_pil_resize_autoaug.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
bgr_mean
=
data_preprocessor
[
'mean'
][::
-
1
]
bgr_std
=
data_preprocessor
[
'std'
][::
-
1
]
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'AutoAugment'
,
policies
=
'imagenet'
,
hparams
=
dict
(
pad_val
=
[
round
(
x
)
for
x
in
bgr_mean
],
interpolation
=
'bicubic'
)),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
256
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
configs/_base_/datasets/imagenet_bs64_swin_224.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
bgr_mean
=
data_preprocessor
[
'mean'
][::
-
1
]
bgr_std
=
data_preprocessor
[
'std'
][::
-
1
]
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'RandAugment'
,
policies
=
'timm_increasing'
,
num_policies
=
2
,
total_level
=
10
,
magnitude_level
=
9
,
magnitude_std
=
0.5
,
hparams
=
dict
(
pad_val
=
[
round
(
x
)
for
x
in
bgr_mean
],
interpolation
=
'bicubic'
)),
dict
(
type
=
'RandomErasing'
,
erase_prob
=
0.25
,
mode
=
'rand'
,
min_area_ratio
=
0.02
,
max_area_ratio
=
1
/
3
,
fill_color
=
bgr_mean
,
fill_std
=
bgr_std
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
256
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
configs/_base_/datasets/imagenet_bs64_swin_256.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
bgr_mean
=
data_preprocessor
[
'mean'
][::
-
1
]
bgr_std
=
data_preprocessor
[
'std'
][::
-
1
]
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
256
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'RandAugment'
,
policies
=
'timm_increasing'
,
num_policies
=
2
,
total_level
=
10
,
magnitude_level
=
9
,
magnitude_std
=
0.5
,
hparams
=
dict
(
pad_val
=
[
round
(
x
)
for
x
in
bgr_mean
],
interpolation
=
'bicubic'
)),
dict
(
type
=
'RandomErasing'
,
erase_prob
=
0.25
,
mode
=
'rand'
,
min_area_ratio
=
0.02
,
max_area_ratio
=
1
/
3
,
fill_color
=
bgr_mean
,
fill_std
=
bgr_std
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
292
,
# ( 256 / 224 * 256 )
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
256
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'val'
,
pipeline
=
test_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
)
val_evaluator
=
dict
(
type
=
'Accuracy'
,
topk
=
(
1
,
5
))
# If you want standard test, please manually configure the test dataset
test_dataloader
=
val_dataloader
test_evaluator
=
val_evaluator
Prev
1
2
3
4
5
6
7
…
50
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment