Skip to content

Commit

Permalink
MatlabAPI/CocoApi.m>download(): altered timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
pdollar committed Jul 10, 2016
1 parent a22446f commit d14a245
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MatlabAPI/CocoApi.m
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ function download( coco, tarDir, maxn )
urls={coco.data.images.coco_url}; urls=urls(o); do=true(1,n);
for i=1:n, fs{i}=[tarDir '/' fs{i}]; do(i)=~exist(fs{i},'file'); end
fs=fs(do); urls=urls(do); n=length(fs); if(n==0), return; end
if(~exist(tarDir,'dir')), mkdir(tarDir); end
msg='downloaded %i/%i images (t=%.1fs)\n'; t=tic;
for i=1:n, websave(fs{i},urls{i}); fprintf(msg,i,n,toc(t)); end
if(~exist(tarDir,'dir')), mkdir(tarDir); end; t=tic;
m='downloaded %i/%i images (t=%.1fs)\n'; o=weboptions('Timeout',60);
for i=1:n, websave(fs{i},urls{i},o); fprintf(m,i,n,toc(t)); end
end
end

Expand Down

0 comments on commit d14a245

Please sign in to comment.