disabling the photo model in web.lua
I will support the photo model in the next version
This commit is contained in:
parent
ee71773a09
commit
c4657b4720
|
@ -47,28 +47,6 @@
|
|||
<label><input type="radio" name="scale" value="1"> 1.6x</label>
|
||||
<label><input type="radio" name="scale" value="2"> 2x</label>
|
||||
</fieldset>
|
||||
<div class="experimental">
|
||||
<div>
|
||||
<a href="#" class="button close">
|
||||
+ Experimental
|
||||
</a>
|
||||
</div>
|
||||
<div class="container hide">
|
||||
<fieldset>
|
||||
<legend>Style</legend>
|
||||
<label><input type="radio" name="style" value="art" checked>Artwork</label>
|
||||
<label><input type="radio" name="style" value="photo">Photo</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Adding white noise</legend>
|
||||
<label><input type="radio" name="white_noise" value="0" checked="checked">Off</label>
|
||||
<label><input type="radio" name="white_noise" value="1">On</label>
|
||||
<div class="help">
|
||||
To denoise without unnaturalness in anime screencap or photo.
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit"/>
|
||||
</form>
|
||||
<div class="help">
|
||||
|
|
|
@ -44,28 +44,6 @@
|
|||
<label><input type="radio" name="scale" value="1"> 1.6x</label>
|
||||
<label><input type="radio" name="scale" value="2"> 2x</label>
|
||||
</fieldset>
|
||||
<div class="experimental">
|
||||
<div>
|
||||
<a href="#" class="button close">
|
||||
+ 実験的
|
||||
</a>
|
||||
</div>
|
||||
<div class="container hide">
|
||||
<fieldset>
|
||||
<legend>スタイル</legend>
|
||||
<label><input type="radio" name="style" value="art" checked>イラスト</label>
|
||||
<label><input type="radio" name="style" value="photo">写真</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>ホワイトノイズ付加</legend>
|
||||
<label><input type="radio" name="white_noise" value="0" checked="checked">なし</label>
|
||||
<label><input type="radio" name="white_noise" value="1">あり</label>
|
||||
<div class="help">
|
||||
アニメキャプや写真をノイズ除去したときの不自然さを低減します。
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" value="実行"/>
|
||||
</form>
|
||||
<div class="help">
|
||||
|
|
|
@ -46,28 +46,6 @@
|
|||
<label><input type="radio" name="scale" value="1"> 1.6x</label>
|
||||
<label><input type="radio" name="scale" value="2"> 2x</label>
|
||||
</fieldset>
|
||||
<div class="experimental">
|
||||
<div>
|
||||
<a href="#" class="button close">
|
||||
+ Экспериментальный
|
||||
</a>
|
||||
</div>
|
||||
<div class="container hide">
|
||||
<fieldset>
|
||||
<legend>Стиль</legend>
|
||||
<label><input type="radio" name="style" value="art" checked>Произведение искусства</label>
|
||||
<label><input type="radio" name="style" value="photo">Фотография</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Adding white noise</legend>
|
||||
<label><input type="radio" name="white_noise" value="0" checked="checked">Off</label>
|
||||
<label><input type="radio" name="white_noise" value="1">On</label>
|
||||
<div class="help">
|
||||
To denoise without unnaturalness in anime screencap or photo.
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit"/>
|
||||
</form>
|
||||
<div class="help">
|
||||
|
|
|
@ -14,7 +14,7 @@ fieldset {
|
|||
padding: 1em 5px 0.2em 0;
|
||||
}
|
||||
.help {
|
||||
font-size: 0.85em;
|
||||
font-size: 0.8em;
|
||||
margin: 1em 0 0 0;
|
||||
}
|
||||
.github-banner {
|
||||
|
|
|
@ -68,13 +68,13 @@ $(function (){
|
|||
|
||||
$("#url").change(clear_file);
|
||||
$("#file").change(clear_url);
|
||||
$("input[name=style]").change(on_change_style);
|
||||
//$("input[name=style]").change(on_change_style);
|
||||
$("input[name=noise]").change(on_change_noise_level);
|
||||
$("input[name=scale]").change(on_change_scale_factor);
|
||||
$("input[name=white_noise]").change(on_change_white_noise);
|
||||
$(".experimental .button").click(on_click_experimental_button)
|
||||
//$("input[name=white_noise]").change(on_change_white_noise);
|
||||
//$(".experimental .button").click(on_click_experimental_button)
|
||||
|
||||
on_change_style();
|
||||
//on_change_style();
|
||||
on_change_scale_factor();
|
||||
on_change_noise_level();
|
||||
})
|
||||
|
|
9
web.lua
9
web.lua
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue