shihenw / convolutional-pose-machines-release

Code repository for Convolutional Pose Machines, CVPR'16
Other
878 stars 343 forks source link

Error in genJSON (line 358) savejson('root', joint_all, opt); --> training/json directory needs to be made #27

Closed schelian closed 8 years ago

schelian commented 8 years ago

Hi all, if you get the error below, "mkdir json" in the training directory. This would be easy to fix in the main branch...

FLIC images 4966, conut = 3987 Flipped 199 samples Error using fwrite Invalid file identifier. Use fopen to generate a valid file identifier.

Error in savejson (line 136) fwrite(fid, sprintf('{%s',nl));

Error in genJSON (line 358) savejson('root', joint_all, opt);

136 fwrite(fid, sprintf('{%s',nl));

mindcont commented 7 years ago

Same error as mine. The solution is you should manually create a new folder named is json under training , or when code run on save file

opt.FileName = 'json/MPI_annotations.json'; opt.FloatFormat = '%.3f'; savejson('root', joint_all, opt);

training/util/jsonlab/savejson.m line 129

fid = fopen(opt.FileName, 'wt');

matlab fopen function will result fopen returned -1 ,means no this folder so it can`t create *.json to save the annotation information.