ã¯ããã«
Dockerã§waifu2x(ç»åã®æ¡å¤§ã»é«è§£å度å)ãè¡ãã¾ãã WindowsãWebãµã¼ãã¹ä¸ã§ãã§ãã¾ãããDockerã§ã®æ¹æ³ãè¨è¼ãã¾ãã
Dockerã®ã¤ã¡ã¼ã¸ããã¦ã³ãã¼ãããã
ã¿ã¼ããã«ãéãã以ä¸ã®ã³ãã³ããå ¥åãã¾ãã
docker pull redpeacock78/waifu2x
ä½æ¥ç¨ã®ãã£ã¬ã¯ããªãä½æãã移åãã¾ãã
mkdir ~/waifu2x_work cd ~/waifu2x_work
å¤æåã®ç»åãä½æ¥ç¨ãã£ã¬ã¯ããªã¸ã³ãã¼ãã¾ãã
ããã§ã¯ 001.png,002.pngã¨ãã¾ãã
Dockerã§ã³ã³ããã®ä½æãå®è¡ãããã
ã¿ã¼ããã«ãéãã以ä¸ã®ã³ãã³ããå ¥åãã¾ãã
1. ãã¡ã¤ã«ï¼ã¤ã®ã¿å¤æãå¤æå¾ã®ãã¡ã¤ã«åãæå®ããå ´å
docker run --rm -it -v $(pwd):/work redpeacock78/waifu2x -p 0 -m noise-scale --scale-ratio 2 --noise-level 2 -i 001.png -o 001_out.png
001_out.pngãã¡ã¤ã«ãä½æããã¾ãã
2. ãã¡ã¤ã«ï¼ã¤ã®ã¿å¤æãå¤æå¾ã®ãã¡ã¤ã«åãæå®ããªãå ´å
docker run --rm -it -v $(pwd):/work redpeacock78/waifu2x -p 0 -m noise-scale --scale-ratio 2 --noise-level 2 -i 001.png
001_[L2][x2.00].pngãã¡ã¤ã«ãä½æããã¾ãã
3. è¤æ°ãã¡ã¤ã«ãä¸æ¬ãã¦å¤æããå ´å
ã·ã§ã«ã¹ã¯ãªãããä½æãã¾ãã ãã®ã·ã§ã«ã¹ã¯ãªããã®åæã¨ãã¦ãåããã©ã«ãã«ããå ¨ã¦ã®.pngãã¡ã¤ã«ã対象ã¨ãã¦ãã¾ãã
以ä¸ã®ã·ã§ã«ã¹ã¯ãªãããä½æãã~/waifu2x_workãã©ã«ãã«æ ¼ç´ãã¾ãã
#!/bin/bash for filename in $(ls *.png) do docker run --rm -it -v $(pwd):/work redpeacock78/waifu2x -p 0 -m noise-scale --scale-ratio 2 --noise-level 2 -i $filename done
waifu2x_folder.sh ã®æ¨©éãå¤æ´ï¼å®è¡å¯è½ï¼ã«ãã¾ãã
chmod +x waifu2x_folder.sh
ã·ã§ã«ã¹ã¯ãªãããå®è¡ãã¾ãã
./waifu2x_folder.sh
001[L2][x2.00].pngã002[L2][x2.00].pngãä½æããã¾ãã
â»å¤æåã®ãã¡ã¤ã«åã®é·ãã«æ³¨æï¼ãã¡ã¤ã«åãé·ãã¨ãå¤æã«å¤±æãã¾ããï¼
ãã¡ã¤ã«åãé·ãå ´åãä¸æ¬ãã¦ãã¡ã¤ã«åãå¤æ´ãããã¨ãã§ãã¾ãã å¤æ´ããããã¡ã¤ã«ãå ¨ã¦é¸æãã¦ãããå³ã¯ãªãã¯âãååã®å¤æ´ï¼½ãã¯ãªãã¯ãã¾ãã
å¤æ´å¾ã®ãã¡ã¤ã«åãå ¥ãã¦ãå³å´ã®ãï¼è¿½å ããã¯ãªãã¯ããé£çªã®å½¢å¼ãé¸ã¶ãã¨ã§ããã¡ã¤ã«ãã¾ã¨ãã¦é£çªãä»ãã¦å¤æ´ãã§ãã¾ãã