mmclassification/configs/sam/vit-huge-p16_sam_headless.py
Yixiao Fang 0826df8963
[Feature] Add ViT of SAM (#1476)
* add vit of sam

* update

* update

* add ut

* update ut

* remove num_classes

* support dynamic input

* add ut

* add comments

* update ut
2023-04-13 17:03:28 +08:00

25 lines
502 B
Python

# model settings
model = dict(
type='ImageClassifier',
backbone=dict(
type='ViTSAM',
arch='huge',
img_size=1024,
patch_size=16,
out_channels=256,
use_abs_pos=True,
use_rel_pos=True,
window_size=14,
),
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,
)