2 Star 5 Fork 1

OpenMMLab / mmfewshot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
fsce_r101_fpn_contrastive-loss_voc-split3_3shot-fine-tuning.py 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
Linyiqi 提交于 2021-11-01 23:27 . Reformat config files (#46)
_base_ = [
'../../../_base_/datasets/fine_tune_based/few_shot_voc.py',
'../../../_base_/schedules/schedule.py',
'../../fsce_r101_fpn_contrastive_loss.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='FSCE', setting='SPLIT3_3SHOT')],
num_novel_shots=3,
num_base_shots=3,
classes='ALL_CLASSES_SPLIT3'),
val=dict(classes='ALL_CLASSES_SPLIT3'),
test=dict(classes='ALL_CLASSES_SPLIT3'))
evaluation = dict(
interval=5000,
class_splits=['BASE_CLASSES_SPLIT3', 'NOVEL_CLASSES_SPLIT3'])
checkpoint_config = dict(interval=5000)
optimizer = dict(lr=0.001)
lr_config = dict(warmup_iters=200, gamma=0.5, step=[6000, 8000])
runner = dict(max_iters=10000)
custom_hooks = [
dict(
type='ContrastiveLossDecayHook',
decay_steps=(3000, 6000),
decay_rate=0.5)
]
model = dict(
roi_head=dict(
bbox_head=dict(
with_weight_decay=True,
loss_contrast=dict(iou_threshold=0.6, loss_weight=0.2))))
# base model needs to be initialized with following script:
# tools/detection/misc/initialize_bbox_head.py
# please refer to configs/detection/fsce/README.md for more details.
load_from = ('work_dirs/fsce_r101_fpn_voc-split3_base-training/'
'base_model_random_init_bbox_head.pth')
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/open-mmlab/mmfewshot.git
git@gitee.com:open-mmlab/mmfewshot.git
open-mmlab
mmfewshot
mmfewshot
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891