GUI版でupconv_7_photoモデルに対応

This commit is contained in:
lltcggie 2016-07-04 21:45:41 +09:00
parent 77f5281bcb
commit 81b7f06dd0
4 changed files with 25 additions and 9 deletions

View File

@ -92,5 +92,6 @@
"OK":"OK",
"Cancel":"Cancel",
"IDC_STATIC_USE_GPU_NO":"Use GPU No",
"IDC_RADIO_MODEL_UPCONV_RGB":"2-D illust (UpRGB Model)"
"IDC_RADIO_MODEL_UPCONV_RGB":"2-D illust (UpRGB Model)",
"IDC_RADIO_MODEL_UPCONV_PHOTO":"Photo (UpPhoto Model)"
}

View File

@ -92,5 +92,6 @@
"OK":"OK",
"Cancel":"キャンセル",
"IDC_STATIC_USE_GPU_NO":"使用GPU No",
"IDC_RADIO_MODEL_UPCONV_RGB":"2次元イラスト (UpRGBモデル)"
"IDC_RADIO_MODEL_UPCONV_RGB":"2次元イラスト (UpRGBモデル)",
"IDC_RADIO_MODEL_UPCONV_PHOTO":"写真・アニメ (UpPhotoモデル)"
}

View File

@ -316,6 +316,11 @@ bool DialogEvent::SyncMember(const bool NotSyncCropSize, const bool silent)
break;
case 3:
model_dir = TEXT("models/upconv_7_photo");
modelType = eModelTypeUpConvPhoto;
break;
case 4:
model_dir = TEXT("models/anime_style_art");
modelType = eModelTypeY;
break;
@ -1469,6 +1474,7 @@ void DialogEvent::SetWindowTextLang()
SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)langStringList.GetString(L"IDC_RADIO_MODEL_RGB").c_str());
SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)langStringList.GetString(L"IDC_RADIO_MODEL_PHOTO").c_str());
SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)langStringList.GetString(L"IDC_RADIO_MODEL_UPCONV_RGB").c_str());
SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)langStringList.GetString(L"IDC_RADIO_MODEL_UPCONV_PHOTO").c_str());
SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)langStringList.GetString(L"IDC_RADIO_MODEL_Y").c_str());
SendMessage(GetDlgItem(dh, IDC_COMBO_MODEL), CB_SETCURSEL, cur, 0);
@ -1871,8 +1877,10 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData)
index = 1;
else if (modelType == eModelTypeUpConvRGB)
index = 2;
else
else if (modelType == eModelTypeUpConvPhoto)
index = 3;
else
index = 4;
SendMessage(GetDlgItem(dh, IDC_COMBO_MODEL), CB_SETCURSEL, index, 0);
@ -2026,6 +2034,7 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData)
cmdModelTypeConstraintV.push_back(L"anime_style_art_rgb");
cmdModelTypeConstraintV.push_back(L"photo");
cmdModelTypeConstraintV.push_back(L"upconv_7_anime_style_art_rgb");
cmdModelTypeConstraintV.push_back(L"upconv_7_photo");
cmdModelTypeConstraintV.push_back(L"anime_style_art_y");
TCLAP::ValuesConstraint<std::wstring> cmdModelTypeConstraint(cmdModelTypeConstraintV);
TCLAP::ValueArg<std::wstring> cmdModelType(L"y", L"model_type", L"model type",
@ -2251,10 +2260,14 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData)
index = 0;
else if (cmdModelType.getValue() == L"photo")
index = 1;
else if (cmdModelType.getValue() == L"anime_style_art_y")
else if (cmdModelType.getValue() == L"upconv_7_anime_style_art_rgb")
index = 2;
else
else if (cmdModelType.getValue() == L"upconv_7_photo")
index = 3;
else if (cmdModelType.getValue() == L"anime_style_art_y")
index = 4;
else
index = 4;
SendMessage(GetDlgItem(dh, IDC_COMBO_MODEL), CB_SETCURSEL, index, 0);

View File

@ -88,6 +88,7 @@ private:
eModelTypePhoto,
eModelTypeY,
eModelTypeUpConvRGB,
eModelTypeUpConvPhoto,
eModelTypeEnd,
};