# coding: utf-8
from utils.trainer import MyArgs, STFT_Separator_enhance_Trainer
from models.dpcl import DPCL

if __name__ == '__main__':
    p = MyArgs()
    # DPCL model to load + params
    p.parser.add_argument('--model_folder',
                          help='Path to the Model folder to load',
                          required=True)

    p.add_stft_args()
    p.add_separator_args()
    p.add_enhance_layer_args()

    args = p.get_args()

    trainer = STFT_Separator_enhance_Trainer(DPCL, 'STFT_DPCL_enhance',
                                             **vars(args))
    trainer.train()
예제 #2
0
# coding: utf-8
from utils.trainer import MyArgs, STFT_Separator_FineTune_Trainer
from models.L41 import L41Model
if __name__ == '__main__':
    p = MyArgs()

    p.parser.add_argument('--model_folder',
                          help='Path to the Model folder to load',
                          required=True)
    p.add_stft_args()
    p.add_separator_args()

    args = p.get_args()

    trainer = STFT_Separator_FineTune_Trainer(L41Model, 'STFT_L41_finetuning',
                                              **vars(args))
    trainer.train()
# coding: utf-8
from utils.trainer import MyArgs, Front_Separator_Finetuning_Trainer
from models.L41 import L41Model

if __name__ == '__main__':
    p = MyArgs()

    # Adapt model to load + params
    p.parser.add_argument('--model_folder',
                          help='Path to model folder to load',
                          required=True)

    p.add_adapt_args()
    p.add_separator_args()

    args = p.get_args()

    trainer = Front_Separator_Finetuning_Trainer(L41Model,
                                                 'front_L41_finetuning',
                                                 pretraining=False,
                                                 **vars(args))
    trainer.build_model()
    trainer.train()
예제 #4
0
# coding: utf-8
from utils.trainer import MyArgs, Front_Separator_Enhance_Finetuning_Trainer
from models.dpcl import DPCL

if __name__ == '__main__':
    p = MyArgs()

    # Adapt model to load + params
    p.parser.add_argument('--model_folder',
                          help='Path to model folder to load',
                          required=True)

    p.add_adapt_args()
    p.add_separator_args()
    p.add_finetuning_args()
    p.add_enhance_layer_args()

    args = p.get_args()

    trainer = Front_Separator_Enhance_Finetuning_Trainer(
        DPCL, 'front_DPCL_finetuning', pretraining=False, **vars(args))
    trainer.train()
# coding: utf-8
from utils.trainer import MyArgs, STFT_Separator_FineTune_Trainer
from models.L41 import L41Model
if __name__ == '__main__':
    p = MyArgs()

    p.parser.add_argument('--model_folder',
                          help='Path to the Model folder to load',
                          required=True)
    p.add_stft_args()
    p.add_finetuning_args()
    p.add_separator_args()

    args = p.get_args()

    trainer = STFT_Separator_FineTune_Trainer(L41Model, 'STFT_L41_finetuning',
                                              **vars(args))
    trainer.train()
예제 #6
0
# coding: utf-8
from utils.trainer import MyArgs, Front_Separator_Inference, STFT_inference, STFT_finetuned_inference
from models.L41 import L41Model
from utils.bss_eval import bss_eval_sources
import numpy as np

if __name__ == '__main__':
    p = MyArgs()

    p.parser.add_argument('--model_folder',
                          help='Path to the Model folder to load',
                          required=True)
    p.select_inferencer()
    p.add_adapt_args()
    p.add_separator_args()
    args = p.get_args()

    # Switch on different model Inferencer:
    if args.model == 'front_L41':
        inferencer = Front_Separator_Inference
    elif args.model == 'STFT_L41':
        inferencer = STFT_inference

    inferencer = inferencer(L41Model, 'inference', **vars(args))

    sdr = 0.0
    sir = 0.0
    sar = 0.0
    i = 0
    for mix, non_mix, separated in inferencer.inference():
        for m, n_m, s in zip(list(mix), list(non_mix), list(separated)):
# coding: utf-8
from utils.trainer import MyArgs, Adapt_Pretrainer

if __name__ == '__main__':
    p = MyArgs()

    #Preprocess arguments
    p.add_adapt_args()
    args = p.get_args()

    trainer = Adapt_Pretrainer(pretraining=True, **vars(args))
    trainer.build_model()
    trainer.train()

#Network arguments