예제 #1
0
def update(args):
    clean(args)

    if args.image == 'all' or args.image == 'exabgp':
        ExaBGP.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'exabgp_mrtparse':
        ExaBGP_MRTParse.build_image(True,
                                    checkout=args.checkout,
                                    nocache=args.no_cache)
    if args.image == 'all' or args.image == 'gobgp':
        GoBGP.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'quagga':
        Quagga.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'bird':
        BIRD.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'mirage':
        if args.checkout == "HEAD":
            args.checkout = "bgperf"
        MIRAGE.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'mirage_st':
        if args.checkout == "HEAD":
            args.checkout = "bgperf"
        MIRAGE_ST.build_image(True,
                              checkout=args.checkout,
                              nocache=args.no_cache)
    if args.image == 'all' or args.image == 'throughput':
        if args.checkout == "HEAD":
            args.checkout = "feature-integrate-test"
        ThroughputTarget.build_image(True,
                                     checkout=args.checkout,
                                     nocache=args.no_cache)
    if args.image == 'all' or args.image == 'frr':
        FRRouting.build_image(True,
                              checkout=args.checkout,
                              nocache=args.no_cache)
예제 #2
0
def prepare(args):
    ExaBGP.build_image(args.force, nocache=args.no_cache)
    ExaBGP_MRTParse.build_image(args.force, nocache=args.no_cache)
    GoBGP.build_image(args.force, nocache=args.no_cache)
    Quagga.build_image(args.force,
                       checkout='quagga-1.0.20160309',
                       nocache=args.no_cache)
    BIRD.build_image(args.force, nocache=args.no_cache)
예제 #3
0
파일: bgperf.py 프로젝트: jopietsch/bgperf
def prepare(args):
    ExaBGP.build_image(args.force, nocache=args.no_cache)
    ExaBGP_MRTParse.build_image(args.force, nocache=args.no_cache)
    GoBGP.build_image(args.force, nocache=args.no_cache)
    BIRD.build_image(args.force, nocache=args.no_cache)
    FRRouting.build_image(args.force,
                          checkout='stable/3.0',
                          nocache=args.no_cache)
예제 #4
0
def update(args):
    if args.image == 'all' or args.image == 'exabgp':
        ExaBGP.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'gobgp':
        GoBGP.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'quagga':
        Quagga.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'bird':
        BIRD.build_image(True, checkout=args.checkout, nocache=args.no_cache)
예제 #5
0
def update(args):
    if args.image == 'all' or args.image == 'exabgp':
        ExaBGP.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'gobgp':
        GoBGP.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'quagga':
        Quagga.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'bird':
        BIRD.build_image(True, checkout=args.checkout, nocache=args.no_cache)
예제 #6
0
def prepare(args):
    ExaBGP.build_image(args.force, nocache=args.no_cache)
    ExaBGP_MRTParse.build_image(args.force, nocache=args.no_cache)
    GoBGP.build_image(args.force, nocache=args.no_cache)
    Quagga.build_image(args.force,
                       checkout='quagga-1.0.20160309',
                       nocache=args.no_cache)
    BIRD.build_image(args.force, nocache=args.no_cache)
    MIRAGE.build_image(args.force, checkout='bgperf', nocache=args.no_cache)
    MIRAGE_ST.build_image(args.force, checkout='bgperf', nocache=args.no_cache)
    FRRouting.build_image(args.force,
                          checkout='stable/3.0',
                          nocache=args.no_cache)
예제 #7
0
파일: bgperf.py 프로젝트: jopietsch/bgperf
def update(args):
    if args.image == 'all' or args.image == 'exabgp':
        ExaBGP.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'exabgp_mrtparse':
        ExaBGP_MRTParse.build_image(True,
                                    checkout=args.checkout,
                                    nocache=args.no_cache)
    if args.image == 'all' or args.image == 'gobgp':
        GoBGP.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'bird':
        BIRD.build_image(True, checkout=args.checkout, nocache=args.no_cache)
    if args.image == 'all' or args.image == 'frr':
        FRRouting.build_image(True,
                              checkout=args.checkout,
                              nocache=args.no_cache)
예제 #8
0
파일: augment.py 프로젝트: frankfan007/BIRD
    def __getitem__(self, idx):

        ys, meta, _, xs = self.mix[idx]

        xs = torch.from_numpy(xs)
        ys = torch.from_numpy(ys)

        X1s = torchaudio.functional.spectrogram(waveform=torch.transpose(
            xs[0, :, :], 0, 1),
                                                pad=0,
                                                window=torch.hann_window(400),
                                                n_fft=512,
                                                hop_length=256,
                                                win_length=400,
                                                power=None,
                                                normalized=False)

        X2s = torchaudio.functional.spectrogram(waveform=torch.transpose(
            xs[1, :, :], 0, 1),
                                                pad=0,
                                                window=torch.hann_window(400),
                                                n_fft=512,
                                                hop_length=256,
                                                win_length=400,
                                                power=None,
                                                normalized=False)

        Ys = torchaudio.functional.spectrogram(waveform=torch.transpose(
            ys, 0, 1),
                                               pad=0,
                                               window=torch.hann_window(400),
                                               n_fft=512,
                                               hop_length=256,
                                               win_length=400,
                                               power=None,
                                               normalized=False)

        M1s = (X1s[0, :, :, 0]**2 +
               X1s[0, :, :, 1]**2) / (X1s[0, :, :, 0]**2 + X1s[0, :, :, 1]**2 +
                                      X2s[0, :, :, 0]**2 + X2s[0, :, :, 1]**2)
        M2s = (X1s[1, :, :, 0]**2 +
               X1s[1, :, :, 1]**2) / (X1s[1, :, :, 0]**2 + X1s[1, :, :, 1]**2 +
                                      X2s[1, :, :, 0]**2 + X2s[1, :, :, 1]**2)
        Ms = torch.cat(
            (torch.unsqueeze(M1s, dim=0), torch.unsqueeze(M2s, dim=0)), 0)

        tau = BIRD.getTDOA(meta)[0]

        return Ys, Ms, tau
