christopherh@1: christopherh@1: christopherh@1: E_directory = '/media/data/matlab-work/mirex_results/converted'; christopherh@1: christopherh@1: A_directory = '/media/data/beatles chord transcriptions 1.3/'; christopherh@1: christopherh@1: results_dir = '/media/data/matlab-work/mirex_results/recall1' christopherh@1: christopherh@1: christopherh@1: folders = {'de','ko1','ko2','md','ogf1','ogf2','pp','pvm1','pvm2','rrhs1','rrhs2','rrhs3'}; christopherh@1: christopherh@1: beatles_A_names = readlist('beatles_A_paths.txt'); christopherh@1: christopherh@1: beatles_E_names = readlist('beatles_names.txt'); christopherh@1: christopherh@1: outtext = ''; christopherh@1: christopherh@1: folder_number = length(folders); christopherh@1: song_number = length(beatles_A_names); christopherh@1: christopherh@1: paramasarray = []; christopherh@1: christopherh@1: %tests to run: christopherh@1: christopherh@1: christopherh@1: % TEST1 christopherh@1: christopherh@1: % set the recall parameters christopherh@1: params.framerate = 100; %fps 10ms frames christopherh@1: params.comparison = 'mx08'; christopherh@1: params.cardinality = 3; christopherh@1: params.inversion = 0; christopherh@1: params.dictionary = {};% {'N', 'X:maj', 'X:min', 'X:dim', 'X:aug'}; christopherh@1: christopherh@1: paramsarray = [paramsarray params]; christopherh@1: christopherh@1: christopherh@1: % TEST2 christopherh@1: christopherh@1: % set the recall parameters christopherh@1: params.comparison = 'mx09'; christopherh@1: params.cardinality = 3; christopherh@1: params.inversion = 0; christopherh@1: params.dictionary = {};% {'N', 'X:maj', 'X:min', 'X:dim', 'X:aug'}; christopherh@1: christopherh@1: paramsarray = [paramsarray params]; christopherh@1: christopherh@1: % TEST3 christopherh@1: christopherh@1: % set the recall parameters christopherh@1: params.comparison = 'op'; christopherh@1: params.cardinality = 3; christopherh@1: params.inversion = 0; christopherh@1: params.dictionary = {};% {'N', 'X:maj', 'X:min', 'X:dim', 'X:aug'}; christopherh@1: christopherh@1: paramsarray = [paramsarray params]; christopherh@1: christopherh@1: % TEST4 christopherh@1: christopherh@1: % set the recall parameters christopherh@1: params.comparison = 'op'; christopherh@1: params.cardinality = 2; christopherh@1: params.inversion = 0; christopherh@1: params.dictionary = {};% {'N', 'X:maj', 'X:min', 'X:dim', 'X:aug'}; christopherh@1: christopherh@1: paramsarray = [paramsarray params]; christopherh@1: christopherh@1: % TEST5 christopherh@1: christopherh@1: % set the recall parameters christopherh@1: params.comparison = 'op'; christopherh@1: params.cardinality = 3; christopherh@1: params.inversion = 0; christopherh@1: params.dictionary = {'N', 'X:maj', 'X:min'}; christopherh@1: christopherh@1: paramsarray = [paramsarray params]; christopherh@1: christopherh@1: christopherh@1: % TEST6 christopherh@1: christopherh@1: % set the recall parameters christopherh@1: params.comparison = 'op'; christopherh@1: params.cardinality = 2; christopherh@1: params.inversion = 0; christopherh@1: params.dictionary = {'N', 'X:maj', 'X:min'}; christopherh@1: christopherh@1: paramsarray = [paramsarray params]; christopherh@1: christopherh@1: christopherh@1: christopherh@1: for index = 1:numparams christopherh@1: christopherh@1: params = paramsarray(index); christopherh@1: christopherh@1: results = zeros(folder_number,song_number,2); christopherh@1: christopherh@1: time_resolution = 1/params.framerate; % recall time resolution = 1/fps christopherh@1: christopherh@1: for i = 1:folder_number christopherh@1: christopherh@1: % for each folder christopherh@1: christopherh@1: christopherh@1: for j = 1:song_number christopherh@1: christopherh@1: % get current annotation file christopherh@1: annotations_labfile = [A_directory '/' beatles_A_names{j}] christopherh@1: christopherh@1: % get current labfile christopherh@1: estimates_labfile = [E_directory '/' folders{i} '/' beatles_E_names{j}]; christopherh@1: christopherh@1: % sample at specified frame rate christopherh@1: % annotation_frames = lab2frames(annotations_labfile, time_resolution); christopherh@1: % estimate_frames = lab2frames(estimates_labfile, time_resolution); christopherh@1: christopherh@1: % calculate recall christopherh@1: % [recall, non_dictionary] = getrecall2(estimate_frames, annotation_frames, params); christopherh@1: christopherh@1: [recall, non_dictionary] = getrecall3(estimates_labfile, annotations_labfile, params); christopherh@1: christopherh@1: %[segmeasure, m, f] = getsegmeasure(annotation_labfile, estimates_labfile) christopherh@1: christopherh@1: results(i,j,1) = recall; christopherh@1: results(i,j,2) = non_dictionary; christopherh@1: christopherh@1: end christopherh@1: christopherh@1: christopherh@1: end christopherh@1: christopherh@1: outtext = format_recall_results(results, params, folders, beatles_A_names); christopherh@1: christopherh@1: printfile(outtext, [results_dir '/recall-' datestr(now,'yyyy-mm-dd') '-' params.comparison '.txt']); christopherh@1: christopherh@1: end christopherh@1: