Changeset 71
- Timestamp:
- 07/09/13 14:31:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
birds/createmilbirds_19cl.m
r70 r71 9 9 intens_thr = 0.8; % remove 80% of the signal?? 10 10 f_min = 2000; % frequency threshold (everything below is removed) 11 % blurring of the spectrogram: 12 G = fspecial('gaussian',[5 5],2); 11 13 12 14 % 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/'; 16 dpath = '/data/birds_mlsp2013/mlsp_contest_dataset2/essential_data'; 17 % load the filenames 18 fid = fopen(fullfile(dpath,'rec_id2filename.txt')); 19 data = textscan(fid,'%n%s','headerlines',1); 20 fclose(fid); 21 bagid = data{1}; 22 names = data{2}; 23 % next load the labels: 24 fid = fopen(fullfile(dpath,'rec_labels_test_hidden.txt')); 25 data = textscan(fid,'%n%s','headerlines',1); 26 bagid2 = data{1}; 27 labstr = data{2}; 28 % load the indices for the training and test objects: 31 29 N = length(bagid2); 32 30 CVfile = fopen(fullfile(dpath,'CVfolds_2.txt')); 33 CVdata = textscan(CVfile, '%f,%f', N, 'headerlines',1);31 CVdata = textscan(CVfile, '%f,%f', N, 'headerlines',1); 34 32 fclose(CVfile); 35 36 33 bagid3 = CVdata{1}; 37 34 Itst = CVdata{2}; 38 35 39 36 % some checking 40 37 if any(bagid~=bagid2) 41 38 error('Bagid''s do not match.'); 42 39 end 43 G = fspecial('gaussian',[5 5],2);44 40 45 41 % run over the files, and get the features:
Note: See TracChangeset
for help on using the changeset viewer.