def merge_cfg_from_file(cfg_filename): """Load a yaml config file and merge it into the global config.""" with open(cfg_filename, 'r') as f: yaml_cfg = AttrDict(yaml.load(f)) _merge_a_into_b(yaml_cfg, __C)
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import six import yaml import copy import numpy as np from lib.utils.collections import AttrDict from lib.utils.misc import get_run_name from ast import literal_eval __C = AttrDict() # Consumers can get config by: cfg = __C # Root directory of project __C.ROOT_DIR = os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # ---------------------------------------------------------------------------- # # Data configurations # ---------------------------------------------------------------------------- # __C.DATASET = AttrDict() __C.DATASET.NAME = 'nyu' __C.DATASET.RGB_PIXEL_MEANS = (0.485, 0.456, 0.406 ) # (102.9801, 115.9465, 122.7717) __C.DATASET.RGB_PIXEL_VARS = (0.229, 0.224, 0.225) # (1, 1, 1) # Scale the depth map
import copy from ast import literal_eval import warnings import numpy as np from packaging import version import torch import torch.nn as nn from torch.nn import init import yaml import lib.nn as mynn from lib.utils.collections import AttrDict from lib.utils.io import cache_url __C = AttrDict() # Consumers can get config by: # from fast_rcnn_config import cfg cfg = __C # Random note: avoid using '.ON' as a config key since yaml converts it to True; # prefer 'ENABLED' instead # ---------------------------------------------------------------------------- # # Training options # ---------------------------------------------------------------------------- # __C.TRAIN = AttrDict() # Initialize network with weights from this .pkl file __C.TRAIN.WEIGHTS = b''
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import six import os import os.path as osp import copy from ast import literal_eval import numpy as np import yaml from lib.utils.collections import AttrDict __C = AttrDict() # Consumers can get config by: # from fast_rcnn_config import cfg cfg = __C __C.ROOT_DIR = osp.abspath(osp.join(osp.dirname(__file__), '..', '..')) # Random note: avoid using '.ON' as a config key since yaml converts it to True; # prefer 'ENABLED' instead # ---------------------------------------------------------------------------- # # DATASET Options # ---------------------------------------------------------------------------- # __C.DATASET = AttrDict() __C.DATASET.SELF_SPLIT_DATASET = False