mirror of
https://github.com/CTCaer/waifu2x-caffe.git
synced 2024-11-27 13:00:24 +00:00
引数がうまく使われていなかったのを修正
This commit is contained in:
parent
3e578ba1be
commit
4e5c3ed698
@ -470,7 +470,7 @@ Waifu2x::eWaifu2xError Waifu2x::ConstractNet(boost::shared_ptr<caffe::Net<float>
|
||||
caffe::NetParameter param;
|
||||
if (isModelExist && isModelBinExist && caffe::ReadProtoFromBinaryFile(modelbin_path, ¶m))
|
||||
{
|
||||
const auto ret = SetParameter(param);
|
||||
const auto ret = SetParameter(param, process);
|
||||
if (ret != eWaifu2xError_OK)
|
||||
return ret;
|
||||
|
||||
@ -481,7 +481,7 @@ Waifu2x::eWaifu2xError Waifu2x::ConstractNet(boost::shared_ptr<caffe::Net<float>
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto ret = LoadParameterFromJson(net, model_path, param_path);
|
||||
const auto ret = LoadParameterFromJson(net, model_path, param_path, process);
|
||||
if (ret != eWaifu2xError_OK)
|
||||
return ret;
|
||||
}
|
||||
@ -489,7 +489,7 @@ Waifu2x::eWaifu2xError Waifu2x::ConstractNet(boost::shared_ptr<caffe::Net<float>
|
||||
return eWaifu2xError_OK;
|
||||
}
|
||||
|
||||
Waifu2x::eWaifu2xError Waifu2x::SetParameter(caffe::NetParameter ¶m) const
|
||||
Waifu2x::eWaifu2xError Waifu2x::SetParameter(caffe::NetParameter ¶m, const std::string &process) const
|
||||
{
|
||||
param.mutable_state()->set_phase(caffe::TEST);
|
||||
|
||||
@ -527,7 +527,7 @@ Waifu2x::eWaifu2xError Waifu2x::SetParameter(caffe::NetParameter ¶m) const
|
||||
return eWaifu2xError_OK;
|
||||
}
|
||||
|
||||
Waifu2x::eWaifu2xError Waifu2x::LoadParameterFromJson(boost::shared_ptr<caffe::Net<float>> &net, const std::string &model_path, const std::string ¶m_path)
|
||||
Waifu2x::eWaifu2xError Waifu2x::LoadParameterFromJson(boost::shared_ptr<caffe::Net<float>> &net, const std::string &model_path, const std::string ¶m_path, const std::string &process)
|
||||
{
|
||||
const std::string caffemodel_path = param_path + ".caffemodel";
|
||||
const std::string modelbin_path = model_path + ".protobin";
|
||||
@ -538,7 +538,7 @@ Waifu2x::eWaifu2xError Waifu2x::LoadParameterFromJson(boost::shared_ptr<caffe::N
|
||||
|
||||
caffe::WriteProtoToBinaryFile(param, modelbin_path);
|
||||
|
||||
const auto ret = SetParameter(param);
|
||||
const auto ret = SetParameter(param, process);
|
||||
if (ret != eWaifu2xError_OK)
|
||||
return ret;
|
||||
|
||||
|
@ -103,8 +103,8 @@ private:
|
||||
eWaifu2xError Zoom2xAndPaddingImage(const cv::Mat &input, cv::Mat &output, cv::Size_<int> &zoom_size);
|
||||
eWaifu2xError CreateZoomColorImage(const cv::Mat &float_image, const cv::Size_<int> &zoom_size, std::vector<cv::Mat> &cubic_planes);
|
||||
eWaifu2xError ConstractNet(boost::shared_ptr<caffe::Net<float>> &net, const std::string &model_path, const std::string ¶m_path, const std::string &process);
|
||||
eWaifu2xError LoadParameterFromJson(boost::shared_ptr<caffe::Net<float>> &net, const std::string &model_path, const std::string ¶m_path);
|
||||
eWaifu2xError SetParameter(caffe::NetParameter ¶m) const;
|
||||
eWaifu2xError LoadParameterFromJson(boost::shared_ptr<caffe::Net<float>> &net, const std::string &model_path, const std::string ¶m_path, const std::string &process);
|
||||
eWaifu2xError SetParameter(caffe::NetParameter ¶m, const std::string &process) const;
|
||||
eWaifu2xError ReconstructImage(boost::shared_ptr<caffe::Net<float>> net, cv::Mat &im);
|
||||
eWaifu2xError WriteMat(const cv::Mat &im, const std::string &output_file);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user