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", "OK":"OK",
"Cancel":"Cancel", "Cancel":"Cancel",
"IDC_STATIC_USE_GPU_NO":"Use GPU No", "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", "OK":"OK",
"Cancel":"キャンセル", "Cancel":"キャンセル",
"IDC_STATIC_USE_GPU_NO":"使用GPU No", "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

@ -301,8 +301,8 @@ bool DialogEvent::SyncMember(const bool NotSyncCropSize, const bool silent)
switch (cur) switch (cur)
{ {
case 0: case 0:
model_dir = TEXT("models/anime_style_art_rgb"); model_dir = TEXT("models/anime_style_art_rgb");
modelType = eModelTypeRGB; modelType = eModelTypeRGB;
break; break;
case 1: case 1:
@ -316,8 +316,13 @@ bool DialogEvent::SyncMember(const bool NotSyncCropSize, const bool silent)
break; break;
case 3: case 3:
model_dir = TEXT("models/anime_style_art"); model_dir = TEXT("models/upconv_7_photo");
modelType = eModelTypeY; modelType = eModelTypeUpConvPhoto;
break;
case 4:
model_dir = TEXT("models/anime_style_art");
modelType = eModelTypeY;
break; break;
default: default:
@ -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_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_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_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(hwndCombo, CB_ADDSTRING, 0, (LPARAM)langStringList.GetString(L"IDC_RADIO_MODEL_Y").c_str());
SendMessage(GetDlgItem(dh, IDC_COMBO_MODEL), CB_SETCURSEL, cur, 0); 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; index = 1;
else if (modelType == eModelTypeUpConvRGB) else if (modelType == eModelTypeUpConvRGB)
index = 2; index = 2;
else else if (modelType == eModelTypeUpConvPhoto)
index = 3; index = 3;
else
index = 4;
SendMessage(GetDlgItem(dh, IDC_COMBO_MODEL), CB_SETCURSEL, index, 0); 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"anime_style_art_rgb");
cmdModelTypeConstraintV.push_back(L"photo"); cmdModelTypeConstraintV.push_back(L"photo");
cmdModelTypeConstraintV.push_back(L"upconv_7_anime_style_art_rgb"); 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"); cmdModelTypeConstraintV.push_back(L"anime_style_art_y");
TCLAP::ValuesConstraint<std::wstring> cmdModelTypeConstraint(cmdModelTypeConstraintV); TCLAP::ValuesConstraint<std::wstring> cmdModelTypeConstraint(cmdModelTypeConstraintV);
TCLAP::ValueArg<std::wstring> cmdModelType(L"y", L"model_type", L"model type", 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; index = 0;
else if (cmdModelType.getValue() == L"photo") else if (cmdModelType.getValue() == L"photo")
index = 1; index = 1;
else if (cmdModelType.getValue() == L"anime_style_art_y") else if (cmdModelType.getValue() == L"upconv_7_anime_style_art_rgb")
index = 2; index = 2;
else else if (cmdModelType.getValue() == L"upconv_7_photo")
index = 3; 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); SendMessage(GetDlgItem(dh, IDC_COMBO_MODEL), CB_SETCURSEL, index, 0);

View File

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