-
Notifications
You must be signed in to change notification settings - Fork 0
/
fast_tiny_msra_512_finetune_ic17mlt.py
65 lines (65 loc) · 1.49 KB
/
fast_tiny_msra_512_finetune_ic17mlt.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
model = dict(
type='FAST',
backbone=dict(
type='fast_backbone',
config='config/fast/nas-configs/fast_tiny.config'
),
neck=dict(
type='fast_neck',
config='config/fast/nas-configs/fast_tiny.config'
),
detection_head=dict(
type='fast_head',
config='config/fast/nas-configs/fast_tiny.config',
pooling_size=7,
dropout_ratio=0.1,
loss_text=dict(
type='DiceLoss',
loss_weight=0.5
),
loss_kernel=dict(
type='DiceLoss',
loss_weight=1.0
),
loss_emb=dict(
type='EmbLoss_v2',
feature_dim=4,
loss_weight=0.25
)
)
)
repeat_times = 10
data = dict(
batch_size=16,
train=dict(
type='FAST_MSRA',
split='train',
is_transform=True,
img_size=512,
short_size=512,
pooling_size=7,
read_type='cv2',
repeat_times=repeat_times
),
test=dict(
type='FAST_MSRA',
split='test',
short_size=512,
read_type='pil'
)
)
train_cfg = dict(
lr=1e-3,
schedule='polylr',
epoch=600 // repeat_times,
optimizer='Adam',
pretrain='pretrained/fast_tiny_ic17mlt_640.pth',
# https://github.com/czczup/FAST/releases/download/release/fast_tiny_ic17mlt_640.pth
save_interval=10 // repeat_times,
)
test_cfg = dict(
min_score=0.88,
min_area=200,
bbox_type='rect',
result_path='outputs/submit_msra/'
)