All Projects → tsurumeso → waifu2x-chainer

tsurumeso / waifu2x-chainer

Licence: MIT License
Chainer implementation of waifu2x

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to waifu2x-chainer

Einops
Deep learning operations reinvented (for pytorch, tensorflow, jax and others)
Stars: ✭ 4,022 (+2835.77%)
Mutual labels:  chainer, cupy
Chainer
A flexible framework of neural networks for deep learning
Stars: ✭ 5,656 (+4028.47%)
Mutual labels:  chainer, cupy
Chainercv
ChainerCV: a Library for Deep Learning in Computer Vision
Stars: ✭ 1,463 (+967.88%)
Mutual labels:  chainer, cupy
Test Tube
Python library to easily log experiments and parallelize hyperparameter search for neural networks
Stars: ✭ 663 (+383.94%)
Mutual labels:  caffe, chainer
Deepo
Setup and customize deep learning environment in seconds.
Stars: ✭ 6,145 (+4385.4%)
Mutual labels:  caffe, chainer
Onnx Chainer
Add-on package for ONNX format support in Chainer
Stars: ✭ 83 (-39.42%)
Mutual labels:  caffe, chainer
Machine Learning Curriculum
💻 Make machines learn so that you don't have to struggle to program them; The ultimate list
Stars: ✭ 761 (+455.47%)
Mutual labels:  caffe, chainer
deep-learning-platforms
deep-learning platforms,framework,data(深度学习平台、框架、资料)
Stars: ✭ 17 (-87.59%)
Mutual labels:  caffe, chainer
caffe-yolo-9000
caffe-yolo-9000
Stars: ✭ 49 (-64.23%)
Mutual labels:  caffe
caffe-demo
Collection of deep learning demos based on neworks from the Caffe Zoo
Stars: ✭ 15 (-89.05%)
Mutual labels:  caffe
SSD Tracker
Counting people, dog and bicycle using SSD detection and tracking.
Stars: ✭ 17 (-87.59%)
Mutual labels:  caffe
chainer-wasserstein-gan
Chainer implementation of the Wesserstein GAN
Stars: ✭ 20 (-85.4%)
Mutual labels:  chainer
kernelized correlation filters gpu
Real-time visual object tracking using correlations filters and deep learning
Stars: ✭ 27 (-80.29%)
Mutual labels:  caffe
Faster rcnn Cplusplus vs2013
faster-rcnn_VS2013with C++
Stars: ✭ 77 (-43.8%)
Mutual labels:  caffe
autodial
AutoDIAL Caffe Implementation
Stars: ✭ 28 (-79.56%)
Mutual labels:  caffe
vqa-soft
Accompanying code for "A Simple Loss Function for Improving the Convergence and Accuracy of Visual Question Answering Models" CVPR 2017 VQA workshop paper.
Stars: ✭ 14 (-89.78%)
Mutual labels:  caffe
TensorRT-LPR
车牌识别,基于HyperLPR实现,修改模型调用方法,使用caffe+tensorRT实现GPU加速,修改了车牌检测模型
Stars: ✭ 14 (-89.78%)
Mutual labels:  caffe
revisiting-sepconv
an implementation of Revisiting Adaptive Convolutions for Video Frame Interpolation using PyTorch
Stars: ✭ 43 (-68.61%)
Mutual labels:  cupy
Similarity-Adaptive-Deep-Hashing
Unsupervised Deep Hashing with Similarity-Adaptive and Discrete Optimization (TPAMI2018)
Stars: ✭ 18 (-86.86%)
Mutual labels:  caffe
Face-Attributes-MultiTask-Classification
Use Cafffe to do Face Attributes MultiTask Classification based on CelebA data sets
Stars: ✭ 32 (-76.64%)
Mutual labels:  caffe

waifu2x-chainer

This is a Chainer implementation of waifu2x [1]. Note that the training procedure of waifu2x-chainer may be slightly different from original waifu2x.

Summary

  • 2D character picture (Kagamine Rin) is licensed under CC BY-NC by piapro [2].

Requirements

  • Chainer
  • CuPy (for GPU support)
  • Matplotlib (for benchmark)
  • ONNX-Chainer (for ONNX model export)
  • Pillow
  • Wand (for training)

Installation

Install Python packages

pip install chainer
pip install pillow

Enable GPU support

Install CuPy precompiled binary package which includes the latest version of cuDNN library.
See: CuPy Installation Guide

Getting waifu2x-chainer

git clone https://github.com/tsurumeso/waifu2x-chainer.git

Testing

cd waifu2x-chainer
python waifu2x.py

Usage

Omitting --gpu (-g) option run on CPU.

Noise reduction

python waifu2x.py --method noise --noise_level 1 --input path/to/image/or/directory --arch VGG7 --gpu 0

python waifu2x.py -m noise -n 0 -i path/to/image/or/directory -a 0 -g 0
python waifu2x.py -m noise -n 2 -i path/to/image/or/directory -a 0 -g 0
python waifu2x.py -m noise -n 3 -i path/to/image/or/directory -a 0 -g 0

2x upscaling

python waifu2x.py --method scale --input path/to/image/or/directory --arch VGG7 --gpu 0

python waifu2x.py -m scale -i path/to/image/or/directory -a 0 -g 0

Noise reduction + 2x upscaling

python waifu2x.py --method noise_scale --noise_level 1 --input path/to/image/or/directory --arch VGG7 --gpu 0

python waifu2x.py -m noise_scale -n 0 -i path/to/image/or/directory -a 0 -g 0
python waifu2x.py -m noise_scale -n 2 -i path/to/image/or/directory -a 0 -g 0
python waifu2x.py -m noise_scale -n 3 -i path/to/image/or/directory -a 0 -g 0

Train your own model

Install Wand

sudo apt install libmagickwand-dev
pip install wand

For more details, please refer template training script at appendix/linux or appendix/windows . In my case, 5000 JPEG images are used for pretraining and 1000 noise-free-PNG images for finetuning.

Convert Chainer models to ONNX and Caffe models

Install ONNX-Chainer

pip install onnx-chainer

Run script

cd appendix
python convert_models.py

Results are saved at the same directory of the original models (e.g. models/vgg7/anime_style_scale_rgb.npz to models/vgg7/anime_style_scale_rgb.caffemodel).
Note: Since chainer.CaffeFunction does not currently support Slice layer, some models are not converted to caffemodel.

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].