forked from open-mmlab/mmfewshot
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtfa_r101_fpn_voc-split3_5shot-fine-tuning.py
31 lines (31 loc) · 1.16 KB
/
tfa_r101_fpn_voc-split3_5shot-fine-tuning.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
_base_ = [
'../../../_base_/datasets/fine_tune_based/few_shot_voc.py',
'../../../_base_/schedules/schedule.py', '../../tfa_r101_fpn.py',
'../../../_base_/default_runtime.py'
]
# classes splits are predefined in FewShotVOCDataset
# FewShotVOCDefaultDataset predefine ann_cfg for model reproducibility.
data = dict(
train=dict(
type='FewShotVOCDefaultDataset',
ann_cfg=[dict(method='TFA', setting='SPLIT3_5SHOT')],
num_novel_shots=5,
num_base_shots=5,
classes='ALL_CLASSES_SPLIT3'),
val=dict(classes='ALL_CLASSES_SPLIT3'),
test=dict(classes='ALL_CLASSES_SPLIT3'))
evaluation = dict(
interval=20000,
class_splits=['BASE_CLASSES_SPLIT3', 'NOVEL_CLASSES_SPLIT3'])
checkpoint_config = dict(interval=20000)
optimizer = dict(lr=0.001)
lr_config = dict(
warmup_iters=10, step=[
18000,
])
runner = dict(max_iters=20000)
# base model needs to be initialized with following script:
# tools/detection/misc/initialize_bbox_head.py
# please refer to configs/detection/tfa/README.md for more details.
load_from = ('work_dirs/tfa_r101_fpn_voc-split3_base-training/'
'base_model_random_init_bbox_head.pth')