From d6f5e48dab8bb3f4f351944e9d8ed12296b042d8 Mon Sep 17 00:00:00 2001 From: nagadomi Date: Sun, 12 Feb 2017 17:04:29 +0900 Subject: [PATCH 01/17] Add support for icc profile --- lib/image_loader.lua | 14 ++++++++++++-- lib/sRGB2014.lua | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 lib/sRGB2014.lua diff --git a/lib/image_loader.lua b/lib/image_loader.lua index 76fec1b..491705a 100644 --- a/lib/image_loader.lua +++ b/lib/image_loader.lua @@ -1,10 +1,10 @@ local gm = require 'graphicsmagick' local ffi = require 'ffi' local iproc = require 'iproc' +local sRGB2014 = require 'sRGB2014' require 'pl' local image_loader = {} - local clip_eps8 = (1.0 / 255.0) * 0.5 - (1.0e-7 * (1.0 / 255.0) * 0.5) local clip_eps16 = (1.0 / 65535.0) * 0.5 - (1.0e-7 * (1.0 / 65535.0) * 0.5) local background_color = 0.5 @@ -53,6 +53,10 @@ function image_loader.encode_png(rgb, options) if options.gamma then im:gamma(options.gamma) end + if options.icm and im.profile then + im:profile("icm", sRGB2014) + im:profile("icm", options.icm) + end return im:depth(options.depth):format("PNG"):toString() end function image_loader.save_png(filename, rgb, options) @@ -72,7 +76,13 @@ function image_loader.decode_float(blob) local gamma_lcd = 0.454545 im:fromBlob(blob, #blob) - + if im.profile then + meta.icm = im:profile("icm") + if meta.icm then + im:profile("icm", sRGB2014) + im:removeProfile() + end + end if im:colorspace() == "CMYK" then im:colorspace("RGB") end diff --git a/lib/sRGB2014.lua b/lib/sRGB2014.lua new file mode 100644 index 0000000..b6094df --- /dev/null +++ b/lib/sRGB2014.lua @@ -0,0 +1,2 @@ +-- sRGB2014.icc +return "\000\000\011\208\000\000\000\000\002\000\000\000\109\110\116\114\082\071\066\032\088\089\090\032\007\223\000\002\000\015\000\000\000\000\000\000\097\099\115\112\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\246\214\000\001\000\000\000\000\211\045\000\000\000\000\061\014\178\222\174\147\151\190\155\103\038\206\140\010\067\206\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\100\101\115\099\000\000\001\068\000\000\000\099\098\088\089\090\000\000\001\168\000\000\000\020\098\084\082\067\000\000\001\188\000\000\008\012\103\084\082\067\000\000\001\188\000\000\008\012\114\084\082\067\000\000\001\188\000\000\008\012\100\109\100\100\000\000\009\200\000\000\000\136\103\088\089\090\000\000\010\080\000\000\000\020\108\117\109\105\000\000\010\100\000\000\000\020\109\101\097\115\000\000\010\120\000\000\000\036\098\107\112\116\000\000\010\156\000\000\000\020\114\088\089\090\000\000\010\176\000\000\000\020\116\101\099\104\000\000\010\196\000\000\000\012\118\117\101\100\000\000\010\208\000\000\000\135\119\116\112\116\000\000\011\088\000\000\000\020\099\112\114\116\000\000\011\108\000\000\000\055\099\104\097\100\000\000\011\164\000\000\000\044\100\101\115\099\000\000\000\000\000\000\000\009\115\082\071\066\050\048\049\052\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\088\089\090\032\000\000\000\000\000\000\036\160\000\000\015\132\000\000\182\207\099\117\114\118\000\000\000\000\000\000\004\000\000\000\000\005\000\010\000\015\000\020\000\025\000\030\000\035\000\040\000\045\000\050\000\055\000\059\000\064\000\069\000\074\000\079\000\084\000\089\000\094\000\099\000\104\000\109\000\114\000\119\000\124\000\129\000\134\000\139\000\144\000\149\000\154\000\159\000\164\000\169\000\174\000\178\000\183\000\188\000\193\000\198\000\203\000\208\000\213\000\219\000\224\000\229\000\235\000\240\000\246\000\251\001\001\001\007\001\013\001\019\001\025\001\031\001\037\001\043\001\050\001\056\001\062\001\069\001\076\001\082\001\089\001\096\001\103\001\110\001\117\001\124\001\131\001\139\001\146\001\154\001\161\001\169\001\177\001\185\001\193\001\201\001\209\001\217\001\225\001\233\001\242\001\250\002\003\002\012\002\020\002\029\002\038\002\047\002\056\002\065\002\075\002\084\002\093\002\103\002\113\002\122\002\132\002\142\002\152\002\162\002\172\002\182\002\193\002\203\002\213\002\224\002\235\002\245\003\000\003\011\003\022\003\033\003\045\003\056\003\067\003\079\003\090\003\102\003\114\003\126\003\138\003\150\003\162\003\174\003\186\003\199\003\211\003\224\003\236\003\249\004\006\004\019\004\032\004\045\004\059\004\072\004\085\004\099\004\113\004\126\004\140\004\154\004\168\004\182\004\196\004\211\004\225\004\240\004\254\005\013\005\028\005\043\005\058\005\073\005\088\005\103\005\119\005\134\005\150\005\166\005\181\005\197\005\213\005\229\005\246\006\006\006\022\006\039\006\055\006\072\006\089\006\106\006\123\006\140\006\157\006\175\006\192\006\209\006\227\006\245\007\007\007\025\007\043\007\061\007\079\007\097\007\116\007\134\007\153\007\172\007\191\007\210\007\229\007\248\008\011\008\031\008\050\008\070\008\090\008\110\008\130\008\150\008\170\008\190\008\210\008\231\008\251\009\016\009\037\009\058\009\079\009\100\009\121\009\143\009\164\009\186\009\207\009\229\009\251\010\017\010\039\010\061\010\084\010\106\010\129\010\152\010\174\010\197\010\220\010\243\011\011\011\034\011\057\011\081\011\105\011\128\011\152\011\176\011\200\011\225\011\249\012\018\012\042\012\067\012\092\012\117\012\142\012\167\012\192\012\217\012\243\013\013\013\038\013\064\013\090\013\116\013\142\013\169\013\195\013\222\013\248\014\019\014\046\014\073\014\100\014\127\014\155\014\182\014\210\014\238\015\009\015\037\015\065\015\094\015\122\015\150\015\179\015\207\015\236\016\009\016\038\016\067\016\097\016\126\016\155\016\185\016\215\016\245\017\019\017\049\017\079\017\109\017\140\017\170\017\201\017\232\018\007\018\038\018\069\018\100\018\132\018\163\018\195\018\227\019\003\019\035\019\067\019\099\019\131\019\164\019\197\019\229\020\006\020\039\020\073\020\106\020\139\020\173\020\206\020\240\021\018\021\052\021\086\021\120\021\155\021\189\021\224\022\003\022\038\022\073\022\108\022\143\022\178\022\214\022\250\023\029\023\065\023\101\023\137\023\174\023\210\023\247\024\027\024\064\024\101\024\138\024\175\024\213\024\250\025\032\025\069\025\107\025\145\025\183\025\221\026\004\026\042\026\081\026\119\026\158\026\197\026\236\027\020\027\059\027\099\027\138\027\178\027\218\028\002\028\042\028\082\028\123\028\163\028\204\028\245\029\030\029\071\029\112\029\153\029\195\029\236\030\022\030\064\030\106\030\148\030\190\030\233\031\019\031\062\031\105\031\148\031\191\031\234\032\021\032\065\032\108\032\152\032\196\032\240\033\028\033\072\033\117\033\161\033\206\033\251\034\039\034\085\034\130\034\175\034\221\035\010\035\056\035\102\035\148\035\194\035\240\036\031\036\077\036\124\036\171\036\218\037\009\037\056\037\104\037\151\037\199\037\247\038\039\038\087\038\135\038\183\038\232\039\024\039\073\039\122\039\171\039\220\040\013\040\063\040\113\040\162\040\212\041\006\041\056\041\107\041\157\041\208\042\002\042\053\042\104\042\155\042\207\043\002\043\054\043\105\043\157\043\209\044\005\044\057\044\110\044\162\044\215\045\012\045\065\045\118\045\171\045\225\046\022\046\076\046\130\046\183\046\238\047\036\047\090\047\145\047\199\047\254\048\053\048\108\048\164\048\219\049\018\049\074\049\130\049\186\049\242\050\042\050\099\050\155\050\212\051\013\051\070\051\127\051\184\051\241\052\043\052\101\052\158\052\216\053\019\053\077\053\135\053\194\053\253\054\055\054\114\054\174\054\233\055\036\055\096\055\156\055\215\056\020\056\080\056\140\056\200\057\005\057\066\057\127\057\188\057\249\058\054\058\116\058\178\058\239\059\045\059\107\059\170\059\232\060\039\060\101\060\164\060\227\061\034\061\097\061\161\061\224\062\032\062\096\062\160\062\224\063\033\063\097\063\162\063\226\064\035\064\100\064\166\064\231\065\041\065\106\065\172\065\238\066\048\066\114\066\181\066\247\067\058\067\125\067\192\068\003\068\071\068\138\068\206\069\018\069\085\069\154\069\222\070\034\070\103\070\171\070\240\071\053\071\123\071\192\072\005\072\075\072\145\072\215\073\029\073\099\073\169\073\240\074\055\074\125\074\196\075\012\075\083\075\154\075\226\076\042\076\114\076\186\077\002\077\074\077\147\077\220\078\037\078\110\078\183\079\000\079\073\079\147\079\221\080\039\080\113\080\187\081\006\081\080\081\155\081\230\082\049\082\124\082\199\083\019\083\095\083\170\083\246\084\066\084\143\084\219\085\040\085\117\085\194\086\015\086\092\086\169\086\247\087\068\087\146\087\224\088\047\088\125\088\203\089\026\089\105\089\184\090\007\090\086\090\166\090\245\091\069\091\149\091\229\092\053\092\134\092\214\093\039\093\120\093\201\094\026\094\108\094\189\095\015\095\097\095\179\096\005\096\087\096\170\096\252\097\079\097\162\097\245\098\073\098\156\098\240\099\067\099\151\099\235\100\064\100\148\100\233\101\061\101\146\101\231\102\061\102\146\102\232\103\061\103\147\103\233\104\063\104\150\104\236\105\067\105\154\105\241\106\072\106\159\106\247\107\079\107\167\107\255\108\087\108\175\109\008\109\096\109\185\110\018\110\107\110\196\111\030\111\120\111\209\112\043\112\134\112\224\113\058\113\149\113\240\114\075\114\166\115\001\115\093\115\184\116\020\116\112\116\204\117\040\117\133\117\225\118\062\118\155\118\248\119\086\119\179\120\017\120\110\120\204\121\042\121\137\121\231\122\070\122\165\123\004\123\099\123\194\124\033\124\129\124\225\125\065\125\161\126\001\126\098\126\194\127\035\127\132\127\229\128\071\128\168\129\010\129\107\129\205\130\048\130\146\130\244\131\087\131\186\132\029\132\128\132\227\133\071\133\171\134\014\134\114\134\215\135\059\135\159\136\004\136\105\136\206\137\051\137\153\137\254\138\100\138\202\139\048\139\150\139\252\140\099\140\202\141\049\141\152\141\255\142\102\142\206\143\054\143\158\144\006\144\110\144\214\145\063\145\168\146\017\146\122\146\227\147\077\147\182\148\032\148\138\148\244\149\095\149\201\150\052\150\159\151\010\151\117\151\224\152\076\152\184\153\036\153\144\153\252\154\104\154\213\155\066\155\175\156\028\156\137\156\247\157\100\157\210\158\064\158\174\159\029\159\139\159\250\160\105\160\216\161\071\161\182\162\038\162\150\163\006\163\118\163\230\164\086\164\199\165\056\165\169\166\026\166\139\166\253\167\110\167\224\168\082\168\196\169\055\169\169\170\028\170\143\171\002\171\117\171\233\172\092\172\208\173\068\173\184\174\045\174\161\175\022\175\139\176\000\176\117\176\234\177\096\177\214\178\075\178\194\179\056\179\174\180\037\180\156\181\019\181\138\182\001\182\121\182\240\183\104\183\224\184\089\184\209\185\074\185\194\186\059\186\181\187\046\187\167\188\033\188\155\189\021\189\143\190\010\190\132\190\255\191\122\191\245\192\112\192\236\193\103\193\227\194\095\194\219\195\088\195\212\196\081\196\206\197\075\197\200\198\070\198\195\199\065\199\191\200\061\200\188\201\058\201\185\202\056\202\183\203\054\203\182\204\053\204\181\205\053\205\181\206\054\206\182\207\055\207\184\208\057\208\186\209\060\209\190\210\063\210\193\211\068\211\198\212\073\212\203\213\078\213\209\214\085\214\216\215\092\215\224\216\100\216\232\217\108\217\241\218\118\218\251\219\128\220\005\220\138\221\016\221\150\222\028\222\162\223\041\223\175\224\054\224\189\225\068\225\204\226\083\226\219\227\099\227\235\228\115\228\252\229\132\230\013\230\150\231\031\231\169\232\050\232\188\233\070\233\208\234\091\234\229\235\112\235\251\236\134\237\017\237\156\238\040\238\180\239\064\239\204\240\088\240\229\241\114\241\255\242\140\243\025\243\167\244\052\244\194\245\080\245\222\246\109\246\251\247\138\248\025\248\168\249\056\249\199\250\087\250\231\251\119\252\007\252\152\253\041\253\186\254\075\254\220\255\109\255\255\100\101\115\099\000\000\000\000\000\000\000\046\073\069\067\032\054\049\057\054\054\045\050\045\049\032\068\101\102\097\117\108\116\032\082\071\066\032\067\111\108\111\117\114\032\083\112\097\099\101\032\045\032\115\082\071\066\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\088\089\090\032\000\000\000\000\000\000\098\153\000\000\183\133\000\000\024\218\088\089\090\032\000\000\000\000\000\000\000\000\000\080\000\000\000\000\000\000\109\101\097\115\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\088\089\090\032\000\000\000\000\000\000\000\158\000\000\000\164\000\000\000\135\088\089\090\032\000\000\000\000\000\000\111\162\000\000\056\245\000\000\003\144\115\105\103\032\000\000\000\000\067\082\084\032\100\101\115\099\000\000\000\000\000\000\000\045\082\101\102\101\114\101\110\099\101\032\086\105\101\119\105\110\103\032\067\111\110\100\105\116\105\111\110\032\105\110\032\073\069\067\032\054\049\057\054\054\045\050\045\049\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\088\089\090\032\000\000\000\000\000\000\246\214\000\001\000\000\000\000\211\045\116\101\120\116\000\000\000\000\067\111\112\121\114\105\103\104\116\032\073\110\116\101\114\110\097\116\105\111\110\097\108\032\067\111\108\111\114\032\067\111\110\115\111\114\116\105\117\109\044\032\050\048\049\053\000\000\115\102\051\050\000\000\000\000\000\001\012\068\000\000\005\223\255\255\243\038\000\000\007\148\000\000\253\143\255\255\251\161\255\255\253\162\000\000\003\219\000\000\192\117" From 835b0531d480902fd6680fe88123e123cf1f3223 Mon Sep 17 00:00:00 2001 From: nagadomi Date: Sun, 12 Feb 2017 19:01:25 +0900 Subject: [PATCH 02/17] Update NOTICE --- NOTICE | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NOTICE b/NOTICE index 021a888..47dd50f 100644 --- a/NOTICE +++ b/NOTICE @@ -1,2 +1,4 @@ images/miku_*: CC BY-NC by piapro (http://piapro.net/en_for_creators.html) webgen/assets/bg.png: Generated by chibichara maker (http://tetrabo.com/chibichara/). +lib/sRGB2014.lua: sRGB2014.icc from http://www.color.org/srgbprofiles.xalter + From 08fb204fcac08e0d6c4d78343e89f4f36b5ca8a5 Mon Sep 17 00:00:00 2001 From: NaamloosDT Date: Tue, 14 Feb 2017 22:46:00 +0100 Subject: [PATCH 03/17] Updated Dutch translation --- webgen/locales/nl.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 webgen/locales/nl.yml diff --git a/webgen/locales/nl.yml b/webgen/locales/nl.yml new file mode 100644 index 0000000..f70ed9c --- /dev/null +++ b/webgen/locales/nl.yml @@ -0,0 +1,30 @@ +--- +description: Single-Image Super-Resolutie voor Anime-Style afbeeldingen met behulp van Deep Convolutional Neural Networks. Oh, en het ondersteunt foto's. +show_demonstration: Vertoon volledige demonstratie +go_to_github: Ga naar GitHub +image_choosing: Afbeelding selecteren +type_url: Typ URL +choose_file: Of selecteer een bestand +file_limits: "Limieten: Grootte: 5MB, Ruis vermindering: 3000x3000px, Vergroting: 1500x1500px." +style: Stijl +artwork: Artwork +photo: Foto +noise_reduction: Ruis vermindering +expect_jpeg: verwacht JPEG artifact +nr_none: Geen +nr_low: Laag +nr_medium: Gemiddeld +nr_high: Hoog +nr_highest: Hoogste +nr_hint: "Gebruik ruisvermindering alleen als de afbeelding ook daadwerkelijk ruis bevat, of het effect zal omgekeerd zijn." +upscaling: Vergroting +up_none: Geen +tta: TTA +tta_best_effort: "n-pass auto" +tta_rule: "Vertoon de `n-pass auto` optie." +tta_hint: "TTA maakt de kwaliteit stabiel maar veroorzaakt een limiet in grootte" +button_convert: Converteer +button_download: Download +hints: + - "Als je gebruik maakt van FireFox, gebruik dan CTRL + S om een afbeelding op te slaan. De \"Save Image\"/\"Afbeelding Opslaan\" optie werkt niet." + \ No newline at end of file From 2b566f998d410969bddd368f6fe325db0b18a56d Mon Sep 17 00:00:00 2001 From: nagadomi Date: Fri, 17 Feb 2017 22:53:10 +0900 Subject: [PATCH 04/17] Add support for Dutch #173 --- appendix/waifu2x.nginx.conf | 1 + assets/index.de.html | 4 + assets/index.es.html | 4 + assets/index.fr.html | 4 + assets/index.html | 4 + assets/index.ja.html | 4 + assets/index.ko.html | 4 + assets/index.nl.html | 191 ++++++++++++++++++++++++++++++++ assets/index.pt.html | 4 + assets/index.ru.html | 4 + assets/index.tr.html | 4 + assets/index.zh-CN.html | 4 + assets/index.zh-TW.html | 4 + web.lua | 3 + webgen/templates/index.html.erb | 4 + 15 files changed, 243 insertions(+) create mode 100644 assets/index.nl.html diff --git a/appendix/waifu2x.nginx.conf b/appendix/waifu2x.nginx.conf index b9e0541..742fb34 100644 --- a/appendix/waifu2x.nginx.conf +++ b/appendix/waifu2x.nginx.conf @@ -17,6 +17,7 @@ map $http_accept_language $lang { ~zh-TW zh-TW; ~zh zh-CN; ~ko ko; + ~nl nl; ~en en; } diff --git a/assets/index.de.html b/assets/index.de.html index ec7c928..f79efd9 100644 --- a/assets/index.de.html +++ b/assets/index.de.html @@ -62,6 +62,10 @@ 한국어 + / + + Dutch +

Einzelbild Super-Auflösungs Konvertierung für Bilder im Anime Stil mithilfe eines künstlichen neuronalen Netzwerk. Zusätzlich dazu unterstützt es auch Fotos.

Mejora la resolución de ilustraciones de tipo anime utilizando redes neuronales convolucionales. También es compatible con fotografías.

Outil permettant la mise à l'échelle de n'importe quelle image de style "anime", par le biais de réseaux de neurones convolutionnels. Fonctionne également sur les photos.

Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.

深層畳み込みニューラルネットワークによる二次元画像のための超解像システム。 写真にも対応。

컨볼루젼 신경망(CNN) 시스템을 통한 딥 러닝으로 2차원 이미지의 해상도를 개선합니다. 그림 뿐만 아니라 사진에도 대응합니다.

+

waifu2x

+ +

Single-Image Super-Resolutie voor Anime-Style afbeeldingen met behulp van Deep Convolutional Neural Networks. Oh, en het ondersteunt foto's.

+ +
+
+
Afbeelding selecteren:
+
+ +
+ Of selecteer een bestand: +
+
+
+ Limieten: Grootte: 5MB, Ruis vermindering: 3000x3000px, Vergroting: 1500x1500px. +
+
+
+
+ Stijl: +
+
+ + +
+
+
+
+ Ruis vermindering: +
+ (verwacht JPEG artifact) +
+
+
+ + + + + +
+
+ Gebruik ruisvermindering alleen als de afbeelding ook daadwerkelijk ruis bevat, of het effect zal omgekeerd zijn. +
+
+
+
+ Vergroting: +
+
+
+ + + +
+
+ + + + + +
+
    + +
  • Als je gebruik maakt van FireFox, gebruik dan CTRL + S om een afbeelding op te slaan. De "Save Image"/"Afbeelding Opslaan" optie werkt niet.
  • + +
+
+
+
+
+ waifu2x +
+ + diff --git a/assets/index.pt.html b/assets/index.pt.html index 98131b4..944119d 100644 --- a/assets/index.pt.html +++ b/assets/index.pt.html @@ -62,6 +62,10 @@ 한국어 + / + + Dutch +

Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.

Waifu2x позволяет увеличивать в 2 раза рисованные изображения, например аниме или арт, а также устранять шум на изображении (преимущественно артефакты сжатия JPEG). Теперь также поддерживаются фотографии.

Derin Sarmalı Sinirsel Ağ ile çalışan anime stili çalışmalar için süper çözünürlük yükselticidir. Normal fotoğrafları da destekler.

本程序使用卷积神经网络对动漫风格的图片进行放大操作(支持照片)。

使用深度卷積神經網路的二次元圖片超解析系統。同時支援照片處理。

<%= t[:description] %>

Einzelbild Super-Auflösungs Konvertierung für Bilder im Anime Stil mithilfe eines künstlichen neuronalen Netzwerk. Zusätzlich dazu unterstützt es auch Fotos.

diff --git a/assets/index.es.html b/assets/index.es.html index 0b38588..328e048 100644 --- a/assets/index.es.html +++ b/assets/index.es.html @@ -64,7 +64,7 @@ / - Dutch + Nederlands

Mejora la resolución de ilustraciones de tipo anime utilizando redes neuronales convolucionales. También es compatible con fotografías.

diff --git a/assets/index.fr.html b/assets/index.fr.html index 6bd31ee..0f263d6 100644 --- a/assets/index.fr.html +++ b/assets/index.fr.html @@ -64,7 +64,7 @@ / - Dutch + Nederlands

Outil permettant la mise à l'échelle de n'importe quelle image de style "anime", par le biais de réseaux de neurones convolutionnels. Fonctionne également sur les photos.

diff --git a/assets/index.html b/assets/index.html index 5bd2799..1b2865f 100644 --- a/assets/index.html +++ b/assets/index.html @@ -64,7 +64,7 @@ / - Dutch + Nederlands

Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.

diff --git a/assets/index.ja.html b/assets/index.ja.html index 742b3c2..621d020 100644 --- a/assets/index.ja.html +++ b/assets/index.ja.html @@ -64,7 +64,7 @@ / - Dutch + Nederlands

深層畳み込みニューラルネットワークによる二次元画像のための超解像システム。 写真にも対応。

diff --git a/assets/index.ko.html b/assets/index.ko.html index 3c954ce..b927f50 100644 --- a/assets/index.ko.html +++ b/assets/index.ko.html @@ -64,7 +64,7 @@ / - Dutch + Nederlands

컨볼루젼 신경망(CNN) 시스템을 통한 딥 러닝으로 2차원 이미지의 해상도를 개선합니다. 그림 뿐만 아니라 사진에도 대응합니다.

diff --git a/assets/index.nl.html b/assets/index.nl.html index 5db4aa5..be8cbf2 100644 --- a/assets/index.nl.html +++ b/assets/index.nl.html @@ -64,7 +64,7 @@ / - Dutch + Nederlands

Single-Image Super-Resolutie voor Anime-Style afbeeldingen met behulp van Deep Convolutional Neural Networks. Oh, en het ondersteunt foto's.

diff --git a/assets/index.pt.html b/assets/index.pt.html index 944119d..99a2f05 100644 --- a/assets/index.pt.html +++ b/assets/index.pt.html @@ -64,7 +64,7 @@ / - Dutch + Nederlands

Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.

diff --git a/assets/index.ru.html b/assets/index.ru.html index db20ad2..6b2a05b 100644 --- a/assets/index.ru.html +++ b/assets/index.ru.html @@ -64,7 +64,7 @@ / - Dutch + Nederlands

Waifu2x позволяет увеличивать в 2 раза рисованные изображения, например аниме или арт, а также устранять шум на изображении (преимущественно артефакты сжатия JPEG). Теперь также поддерживаются фотографии.

diff --git a/assets/index.tr.html b/assets/index.tr.html index 650fb34..3c9cca3 100644 --- a/assets/index.tr.html +++ b/assets/index.tr.html @@ -64,7 +64,7 @@ / - Dutch + Nederlands

Derin Sarmalı Sinirsel Ağ ile çalışan anime stili çalışmalar için süper çözünürlük yükselticidir. Normal fotoğrafları da destekler.

diff --git a/assets/index.zh-CN.html b/assets/index.zh-CN.html index 05332bf..94adb93 100644 --- a/assets/index.zh-CN.html +++ b/assets/index.zh-CN.html @@ -64,7 +64,7 @@ / - Dutch + Nederlands

本程序使用卷积神经网络对动漫风格的图片进行放大操作(支持照片)。

diff --git a/assets/index.zh-TW.html b/assets/index.zh-TW.html index 1a82ca7..cf31205 100644 --- a/assets/index.zh-TW.html +++ b/assets/index.zh-TW.html @@ -64,7 +64,7 @@ / - Dutch + Nederlands

使用深度卷積神經網路的二次元圖片超解析系統。同時支援照片處理。

diff --git a/webgen/templates/index.html.erb b/webgen/templates/index.html.erb index f91b729..3ac8323 100644 --- a/webgen/templates/index.html.erb +++ b/webgen/templates/index.html.erb @@ -64,7 +64,7 @@ / - Dutch + Nederlands

<%= t[:description] %>

From 780e22cf51183d3e8a7a8608c64145a66348c27b Mon Sep 17 00:00:00 2001 From: nagadomi Date: Wed, 1 Mar 2017 15:15:45 +0900 Subject: [PATCH 06/17] Fix io.read option --- lib/image_loader.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/image_loader.lua b/lib/image_loader.lua index 491705a..3e22ca5 100644 --- a/lib/image_loader.lua +++ b/lib/image_loader.lua @@ -137,7 +137,7 @@ function image_loader.load_float(file) if not fp then error(file .. ": failed to load image") end - local buff = fp:read("*a") + local buff = fp:read("*all") fp:close() return image_loader.decode_float(buff) end @@ -146,7 +146,7 @@ function image_loader.load_byte(file) if not fp then error(file .. ": failed to load image") end - local buff = fp:read("*a") + local buff = fp:read("*all") fp:close() return image_loader.decode_byte(buff) end From eb3926b61ccec43d680467ff4e6067ba0240f46a Mon Sep 17 00:00:00 2001 From: nagadomi Date: Thu, 2 Mar 2017 14:47:49 +0900 Subject: [PATCH 07/17] Fix to work on Lua52 web.lua does not work on Lua52 because turbo does not support Lua52 FFI. --- lib/compression.lua | 4 ++-- lib/settings.lua | 5 +++++ tools/benchmark.lua | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/compression.lua b/lib/compression.lua index 6593c82..a31e0ed 100644 --- a/lib/compression.lua +++ b/lib/compression.lua @@ -1,5 +1,5 @@ -- snapply compression for ByteTensor -require 'snappy' +local snappy = require 'snappy' local compression = {} compression.compress = function (bt) @@ -9,7 +9,7 @@ end compression.decompress = function(data) local size = data[1] local dec = snappy.decompress(data[2]:string()) - local bt = torch.ByteTensor(unpack(torch.totable(size))) + local bt = torch.ByteTensor(table.unpack(torch.totable(size))) bt:storage():string(dec) return bt end diff --git a/lib/settings.lua b/lib/settings.lua index 1c66cb3..03830e4 100644 --- a/lib/settings.lua +++ b/lib/settings.lua @@ -148,4 +148,9 @@ end settings.images = string.format("%s/images.t7", settings.data_dir) settings.image_list = string.format("%s/image_list.txt", settings.data_dir) +-- patch for lua52 +if not math.log10 then + math.log10 = function(x) return math.log(x, 10) end +end + return settings diff --git a/tools/benchmark.lua b/tools/benchmark.lua index a9aa70f..950f1b1 100644 --- a/tools/benchmark.lua +++ b/tools/benchmark.lua @@ -81,6 +81,11 @@ if opt.output_dir:len() > 0 then dir.makepath(opt.output_dir) end +-- patch for lua52 +if not math.log10 then + math.log10 = function(x) return math.log(x, 10) end +end + local function rgb2y_matlab(x) local y = torch.Tensor(1, x:size(2), x:size(3)):zero() x = iproc.byte2float(x) From b19ad361230851c98ca0dd290a5203573b1677dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Ereza=20Mart=C3=ADnez?= Date: Sun, 21 May 2017 23:35:56 +0200 Subject: [PATCH 08/17] Add Catalan translation --- appendix/waifu2x.nginx.conf | 1 + assets/index.ca.html | 195 ++++++++++++++++++++++++++++++++ assets/index.de.html | 4 + assets/index.es.html | 4 + assets/index.fr.html | 4 + assets/index.html | 4 + assets/index.ja.html | 4 + assets/index.ko.html | 4 + assets/index.nl.html | 4 + assets/index.pt.html | 4 + assets/index.ru.html | 4 + assets/index.tr.html | 4 + assets/index.zh-CN.html | 4 + assets/index.zh-TW.html | 4 + web.lua | 3 + webgen/locales/ca.yml | 30 +++++ webgen/templates/index.html.erb | 4 + 17 files changed, 281 insertions(+) create mode 100644 assets/index.ca.html create mode 100644 webgen/locales/ca.yml diff --git a/appendix/waifu2x.nginx.conf b/appendix/waifu2x.nginx.conf index 742fb34..71786f0 100644 --- a/appendix/waifu2x.nginx.conf +++ b/appendix/waifu2x.nginx.conf @@ -18,6 +18,7 @@ map $http_accept_language $lang { ~zh zh-CN; ~ko ko; ~nl nl; + ~ca ca; ~en en; } diff --git a/assets/index.ca.html b/assets/index.ca.html new file mode 100644 index 0000000..7b43f9d --- /dev/null +++ b/assets/index.ca.html @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + waifu2x + + +
+

waifu2x

+ +

Amplia la resolució d'il·lustracions d'estil anime utilitzant xarxes neuronals convolucionals profundes. I suporta fotos.

+ +
+
+
Escolliu una imatge:
+
+ +
+ O escolliu un fitxer: +
+
+
+ Límits: Mida: 5MB, Reducció de soroll: 3000x3000px, Sobreescalat: 1500x1500px. +
+
+
+
+ Estil: +
+
+ + +
+
+
+
+ Reducció de soroll: +
+ (espera artefactes JPEG) +
+
+
+ + + + + +
+
+ Utilitzeu la reducció de soroll si la imatge té soroll, si no, podeu aconseguir l'efecte contrari. +
+
+
+
+ Sobreescalat: +
+
+
+ + + +
+
+ + + + + +
+
    + +
  • Si utilitzeu el Firefox, premeu la tecla Control+S per desar la imatge. L'opció "Desa la imatge" no funciona.
  • + +
+
+
+
+
+ waifu2x +
+ + diff --git a/assets/index.de.html b/assets/index.de.html index efb4dc7..a3f250a 100644 --- a/assets/index.de.html +++ b/assets/index.de.html @@ -66,6 +66,10 @@ Nederlands + / + + Català +

Einzelbild Super-Auflösungs Konvertierung für Bilder im Anime Stil mithilfe eines künstlichen neuronalen Netzwerk. Zusätzlich dazu unterstützt es auch Fotos.

Mejora la resolución de ilustraciones de tipo anime utilizando redes neuronales convolucionales. También es compatible con fotografías.

Outil permettant la mise à l'échelle de n'importe quelle image de style "anime", par le biais de réseaux de neurones convolutionnels. Fonctionne également sur les photos.

Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.

深層畳み込みニューラルネットワークによる二次元画像のための超解像システム。 写真にも対応。

컨볼루젼 신경망(CNN) 시스템을 통한 딥 러닝으로 2차원 이미지의 해상도를 개선합니다. 그림 뿐만 아니라 사진에도 대응합니다.

Single-Image Super-Resolutie voor Anime-Style afbeeldingen met behulp van Deep Convolutional Neural Networks. Oh, en het ondersteunt foto's.

Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.

Waifu2x позволяет увеличивать в 2 раза рисованные изображения, например аниме или арт, а также устранять шум на изображении (преимущественно артефакты сжатия JPEG). Теперь также поддерживаются фотографии.

Derin Sarmalı Sinirsel Ağ ile çalışan anime stili çalışmalar için süper çözünürlük yükselticidir. Normal fotoğrafları da destekler.

本程序使用卷积神经网络对动漫风格的图片进行放大操作(支持照片)。

使用深度卷積神經網路的二次元圖片超解析系統。同時支援照片處理。

<%= t[:description] %>

컨볼루젼 신경망(CNN) 시스템을 통한 딥 러닝으로 2차원 이미지의 해상도를 개선합니다. 그림 뿐만 아니라 사진에도 대응합니다.

+

컨볼루전 신경망(CNN) 시스템을 통한 딥 러닝으로 2차원 이미지의 해상도를 개선합니다. 그림뿐만 아니라 사진에도 대응합니다.

@@ -115,7 +115,7 @@
노이즈 감소:
- (JPEG 아티팩트 제외) + (JPEG 이미지에 권장)
@@ -126,7 +126,7 @@
- 실제로 노이즈가 있는 이미지에만 사용해야 하며, 그렇지 않을 경우 사진의 세세한 부분이 뭉개질 수 있습니다. + 실제로 노이즈가 있는 이미지에만 사용해야 하며, 그렇지 않을 경우 이미지의 세세한 부분이 뭉개질 수 있습니다.
- 업스케일링: + 확대:
-

컨볼루전 신경망(CNN) 시스템을 통한 딥 러닝으로 2차원 이미지의 해상도를 개선합니다. 그림뿐만 아니라 사진에도 대응합니다.

+

컨볼루션 신경망(CNN) 시스템을 통한 딥 러닝으로 2차원 이미지의 해상도를 개선합니다. 그림뿐만 아니라 사진에도 대응합니다.

-

컨볼루션 신경망(CNN) 시스템을 통한 딥 러닝으로 2차원 이미지의 해상도를 개선합니다. 그림뿐만 아니라 사진에도 대응합니다.

+

컨볼루션 신경망(CNN) 시스템을 통한 딥 러닝으로 2차원 이미지의 해상도를 개선합니다. 그림뿐만 아니라 사진도 지원합니다.

@@ -182,7 +182,7 @@
    -
  • Firefox에서 이미지를 저장하려면 Ctrl+S를 누르십시오. 오른쪽 클릭 > "이미지 저장"을 이용하면 정상적으로 동작하지 않습니다.
  • +
  • Firefox에서 이미지를 저장하려면 Ctrl+S를 누르십시오. ‘이미지 저장’ 옵션은 작동하지 않습니다.
From d4ec492901a309dd23a9bd4a8bfbef329403dd90 Mon Sep 17 00:00:00 2001 From: nagadomi Date: Tue, 5 Dec 2017 15:19:37 +0900 Subject: [PATCH 16/17] Update nl --- assets/index.nl.html | 8 ++++---- webgen/locales/nl.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/index.nl.html b/assets/index.nl.html index ace76da..dca71a2 100644 --- a/assets/index.nl.html +++ b/assets/index.nl.html @@ -74,7 +74,7 @@

Single-Image Super-Resolutie voor Anime-Style afbeeldingen met behulp van Deep Convolutional Neural Networks. Oh, en het ondersteunt foto's.

@@ -182,7 +182,7 @@
    -
  • Als je gebruik maakt van FireFox, gebruik dan CTRL + S om een afbeelding op te slaan. De "Save Image"/"Afbeelding Opslaan" optie werkt niet.
  • +
  • Als je gebruik maakt van FireFox, gebruik dan CTRL + S om een afbeelding op te slaan. De "Save Image" "Afbeelding Opslaan" optie werkt niet.
diff --git a/webgen/locales/nl.yml b/webgen/locales/nl.yml index cd906b7..d740242 100644 --- a/webgen/locales/nl.yml +++ b/webgen/locales/nl.yml @@ -26,5 +26,5 @@ tta_hint: "TTA verzekerd een betere kwaliteit, maar het limiteerd de grootte van button_convert: Converteer button_download: Download hints: - - "Als je gebruik maakt van FireFox, gebruik dan CTRL + S om een afbeelding op te slaan. De \"Save Image\" /\ "Afbeelding Opslaan\" optie werkt niet." + - "Als je gebruik maakt van FireFox, gebruik dan CTRL + S om een afbeelding op te slaan. De \"Save Image\" \"Afbeelding Opslaan\" optie werkt niet." From c955203fbcaee3d56c82d6ea82b7fb13c364a568 Mon Sep 17 00:00:00 2001 From: nagadomi Date: Tue, 5 Dec 2017 15:30:00 +0900 Subject: [PATCH 17/17] Update ko --- webgen/locales/ko.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/webgen/locales/ko.yml b/webgen/locales/ko.yml index c8e6d06..46befcd 100644 --- a/webgen/locales/ko.yml +++ b/webgen/locales/ko.yml @@ -1,24 +1,25 @@ --- -description: 컨볼루젼 신경망(CNN) 시스템을 통한 딥 러닝으로 2차원 이미지의 해상도를 개선합니다. 그림 뿐만 아니라 사진에도 대응합니다. -show_demonstration: 실제 데모 보기 +description: 컨볼루션 신경망(CNN) 시스템을 통한 딥 러닝으로 2차원 이미지의 해상도를 개선합니다. 그림뿐만 아니라 사진도 지원합니다. +show_demonstration: 실제 예제 보기 go_to_github: GitHub에서 보기 image_choosing: 이미지 선택 type_url: URL 입력 choose_file: 또는 파일 업로드 -file_limits: "제한: 크기: 5MB, 노이즈 감소: 3000x3000px, 업스케일링: 1500x1500px." +file_limits: "제한: 크기: 5MB, 노이즈 감소: 3000x3000px, 확대: 1500x1500px." style: 스타일 artwork: 그림 photo: 사진 noise_reduction: 노이즈 감소 -expect_jpeg: JPEG 아티팩트 제외 +expect_jpeg: JPEG 이미지에 권장 nr_none: 없음 +nr_low: 낮음 nr_medium: 중간 nr_high: 높음 -nr_highest: 최상 -nr_hint: "실제로 노이즈가 있는 이미지에만 사용해야 하며, 그렇지 않을 경우 사진의 세세한 부분이 뭉개질 수 있습니다." -upscaling: 업스케일링 +nr_highest: 최고 +nr_hint: "실제로 노이즈가 있는 이미지에만 사용해야 하며, 그렇지 않을 경우 세세한 부분이 뭉개질 수 있습니다." +upscaling: 확대 up_none: 없음 button_convert: 변환 button_download: 다운로드 hints: - - "FireFox에서 이미지를 저장하려면 Ctrl+S를 누르세요. 오른쪽 클릭 > \"이미지 저장\"을 이용하면 정상적으로 동작하지 않습니다." + - "Firefox에서 이미지를 저장하려면 Ctrl+S를 누르십시오. ‘이미지 저장’ 옵션은 작동하지 않습니다."