From fe09583367c9f3607589833570a86dbe8bbb7eac Mon Sep 17 00:00:00 2001 From: lltcggie Date: Thu, 19 Nov 2015 02:48:30 +0900 Subject: [PATCH] =?UTF-8?q?CUI=E3=81=A7=E3=82=82TTA=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E3=81=86=E3=81=A8=E3=81=8D=E3=81=AB=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E5=90=8D=E3=81=8C=E5=A4=89=E5=8C=96=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- waifu2x-caffe/Source.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/waifu2x-caffe/Source.cpp b/waifu2x-caffe/Source.cpp index fc1e5f6..bcb27a8 100644 --- a/waifu2x-caffe/Source.cpp +++ b/waifu2x-caffe/Source.cpp @@ -136,6 +136,8 @@ int main(int argc, char** argv) if (outputExt.length() > 0 && outputExt[0] != '.') outputExt = "." + outputExt; + const bool use_tta = cmdTTALevel.getValue() == 1; + std::vector> file_paths; if (boost::filesystem::is_directory(input_path)) // input_pathがフォルダならそのディレクトリ以下の画像ファイルを一括変換 { @@ -150,6 +152,8 @@ int main(int argc, char** argv) const std::string &mode = cmdMode.getValue(); if (mode.find("noise") != mode.npos || mode.find("auto_scale") != mode.npos) addstr += "(Level" + std::to_string(cmdNRLevel.getValue()) + ")"; + if (use_tta) + addstr += "(tta)"; if (mode.find("scale") != mode.npos) addstr += "(x" + std::to_string(cmdScaleRatio.getValue()) + ")"; @@ -244,6 +248,8 @@ int main(int argc, char** argv) std::string &mode = cmdMode.getValue(); if (mode.find("noise") != mode.npos || mode.find("auto_scale") != mode.npos) outputFileName = outputFileName + "(Level" + std::to_string(cmdNRLevel.getValue()) + ")"; + if (use_tta) + outputFileName += "(tta)"; if (mode.find("scale") != mode.npos) outputFileName = outputFileName + "(x" + std::to_string(cmdScaleRatio.getValue()) + ")"; outputFileName += outputExt; @@ -254,7 +260,7 @@ int main(int argc, char** argv) Waifu2x::eWaifu2xError ret; Waifu2x w; - ret = w.init(argc, argv, cmdMode.getValue(), cmdNRLevel.getValue(), cmdScaleRatio.getValue(), cmdModelPath.getValue(), cmdProcess.getValue(), cmdTTALevel.getValue() == 1, + ret = w.init(argc, argv, cmdMode.getValue(), cmdNRLevel.getValue(), cmdScaleRatio.getValue(), cmdModelPath.getValue(), cmdProcess.getValue(), use_tta, cmdCropSizeFile.getValue(), cmdBatchSizeFile.getValue()); switch (ret) {