emmanouil@71: function [Pre,Rec,F] = batchProcessingEvaluate(folder) emmanouil@71: emmanouil@71: % Evaluate transcription output, using onset-only note-based metrics emmanouil@71: % e.g. [Pre,Rec,F] = batchProcessingEvaluate('TRIOS-mirex2012-matlab'); emmanouil@71: emmanouil@71: emmanouil@71: fileList = dir(folder); emmanouil@71: fileCount = 0; emmanouil@71: emmanouil@71: for i=3:length(fileList) emmanouil@71: emmanouil@71: if(isdir([folder '/' fileList(i).name])) emmanouil@71: emmanouil@71: fileCount = fileCount + 1; emmanouil@71: emmanouil@71: emmanouil@71: % Load ground truth emmanouil@71: [pianoRollGT,nmatGT] = convertMIDIToPianoRoll([fileList(i).name '.mid'],10,1.0); emmanouil@71: emmanouil@71: emmanouil@71: % Load transcripton nmat emmanouil@71: nmat = load([folder '/' fileList(i).name '/' 'mix.lab']); emmanouil@71: emmanouil@71: emmanouil@71: % Convert 3rd nmat column to MIDI scale emmanouil@71: nmat(:,3) = round(12.*log2(nmat(:,3)./27.5) + 1); emmanouil@71: emmanouil@71: emmanouil@71: % Compute onset-based note-level accuracy emmanouil@71: [Pre(fileCount),Rec(fileCount),F(fileCount)] = computeNoteLevelAccuracy(nmat,nmatGT); emmanouil@71: emmanouil@71: end; emmanouil@71: end;