소스 검색

Merge branch 'master' into upconv

nagadomi 9 년 전
부모
커밋
a0d8826779

+ 2 - 2
README.md

@@ -78,7 +78,7 @@ sudo apt-get install cuda
 
 ```
 sudo apt-get install libsnappy-dev
-sudo apt-get install libgraphicsmagick-dev
+sudo apt-get install libgraphicsmagick1-dev
 ```
 
 #### Install Torch7
@@ -182,7 +182,7 @@ th waifu2x.lua -m noise -noise_level 1 -resume 1 -l data/frame.txt -o new_frames
 
 Generating a video from waifu2xed images and audio.
 ```
-avconv -f image2 -r 24 -i new_frames/%d.png -i audio.mp3 -r 24 -vcodec libx264 -crf 16 video.mp4
+avconv -f image2 -framerate 24 -i new_frames/%d.png -i audio.mp3 -r 24 -vcodec libx264 -crf 16 video.mp4
 ```
 
 ## Train Your Own Model

+ 8 - 3
appendix/benchmark.md

@@ -1,10 +1,15 @@
 # Benchmark results
 
+## Usage
 
-## dataset
+```
+th tools/benchmark.lua -dir path/to/dataset_dir -method scale -color y -model1_dir path/to/model_dir
+```
 
-    photo_set: 300 various photos.
-    art_set  : 90 artworks (PNG only).
+## Dataset
+
+    photo_test: 300 various photos.
+    art_test  : 90 artworks (PNG only).
 
 ## 2x upscaling model
 

+ 1 - 0
appendix/waifu2x.nginx.conf

@@ -15,6 +15,7 @@ map $http_accept_language $lang {
   ~tr tr;
   ~zh-CN zh-CN;
   ~zh zh-CN;
+  ~ko ko;
   ~en en;
 }
 

+ 7 - 3
assets/index.de.html

@@ -53,6 +53,10 @@
 	<a href="index.zh-CN.html">
 	  简体中文
 	</a>
+	/
+	<a href="index.ko.html">
+	  한국어
+	</a>
       </div>
       <p>Einzelbild Super-Auflösungs Konvertierung für Bilder im Anime Stil mithilfe eines faltenden neuralen Netzwerks. Zusätzlich dazu unterstützt es auch Fotos.</p>
       <p class="margin1 link-box">
@@ -84,7 +88,7 @@
 	  <div class="option-right">
 	    <label><input type="radio" name="style" class="radio" value="art" checked>
 	      <span class="r-text">
-		Kunst
+		Illustration
 	      </span>
 	    </label>
 	    <label><input type="radio" name="style" class="radio" value="photo">
@@ -126,7 +130,7 @@
 	    <label>
 	      <input type="radio" name="noise" class="radio" value="3">
 	      <span class="r-text">
-		Am Höchsten
+		Höchste
 	      </span>
 	    </label>
 	  </div>
@@ -165,7 +169,7 @@
 	<div class="bottom-hint">
 	  <ul>
 	    
-	      <li>Wenn Sie Firefox benutzen, benutzen Sie bitte SRTG+S um das Bild zu speichern. Herunterladen funktioniert bei Firefox leider nicht.</li>
+	      <li>Wenn Sie Firefox benutzen, benutzen Sie bitte STRG+S um das Bild zu speichern. Herunterladen funktioniert bei Firefox leider nicht.</li>
 	    
 	  </ul>
 	</div>

+ 4 - 0
assets/index.es.html

@@ -53,6 +53,10 @@
 	<a href="index.zh-CN.html">
 	  简体中文
 	</a>
+	/
+	<a href="index.ko.html">
+	  한국어
+	</a>
       </div>
       <p>Mejora la resolución de ilustraciones de tipo anime utilizando redes neuronales convolucionales. También es compatible con fotografías.</p>
       <p class="margin1 link-box">

+ 4 - 0
assets/index.fr.html

@@ -53,6 +53,10 @@
 	<a href="index.zh-CN.html">
 	  简体中文
 	</a>
+	/
+	<a href="index.ko.html">
+	  한국어
+	</a>
       </div>
       <p>Outil permettant d'agrandir n'importe quelle image de style "anime", par le biais de réseaux de neurones convolutionnels. Fonctionne également sur les photos.</p>
       <p class="margin1 link-box">

+ 4 - 0
assets/index.html

@@ -53,6 +53,10 @@
 	<a href="index.zh-CN.html">
 	  简体中文
 	</a>
+	/
+	<a href="index.ko.html">
+	  한국어
+	</a>
       </div>
       <p>Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.</p>
       <p class="margin1 link-box">

