Add a new option to add a labels file and a means file.

This commit is contained in:
2017-10-09 13:00:26 +02:00
parent 1e901507fa
commit e70c5f22ce
5 changed files with 92 additions and 34 deletions

View File

@@ -17,16 +17,18 @@ namespace fmri {
public:
typedef float DType;
Simulator(const string &model_file, const string &weights_file);
Simulator(const string &model_file, const string &weights_file, const string &means_file = "");
void simulate(const string &input_file);
vector<DType> simulate(const string &input_file);
private:
caffe::Net<DType> net;
cv::Size input_geometry;
cv::Mat means;
unsigned int num_channels;
vector<cv::Mat> getWrappedInputLayer();
cv::Mat preprocess(cv::Mat original) const;
cv::Mat processMeans(const string &means_file) const;
};
}