Home

Awesome

EDVR has been merged into BasicSR. This GitHub repo is a mirror of BasicSR. Recommend to use BasicSR, and open issues, pull requests, etc in BasicSR.

Note that this version is not compatible with previous versions. If you want to use previous ones, please refer to the old_version branch.


:rocket: BasicSR

English | 简体中文GitHub | Gitee码云

<a href="https://drive.google.com/drive/folders/1G_qcpvkT5ixmw5XoN6MupkOzcK1km625?usp=sharing"><img src="https://colab.research.google.com/assets/colab-badge.svg" height="18" alt="google colab logo"></a> Google Colab: GitHub Link | Google Drive Link <br> :m: Model Zoo :arrow_double_down: Google Drive: Pretrained Models | Reproduced Experiments :arrow_double_down: 百度网盘: 预训练模型 | 复现实验 <br> :file_folder: Datasets :arrow_double_down: Google Drive :arrow_double_down: 百度网盘 (提取码:basr)<br> :chart_with_upwards_trend: Training curves in wandb <br> :computer: Commands for training and testing <br> :zap: HOWTOs


BasicSR (Basic Super Restoration) is an open source image and video restoration toolbox based on PyTorch, such as super-resolution, denoise, deblurring, JPEG artifacts removal, etc.<br> <sub>(ESRGAN, EDVR, DNI, SFTGAN)</sub> <sub>(HandyView, HandyFigure, HandyCrawler, HandyWriting)</sub>

:sparkles: New Features

<details> <summary>More</summary> <ul> <li> Sep 8, 2020. Add <b>blind face restoration</b> inference codes: <b>DFDNet</b>. <br> <i><font color="#DCDCDC">ECCV20: Blind Face Restoration via Deep Multi-scale Component Dictionaries</font></i> <br> <i><font color="#DCDCDC">Xiaoming Li, Chaofeng Chen, Shangchen Zhou, Xianhui Lin, Wangmeng Zuo and Lei Zhang</font></i> </li> <li> Aug 27, 2020. Add <b>StyleGAN2</b> training and testing codes. <br> <i><font color="#DCDCDC">CVPR20: Analyzing and Improving the Image Quality of StyleGAN</font></i> <br> <i><font color="#DCDCDC">Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen and Timo Aila</font></i> </li> <li>Aug 19, 2020. A <b>brand-new</b> BasicSR v1.0.0 online.</li> </ul> </details>

:zap: HOWTOs

We provides simple pipelines to train/test/inference models for quick start. These pipelines/commands cannot cover all the cases and more details are in the following sections.

GAN
StyleGAN2TrainInference
Face Restoration
DFDNet-Inference
Super Resolution
ESRGANTODOTODOSRGANTODOTODO
EDSRTODOTODOSRResNetTODOTODO
RCANTODOTODO
EDVRTODOTODODUF-TODO
BasicVSRTODOTODOTOF-TODO
Deblurring
DeblurGANv2-TODO
Denoise
RIDNet-TODOCBDNet-TODO

:wrench: Dependencies and Installation

  1. Clone repo

    git clone https://github.com/xinntao/BasicSR.git
    
  2. Install dependent packages

    cd BasicSR
    pip install -r requirements.txt
    
  3. Install BasicSR

    Please run the following commands in the BasicSR root path to install BasicSR:<br> (Make sure that your GCC version: gcc >= 5) <br> If you do not need the cuda extensions: <br>dcn for EDVR<br>upfirdn2d and fused_act for StyleGAN2<br> please add --no_cuda_ext when installing

    python setup.py develop --no_cuda_ext
    

    If you use the EDVR and StyleGAN2 model, the above cuda extensions are necessary.

    python setup.py develop
    

    You may also want to specify the CUDA paths:

    CUDA_HOME=/usr/local/cuda \
    CUDNN_INCLUDE_DIR=/usr/local/cuda \
    CUDNN_LIB_DIR=/usr/local/cuda \
    python setup.py develop
    

Note that BasicSR is only tested in Ubuntu, and may be not suitable for Windows. You may try Windows WSL with CUDA supports :-) (It is now only available for insider build with Fast ring).

:hourglass_flowing_sand: TODO List

Please see project boards.

:turtle: Dataset Preparation

:computer: Train and Test

:european_castle: Model Zoo and Baselines

<p align="center"> <a href="https://app.wandb.ai/xintao/basicsr" target="_blank"> <img src="./assets/wandb.jpg" height="280"> </a></p>

:memo: Codebase Designs and Conventions

Please see DesignConvention.md for the designs and conventions of the BasicSR codebase.<br> The figure below shows the overall framework. More descriptions for each component: <br> Datasets.md | Models.md | Config.md | Logging.md

overall_structure

:scroll: License and Acknowledgement

This project is released under the Apache 2.0 license.<br> More details about license and acknowledgement are in LICENSE.

:earth_asia: Citations

If BasicSR helps your research or work, please consider citing BasicSR.<br> The following is a BibTeX reference. The BibTeX entry requires the url LaTeX package.

@misc{wang2020basicsr,
  author =       {Xintao Wang and Ke Yu and Kelvin C.K. Chan and
                  Chao Dong and Chen Change Loy},
  title =        {BasicSR},
  howpublished = {\url{https://github.com/xinntao/BasicSR}},
  year =         {2020}
}

Xintao Wang, Ke Yu, Kelvin C.K. Chan, Chao Dong and Chen Change Loy. BasicSR. https://github.com/xinntao/BasicSR, 2020.

:e-mail: Contact

If you have any question, please email xintao.wang@outlook.com.