|
@@ -39,9 +39,9 @@ local PHOTO_MODEL_DIR = path.join(ROOT, "models", "ukbench")
|
|
|
local art_noise1_model = torch.load(path.join(ART_MODEL_DIR, "noise1_model.t7"), "ascii")
|
|
|
local art_noise2_model = torch.load(path.join(ART_MODEL_DIR, "noise2_model.t7"), "ascii")
|
|
|
local art_scale2_model = torch.load(path.join(ART_MODEL_DIR, "scale2.0x_model.t7"), "ascii")
|
|
|
-local photo_scale2_model = torch.load(path.join(PHOTO_MODEL_DIR, "scale2.0x_model.t7"), "ascii")
|
|
|
-local photo_noise1_model = torch.load(path.join(PHOTO_MODEL_DIR, "noise1_model.t7"), "ascii")
|
|
|
-local photo_noise2_model = torch.load(path.join(PHOTO_MODEL_DIR, "noise2_model.t7"), "ascii")
|
|
|
+--local photo_scale2_model = torch.load(path.join(PHOTO_MODEL_DIR, "scale2.0x_model.t7"), "ascii")
|
|
|
+--local photo_noise1_model = torch.load(path.join(PHOTO_MODEL_DIR, "noise1_model.t7"), "ascii")
|
|
|
+--local photo_noise2_model = torch.load(path.join(PHOTO_MODEL_DIR, "noise2_model.t7"), "ascii")
|
|
|
local CLEANUP_MODEL = false -- if you are using the low memory GPU, you could use this flag.
|
|
|
local CACHE_DIR = path.join(ROOT, "cache")
|
|
|
local MAX_NOISE_IMAGE = 2560 * 2560
|
|
@@ -120,7 +120,7 @@ local function convert(x, options)
|
|
|
x = reconstruct.image(art_noise2_model, x)
|
|
|
cleanup_model(art_noise2_model)
|
|
|
end
|
|
|
- else -- photo
|
|
|
+ else --[[photo
|
|
|
if options.method == "scale" then
|
|
|
x = reconstruct.scale(photo_scale2_model, 2.0, x)
|
|
|
cleanup_model(photo_scale2_model)
|
|
@@ -131,6 +131,7 @@ local function convert(x, options)
|
|
|
x = reconstruct.image(photo_noise2_model, x)
|
|
|
cleanup_model(photo_noise2_model)
|
|
|
end
|
|
|
+ --]]
|
|
|
end
|
|
|
image.save(cache_file, x)
|
|
|
return x
|