Mercurial > hg > c4dm-chord-transcriptions
annotate evaluationtools/get_all_seg_results.m @ 1:8973548174c1 tip
adding tools to repo
author | christopherh |
---|---|
date | Mon, 06 May 2013 14:43:47 +0100 |
parents | |
children |
rev | line source |
---|---|
christopherh@1 | 1 |
christopherh@1 | 2 |
christopherh@1 | 3 E_directory = '/media/data/matlab-work/mirex_results/converted'; |
christopherh@1 | 4 |
christopherh@1 | 5 A_directory = '/media/data/beatles chord transcriptions 1.3/'; |
christopherh@1 | 6 |
christopherh@1 | 7 results_dir = '/media/data/matlab-work/mirex_results/seg' |
christopherh@1 | 8 |
christopherh@1 | 9 |
christopherh@1 | 10 folders = {'ch_aes','ch_hcdf','ch_hcdfa','de','ko1','ko2','md','ogf1','ogf2','pp','pvm1','pvm2','rrhs1','rrhs2','rrhs3'}; |
christopherh@1 | 11 |
christopherh@1 | 12 beatles_A_names = readlist('beatles_A_paths.txt'); |
christopherh@1 | 13 |
christopherh@1 | 14 beatles_E_names = readlist('beatles_names.txt'); |
christopherh@1 | 15 |
christopherh@1 | 16 outtext = ''; |
christopherh@1 | 17 |
christopherh@1 | 18 folder_number = length(folders); |
christopherh@1 | 19 song_number = length(beatles_A_names); |
christopherh@1 | 20 |
christopherh@1 | 21 paramasarray = []; |
christopherh@1 | 22 |
christopherh@1 | 23 %tests to run: |
christopherh@1 | 24 |
christopherh@1 | 25 |
christopherh@1 | 26 % TEST1 |
christopherh@1 | 27 |
christopherh@1 | 28 % set the recall parameters |
christopherh@1 | 29 params.framerate = 100; %fps 10ms frames |
christopherh@1 | 30 |
christopherh@1 | 31 |
christopherh@1 | 32 |
christopherh@1 | 33 results = zeros(folder_number,song_number,6); |
christopherh@1 | 34 |
christopherh@1 | 35 time_resolution = 1/params.framerate; % recall time resolution = 1/fps |
christopherh@1 | 36 |
christopherh@1 | 37 for i = 1:folder_number |
christopherh@1 | 38 |
christopherh@1 | 39 % for each folder |
christopherh@1 | 40 |
christopherh@1 | 41 |
christopherh@1 | 42 for j = 1:song_number |
christopherh@1 | 43 |
christopherh@1 | 44 % get current annotation file |
christopherh@1 | 45 annotations_labfile = [A_directory '/' beatles_A_names{j}] |
christopherh@1 | 46 |
christopherh@1 | 47 % get current labfile |
christopherh@1 | 48 estimates_labfile = [E_directory '/' folders{i} '/' beatles_E_names{j}]; |
christopherh@1 | 49 |
christopherh@1 | 50 [segmeasure, m, f,total_time, dAE, dEA] = getsegmeasure(annotation_labfile, estimates_labfile) |
christopherh@1 | 51 |
christopherh@1 | 52 results(i,j,1) = segmeasure; |
christopherh@1 | 53 results(i,j,2) = m; |
christopherh@1 | 54 results(i,j,3) = f; |
christopherh@1 | 55 results(i,j,4) = total_time; |
christopherh@1 | 56 results(i,j,5) = dAE; |
christopherh@1 | 57 results(i,j,6) = dEA; |
christopherh@1 | 58 |
christopherh@1 | 59 end |
christopherh@1 | 60 |
christopherh@1 | 61 |
christopherh@1 | 62 end |
christopherh@1 | 63 |
christopherh@1 | 64 outtext = format_seg_results(results, folders, beatles_A_names); |
christopherh@1 | 65 |
christopherh@1 | 66 printfile(outtext, [results_dir '/seg-' datestr(now,'yyyy-mm-dd') '.txt']); |
christopherh@1 | 67 |
christopherh@1 | 68 |
christopherh@1 | 69 |