mmclassification/configs/dinov2/vit-giant-p14_dinov2-pre_headless.py
Yixiao Fang d9e561a09d
[Feature] Support dinov2 backbone (#1522)
* support dinov2 backbone

* update metafile and readme

* compatible to use_layer_scale

* update SwiGLUFFN

* add deprecation warning

* update
2023-05-05 16:59:37 +08:00

22 lines
503 B
Python

# model settings
model = dict(
type='ImageClassifier',
backbone=dict(
type='VisionTransformer',
arch='dinov2-giant',
img_size=518,
patch_size=14,
layer_scale_init_value=1e-5,
layer_cfgs=dict(ffn_type='swiglu_fused'),
),
neck=None,
head=None)
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,
)