+ 4 - 0
assets/index.ja.html

@@ -53,6 +53,10 @@
 	<a href="index.zh-CN.html">
 	  简体中文
 	</a>
+	/
+	<a href="index.ko.html">
+	  한국어
+	</a>
       </div>
       <p>深層畳み込みニューラルネットワークによる二次元画像のための超解像システム。 写真にも対応。</p>
       <p class="margin1 link-box">

+ 182 - 0
assets/index.ko.html

@@ -0,0 +1,182 @@
+<!DOCTYPE html> 
+<html lang="ko">
+  <!-- This file was automatically generated by webgen/gen.rb. Do not make changes to this file manually. -->
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <meta charset="utf-8">
+    <link rel="shortcut icon" href="favicon.ico"/>
+    <meta name="viewport" content="initial-scale=1.0,width=device-width">
+    <link href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css" rel="stylesheet" type="text/css">
+    <link href="style.css" rel="stylesheet" type="text/css">
+    <link href="mobile.css" rel="stylesheet" type="text/css" media="screen and (max-width: 768px) and (min-width: 0px)">
+    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
+    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
+    <script type="text/javascript" src="ui.js"></script>
+    <title>waifu2x</title>
+  </head>
+  <body>
+    <div class="all-page">
+      <h1 class="main-title">waifu2x</h1>
+      <div class="choose-lang">
+	<a href="index.html">
+	  English
+	</a>
+	/
+	<a href="index.ja.html">
+	  日本語
+	</a>
+	/
+	<a href="index.ru.html">
+	  Русский
+	</a>
+	/
+	<a href="index.pt.html">
+	  Português
+	</a>
+	/
+	<a href="index.es.html">
+	  Español
+	</a>
+	/
+	<a href="index.fr.html">
+	  Français
+	</a>
+	/
+	<a href="index.de.html">
+	  Deutsch
+	</a>
+	/
+	<a href="index.tr.html">
+	  Türkçe
+	</a>
+	/
+	<a href="index.zh-CN.html">
+	  简体中文
+	</a>
+	/
+	<a href="index.ko.html">
+	  한국어
+	</a>
+      </div>
+      <p>컨볼루젼 신경망(CNN) 시스템을 통한 딥 러닝으로 2차원 이미지의 해상도를 개선합니다. 그림 뿐만 아니라 사진에도 대응합니다.</p>
+      <p class="margin1 link-box">
+	<a href="https://raw.githubusercontent.com/nagadomi/waifu2x/master/images/slide.png" class="blue-link" target="_blank">
+	  실제 데모 보기
+	</a>
+	| 
+	<a href="https://github.com/nagadomi/waifu2x" class="blue-link" target="_blank">
+	  GitHub에서 보기
+	</a>
+      </p>
+      <form action="/api" method="POST" enctype="multipart/form-data" target="_blank">
+	<div class="option-box first">
+	  <div class="option-left">이미지 선택:</div>
+	  <div class="option-right">
+	    <input type="text" id="url" name="url" placeholder="URL 입력">
+	    <div class="option-right-small">
+	      또는 파일 업로드: 
+	      <input type="file" id="file" name="file"></div>
+	  </div>
+	  <div class="option-hint file_limits">
+	    제한: 크기: 5MB, 노이즈 감소: 3000x3000px, 업스케일링: 1500x1500px.
+	  </div>
+	</div>
+	<div class="option-box">
+	  <div class="option-left">
+	    스타일:
+	  </div>
+	  <div class="option-right">
+	    <label><input type="radio" name="style" class="radio" value="art" checked>
+	      <span class="r-text">
+		그림
+	      </span>
+	    </label>
+	    <label><input type="radio" name="style" class="radio" value="photo">
+	      <span class="r-text">
+		사진
+	      </span>
+	    </label>
+	  </div>
+	</div>
+	<div class="option-box">
+	  <div class="option-left">
+	    노이즈 감소:
+	    <div class="option-left-small">
+	      (JPEG 아티팩트 제외)
+	    </div>
+	  </div>
+	  <div class="option-right">
+	    <label><input type="radio" name="noise" class="radio" value="-1">
+	      <span class="r-text">
+		없음
+	      </span>
+	    </label>
+	    <label><input type="radio" name="noise" class="radio" value="0" checked>
+	      <span class="r-text">
+		Low
+	      </span>
+	    </label>
+	    <label><input type="radio" name="noise" class="radio" value="1" checked>
+	      <span class="r-text">
+		중간
+	      </span>
+	    </label>
+	    <label>
+	      <input type="radio" name="noise" class="radio" value="2">
+	      <span class="r-text">
+		높음
+	      </span>
+	    </label>
+	    <label>
+	      <input type="radio" name="noise" class="radio" value="3">
+	      <span class="r-text">
+		최상
+	      </span>
+	    </label>
+	  </div>
+	  <div class="option-hint">
+	    실제로 노이즈가 있는 이미지에만 사용해야 하며, 그렇지 않을 경우 사진의 세세한 부분이 뭉개질 수 있습니다.
+	  </div>
+	</div>
+	<div class="option-box">
+	  <div class="option-left">
+	    업스케일링:
+	    <div class="option-left-small"></div>
+	  </div>
+	  <div class="option-right">
+	    <label><input type="radio" name="scale" class="radio" value="-1" checked>
+	      <span class="r-text">
+		없음
+	      </span>
+	    </label>
+	    <label><input type="radio" name="scale" class="radio" value="1">
+	      <span class="r-text">
+		1.6x
+	      </span>
+	    </label>
+	    <label><input type="radio" name="scale" class="radio" value="2">
+	      <span class="r-text">
+		2x
+	      </span>
+	    </label>
+	  </div>
+	</div>
+	
+	
+	  <input type="submit" class="button" value="변환">
+	
+	<input type="submit" name="download" value="다운로드" class="button">
+	<div class="bottom-hint">
+	  <ul>
+	    
+	      <li>FireFox에서 이미지를 저장하려면 Ctrl+S를 누르세요. 오른쪽 클릭 > "이미지 저장"을 이용하면 정상적으로 동작하지 않습니다.</li>
+	    
+	  </ul>
+	</div>
+      </form>
+    </div>
+    <div class="bottom-info address">
+      <a href="https://github.com/nagadomi/waifu2x" class="gray-link" target="_blank">waifu2x</a>
+    </div>
+  </body>
+</html>