예제 #9
0
파일: augment.py 프로젝트: frankfan007/BIRD
    def __getitem__(self, idx):

        ys, meta, _, _ = self.mix[idx]

        ys = torch.from_numpy(ys)

        Ys = torchaudio.functional.spectrogram(waveform=torch.transpose(
            ys, 0, 1),
                                               pad=0,
                                               window=torch.hann_window(400),
                                               n_fft=512,
                                               hop_length=256,
                                               win_length=400,
                                               power=None,
                                               normalized=False)

        rt60 = BIRD.getRT60(meta)

        return Ys, rt60
from torchaudio.datasets import LIBRISPEECH
from augment import RT60

parser = argparse.ArgumentParser()

parser.add_argument('--root', default='', type=str, help='Root to save the datasets')
parser.add_argument('--folds_train', default=[1,2,3,4,5,6,7], type=int, nargs='+', help='List of BIRD folds for training')
parser.add_argument('--folds_eval', default=[8,9], type=int, nargs='+', help='List of BIRD folds for validation')
parser.add_argument('--folds_test', default=[10], type=int, nargs='+', help='List of BIRD folds for test')

args = parser.parse_args()

# This holds the RIR dataset for training, validation and testing

folder_in_archive_rir = 'Bird'
rir_train = BIRD(root=args.root, folder_in_archive=folder_in_archive_rir, folds=args.folds_train)
rir_eval = BIRD(root=args.root, folder_in_archive=folder_in_archive_rir, folds=args.folds_eval)
rir_test = BIRD(root=args.root, folder_in_archive=folder_in_archive_rir, folds=args.folds_test)

# This holds the speech dataset for training, validation and testing

folder_in_archive_speech = 'LibriSpeech'
speech_train = LIBRISPEECH(root=args.root, folder_in_archive=folder_in_archive_speech, url='train-clean-100', download=True)
speech_eval = LIBRISPEECH(root=args.root, folder_in_archive=folder_in_archive_speech, url='dev-clean', download=True)
speech_test = LIBRISPEECH(root=args.root, folder_in_archive=folder_in_archive_speech, url='test-clean', download=True)

# We can simply create augmented data with this training dataset

augmented_train = RT60(rir=rir_train, speech=speech_train, samples_count=10000)

Ys, rt60 = augmented_train[5]
예제 #11
0
# Author: Francois Grondin
# Date: October 19, 2020
# Affiliation: Universite de Sherbrooke
# Contact: [email protected]

import argparse
import os, sys, inspect

current_dir = os.path.dirname(
    os.path.abspath(inspect.getfile(inspect.currentframe())))
parent_dir = os.path.dirname(current_dir)
sys.path.insert(0, parent_dir)

from bird import BIRD

parser = argparse.ArgumentParser()

parser.add_argument('--root',
                    default='',
                    type=str,
                    help='Root to save the datasets')
parser.add_argument('--folds',
                    default=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
                    type=int,
                    nargs='+',
                    help='List of folds')

args = parser.parse_args()

rir = BIRD(root=args.root, folder_in_archive='Bird', folds=args.folds)
예제 #12
0
def prepare(args):
    ExaBGP.build_image(args.force, nocache=args.no_cache)
    GoBGP.build_image(args.force, nocache=args.no_cache)
    Quagga.build_image(args.force, nocache=args.no_cache)
    BIRD.build_image(args.force, nocache=args.no_cache)
예제 #13
0
                    nargs='+',
                    help='Alpha range')
parser.add_argument('--c',
                    default=[335.0, 355.0],
                    type=float,
                    nargs='+',
                    help='Speed of sound range')
parser.add_argument('--d',
                    default=[0.01, 0.30],
                    type=float,
                    nargs='+',
                    help='Microphone spacing range')
parser.add_argument('--r',
                    default=[0.0, 22.0, 0.0, 22.0, 0.0, 22.0, 0.0, 22.0],
                    type=float,
                    nargs='+',
                    help='Distance between source and microphones')

args = parser.parse_args()

rir = BIRD(root=args.root,
           folder_in_archive='Bird',
           folds=args.folds,
           room=args.room,
           alpha=args.alpha,
           c=args.c,
           d=args.d,
           r=args.r)

print(rir._df)
예제 #14
0
def prepare(args):
    ExaBGP.build_image(args.force, nocache=args.no_cache)
    GoBGP.build_image(args.force, nocache=args.no_cache)
    Quagga.build_image(args.force, nocache=args.no_cache)
    BIRD.build_image(args.force, nocache=args.no_cache)
예제 #15
0
def enter():
    global bird
    bird = BIRD()
    grass = Grass()
    game_world.add_object(grass, 0)
    game_world.add_object(bird, 1)