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
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1330 additions
and
0 deletions
+1330
-0
configs/_base_/datasets/imagenet_bs128_revvit_224.py
configs/_base_/datasets/imagenet_bs128_revvit_224.py
+83
-0
configs/_base_/datasets/imagenet_bs128_riformer_medium_384.py
...igs/_base_/datasets/imagenet_bs128_riformer_medium_384.py
+80
-0
configs/_base_/datasets/imagenet_bs128_riformer_small_384.py
configs/_base_/datasets/imagenet_bs128_riformer_small_384.py
+80
-0
configs/_base_/datasets/imagenet_bs128_vig_224.py
configs/_base_/datasets/imagenet_bs128_vig_224.py
+80
-0
configs/_base_/datasets/imagenet_bs16_eva_196.py
configs/_base_/datasets/imagenet_bs16_eva_196.py
+60
-0
configs/_base_/datasets/imagenet_bs16_eva_336.py
configs/_base_/datasets/imagenet_bs16_eva_336.py
+60
-0
configs/_base_/datasets/imagenet_bs16_eva_448.py
configs/_base_/datasets/imagenet_bs16_eva_448.py
+62
-0
configs/_base_/datasets/imagenet_bs16_eva_560.py
configs/_base_/datasets/imagenet_bs16_eva_560.py
+60
-0
configs/_base_/datasets/imagenet_bs16_pil_bicubic_384.py
configs/_base_/datasets/imagenet_bs16_pil_bicubic_384.py
+53
-0
configs/_base_/datasets/imagenet_bs256_beitv2.py
configs/_base_/datasets/imagenet_bs256_beitv2.py
+47
-0
configs/_base_/datasets/imagenet_bs256_davit_224.py
configs/_base_/datasets/imagenet_bs256_davit_224.py
+80
-0
configs/_base_/datasets/imagenet_bs256_itpn.py
configs/_base_/datasets/imagenet_bs256_itpn.py
+49
-0
configs/_base_/datasets/imagenet_bs256_levit_224.py
configs/_base_/datasets/imagenet_bs256_levit_224.py
+80
-0
configs/_base_/datasets/imagenet_bs256_rsb_a12.py
configs/_base_/datasets/imagenet_bs256_rsb_a12.py
+72
-0
configs/_base_/datasets/imagenet_bs256_rsb_a3.py
configs/_base_/datasets/imagenet_bs256_rsb_a3.py
+72
-0
configs/_base_/datasets/imagenet_bs256_simmim_192.py
configs/_base_/datasets/imagenet_bs256_simmim_192.py
+33
-0
configs/_base_/datasets/imagenet_bs256_swin_192.py
configs/_base_/datasets/imagenet_bs256_swin_192.py
+81
-0
configs/_base_/datasets/imagenet_bs32.py
configs/_base_/datasets/imagenet_bs32.py
+51
-0
configs/_base_/datasets/imagenet_bs32_byol.py
configs/_base_/datasets/imagenet_bs32_byol.py
+89
-0
configs/_base_/datasets/imagenet_bs32_mocov2.py
configs/_base_/datasets/imagenet_bs32_mocov2.py
+58
-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_bs128_revvit_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
=
7
,
magnitude_std
=
0.5
,
hparams
=
dict
(
pad_val
=
[
round
(
x
)
for
x
in
bgr_mean
],
interpolation
=
'bicubic'
)),
dict
(
type
=
'ColorJitter'
,
brightness
=
0.4
,
contrast
=
0.4
,
saturation
=
0.4
),
dict
(
type
=
'RandomErasing'
,
erase_prob
=
0.25
,
mode
=
'rand'
,
# should be 'pixel', but currently not supported
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
=
256
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
split
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
persistent_workers
=
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
),
persistent_workers
=
True
,
)
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_bs128_riformer_medium_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
,
)
bgr_mean
=
data_preprocessor
[
'mean'
][::
-
1
]
bgr_std
=
data_preprocessor
[
'std'
][::
-
1
]
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
384
,
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
=
404
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
384
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
128
,
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
=
16
,
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_bs128_riformer_small_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
,
)
bgr_mean
=
data_preprocessor
[
'mean'
][::
-
1
]
bgr_std
=
data_preprocessor
[
'std'
][::
-
1
]
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
384
,
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
=
426
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
384
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
128
,
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_bs128_vig_224.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
127.5
,
127.5
,
127.5
],
std
=
[
127.5
,
127.5
,
127.5
],
# 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
=
248
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
128
,
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
=
128
,
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_bs16_eva_196.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
0.48145466
*
255
,
0.4578275
*
255
,
0.40821073
*
255
],
std
=
[
0.26862954
*
255
,
0.26130258
*
255
,
0.27577711
*
255
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
196
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
196
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
196
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
16
,
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
=
16
,
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_bs16_eva_336.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
0.48145466
*
255
,
0.4578275
*
255
,
0.40821073
*
255
],
std
=
[
0.26862954
*
255
,
0.26130258
*
255
,
0.27577711
*
255
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
336
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
336
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
336
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
16
,
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
=
16
,
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_bs16_eva_448.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
0.48145466
*
255
,
0.4578275
*
255
,
0.40821073
*
255
],
std
=
[
0.26862954
*
255
,
0.26130258
*
255
,
0.27577711
*
255
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
448
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
448
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
448
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
16
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
ann_file
=
'meta/train.txt'
,
data_prefix
=
'train'
,
pipeline
=
train_pipeline
),
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
)
val_dataloader
=
dict
(
batch_size
=
8
,
num_workers
=
5
,
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
'data/imagenet'
,
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_bs16_eva_560.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
num_classes
=
1000
,
# RGB format normalization parameters
mean
=
[
0.48145466
*
255
,
0.4578275
*
255
,
0.40821073
*
255
],
std
=
[
0.26862954
*
255
,
0.26130258
*
255
,
0.27577711
*
255
],
# convert image from BGR to RGB
to_rgb
=
True
,
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
560
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
560
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
560
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
16
,
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
=
16
,
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_bs16_pil_bicubic_384.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_preprocessor
=
dict
(
# 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
=
'Resize'
,
scale
=
384
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
16
,
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
=
16
,
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_bs256_beitv2.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_root
=
'data/imagenet/'
data_preprocessor
=
dict
(
type
=
'TwoNormDataPreprocessor'
,
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
second_mean
=
[
127.5
,
127.5
,
127.5
],
second_std
=
[
127.5
,
127.5
,
127.5
],
to_rgb
=
True
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ColorJitter'
,
brightness
=
0.4
,
contrast
=
0.4
,
saturation
=
0.4
,
hue
=
0.
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'RandomResizedCropAndInterpolationWithTwoPic'
,
size
=
224
,
second_size
=
224
,
interpolation
=
'bicubic'
,
second_interpolation
=
'bicubic'
,
scale
=
(
0.2
,
1.0
)),
dict
(
type
=
'BEiTMaskGenerator'
,
input_size
=
(
14
,
14
),
num_masking_patches
=
75
,
max_num_patches
=
75
,
min_num_patches
=
16
),
dict
(
type
=
'PackInputs'
)
]
train_dataloader
=
dict
(
batch_size
=
256
,
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_bs256_davit_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
=
236
,
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_bs256_itpn.py
0 → 100644
View file @
dff2c686
# dataset settings
dataset_type
=
'ImageNet'
data_root
=
'data/imagenet/'
data_preprocessor
=
dict
(
type
=
'TwoNormDataPreprocessor'
,
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
# clip mean & std
second_mean
=
[
0.48145466
*
255
,
0.4578275
*
255
,
0.40821073
*
255
],
second_std
=
[
0.26862954
*
255
,
0.26130258
*
255
,
0.27577711
*
255
],
to_rgb
=
True
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ColorJitter'
,
brightness
=
0.4
,
contrast
=
0.4
,
saturation
=
0.4
,
hue
=
0.
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
,
direction
=
'horizontal'
),
dict
(
type
=
'RandomResizedCropAndInterpolationWithTwoPic'
,
size
=
224
,
second_size
=
224
,
interpolation
=
'bicubic'
,
second_interpolation
=
'bicubic'
,
scale
=
(
0.2
,
1.0
)),
dict
(
type
=
'BEiTMaskGenerator'
,
input_size
=
(
14
,
14
),
num_masking_patches
=
75
,
max_num_patches
=
75
,
min_num_patches
=
16
),
dict
(
type
=
'PackInputs'
)
]
train_dataloader
=
dict
(
batch_size
=
256
,
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
,
ann_file
=
'meta/train.txt'
,
data_prefix
=
dict
(
img_path
=
'train/'
),
pipeline
=
train_pipeline
))
configs/_base_/datasets/imagenet_bs256_levit_224.py
0 → 100644
View file @
dff2c686
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
=
256
,
num_workers
=
4
,
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
=
256
,
num_workers
=
4
,
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_bs256_rsb_a12.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
=
7
,
magnitude_std
=
0.5
,
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
=
236
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
)
]
train_dataloader
=
dict
(
batch_size
=
256
,
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
=
256
,
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_bs256_rsb_a3.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
=
6
,
magnitude_std
=
0.5
,
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
=
236
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'PackInputs'
)
]
train_dataloader
=
dict
(
batch_size
=
256
,
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
=
256
,
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_bs256_simmim_192.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
=
192
,
crop_ratio_range
=
(
0.67
,
1.0
)),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
dict
(
type
=
'SimMIMMaskGenerator'
,
input_size
=
192
,
mask_patch_size
=
32
,
model_patch_size
=
4
,
mask_ratio
=
0.6
),
dict
(
type
=
'PackInputs'
)
]
train_dataloader
=
dict
(
batch_size
=
256
,
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_bs256_swin_192.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
,
)
train_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'RandomResizedCrop'
,
scale
=
192
,
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
=
[
104
,
116
,
124
],
interpolation
=
'bicubic'
)),
dict
(
type
=
'RandomErasing'
,
erase_prob
=
0.25
,
mode
=
'rand'
,
min_area_ratio
=
0.02
,
max_area_ratio
=
1
/
3
,
fill_color
=
[
103.53
,
116.28
,
123.675
],
fill_std
=
[
57.375
,
57.12
,
58.395
]),
dict
(
type
=
'PackInputs'
),
]
test_pipeline
=
[
dict
(
type
=
'LoadImageFromFile'
),
dict
(
type
=
'ResizeEdge'
,
scale
=
219
,
edge
=
'short'
,
backend
=
'pillow'
,
interpolation
=
'bicubic'
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
192
),
dict
(
type
=
'PackInputs'
),
]
train_dataloader
=
dict
(
batch_size
=
256
,
num_workers
=
8
,
collate_fn
=
dict
(
type
=
'default_collate'
),
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
True
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
split
=
'train'
,
pipeline
=
train_pipeline
),
)
val_dataloader
=
dict
(
batch_size
=
64
,
num_workers
=
5
,
collate_fn
=
dict
(
type
=
'default_collate'
),
persistent_workers
=
True
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
split
=
'val'
,
pipeline
=
test_pipeline
),
)
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.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
=
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_byol.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
,
interpolation
=
'bicubic'
,
backend
=
'pillow'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
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.
),
]
view_pipeline2
=
[
dict
(
type
=
'RandomResizedCrop'
,
scale
=
224
,
interpolation
=
'bicubic'
,
backend
=
'pillow'
),
dict
(
type
=
'RandomFlip'
,
prob
=
0.5
),
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
)
]
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
=
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_bs32_mocov2.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
)
# The difference between mocov2 and mocov1 is the transforms in the pipeline
view_pipeline
=
[
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.4
,
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.5
),
dict
(
type
=
'RandomFlip'
,
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
=
8
,
drop_last
=
True
,
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
))
Prev
1
2
3
4
5
6
…
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