This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfg.py
73 lines (73 loc) · 1.49 KB
/
cfg.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
model = dict(
type='PAN_PP',
backbone=dict(
type='resnet50',
pretrained=True
),
neck=dict(
type='FPEM_v2',
in_channels=(256, 512, 1024, 2048),
out_channels=128,
fpems=4
),
detection_head=dict(
type='PAN_PP_DetHead',
in_channels=512,
hidden_dim=128,
num_classes=6,
loss_text=dict(
type='DiceLoss',
loss_weight=1.0
),
loss_kernel=dict(
type='DiceLoss',
loss_weight=0.5
),
loss_emb=dict(
type='EmbLoss_v2',
feature_dim=4,
loss_weight=0.25
),
use_coordconv=False,
# use_coordconv=True,
)
)
data = dict(
batch_size=1,
train=dict(
type='PAN_PP_TRAIN',
split='train',
is_transform=True,
img_size=736,
short_size=736,
kernel_scale=0.5,
read_type='pil',
with_rec=False
),
test=dict(
type='PAN_PP_TEST',
split='test',
short_size=1024,
read_type='cv2',
with_rec=False,
data='data/TestData/image/'
)
)
train_cfg = dict(
# lr=1e-3,
lr=1e-2,
schedule='polylr',
epoch=200,
optimizer='Adam',
use_ex=False,
# pretrain='',
)
test_cfg = dict(
min_score=0.75,
min_area=260,
min_kernel_area=0.1,
scale=2,
bbox_type='rect',
result_path='outputs',
pretrain='./checkpoints/cfg/checkpoint.pth.tar', # tmp
)