Exemple #1
0
    class config(Config):
        groups = ['foo', 'bar']

        MY_INT = setting(10, foo=10, bar=20)
        MY_FLOAT = setting(10.0, bar=20.0)
        MY_STR = setting('foo', foo='asdf')
        MY_BOOL = setting(True, bar=False)
Exemple #2
0
class config(Config):
    groups = ['train', 'test']
    PATH_BASE = 'C:\Proy\sound-source-separation\data\musdb18wav'
    PATH_RAW = setting(default=PATH_BASE + 'train/raw_audio/',
                       train=PATH_BASE + 'train/raw_audio/',
                       test=PATH_BASE + 'test/raw_audio/')
    PATH_SPEC = setting(default=PATH_BASE + 'train/complex/',
                        train=PATH_BASE + 'train/complex/',
                        test=PATH_BASE + 'test/complex/')
    PATH_INDEXES = setting(default=PATH_BASE + 'train/indexes/',
                           train=PATH_BASE + 'train/indexes/',
                           test=PATH_BASE + 'test/indexes/')
    LOG_FILENAME = 'computing_spec.log'
    FR = 8192
    FFT_SIZE = 1024
    HOP = 256
    MODE = 'conditioned'
    INTRUMENTS = ['bass', 'drums', 'other', 'vocals', 'mix']
    CONDITIONS = ['bass', 'drums', 'other', 'vocals']
    CONDITION_MIX = 1  # complex conditions -> 1 only original instrumets, 2 combination of 2 instruments, etc
    ADD_ZERO = True  # add the zero condition
    ADD_ALL = True  # add the all mix condition
    ADD_IN_BETWEEN = 1.  # in between interval for the combination of several instruments
    STEP = 1  # step in frames for creating the input data
    CHUNK_SIZE = 4  # chunking the indexes before mixing -> define the number of data points of the same track
    SPECTROGRAM_SHAPE = [512, 128, 1]  # freq = 512, time = 128
Exemple #3
0
    class config(Config):
        groups = ['foo', 'bar']

        S1 = setting(10, foo=20)
        S2 = setting(True, bar=False)
        S3 = setting('a', foo='b', bar='c')
        S4 = 0.5
Exemple #4
0
class config(Config):
    groups = ['large', 'small']

    NUM_LAYERS = setting(default=5, large=10, small=3)
    NUM_UNITS = setting(default=128, large=512, small=32)
    USE_SKIP_CONNECTIONS = setting(default=True, small=False)
    LEARNING_RATE = 0.1
    OPTIMIZER = 'adam'
Exemple #5
0
    class config(Config):
        groups = ['foo', 'bar']

        S1 = setting(10, foo=20)
        S2 = setting(True, bar=False)
        S3 = setting('a', foo='b', bar='c')
        S4 = 0.5
        S5 = setting([1, 2, 3], foo=[4, 5, 6])
        S6 = setting({'a': 1, 'b': 2, 'c': 3}, bar={'d': 4, 'e': 5})
Exemple #6
0
    class config(Config):
        groups = ['foo', 'bar']

        MY_INT = setting(10, foo=10, bar=20)
        MY_FLOAT = setting(10.0, bar=20.0)
        MY_STR = setting('foo', foo='asdf')

        @classmethod
        def MY_BOOL(cls):
            return True
Exemple #7
0
class config(Config):
    groups = ["vanilla", "melgan"]

    TYPE = setting(default="vanilla", vanilla="vanilla", melgan="melgan")

    # MELGAN PARAMETERS
    INPUT_SIZE = 128
    NGF = 32
    N_RES_G = 3

    HOP_LENGTH = 256

    RATIOS = setting(default=[1, 1, 1, 2, 1, 1, 1],
                     vanilla=[1, 1, 1, 2, 1, 1, 1],
                     melgan=[8, 8, 2, 2])

    NUM_D = 3
    NDF = 16
    N_LAYER_D = 4
    DOWNSAMP_D = 4

    # AUTOENCODER
    CHANNELS = [128, 256, 256, 512, 512, 512, 128, 32]
    KERNEL = 5
    EXTRACT_LOUDNESS = False
    AUGMENT = setting(default=5, vanilla=5, melgan=1)

    # CLASSIFIER
    CLASSIFIER_CHANNELS = [16, 64, 256]
    CLASSIFIER_LIN_SIZE = [256, 64, 2]

    # TRAIN PARAMETERS
    PATH_PREPEND = "./runs/"
    SAMPRATE = 24000
    N_SIGNAL = setting(default=2**15, vanilla=2**15, melgan=2**14)
    EPOCH = 1000
    BATCH = 1
    LR = 1e-4
    NAME = "untitled"
    CKPT = None

    WAV_LOC = None
    FILE_LIST = None
    LMDB_LOC = "./preprocessed"

    BACKUP = 10000
    EVAL = 1000

    # INCREMENTAL GENERATION
    USE_CACHED_PADDING = False
    BUFFER_SIZE = 1024
    TARGET_SR = 48000