+ 4 - 0
assets/index.pt.html

@@ -53,6 +53,10 @@
 	<a href="index.zh-CN.html">
 	  简体中文
 	</a>
+	/
+	<a href="index.ko.html">
+	  한국어
+	</a>
       </div>
       <p>Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.</p>
       <p class="margin1 link-box">

+ 4 - 0
assets/index.ru.html

@@ -53,6 +53,10 @@
 	<a href="index.zh-CN.html">
 	  简体中文
 	</a>
+	/
+	<a href="index.ko.html">
+	  한국어
+	</a>
       </div>
       <p>Waifu2x позволяет увеличивать в 4 раза рисованные изображения, например аниме или арт, а также устранять шум на изображении (преимущественно артефакты сжатия JPEG). Теперь также поддерживаются фотографии.</p>
       <p class="margin1 link-box">

+ 4 - 0
assets/index.tr.html

@@ -53,6 +53,10 @@
 	<a href="index.zh-CN.html">
 	  简体中文
 	</a>
+	/
+	<a href="index.ko.html">
+	  한국어
+	</a>
       </div>
       <p>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.</p>
       <p class="margin1 link-box">

+ 4 - 0
assets/index.zh-CN.html

@@ -53,6 +53,10 @@
 	<a href="index.zh-CN.html">
 	  简体中文
 	</a>
+	/
+	<a href="index.ko.html">
+	  한국어
+	</a>
       </div>
       <p>本程序使用卷积神经网络对动漫风格的图片进行放大操作(支持照片)。</p>
       <p class="margin1 link-box">

+ 4 - 1
lib/w2nn.lua

@@ -13,7 +13,10 @@ end
 if w2nn then
    return w2nn
 else
-   pcall(load_cunn)
+   local state, ret = pcall(load_cunn)
+   if not state then
+      error("Failed to load CUDA modules. Please check the CUDA Settings.\n---\n" .. ret)
+   end
    pcall(load_cudnn)
    w2nn = {}
 

+ 3 - 0
web.lua

@@ -347,6 +347,7 @@ local index_fr = file.read(path.join(ROOT, "assets", "index.fr.html"))
 local index_de = file.read(path.join(ROOT, "assets", "index.de.html"))
 local index_tr = file.read(path.join(ROOT, "assets", "index.tr.html"))
 local index_zh_cn = file.read(path.join(ROOT, "assets", "index.zh-CN.html"))
+local index_ko = file.read(path.join(ROOT, "assets", "index.ko.html"))
 local index_en = file.read(path.join(ROOT, "assets", "index.html"))
 function FormHandler:get()
    local lang = self.request.headers:get("Accept-Language")
