Shortcuts

matting_default_runtime 源代码

# Copyright (c) OpenMMLab. All rights reserved.
from mmengine.hooks import (CheckpointHook, DistSamplerSeedHook, IterTimerHook,
                            LoggerHook, ParamSchedulerHook)
from mmengine.runner import LogProcessor
from mmengine.visualization import LocalVisBackend

from mmagic.engine.hooks import BasicVisualizationHook
from mmagic.visualization import ConcatImageVisualizer

[文档]default_scope = 'mmagic'
[文档]save_dir = './work_dirs'
[文档]default_hooks = dict( timer=dict(type=IterTimerHook), logger=dict(type=LoggerHook, interval=100), param_scheduler=dict(type=ParamSchedulerHook), checkpoint=dict( type=CheckpointHook, interval=10000, by_epoch=False, out_dir=save_dir), sampler_seed=dict(type=DistSamplerSeedHook),
)
[文档]env_cfg = dict( cudnn_benchmark=False, mp_cfg=dict(mp_start_method='fork', opencv_num_threads=4), dist_cfg=dict(backend='nccl'),
)
[文档]vis_backends = [dict(type=LocalVisBackend)]
[文档]visualizer = dict( type=ConcatImageVisualizer, vis_backends=vis_backends, fn_key='trimap_path', img_keys=['pred_alpha', 'trimap', 'gt_merged', 'gt_alpha'], bgr2rgb=True)
[文档]custom_hooks = [dict(type=BasicVisualizationHook, interval=2000)]
[文档]log_level = 'INFO'
[文档]log_processor = dict(type=LogProcessor, by_epoch=False)
[文档]load_from = None
[文档]resume = False
# TODO: support auto scaling lr
Read the Docs v: latest
Versions
latest
stable
0.x
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.