Skip to content

Commit 14f0137

Browse files
committed
updated demo for new data location (and works if no caption annotations)
1 parent b7d1115 commit 14f0137

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

MatlabAPI/cocoDemo.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
%% Demo for the CocoApi (see CocoApi.m)
22

33
%% initialize COCO api for instance annotations
4-
dataDir='.'; dataType='val2014';
4+
dataDir='../'; dataType='val2014';
55
annFile=sprintf('%s/annotations/instances_%s.json',dataDir,dataType);
66
if(~exist('coco','var')), coco=CocoApi(annFile); end
77

@@ -28,6 +28,7 @@
2828

2929
%% initialize COCO api for caption annotations
3030
annFile=sprintf('%s/annotations/captions_%s.json',dataDir,dataType);
31+
if(~exist(annFile,'file')), return; end
3132
if(~exist('caps','var')), caps=CocoApi(annFile); end
3233

3334
%% load and display caption annotations

0 commit comments

Comments
 (0)