Exemple #8
0
 class config(Config):
     MY_INT = setting(10)
     MY_FLOAT = setting(10.0)
     MY_STR = setting('foo')
     MY_BOOL = setting(True)
     MY_LIST = setting([1, 2, 3])
     MY_DICT = setting({'a': 1, 'b': 2, 'c': 3})
     MY_SHORTHAND_INT = 20
class config(Config):
    groups = [
        'standard', 'simple_dense', 'complex_dense', 'simple_cnn',
        'complex_cnn'
    ]

    GROUP = setting(
        default='simple_dense',
        simple_dense='simple_dense',
        complex_dense='complex_dense',
        simple_cnn='simple_cnn',
        complex_cnn='complex_cnn',
    )
    PATH_BASE = '/net/guzheng/data2/anasynth_nonbp/meseguerbrocal/source_separation/musdb18/models/'
    NAME = 'with_val_all_files'

    PATH_MODEL = setting(
        os.path.join(PATH_BASE, 'conditioned/simple_dense'),
        standard=os.path.join(PATH_BASE, 'standard'),
        simple_dense=os.path.join(PATH_BASE, 'conditioned/simple_dense'),
        complex_dense=os.path.join(PATH_BASE, 'conditioned/complex_dense'),
        simple_cnn=os.path.join(PATH_BASE, 'conditioned/simple_cnn'),
        complex_cnn=os.path.join(PATH_BASE, 'conditioned/complex_cnn'))
    PATH_AUDIO = '/net/guzheng/data2/anasynth_nonbp/meseguerbrocal/source_separation/musdb18/test/complex'
    TARGET = [
        'vocals', 'bass', 'drums', 'rest'
    ]  # ['vocals', 'bass', 'bass_vocals'] -> not ready yet for complex conditions
    INSTRUMENTS = ['bass', 'drums', 'rest', 'vocals'
                   ]  # to check that has the same order than the training
    OVERLAP = 0
    MODE = setting(default='conditioned', standard='standard')
    EMB_TYPE = setting(default='dense',
                       simple_dense='dense',
                       complex_dense='dense',
                       simple_cnn='cnn',
                       complex_cnn='cnn')
Exemple #10
0
class config(Config):
    groups = ['train', 'test']
    PATH_BASE = '/data2/anasynth_nonbp/meseguerbrocal/source_separation/musdb18/'
    PATH_RAW = setting(default=PATH_BASE + 'train/raw_audio/',
                       train=PATH_BASE + 'train/raw_audio/',
                       test=PATH_BASE + 'test/raw_audio/')
    PATH_SPEC = setting(default=PATH_BASE + 'train/complex/',
                        train=PATH_BASE + 'train/complex/',
                        test=PATH_BASE + 'test/complex/')
    PATH_INDEXES = setting(default=PATH_BASE + 'train/indexes/',
                           train=PATH_BASE + 'train/indexes/',
                           test=PATH_BASE + 'test/indexes/')
    FR = 8192
    FFT_SIZE = 1024
    HOP = 256
    MODE = 'conditioned'
    INTRUMENTS = ['bass', 'drums', 'rest', 'vocals', 'mix']
    CONDITIONS = ['bass', 'drums', 'rest', 'vocals']
    CONDITION_MIX = 1  # complex conditions -> 1 only original instrumets, 2 combination of 2 instruments, etc
    ADD_ZERO = True  # add the zero condition
    ADD_ALL = True  # add the all mix condition
    ADD_IN_BETWEEN = 1.  # in between interval for the combination of several instruments
    STEP = 1  # step in frames for creating the input data
    CHUNK_SIZE = 4  # chunking the indexes before mixing -> define the number of data points of the same track
