marl / jams

A JSON Annotated Music Specification for Reproducible MIR Research
ISC License
184 stars 26 forks source link

mir_eval integration #16

Closed bmcfee closed 9 years ago

bmcfee commented 9 years ago

Quick thoughts about making integration with mir_eval simple:

bmcfee commented 9 years ago

Other functions we'll need

bmcfee commented 9 years ago

lab_to_jam(namespace, filename, *parsing)

first cut as of e5e13321577a33ac26adea1969d3a7d9cf5df7ee

bmcfee commented 9 years ago

776c0876b67821e613a216010e16bad95a95da69 implements a first cut at the decorator-wrapping for mir_eval functions.

The gist of this is that for each mir_eval submodule (beat, chord, onset, etc), we wrap the master "evaluate" function which calls all evaluation metrics and returns an ordered dict of scores. Since different tasks have different conventions for data (onsets just have event time, chords have interval labels, etc), we need a few different wrappers to make everything work.

TODO:

We can have the decorator verify that the input annotations have the right type for the evaluation in question.

bmcfee commented 9 years ago

Finally started implementing tests for the eval module #26 ; this looks to be pretty badly broken.

The event-oriented evaluation wrappers (beat and onset) work, since their call signatures fit with mir_eval. The others (chord, segment, tempo) do not work, since the wrapped versions take two annotations as input, while mir_eval takes more than two input arguments (eg, ref_intervals, ref_labels, est_intervals, est_labels).

We'll probably have to rethink the structuring of this decorator/wrapper stuff.

bmcfee commented 9 years ago

Ok, all magic has been purged from the eval module. The docstrings are more static/redundant with mir_eval, but the code is much simpler. So that's probably a win.

Also, all currently implemented evaluators now have functioning tests #26.

All we're missing now is melody @justinsalamon and pattern discovery @urinieto linkage.

bmcfee commented 9 years ago

@justinsalamon I took a few minutes to hack in melody eval; please check it over to make sure I didn't mess something up. (See also the corresponding tests)

justinsalamon commented 9 years ago

@bmcfee just had a look at the melody eval code (and the tests) - looks kosher.

bmcfee commented 9 years ago

Thanks @justinsalamon

I've been thinking a bit about the pattern discovery integration, but am unsure about how exactly to make it work. @urinieto : when you get a minute, can you translate some pattern data so I have a concrete example to work with?