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 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM 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

25 sources
Not sure about open-source, but a number of friends of mine who work as freelance professional creatives (e.g. ad hoc video advertisements for smaller companies) espouse Topaz Labs’ Video Enhance AI [0] for this sort of work. Anecdotally, seeing the results of their applications of it, it does seem to work astoundingly well— especially for an application that runs fine on hobbyist/enthusiast grade hardware (albeit the render times will likely still be in a multiple of hours for longer videos; personal experience on 3090 / 5950X / 128GB home work machine was roughly 5-8 frames rendered/sec when upscaling 720p footage to 1440p, roughly 12 seconds render time for every second of footage. I imagine the render time would scale with the demands of the selected AI model / output resolution). I am not aware of any singular FOSS project in creativ
Read the rest
e work that performs similarly to Topaz Labs’ product for all input videos (note to reader: if I am wrong, correct me— I only have second-hand anecdotes to go off of from my friends who work with this kind of work in their careers, and precious little first-hand experience from upscaling old family memories to experiment with the software). As far as I am aware, this is because different upscaling models are trained on, and thus effective / mainly used for a specific type of content. The same upscaling model that was trained on interpolated 480p videos with compression artifacts will not produce the same results as one trained on, say, anime videos/manga, e.g. the models used by Waifu2X [1]. Hence, with Topaz Labs’ application, you select the model that was trained on footage that best matches the footage you wish to upscale. All that being said, I do know that some (if not all) of the upscaling models Topaz uses are FOSS. Much of their application is just syntactical sugar upon the models it uses, making it easier for non-SWEs to use. I’m not sure whether or not the models that Topaz distributes have any level of training done by them, in house— logically, I would assume as such, otherwise their product wouldn’t be as performant as it is. [0] https://www.topazlabs.com/video-enhance-ai [1] https://github.com/nagadomi/waifu2x
In Stitch It in Time: GAN-Based Facial Editing of Real Videos
A few times I have looked at the possibility of switching from JPEG to another format for photo web sites and every time I have I've come to the conclusion that you can't really win. There are three benefits that one could get from reducing the file size: 1. Reduced storage cost 2. Reduced bandwidth cost 3. Better user experience In my models, storage cost matters a lot. You can't come out ahead here, however, if you still have to keep JPEG copies of all the images. Benefits in terms of 2 are real. Benefits in terms of 3 are hard to realize. Part of it is that adding any more parts to the system will cause problems for somebody somewhere. For instance, you can decompress a new image format with a Javascript polyfill, but is download+decompress really going to be faster for all users? Another problem is that much of the source mater
Read the rest
ial is already overcompressed JPEG so simply recompressing it with another format doesn't lead to a really improved experience. When I've done my own trials, and when I've looked closely at other people's trials, I don't see a revolutionary improvement. A scenario that I am interested in now is making desktop backgrounds from (often overcompressed) photos I find on the web. In these cases, JPEG artifacts look like hell when images are blown up, particularly when images have the sharp-cornered bokeh that you get when people take pictures with the kit lens. In that case I can accept a slow and expensive process to blow the image up and make a PNG, something like https://www.mathworks.com/help/images/jpeg-image-deblocking-... or https://github.com/nagadomi/waifu2x The other approach I imagine is some kind of maximum entropy approach that minimizes the blocking artifacts.
In Better Portable Graphics
Looking at that project on github[1] I can't help but to think the algorithm need to upsample anime images (like in this project) might be different than the one needed to upsample photos. Anime has the benefit of having a lot of sections of solid colors. Edit: Actually looking at the source further it appears they also have models for photos as part of that project in addition to the model for anime. [1] https://github.com/nagadomi/waifu2x
In Let's Enhance – free online image upscale and enhancement with neural networks
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

Showing the 15 most recent of 25 sources. Enable JavaScript to search and browse every indexed mention.

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.