xiaomoguhzz's picture
Add files using upload-large-folder tool
eba0a14 verified
_base_ = './base_config.py'
# model settings
# 使用TinyCLIP+ProxyCLIP模型进行分割
# 模型: TinyCLIP-ViT-39M-16-Text-19M
# VFM: DINO-B-8
# 模式: proxyclip
model = dict(
name_path="configs/proxyclip/cls_context59.txt",
vfm_model="dino-B-8", # Options: 'sam-B', 'sam-L', 'dinov2-B', 'dinov2-L', 'dino-B-8', 'dino-B-16'
type="TinyCLIPProxySegmentation",
clip_type="TinyCLIP-ViT-39M-16-Text-19M",
checkpoint="/mnt/SSD8T/home/wjj/code/DeCLIP_private/checkpoints/TinyCLIP-ViT-39M-16-Text-19M-YFCC15M.pt",
mode="proxyclip", # Use proxyclip mode
beta=1.2, # ProxyCLIP beta parameter
gamma=3.0, # ProxyCLIP gamma parameter
prob_thd=0.0,
logit_scale=40,
slide_stride=112,
slide_crop=336,
)
# dataset settings
dataset_type = "PascalContext59Dataset"
data_root = "/mnt/SSD8T/home/wjj/dataset/VOCdevkit/VOC2010"
test_pipeline = [
dict(type="LoadImageFromFile"),
dict(type="Resize", scale=(2048, 336), keep_ratio=True),
dict(type="LoadAnnotations", reduce_zero_label=True),
dict(
type="PackSegInputs",
meta_keys=(
"img_path",
"seg_map_path",
"ori_shape",
"img_shape",
"pad_shape",
"scale_factor",
"flip",
"flip_direction",
"reduce_zero_label",
"resize_shape",
),
),
]
test_dataloader = dict(
batch_size=1,
num_workers=4,
persistent_workers=True,
sampler=dict(type="DefaultSampler", shuffle=False),
dataset=dict(
type=dataset_type,
data_root=data_root,
data_prefix=dict(
img_path="JPEGImages", seg_map_path="SegmentationClassContext"
),
ann_file="ImageSets/SegmentationContext/val.txt",
pipeline=test_pipeline,
),
)