Go to Main Page.\n'); fprintf(fp,'
Go to Image Ranking.\n'); fprintf(fp,'
| %s | \n',presNames{k}); end fprintf(fp,'|||||||||
|---|---|---|---|---|---|---|---|---|---|
\n');
pres = presentations{k};
fprintf(fp,'
| \n');
end
fprintf(fp,'
| %s | \n',presNames{k}); end fprintf(fp,'
|---|
\n');
fprintf(fp,'
| \n');
end
fprintf(fp,'
| Rank | Score | Algorithm | PR Curve |
|---|---|---|---|
| 0 | \n'); fprintf(fp,'%4.2f | \n',hscore{k}(3)); fprintf(fp,'Humans | \n'); fprintf(fp,'![]() | \n',pres);
fprintf(fp,'
| %d | \n',i); fprintf(fp,'%4.2f | \n',score); fprintf(fp,'%s | \n',pres,alg,name); fprintf(fp,'![]() | \n',pres,alg);
fprintf(fp,'
Page generated on %s.\n',datestr(now)); fprintf(fp,'\n'); fprintf(fp,'\n'); fclose(fp); % Create algorithm pages. for k = 1:length(presentations), pres = presentations{k}; for i = 1:numel(algs{k}), alg = algs{k}{i}; fprintf(2,'Creating page for ''%s''...\n',alg); fname = fullfile(baseDir,pres,alg,'main.html'); fp = fopen(fname,'w'); title = sprintf('[%s] Boundary Detection Benchmark: Algorithm "%s"',presNames{k},names{k}{i}); fprintf(fp,'\n'); fprintf(fp,'
\n'); fprintf(fp,'Back to Algorithm Ranking.\n'); fprintf(fp,'
\n'); fp2 = fopen(fname2,'r'); fwrite(fp,char(fread(fp2)')); fclose(fp2); end fprintf(fp,'
\n');
fprintf(fp,'
Click on an image for additional details.\n'); %fprintf(fp,'
\n');
fprintf(fp,'
| \n');
if mod(j,nper)==0 | j==numel(iidsTest), fprintf(fp,'
Page generated on %s.\n',datestr(now)); fprintf(fp,'\n'); fprintf(fp,'\n'); fclose(fp); % Create image pages for this algorithm. for j = 1:numel(iidsTest), iid = iidsTest(j); score = iscores{k}{i}(j,5); fname = fullfile(baseDir,pres,alg,sprintf('%d.html',iid)); fp = fopen(fname,'w'); title = sprintf(... '[%s] Boundary Detection Benchmark: Algorithm "%s" Image #%d (%d)',presNames{k},names{k}{i},j,iid); fprintf(fp,'\n'); fprintf(fp,'
\n'); fprintf(fp,'Back to Algorithm "%s" page.\n',names{k}{i}); fprintf(fp,'
F=%4.2f',score); fprintf(fp,'
\n',bsdsURL,pres,iid);
fprintf(fp,'
Machine![]() | >\n',iid);
fprintf(fp,'![]() | \n',iid);
fprintf(fp,'
Human![]() | >\n',iid);
fprintf(fp,'![]() | \n',iid);
fprintf(fp,'
Page generated on %s.\n',datestr(now)); fprintf(fp,'\n'); fprintf(fp,'\n'); fclose(fp); end end end % Sort the images by best F measure across all algorithms. % Remember which algorithm had the best score for each image. fprintf(2,'Sorting images...\n'); for k = 1:length(presentations), if numel(algs{k})==0, continue; end bestf{k} = zeros(numel(iidsTest),1); bestalg{k} = zeros(numel(iidsTest),1); for j = 1:numel(iidsTest), f = zeros(numel(algs{k}),1); for i = 1:numel(algs{k}), f(i) = iscores{k}{i}(j,5); end [bestf{k}(j),bestalg{k}(j)] = max(f); end [unused,iperm{k}] = sort(bestf{k}); iperm{k} = iperm{k}(end:-1:1); end % Create images page. fprintf(2,'Creating images page...\n'); mainPage = fullfile(baseDir,'html','images.html'); fp = fopen(mainPage,'w'); title = 'Boundary Detection Benchmark: Image Ranking'; fprintf(fp,'\n'); fprintf(fp,'
\n'); fprintf(fp,'Go to Main Page.\n'); fprintf(fp,'
Go to Algorithm Ranking.\n'); fprintf(fp,'
Click on an image for additional details.\n'); fprintf(fp,'
| \n'); for k = 1:length(presentations), fprintf(fp,' | %s | \n',presNames{k}); end fprintf(fp,'|||||
|---|---|---|---|---|---|---|
| Rank | \n'); for k = 1:length(presentations), fprintf(fp,'ID | Image | Best Algorithm [Score] | \n'); end fprintf(fp,'|||
| %d | \n',j); for k = 1:length(presentations), if numel(algs{k})==0, fprintf(fp,'\n'); fprintf(fp,' | \n'); fprintf(fp,' | \n'); continue; end pres = presentations{k}; iid = iidsTest(iperm{k}(j)); f = bestf{k}(iperm{k}(j)); maxf = hiscores{k}(iperm{k}(j),4); alg = algs{k}{bestalg{k}(iperm{k}(j))}; name = names{k}{bestalg{k}(iperm{k}(j))}; fprintf(fp,' | #%d (%d) | \n',iperm{k}(j),iid); fprintf(fp,'\n');
fprintf(fp,'\n',iid,pres);
fprintf(fp,' \n',bsdsURL,pres,iid);
fprintf(fp,'\n');
fprintf(fp,' | \n');
fprintf(fp,'%s [ %4.2f / %4.2f ] | \n',pres,alg,name,f,maxf);
end
fprintf(fp,'
Page generated on %s.\n',datestr(now)); fprintf(fp,'\n'); fprintf(fp,'\n'); fclose(fp); % Create image pages. for j = 1:numel(iidsTest), iid = iidsTest(j); fprintf(2,'Creating pages for image #%d (%d)...\n',j,iid); for k = 1:length(presentations), if numel(algs{k})==0, continue; end pres = presentations{k}; fname = fullfile(baseDir,'html',sprintf('%d-%s.html',iid,pres)); fp = fopen(fname,'w'); title = sprintf('[%s] Boundary Detection Benchmark: Image #%d (%d) Rank=%d',presNames{k},j,iid,find(iperm{k}==j)); fprintf(fp,'\n'); fprintf(fp,'
\n'); fprintf(fp,'Back to Image Ranking.\n'); fprintf(fp,'
Go to %s page.\n',iid,presentations{3-k},presNames{3-k}); fprintf(fp,'
| Rank | Score | Algorithm | \n'); fprintf(fp,'
|---|---|---|
| 0 | \n'); fprintf(fp,'%4.2f | \n',hiscores{k}(j,4)); fprintf(fp,'Humans | \n'); fprintf(fp,'
| %d | \n',i); fprintf(fp,'%4.2f | \n',f(perm(i))); fprintf(fp,'%s | \n',names{k}{perm(i)}); fprintf(fp,'
\n');
fprintf(fp,'
\n',bsdsURL,pres,iid);
fprintf(fp,'
\n',pres,iid);
fprintf(fp,'
| Rank Algorithm (Score) | Pb | Precision/Recall |
|---|---|---|
| 0 Humans (%4.2f) | \n',hiscores{k}(j,4));
fprintf(fp,'![]() | \n',pres,iid);
fprintf(fp,'![]() | \n',pres,iid);
fprintf(fp,'
| %d %s (%4.2f) | \n',i,names{k}{perm(i)},f(perm(i)));
fprintf(fp,'![]() | \n',pres,algs{k}{perm(i)},iid);
fprintf(fp,'![]() | \n',pres,algs{k}{perm(i)},iid);
fprintf(fp,'
Page generated on %s.\n',datestr(now)); fprintf(fp,'\n'); fprintf(fp,'\n'); fclose(fp); end end