Commit d701c031 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch '38-p800-testitem-processing' into 'main'

Resolve "P800 Testitem processing"

See merge request !81
parents 1cc3047e e5c20c7e
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -686,6 +686,12 @@ ISM

---

# audiotools CLI for format conversion and rendering
# Audiotools CLI for format conversion and rendering

Please refer to [the notebook](./examples/audiotools.ipynb) for an overview.

# Selection test experiments

The folder `experiments/selection` contains a directory skeleton for processing items for the various selection test experiments including the config files. E.g. for processing the items for BS1534-1a, the input files need to be put into `experiments/selection/BS1534-1a/proc_input`, then execute `python3 -m ivas_processing_scripts experiments/selection/BS1534-1a/config/BS1534-1a.yml`. The output files will be in `experiments/selection/BS1534-1a/proc_output`, in subfolders per conditions.

Note that for P800 experiments, there are separate configs per category as different background noises need to be specified. Thus, there are several config files with `-catX` suffix available. The background noise files need to be put into `experiments/selection/P800-X/background_noise`. To generate all categories, there is a convenience script `create_items_p800.py` in the repository root folder.
 No newline at end of file

create_items_p800.py

0 → 100644
+33 −0
Original line number Diff line number Diff line
#! /usr/bin/env python3
import argparse
from pathlib import Path

from ivas_processing_scripts import main as generate_test
from ivas_processing_scripts.utils import apply_func_parallel

P800_TESTS = [f"P800-{i}" for i in range(1, 8)]


class Arguments:
    def __init__(self, config):
        self.config = config
        self.debug = False
        # used to overwrite the multiprocessing key in the configs to rather parallelize on category level
        self.multiprocessing = False


def create_items(testname):
    p800_path = Path(f"experiments/selection/{testname}")
    p800_cfgs = p800_path.joinpath("config").glob("P800*cat*.yml")

    args = [Arguments(str(cfg)) for cfg in p800_cfgs]
    apply_func_parallel(generate_test, zip( args ), type="mp")


# if is necessary here so that multiprocessing does not crash
if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("testname", choices=P800_TESTS)
    args = parser.parse_args()

    create_items(args.testname)
+2 −2
Original line number Diff line number Diff line
@@ -7,8 +7,8 @@ name: P800-1
master_seed: 5
prerun_seed: 2

input_path: "experiments/selection/P800-1/proc_input"
output_path: "experiments/selection/P800-1/proc_output"
input_path: "experiments/selection/P800-1/proc_input/cat1"
output_path: "experiments/selection/P800-1/proc_output/cat1"
use_windows_codec_binaries: true
condition_in_output_filename: true

+317 −0
Original line number Diff line number Diff line
---
################################################
# General configuration
################################################

name: P800-1
master_seed: 5
prerun_seed: 2

input_path: "experiments/selection/P800-1/proc_input/cat2"
output_path: "experiments/selection/P800-1/proc_output/cat2"
use_windows_codec_binaries: True

################################################
### Input configuration
################################################
input:
    fmt: "STEREO"
    # TODO: to be clarified in Test Plan
    fs: 48000

################################################
### Pre-processing on individual items
################################################
preprocessing:
    mask: "HP50"
    loudness: -26
    window: 100

################################################
### Pre-processing on whole signal(s)
################################################
preprocessing_2:
    concatenate_input: true
    # concatenation_order: []
    preamble: 10000
    preamble_noise: true

#################################################
### Bitstream processing
#################################################

################################################
### Configuration for conditions under test
################################################
conditions_to_generate:
    ### Reference and anchor conditions ##########################
    c01:
        type: ref
    c02:
        type: mnru
        q: 28
    c03:
        type: mnru
        q: 24
    c04:
        type: mnru
        q: 20
    c05:
        type: mnru
        q: 16
    c06:
        type: esdru
        alpha: 0.7
    c07:
        type: esdru
        alpha: 0.4
    c08:
        type: esdru
        alpha: 0.1

    ### EVS condition ################################
    c09:
        type: evs
        bitrates:
            - 7200
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c10:
        type: evs
        bitrates:
            - 8000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c11:
        type: evs
        bitrates:
            - 9600
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c12:
        type: evs
        bitrates:
            - 13200
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c13:
        type: evs
        bitrates:
            - 16400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c14:
        type: evs
        bitrates:
            - 24400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c15:
        type: evs
        bitrates:
            - 32000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c16:
        type: evs
        bitrates:
            - 7200
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5
    c17:
        type: evs
        bitrates:
            - 8000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5
    c18:
        type: evs
        bitrates:
            - 9600
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5
    c19:
        type: evs
        bitrates:
            - 13200
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5
    c20:
        type: evs
        bitrates:
            - 16400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5
    c21:
        type: evs
        bitrates:
            - 24400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5
    c22:
        type: evs
        bitrates:
            - 32000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5

    ### IVAS condition ###############################
    c23:
        type: ivas
        bitrates:
            - 13200
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
    c24:
        type: ivas
        bitrates:
            - 16400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
    c25:
        type: ivas
        bitrates:
            - 24400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
    c26:
        type: ivas
        bitrates:
            - 32000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
    c27:
        type: ivas
        bitrates:
            - 48000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
    c28:
        type: ivas
        bitrates:
            - 13200
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
        tx:
            type: "FER"
            error_rate: 5
    c29:
        type: ivas
        bitrates:
            - 16400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
        tx:
            type: "FER"
            error_rate: 5
    c30:
        type: ivas
        bitrates:
            - 24400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
        tx:
            type: "FER"
            error_rate: 5
    c31:
        type: ivas
        bitrates:
            - 32000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
        tx:
            type: "FER"
            error_rate: 5
    c32:
        type: ivas
        bitrates:
            - 48000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
        tx:
            type: "FER"
            error_rate: 5

    c33:
        type: ivas
        bitrates:
            - 24400
        cod:
            opts: ["-dtx", "-max_band", "SWB"]
        dec:
            fmt: "STEREO"

    c34:
        type: ivas
        bitrates:
            - 13200
        cod:
            opts: ["-dtx", "-max_band", "SWB"]
        dec:
            fmt: "STEREO"
        tx:
            type: "FER"
            error_rate: 5

