Merge branch 'master' into upconv
This commit is contained in:
commit
0b40d7db3f
|
@ -93,7 +93,12 @@ luarocks install lua-csnappy
|
|||
luarocks install md5
|
||||
luarocks install uuid
|
||||
luarocks install csvigo
|
||||
PREFIX=$HOME/torch/install luarocks install turbo # if you need to use web application
|
||||
|
||||
# if you need to use web application
|
||||
PREFIX=$HOME/torch/install luarocks install turbo
|
||||
|
||||
# if you need to use cuDNN library. cuDNN is required.
|
||||
luarocks install cudnn
|
||||
```
|
||||
|
||||
#### Getting waifu2x
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
</label>
|
||||
<label><input type="radio" name="noise" class="radio" value="0" checked>
|
||||
<span class="r-text">
|
||||
Low
|
||||
Basse
|
||||
</span>
|
||||
</label>
|
||||
<label><input type="radio" name="noise" class="radio" value="1" checked>
|
||||
|
@ -146,7 +146,7 @@
|
|||
<div class="option-right">
|
||||
<label><input type="radio" name="scale" class="radio" value="-1" checked>
|
||||
<span class="r-text">
|
||||
Aucun
|
||||
Aucune
|
||||
</span>
|
||||
</label>
|
||||
<label><input type="radio" name="scale" class="radio" value="1">
|
||||
|
|
|
@ -86,7 +86,7 @@ local function convert_image(opt)
|
|||
local model_path = path.join(opt.model_dir, ("noise%d_scale%.1fx_model.t7"):format(opt.noise_level, opt.scale))
|
||||
if path.exists(model_path) then
|
||||
local scale_model_path = path.join(opt.model_dir, ("scale%.1fx_model.t7"):format(opt.scale))
|
||||
local t, scale_model = pcall(load_model, scale_model_path, opt.force_cudnn)
|
||||
local t, scale_model = pcall(w2nn.load_model, scale_model_path, opt.force_cudnn)
|
||||
local model = w2nn.load_model(model_path, opt.force_cudnn)
|
||||
if not t then
|
||||
scale_model = model
|
||||
|
@ -165,7 +165,7 @@ local function convert_frames(opt)
|
|||
if path.exists(model_path) then
|
||||
noise_scale_model[opt.noise_level] = w2nn.load_model(model_path, opt.force_cudnn)
|
||||
model_path = path.join(opt.model_dir, ("scale%.1fx_model.t7"):format(opt.scale))
|
||||
t, scale_model = pcall(load_model, model_path, opt.force_cudnn)
|
||||
t, scale_model = pcall(w2nn.load_model, model_path, opt.force_cudnn)
|
||||
if not t then
|
||||
scale_model = noise_scale_model[opt.noise_level]
|
||||
end
|
||||
|
|
4
web.lua
4
web.lua
|
@ -79,7 +79,7 @@ local CURL_OPTIONS = {
|
|||
local CURL_MAX_SIZE = 5 * 1024 * 1024
|
||||
|
||||
local function valid_size(x, scale, tta_level)
|
||||
if scale == 0 then
|
||||
if scale <= 0 then
|
||||
local limit = math.pow(math.floor(math.pow(MAX_NOISE_IMAGE / tta_level, 0.5)), 2)
|
||||
return x:size(2) * x:size(3) <= limit
|
||||
else
|
||||
|
@ -89,7 +89,7 @@ local function valid_size(x, scale, tta_level)
|
|||
end
|
||||
local function auto_tta_level(x, scale)
|
||||
local limit2, limit4, limit8
|
||||
if scale == 0 then
|
||||
if scale <= 0 then
|
||||
limit2 = math.pow(math.floor(math.pow(MAX_NOISE_IMAGE / 2, 0.5)), 2)
|
||||
limit4 = math.pow(math.floor(math.pow(MAX_NOISE_IMAGE / 4, 0.5)), 2)
|
||||
limit8 = math.pow(math.floor(math.pow(MAX_NOISE_IMAGE / 8, 0.5)), 2)
|
||||
|
|
|
@ -12,12 +12,13 @@ photo: "Photo"
|
|||
noise_reduction: "Réduction du bruit numérique "
|
||||
expect_jpeg: "des artéfacts JPEG risquent d'apparaître"
|
||||
nr_none: "Aucune"
|
||||
nr_low: "Basse"
|
||||
nr_medium: "Moyenne"
|
||||
nr_high: "Haute"
|
||||
nr_highest: "Maximale"
|
||||
nr_hint: "Il n'est nécessaire d'utiliser cette option qu'en présence de bruit numérique sur l'image. Si ce n'est pas le cas, l'effet obtenu sera contraire à celui recherché."
|
||||
upscaling: "Mise à l'échelle "
|
||||
up_none: "Aucun"
|
||||
up_none: "Aucune"
|
||||
tta: "Allongement PdC "
|
||||
tta_best_effort: "n-passages auto"
|
||||
tta_rule: "Afficher le tableau comparatif"
|
||||
|
|
Loading…
Reference in a new issue