tests/test_config.py
def _get_config_directory():
    """Find the predefined segmentor config directory."""
    try:
        # Assume we are running in the source mmsegmentation repo
        repo_dpath = dirname(dirname(__file__))
    except NameError:
        # For IPython development when this __file__ is not defined
        import mmseg
        repo_dpath = dirname(dirname(mmseg.__file__))
    config_dpath = join(repo_dpath, 'configs')
    if not exists(config_dpath):
        raise Exception('Cannot find config path')
    return config_dpath
Find the predefined segmentor config directory.
Find the predefined segmentor config directory.
Find the predefined segmentor config directory .
def _get_config_directory():
    try:
        repo_dpath = dirname(dirname(__file__))
    except NameError:
        import mmseg
        repo_dpath = dirname(dirname(mmseg.__file__))
    config_dpath = join(repo_dpath, 'configs')
    if not exists(config_dpath):
        raise Exception('Cannot find config path')
    return config_dpath
def _get_config_directory ( ) : try : repo_dpath = dirname ( dirname ( __file__ ) ) except NameError : import mmseg repo_dpath = dirname ( dirname ( mmseg . __file__ ) ) config_dpath = join ( repo_dpath , 'configs' ) if not exists ( config_dpath ) : raise Exception ( 'Cannot find config path' ) return config_dpath
Find the predefined segmentor config directory.
Find the predefined segmentor config directory .
"""Find the predefined segmentor config directory.""" # Assume we are running in the source mmsegmentation repo # For IPython development when this __file__ is not defined