@@ -371,6 +372,8 @@ function FormHandler:get()
 	 self:write(index_tr)
       elseif langs[1] == "zh-CN" or langs[1] == "zh" then
 	 self:write(index_zh_cn)
+      elseif langs[1] == "ko" then
+	 self:write(index_ko)
       else
 	 self:write(index_en)
       end

+ 0 - 0
webgen/gen.rb


+ 3 - 3
webgen/locales/de.yml

@@ -7,19 +7,19 @@ type_url: URL hier eintragen
 choose_file: Oder wählen Sie eine Datei aus
 file_limits: "Beschränkungen: Größe: 5MB, Rauschunterdrückung: 3000x3000px, maximale Hochskalierung: 1500x1500px."
 style: Stil
-artwork: Kunst
+artwork: Illustration
 photo: Foto
 noise_reduction: Rauschunterdrückung
 expect_jpeg: verursacht möglicherweise JPEG Artifakte
 nr_none: Keine
 nr_medium: Mittel
 nr_high: Hoch
-nr_highest: Am Höchsten
+nr_highest: Höchste
 nr_hint: "Sie sollten Rauschunterdrückung nutzen, wenn das Bild an sich viel Bildrauschen aufweist. Ansonsten könnte es den entgegensetzten Effekt haben."
 upscaling: Hochskalierung
 up_none: Keine
 button_convert: Konvertieren
 button_download: Herunterladen
 hints:
-  - "Wenn Sie Firefox benutzen, benutzen Sie bitte SRTG+S um das Bild zu speichern. Herunterladen funktioniert bei Firefox leider nicht."
+  - "Wenn Sie Firefox benutzen, benutzen Sie bitte STRG+S um das Bild zu speichern. Herunterladen funktioniert bei Firefox leider nicht."
   

+ 24 - 0
webgen/locales/ko.yml

@@ -0,0 +1,24 @@
+---
+description: 컨볼루젼 신경망(CNN) 시스템을 통한 딥 러닝으로 2차원 이미지의 해상도를 개선합니다. 그림 뿐만 아니라 사진에도 대응합니다.
+show_demonstration: 실제 데모 보기
+go_to_github: GitHub에서 보기
+image_choosing: 이미지 선택
+type_url: URL 입력
+choose_file: 또는 파일 업로드
+file_limits: "제한: 크기: 5MB, 노이즈 감소: 3000x3000px, 업스케일링: 1500x1500px."
+style: 스타일
+artwork: 그림
+photo: 사진
+noise_reduction: 노이즈 감소
+expect_jpeg: JPEG 아티팩트 제외
+nr_none: 없음
+nr_medium: 중간
+nr_high: 높음
+nr_highest: 최상
+nr_hint: "실제로 노이즈가 있는 이미지에만 사용해야 하며, 그렇지 않을 경우 사진의 세세한 부분이 뭉개질 수 있습니다."
+upscaling: 업스케일링
+up_none: 없음
+button_convert: 변환
+button_download: 다운로드
+hints:
+  - "FireFox에서 이미지를 저장하려면 Ctrl+S를 누르세요. 오른쪽 클릭 > \"이미지 저장\"을 이용하면 정상적으로 동작하지 않습니다."

+ 6 - 2
webgen/templates/index.html.erb

@@ -53,6 +53,10 @@
 	<a href="index.zh-CN.html">
 	  简体中文
 	</a>
+	/
+	<a href="index.ko.html">
+	  한국어
+	</a>
       </div>
       <p><%= t[:description] %></p>
       <p class="margin1 link-box">
@@ -157,6 +161,7 @@
 	    </label>
 	  </div>
 	</div>
+	<% if false # comment out %>
 	<div class="option-box">
 	  <div class="option-left">
 	    <%= t[:tta] %>:
@@ -168,7 +173,6 @@
 		1 pass
 	      </span>
 	    </label>
-	    <!--
 	    <label><input type="radio" name="tta_level" class="radio" value="2" checked>
 	      <span class="r-text">
 		2 pass
@@ -184,7 +188,6 @@
 		8 pass
 	      </span>
 	    </label>
-	    -->
 	    <label><input type="radio" name="tta_level" class="radio" value="0" checked>
 	      <span class="r-text">
 		<%= t[:tta_best_effort] %>
@@ -234,6 +237,7 @@
 	    </div>
 	  </div>
 	</div>
+	<% end %>
 	<% if t[:button_convert] && !t[:button_convert].empty? %>
 	  <input type="submit" class="button" value="<%= t[:button_convert] %>">
 	<% else %>