Changeset 71


Ignore:
Timestamp:
07/09/13 14:31:36 (11 years ago)
Author:
dtax
Message:

Even better... sort of.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • birds/createmilbirds_19cl.m

    r70 r71  
    99intens_thr = 0.8;   % remove 80% of the signal??
    1010f_min = 2000;       % frequency threshold (everything below is removed)
     11% blurring of the spectrogram:
     12G = fspecial('gaussian',[5 5],2);
    1113
    1214% load the 'meta' data like labels and filenames
    13 dpath = '../birds_mlsp2013/mlsp_contest_dataset/essential_data/';
    14 [bagid,names] = textread(fullfile(dpath,'rec_id2filename.txt'),'%n%s','headerlines',1);
    15 [bagid2,labstr] = textread(fullfile(dpath,'rec_labels_test_hidden.txt'),'%n%s','headerlines',1);
    16 [bagid3,Itst] = textread(fullfile(dpath,'CVfolds_2.txt'),'%n%n',...
    17 'delimiter',',','headerlines',1);
    18 
    19 
    20 %[bagid3,Itst] =
    21 %textread(fullfile(dpath,'CVfolds_2.txt'),'%n%d','headerlines',1);
    22 
    23 %VC: Ik krijg hier foutmeldingen. textread gaat weg, dus ze raden aan om
    24 %textscan te gebruiken.
    25 %>Error using dataread
    26 %>Trouble reading integer from file (row 1, field 2) ==> ,1\n
    27 %>Error in textread (line 175)
    28 %>[varargout{1:nlhs}]=dataread('file',varargin{:}); %#ok<REMFF1>
    29  
    30 
     15%dpath = '../birds_mlsp2013/mlsp_contest_dataset/essential_data/';
     16dpath = '/data/birds_mlsp2013/mlsp_contest_dataset2/essential_data';
     17% load the filenames
     18fid = fopen(fullfile(dpath,'rec_id2filename.txt'));
     19data = textscan(fid,'%n%s','headerlines',1);
     20fclose(fid);
     21bagid = data{1};
     22names = data{2};
     23% next load the labels:
     24fid = fopen(fullfile(dpath,'rec_labels_test_hidden.txt'));
     25data = textscan(fid,'%n%s','headerlines',1);
     26bagid2 = data{1};
     27labstr = data{2};
     28% load the indices for the training and test objects:
    3129N = length(bagid2);
    3230CVfile = fopen(fullfile(dpath,'CVfolds_2.txt'));
    33 CVdata = textscan(CVfile, '%f,%f', N, 'headerlines',1);
     31   CVdata = textscan(CVfile, '%f,%f', N, 'headerlines',1);
    3432fclose(CVfile);
    35 
    3633bagid3 = CVdata{1};
    3734Itst = CVdata{2};
    3835
    39 
     36% some checking
    4037if any(bagid~=bagid2)
    4138        error('Bagid''s do not match.');
    4239end
    43 G = fspecial('gaussian',[5 5],2);
    4440
    4541% run over the files, and get the features:
Note: See TracChangeset for help on using the changeset viewer.