Skip to content

Instantly share code, notes, and snippets.

@justinsalamon
justinsalamon / evalNotes_09.m
Last active February 15, 2016 17:40
Evaluation code used for MIREX multi-f0 Note Tracking subtask. This is the "old" code that has been used on the "MIREX" dataset for this task (I think...?)
function evalNotes_09(resultsDir,algoDir,ID,gtDirname,delim,FH,FL,th_on)
fresults = [resultsDir ID '.subtask2.results.csv'];
fid = fopen(fresults,'w');
fprintf(fid,'Filename,Nref,Nsys,Ncorr,Precision,Recall,Ave. F-measure,Ave. Overlap\n');
d = dir([gtDirname '*.note.mat'] );
Nrefs=zeros(length(d),1);
Nsyses=zeros(length(d),1);
recalls=zeros(length(d),1);
precs=zeros(length(d),1);
@justinsalamon
justinsalamon / ErrorRate_MF0_NoteLevel.m
Created February 15, 2016 17:42
Evaluation code used for MIREX multi-f0 Note Tracking subtask. This is the "new" code by Zhiyao Duan that has been used on the "Su" dataset for this task (I think...?) Raw
function Results = ErrorRate_MF0_NoteLevel(EstNote, GTNote, bUseOffset, FreqDevTh, OnsetDiff, OffsetDiff)
%function Results = ErrorRate_MF0_NoteLevel(EstNote, GTNote, bUseOffset, FreqDevTh, OnsetDiff, OffsetDiff)
% Note-level multi-F0 estimation error rate calculation. Compare a list of estimated notes with
% a list of ground-truth notes.
%
% Input
% - EstNote : estimated notes, each cell corresponds to a note: first line is frame number,
% second line is frequency in MIDI number
% - GTNote : ground-truth notes, the same format as EstNote
% - bUseOffset : (optional, default 0) the flag that if using offset criterion or not
@justinsalamon
justinsalamon / midi_to_text_notes.ipynb
Created February 22, 2016 15:54
Convert Su dataset ground truth midi files to text files with exact time and pitch infromation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@justinsalamon
justinsalamon / viz_notes.ipynb
Last active April 14, 2016 22:43
visualize the notes of a pitch_midi JAMS annotation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@justinsalamon
justinsalamon / compare_AOR_mirex_mireval.ipynb
Last active April 14, 2016 16:43
Compare Average Overlap Ratio metric as computed by MIREX (Duan implementation) and mir_eval
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@justinsalamon
justinsalamon / evaluate_transcription_melody_metrics.ipynb
Last active April 14, 2016 22:33
An example of how to compute melody eval metrics from two note transcription JAMS files
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@justinsalamon
justinsalamon / test_viz_module.ipynb
Created April 15, 2016 20:55
Trying out matplotlib-based viz module for jams
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"sandbox": {},
"annotations": [
{
"namespace": "pitch_hz",
"sandbox": {},
"time": 0,
"duration": null,
"annotation_metadata": {
"annotation_tools": "",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.