################################################
### Post-processing
################################################
postprocessing:
    fmt: "STEREO"
    fs: 48000
    loudness: -26
+317 −0
Original line number Diff line number Diff line
---
################################################
# General configuration
################################################

name: P800-1
master_seed: 5
prerun_seed: 2

input_path: "experiments/selection/P800-1/proc_input/cat3"
output_path: "experiments/selection/P800-1/proc_output/cat3"
use_windows_codec_binaries: True

################################################
### Input configuration
################################################
input:
    fmt: "STEREO"
    # TODO: to be clarified in Test Plan
    fs: 48000

################################################
### Pre-processing on individual items
################################################
preprocessing:
    mask: "HP50"
    loudness: -26
    window: 100

################################################
### Pre-processing on whole signal(s)
################################################
preprocessing_2:
    concatenate_input: true
    # concatenation_order: []
    preamble: 10000
    preamble_noise: true

#################################################
### Bitstream processing
#################################################

################################################
### Configuration for conditions under test
################################################
conditions_to_generate:
    ### Reference and anchor conditions ##########################
    c01:
        type: ref
    c02:
        type: mnru
        q: 28
    c03:
        type: mnru
        q: 24
    c04:
        type: mnru
        q: 20
    c05:
        type: mnru
        q: 16
    c06:
        type: esdru
        alpha: 0.7
    c07:
        type: esdru
        alpha: 0.4
    c08:
        type: esdru
        alpha: 0.1

    ### EVS condition ################################
    c09:
        type: evs
        bitrates:
            - 7200
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c10:
        type: evs
        bitrates:
            - 8000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c11:
        type: evs
        bitrates:
            - 9600
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c12:
        type: evs
        bitrates:
            - 13200
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c13:
        type: evs
        bitrates:
            - 16400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c14:
        type: evs
        bitrates:
            - 24400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c15:
        type: evs
        bitrates:
            - 32000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
    c16:
        type: evs
        bitrates:
            - 7200
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5
    c17:
        type: evs
        bitrates:
            - 8000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5
    c18:
        type: evs
        bitrates:
            - 9600
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5
    c19:
        type: evs
        bitrates:
            - 13200
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5
    c20:
        type: evs
        bitrates:
            - 16400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5
    c21:
        type: evs
        bitrates:
            - 24400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5
    c22:
        type: evs
        bitrates:
            - 32000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
        tx:
            type: "FER"
            error_rate: 5

    ### IVAS condition ###############################
    c23:
        type: ivas
        bitrates:
            - 13200
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
    c24:
        type: ivas
        bitrates:
            - 16400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
    c25:
        type: ivas
        bitrates:
            - 24400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
    c26:
        type: ivas
        bitrates:
            - 32000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
    c27:
        type: ivas
        bitrates:
            - 48000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
    c28:
        type: ivas
        bitrates:
            - 13200
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
        tx:
            type: "FER"
            error_rate: 5
    c29:
        type: ivas
        bitrates:
            - 16400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
        tx:
            type: "FER"
            error_rate: 5
    c30:
        type: ivas
        bitrates:
            - 24400
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
        tx:
            type: "FER"
            error_rate: 5
    c31:
        type: ivas
        bitrates:
            - 32000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
        tx:
            type: "FER"
            error_rate: 5
    c32:
        type: ivas
        bitrates:
            - 48000
        cod:
            opts: ["-max_band", "SWB"]
        dec:
            fmt: "STEREO"
        tx:
            type: "FER"
            error_rate: 5

    c33:
        type: ivas
        bitrates:
            - 24400
        cod:
            opts: ["-dtx", "-max_band", "SWB"]
        dec:
            fmt: "STEREO"

    c34:
        type: ivas
        bitrates:
            - 13200
        cod:
            opts: ["-dtx", "-max_band", "SWB"]
        dec:
            fmt: "STEREO"
        tx:
            type: "FER"
            error_rate: 5

################################################
### Post-processing
################################################
postprocessing:
    fmt: "STEREO"
    fs: 48000
    loudness: -26
Loading