|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"""task.py""" |
|
from config.vocabulary import * |
|
from utils.note_event_dataclasses import Event |
|
|
|
task_cfg = { |
|
"mt3_midi": { |
|
"name": "mt3_midi", |
|
"train_program_vocab": program_vocab_presets["mt3_midi"], |
|
"train_drum_vocab": drum_vocab_presets["gm"], |
|
}, |
|
"mt3_midi_plus": { |
|
"name": "mt3_midi_plus", |
|
"train_program_vocab": program_vocab_presets["mt3_midi_plus"], |
|
"train_drum_vocab": drum_vocab_presets["gm"], |
|
}, |
|
"mt3_full": { |
|
"name": "mt3_full", |
|
"train_program_vocab": program_vocab_presets["mt3_full"], |
|
"train_drum_vocab": drum_vocab_presets["gm"], |
|
}, |
|
"mt3_full_plus": { |
|
"name": "mt3_full_plus", |
|
"train_program_vocab": program_vocab_presets["mt3_full_plus"], |
|
"train_drum_vocab": drum_vocab_presets["gm"], |
|
}, |
|
"gm_ext_plus": { |
|
"name": "gm_ext_plus", |
|
"train_program_vocab": program_vocab_presets["gm_ext_plus"], |
|
"train_drum_vocab": drum_vocab_presets["gm"], |
|
}, |
|
"singing_v1": { |
|
"name": "singing", |
|
"train_program_vocab": program_vocab_presets["mt3_full_plus"], |
|
"train_drum_vocab": drum_vocab_presets["gm"], |
|
"subtask_tokens": ["task", "transcribe_singing", "transcribe_all"], |
|
"ignore_decoding_tokens": ["task", "transcribe_singing", "transcribe_all"], |
|
"max_task_token_length": 2, |
|
"eval_subtask_prefix": { |
|
"default": [Event("transcribe_all", 0), Event("task", 0)], |
|
"singing-only": [Event("transcribe_singing", 0), |
|
Event("task", 0)], |
|
} |
|
}, |
|
"singing_drum_v1": { |
|
"name": "singing_drum", |
|
"train_program_vocab": program_vocab_presets["mt3_full_plus"], |
|
"train_drum_vocab": drum_vocab_presets["gm"], |
|
"subtask_tokens": ["task", "transcribe_singing", "transcribe_drum", "transcribe_all"], |
|
"ignore_decoding_tokens": [ |
|
"task", "transcribe_singing", "transcribe_drum", "transcribe_all" |
|
], |
|
"max_task_token_length": 2, |
|
"eval_subtask_prefix": { |
|
"default": [Event("transcribe_all", 0), Event("task", 0)], |
|
"singing-only": [Event("transcribe_singing", 0), |
|
Event("task", 0)], |
|
"drum-only": [Event("transcribe_drum", 0), |
|
Event("task", 0)], |
|
} |
|
}, |
|
"mc13": { |
|
"name": "mc13", |
|
"train_program_vocab": program_vocab_presets["gm_plus"], |
|
"train_drum_vocab": drum_vocab_presets["gm"], |
|
"num_decoding_channels": len(program_vocab_presets["gm_plus"]) + 1, |
|
"max_note_token_length_per_ch": 512, |
|
"mask_loss_strategy": None, |
|
}, |
|
"mc13_256": { |
|
"name": "mc13_256", |
|
"train_program_vocab": program_vocab_presets["gm_plus"], |
|
"train_drum_vocab": drum_vocab_presets["gm"], |
|
"num_decoding_channels": len(program_vocab_presets["gm_plus"]) + 1, |
|
"max_note_token_length_per_ch": 256, |
|
"mask_loss_strategy": None, |
|
}, |
|
"mc13_full_plus": { |
|
"name": "mc13_full_plus", |
|
"train_program_vocab": program_vocab_presets["mt3_full_plus"], |
|
"train_drum_vocab": drum_vocab_presets["gm"], |
|
"program2channel_vocab_source": program_vocab_presets["gm_plus"], |
|
"num_decoding_channels": 13, |
|
"max_note_token_length_per_ch": 512, |
|
"mask_loss_strategy": None, |
|
}, |
|
"mc13_full_plus_256": { |
|
"name": "mc13_full_plus_256", |
|
"train_program_vocab": program_vocab_presets["mt3_full_plus"], |
|
"train_drum_vocab": drum_vocab_presets["gm"], |
|
"program2channel_vocab_source": program_vocab_presets["gm_plus"], |
|
"num_decoding_channels": 13, |
|
"max_note_token_length_per_ch": 256, |
|
"mask_loss_strategy": None, |
|
}, |
|
"exc_v1": { |
|
"name": "exclusive", |
|
"train_program_vocab": program_vocab_presets["mt3_full_plus"], |
|
"train_drum_vocab": drum_vocab_presets["gm"], |
|
"subtask_tokens": ["transcribe", "all", ":"], |
|
|
|
|
|
|
|
|
|
"ignore_decoding_tokens_from_and_to": ["transcribe", ":"], |
|
"eval_subtask_prefix": { |
|
"default": [Event("transcribe", 0), Event("all", 0), Event(":", 0)], |
|
}, |
|
"shuffle_subtasks": True, |
|
}, |
|
} |
|
|