| 3061 | } |
| 3062 | |
| 3063 | void readMeanBinaryFile(const string& caffeMeanFile, caffe::BlobProto* blob) |
| 3064 | { |
| 3065 | fstream infile(caffeMeanFile.c_str(), ios::in | ios::binary); |
| 3066 | if(!infile) |
| 3067 | { |
| 3068 | cerr << "[EP024] Couldn't open the Caffe Mean file : " << caffeMeanFile << endl; |
| 3069 | exit(-1); |
| 3070 | } |
| 3071 | |
| 3072 | // Merge the deploy file to caffe Net |
| 3073 | bool binMergeStatus = blob->ParseFromIstream(&infile); |
| 3074 | if(!binMergeStatus) |
| 3075 | { |
| 3076 | cerr << "[EP025] Couldn't Parse the Caffe Mean file : " << caffeMeanFile << endl; |
| 3077 | exit(-1); |
| 3078 | } |
| 3079 | infile.close(); |
| 3080 | } |
| 3081 | |
| 3082 | // Extract the mean data |
| 3083 | void ExtractCaffeMeanData(const caffe::BlobProto* blob, XGraph* graph) |
no test coverage detected