HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
nagadomi
waifu2x
Lua2015–2023
nagadomi / waifu2x

waifu2x

Image Super-Resolution for Anime-Style Art

22Distinct people
25Mentions
0Explicit recommenders
28.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Image Super-Resolution for Anime-Style Art

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 8:59:02 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year25 dated mentions

Observed mentions: 2015-05-18 09:09:43 UTC to 2023-02-16 12:43:37 UTC.

02462015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 4 mentions; 3 submissions, 1 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC431
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC514
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC615
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC303
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
waifu2x Image Super-Resolution for Anime-style art using Deep Convolutional Neural Networks. And it supports photo. The demo application can be found at https://waifu2x.udp.jp/ (Cloud version), https://unlimited.waifu2x.net/ (In-Browser version). 2023/02 PyTorch version nunif waifu2x development has already been moved to the repository above. Summary Click to see the slide show. References waifu2x is inspired by SRCNN [1]. 2D character picture (HatsuneMiku) is licensed under CC BY-NC by piapro [2]. [1] Chao Dong, Chen Change Loy, Kaiming He, Xiaoou Tang, "Image Super-Resolution Using Deep Convolutional Networks", http://arxiv.org/abs/1501.00092 [2] "For Creators", https://piapro.net/intl/en_for_creators.html Public AMI TODO Third Party Software Third-Party If you are a windows user, I recommend you to use waifu2x-caffe(Just download from releases tab), waifu2x-ncnn-vulkan or waifu2x-conver-cpp. Dependencies Hardware NVIDIA GPU Platform Torch7 NVIDIA CUDA LuaRocks packages (excludes torch7's default packages) lua-csnappy md5 uuid csvigo turbo Installation Setting Up the Command Line Tool Environment (on Ubuntu 16.04) Install CUDA See: NVIDIA CUDA Getting Started Guide for Linux Download CUDA sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb sudo apt-get update sudo apt-get install cuda Install Package sudo apt-get install libsnappy-dev sudo apt-get install libgraphicsmagick1-dev sudo apt-get install libssl1.0-dev # for web server Note: waifu2x requires little-cms2 linked graphicsmagick. if you use macOS/homebrew, See #174. Install Torch7 See: Getting started with Torch. For CUDA9.x/CUDA8.x, see #222 For CUDA10.x, see #253 Getting waifu2x git clone --depth 1 https://github.com/nagadomi/waifu2x.git and install lua modules. cd waifu2x ./install_lua_modules.sh Validation Testing the waifu2x command line tool. th waifu2x.lua Web Application th web.lua View at: http://localhost:8812/ Command line tools Notes: If you have cuDNN library, than you can use cuDNN with -force_cudnn 1 option. cuDNN is too much faster than default kernel. If you got GPU out of memory error, you can avoid it with -crop_size option (e.g. -crop_size 128). Noise Reduction th waifu2x.lua -m noise -noise_level 1 -i input_image.png -o output_image.png th waifu2x.lua -m noise -noise_level 0 -i input_image.png -o output_image.png th waifu2x.lua -m noise -noise_level 2 -i input_image.png -o output_image.png th waifu2x.lua -m noise -noise_level 3 -i input_image.png -o output_image.png 2x Upscaling th waifu2x.lua -m scale -i input_image.png -o output_image.png Noise Reduction + 2x Upscaling th waifu2x.lua -m noise_scale -noise_level 1 -i input_image.png -o output_image.png th waifu2x.lua -m noise_scale -noise_level 0 -i input_image.png -o output_image.png th waifu2x.lua -m noise_scale -noise_level 2 -i input_image.png -o output_image.png th waifu2x.lua -m noise_scale -noise_level 3 -i input_image.png -o output_image.png Batch conversion find /path/to/imagedir -name "*.png" -o -name "*.jpg" > image_list.txt th waifu2x.lua -m scale -l ./image_list.txt -o /path/to/outputdir/prefix_%d.png The output format supports %s and %d(e.g. %06d). %s will be replaced the basename of the source filename. %d will be replaced a sequence number. For example, when input filename is piyo.png, %s_%03d.png will be replaced piyo_001.png. See also th waifu2x.lua -h. Using photo model Please add -model_dir models/photo to command line option, if you want to use photo model. For example, th waifu2x.lua -model_dir models/photo -m scale -i input_image.png -o output_image.png Video Encoding * avconv is alias of ffmpeg on Ubuntu 14.04. Extracting images and audio from a video. (range: 00:09:00 ~ 00:12:00) mkdir frames avconv -i data/raw.avi -ss 00:09:00 -t 00:03:00 -r 24 -f image2 frames/%06d.png avconv -i data/raw.avi -ss 00:09:00 -t 00:03:00 audio.mp3 Generating a image list. find ./frames -name "*.png" |sort > data/frame.txt waifu2x (for example, noise reduction) mkdir new_frames th waifu2x.lua -m noise -noise_level 1 -resume 1 -l data/frame.txt -o new_frames/%d.png Generating a video from waifu2xed images and audio. 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 Note1: If you have cuDNN library, you can use cudnn kernel with -backend cudnn option. And, you can convert trained cudnn model to cunn model with tools/rebuild.lua. Note2: The command that was used to train for waifu2x's pretrained models is available at appendix/train_upconv_7_art.sh, appendix/train_upconv_7_photo.sh. Maybe it is helpful. Data Preparation Genrating a file list. find /path/to/image/dir -name "*.png" > data/image_list.txt You should use noise free images. In my case, waifu2x is trained with 6000 high-resolution-noise-free-PNG images. Converting training data. th convert_data.lua Train a Noise Reduction(level1) model mkdir models/my_model th train.lua -model_dir models/my_model -method noise -noise_level 1 -test images/miku_noisy.png # usage th waifu2x.lua -model_dir models/my_model -m noise -noise_level 1 -i images/miku_noisy.png -o output.png You can check the performance of model with models/my_model/noise1_best.png. Train a Noise Reduction(level2) model th train.lua -model_dir models/my_model -method noise -noise_level 2 -test images/miku_noisy.png # usage th waifu2x.lua -model_dir models/my_model -m noise -noise_level 2 -i images/miku_noisy.png -o output.png You can check the performance of model with models/my_model/noise2_best.png. Train a 2x UpScaling model th train.lua -model upconv_7 -model_dir models/my_model -method scale -scale 2 -test images/miku_small.png # usage th waifu2x.lua -model_dir models/my_model -m scale -scale 2 -i images/miku_small.png -o output.png You can check the performance of model with models/my_model/scale2.0x_best.png. Train a 2x and noise reduction fusion model th train.lua -model upconv_7 -model_dir models/my_model -method noise_scale -
Read the full README on GitHub

What Hacker News says

6 sources
It's really cool to see a writeup for this on real-life images. Similar work at Pinterest http://engineering.flipboard.com/2015/05/scaling-convnets/, for Anime scaling https://github.com/nagadomi/waifu2x and for sprite scaling (can't find the reference I'm thinking of). This tech has been around for several years, and some variation was presented in concert with the Boston Marathon investigation. https://arstechnica.com/information-technology/2013/05/hallu... (Not clear if this was used as part of the investigation, or if it could be used for future investigations)
In Pixel Recursive Super Resolution
Read the rest
In With Google's RAISR, images can be up to 75% smaller without losing detail

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.