Exemple #11
0
 class config(Config):
     adsf = setting(123)
Exemple #12
0
 class config(Config):
     groups = ['hello']
     FOO = setting(None, hello=123)
Exemple #13
0
 class config(Config):
     FOO = setting(None)
 class config(Config):
     FOO = setting(10)
Exemple #15
0
 class c(Config):
     groups = ['a']
     A = setting(1, a=2)
     B = 2.0
     C = True
     D = 'foo'
Exemple #16
0
 class config(Config):
     MY_LIST = setting(1j)
Exemple #17
0
    class config(Config):
        groups = ['foo', 'bar']

        S1 = setting(10, foo=20)
        SECOND_OPTION = setting(True, bar=False)
        S3 = setting('a', foo='b', bar='c')
Exemple #18
0
 class config(Config):
     groups = ['a', 'b']
     FOO = setting(10, a=20, b=30)
Exemple #19
0
 class config(Config):
     groups = ['foo', 'bar']
     MY_INT = setting(10, baz=20)
Exemple #20
0
class config(Config):

    groups = ['standard', 'simple_dense', 'complex_dense', 'simple_cnn',
              'complex_cnn']
    # General

    MODE = setting(default='conditioned', standard='standard')

    NAME = 'with_val_all_files'
    ADD_TIME = False    # add the time and date in the name
    TARGET = 'vocals'   # only for standard version

    # GENERATOR
    PATH_BASE = '/data2/anasynth_nonbp/meseguerbrocal/source_separation/musdb18/'
    # default = conditioned
    INDEXES_TRAIN = setting(
        default=os.path.join(
            PATH_BASE, 'train/indexes/indexes_conditioned_1_4_1_True_True_1.0.npz'),
        standard=os.path.join(
            PATH_BASE, 'train/indexes/indexes_standard_1_4.npz')
    )
    INDEXES_VAL = setting(
        default=os.path.join(
            PATH_BASE, 'train/indexes/indexes_conditioned_128_4_1_True_True_1.0.npz'),
        standard=os.path.join(
            PATH_BASE, 'train/indexes/indexes_standard_128_4.npz')
    )

    NUM_THREADS = tf.data.experimental.AUTOTUNE   # 32
    N_PREFETCH = tf.data.experimental.AUTOTUNE  # 4096

    # checkpoints
    EARLY_STOPPING_MIN_DELTA = 1e-6
    EARLY_STOPPING_PATIENCE = 15
    REDUCE_PLATEAU_PATIENCE = 5

    # training
    BATCH_SIZE = 64
    N_BATCH = 2048
    N_EPOCH = 1000
    PROGRESSIVE = False

    # unet paramters
    INPUT_SHAPE = [512, 128, 1]  # freq = 512, time = 128
    FILTERS_LAYER_1 = 16
    N_LAYERS = 6
    LR = 1e-3
    ACTIVATION_ENCODER = 'leaky_relu'
    ACTIVATION_DECODER = 'relu'
    ACT_LAST = 'sigmoid'
    LOSS = 'mean_absolute_error'

    # -------------------------------

    # control parameters
    CONTROL_TYPE = setting(
        'dense', simple_dense='dense', complex_dense='dense',
        simple_cnn='cnn', complex_cnn='cnn'
    )
    FILM_TYPE = setting(
        'simple', simple_dense='simple', complex_dense='complex',
        simple_cnn='simple', complex_cnn='complex'
    )
    Z_DIM = 4       # for musdb -> 4 instruments: vocals, drums, bass, rest
    ACT_G = 'linear'
    ACT_B = 'linear'
    N_CONDITIONS = setting(
        6, simple_dense=6, complex_dense=1008,
        simple_cnn=6, complex_cnn=1008
    )

    # cnn control
    N_FILTERS = setting(
        [16, 32, 64], simple_cnn=[16, 32, 64], complex_cnn=[32, 64, 256]
    )
    PADDING = ['same', 'same', 'valid']
    # Dense control
    N_NEURONS = setting(
        [16, 64, 256], simple_dense=[16, 64, 256],
        complex_dense=[16, 256, 1024]
    )