# :rocket: BasicSR
[English](README.md) **|** [简体中文](README_CN.md)   [GitHub](https://github.com/xinntao/BasicSR) **|** [Gitee码云](https://gitee.com/xinntao/BasicSR)
<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](colab) **|** [Google Drive Link](https://drive.google.com/drive/folders/1G_qcpvkT5ixmw5XoN6MupkOzcK1km625?usp=sharing) <br>
:m: [Model Zoo](docs/ModelZoo.md) :arrow_double_down: Google Drive: [Pretrained Models](https://drive.google.com/drive/folders/15DgDtfaLASQ3iAPJEVHQF49g9msexECG?usp=sharing) **|** [Reproduced Experiments](https://drive.google.com/drive/folders/1XN4WXKJ53KQ0Cu0Yv-uCt8DZWq6uufaP?usp=sharing)
:arrow_double_down: 百度网盘: [预训练模型](https://pan.baidu.com/s/1R6Nc4v3cl79XPAiK0Toe7g) **|** [复现实验](https://pan.baidu.com/s/1UElD6q8sVAgn_cxeBDOlvQ) <br>
:file_folder: [Datasets](docs/DatasetPreparation.md) :arrow_double_down: [Google Drive](https://drive.google.com/drive/folders/1gt5eT293esqY0yr1Anbm36EdnxWW_5oH?usp=sharing) :arrow_double_down: [百度网盘](https://pan.baidu.com/s/1AZDcEAFwwc1OC3KCd7EDnQ) (提取码:basr)<br>
:chart_with_upwards_trend: [Training curves in wandb](https://app.wandb.ai/xintao/basicsr) <br>
:computer: [Commands for training and testing](docs/TrainTest.md) <br>
:zap: [HOWTOs](#zap-howtos)
---
BasicSR (**Basic** **S**uper **R**estoration) 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](https://github.com/xinntao/ESRGAN), [EDVR](https://github.com/xinntao/EDVR), [DNI](https://github.com/xinntao/DNI), [SFTGAN](https://github.com/xinntao/SFTGAN))</sub>
<sub>([HandyView](https://github.com/xinntao/HandyView), [HandyFigure](https://github.com/xinntao/HandyFigure), [HandyCrawler](https://github.com/xinntao/HandyCrawler), [HandyWriting](https://github.com/xinntao/HandyWriting))</sub>
## :sparkles: New Features
- Nov 29, 2020. Add **ESRGAN** and **DFDNet** [colab demo](colab).
- Sep 8, 2020. Add **blind face restoration** inference codes: [DFDNet](https://github.com/csxmli2016/DFDNet).
- Aug 27, 2020. Add **StyleGAN2 training and testing** codes: [StyleGAN2](https://github.com/rosinality/stylegan2-pytorch).
<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 | | | | | |
| :--- | :---: | :---: | :--- | :---: | :---: |
| StyleGAN2 | [Train](docs/HOWTOs.md#How-to-train-StyleGAN2) | [Inference](docs/HOWTOs.md#How-to-inference-StyleGAN2) | | | |
| **Face Restoration** | | | | | |
| DFDNet | - | [Inference](docs/HOWTOs.md#How-to-inference-DFDNet) | | | |
| **Super Resolution** | | | | | |
| ESRGAN | *TODO* | *TODO* | SRGAN | *TODO* | *TODO*|
| EDSR | *TODO* | *TODO* | SRResNet | *TODO* | *TODO*|
| RCAN | *TODO* | *TODO* | | | |
| EDVR | *TODO* | *TODO* | DUF | - | *TODO* |
| BasicVSR | *TODO* | *TODO* | TOF | - | *TODO* |
| **Deblurring** | | | | | |
| DeblurGANv2 | - | *TODO* | | | |
| **Denoise** | | | | | |
| RIDNet | - | *TODO* | CBDNet | - | *TODO*|
## :wrench: Dependencies and Installation
- Python >= 3.7 (Recommend to use [Anaconda](https://www.anaconda.com/download/#linux) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html))
- [PyTorch >= 1.3](https://pytorch.org/)
- NVIDIA GPU + [CUDA](https://developer.nvidia.com/cuda-downloads)
### Pip install
```bash
pip install basicsr
```
- pip installation does not compile cuda extensions.
- If you want to use cuda extensions, set environment variable `BASICSR_JIT=True`. Note that every time you run the model, it will compile the extensions just time.
- Example: StyleGAN2 inference colab.
### Git clone and compile
1. Clone repo
```bash
git clone https://github.com/xinntao/BasicSR.git
```
1. Install dependent packages
```bash
cd BasicSR
pip install -r requirements.txt
```
1. 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 need the cuda extensions: <br>
 [*dcn* for EDVR](basicsr/ops)<br>
 [*upfirdn2d* and *fused_act* for StyleGAN2](basicsr/ops)<br>
please add `--cuda_ext` when installing.<br>
If you use the EDVR and StyleGAN2 model, the above cuda extensions are necessary.
```bash
python setup.py develop --cuda_ext
```
Otherwise, install without compiling cuda extensions
```bash
python setup.py develop
```
You may also want to specify the CUDA paths:
```bash
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](https://docs.microsoft.com/en-us/windows/win32/direct3d12/gpu-cuda-in-wsl) :-) (It is now only available for insider build with Fast ring).
## :hourglass_flowing_sand: TODO List
Please see [project boards](https://github.com/xinntao/BasicSR/projects).
## :turtle: Dataset Preparation
- Please refer to **[DatasetPreparation.md](docs/DatasetPreparation.md)** for more details.
- The descriptions of currently supported datasets (`torch.utils.data.Dataset` classes) are in [Datasets.md](docs/Datasets.md).
## :computer: Train and Test
- **Training and testing commands**: Please see **[TrainTest.md](docs/TrainTest.md)** for the basic usage.
- **Options/Configs**: Please refer to [Config.md](docs/Config.md).
- **Logging**: Please refer to [Logging.md](docs/Logging.md).
## :european_castle: Model Zoo and Baselines
- The descriptions of currently supported models are in [Models.md](docs/Models.md).
- **Pre-trained models and log examples** are available in **[ModelZoo.md](docs/ModelZoo.md)**.
- We also provide **training curves** in [wandb](https://app.wandb.ai/xintao/basicsr):
<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](docs/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](docs/Datasets.md)** | **[Models.md](docs/Models.md)** | **[Config.md](Config.md)** | **[Logging.md](docs/Logging.md)**
![overall_structure](./assets/overall_structure.png)
## :scroll: License and Acknowledgement
This project is released under the Apache 2.0 license.<br>
More details about **license** and **acknowledgement** are in [LICENSE](LICENSE/README.md).
## :earth_asia: Citations
If BasicSR helps your research or work, please consider citing BasicSR.<br>
The following is a BibTeX reference.
没有合适的资源?快使用搜索试试~ 我知道了~
BasicSR:用于超分辨率,去噪,去模糊等的开源图像和视频恢复工具箱。当前,它包括EDSR,RCAN,SRResNet,SRG...
共208个文件
py:99个
yml:45个
md:26个
19 下载量 52 浏览量
2021-05-10
16:31:14
上传
评论 2
收藏 1.24MB ZIP 举报
温馨提示
:rocket: 基本SR | | Google Colab: | :circled_M: :fast_down_button: Google云端硬盘: | :fast_down_button:百度网盘:| :file_folder: :fast_down_button: :fast_down_button:(提取码:basr) :chart_increasing: :laptop: :high_voltage: BasicSR(基本S- UPERřestoration)是基于PyTorch一个开源图像和视频恢复工具箱,如超分辨率,降噪,去模糊,JPEG伪像的去除,等等。 ( , , , ) ( , , , ) :sparkles: 新的功能 2020年11月29日。添加ESRGAN和DFDNet 。 2020年9月8日。添加盲人脸恢复推理代码: 。 2020年8月27日。添加StyleGAN2培训和测试代码: 。 更多的 2020年9月8日。添加盲人脸恢复推理代码: DFDNet 。 ECCV20:通过深度多尺度组件字典进行盲人脸恢
资源详情
资源评论
资源推荐
收起资源包目录
BasicSR:用于超分辨率,去噪,去模糊等的开源图像和视频恢复工具箱。当前,它包括EDSR,RCAN,SRResNet,SRGAN,ESRGAN,EDVR等。还支持StyleGAN2,DFDNet (208个子文件)
setup.cfg 558B
deform_conv_cuda.cpp 28KB
deform_conv_ext.cpp 7KB
fused_bias_act.cpp 1KB
upfirdn2d.cpp 1KB
deform_conv_cuda_kernel.cu 42KB
upfirdn2d_kernel.cu 12KB
fused_bias_act_kernel.cu 3KB
.gitignore 1KB
MANIFEST.in 201B
wandb.jpg 83KB
LICENSE 11KB
LICENSE-NVIDIA 5KB
LICENSE-stylegan2-pytorch 1KB
generate_bicubic_img.m 2KB
generate_LR_Vimeo90K.m 1KB
main_reverse_filter.m 716B
main_bp.m 616B
backprojection.m 608B
DatasetPreparation.md 15KB
DatasetPreparation_CN.md 14KB
Config.md 11KB
Config_CN.md 11KB
ModelZoo.md 8KB
ModelZoo_CN.md 8KB
README.md 8KB
README_CN.md 8KB
TrainTest.md 5KB
TrainTest_CN.md 5KB
DesignConvention.md 4KB
DesignConvention_CN.md 4KB
HOWTOs.md 3KB
HOWTOs_CN.md 3KB
Metrics_CN.md 2KB
Metrics.md 2KB
Logging.md 2KB
Logging_CN.md 2KB
Datasets.md 1KB
Datasets_CN.md 1KB
Models.md 1KB
README.md 1KB
README.md 1KB
Models_CN.md 1KB
README.md 715B
README.md 438B
niqe_pris_params.npz 12KB
baboon.png 511KB
overall_structure.png 74KB
basicsr.png 17KB
stylegan2_arch.py 31KB
convert_models.py 17KB
edvr_arch.py 17KB
losses.py 15KB
deform_conv.py 15KB
matlab_functions.py 13KB
duf_arch.py 13KB
stylegan2_model.py 13KB
video_test_dataset.py 12KB
inception.py 12KB
base_model.py 12KB
data_util.py 12KB
train.py 10KB
reds_dataset.py 10KB
face_util.py 9KB
inference_dfdnet.py 9KB
arch_util.py 8KB
niqe.py 8KB
extract_images_from_tfrecords.py 8KB
dfdnet_arch.py 8KB
sr_model.py 7KB
lmdb_util.py 7KB
video_base_model.py 7KB
tof_arch.py 7KB
ridnet_arch.py 7KB
flow_util.py 6KB
create_lmdb.py 6KB
vgg_arch.py 6KB
file_client.py 6KB
upfirdn2d.py 6KB
logger.py 6KB
download_pretrained_models.py 6KB
dfdnet_util.py 6KB
transforms.py 5KB
img_util.py 5KB
extract_subimages.py 5KB
setup.py 5KB
paired_image_dataset.py 5KB
srgan_model.py 5KB
psnr_ssim.py 5KB
spynet_arch.py 5KB
vimeo90k_dataset.py 5KB
rcan_arch.py 5KB
misc.py 4KB
__init__.py 4KB
lr_scheduler.py 4KB
rrdbnet_arch.py 4KB
convert_stylegan.py 4KB
options.py 3KB
fid.py 3KB
calculate_psnr_ssim.py 3KB
共 208 条
- 1
- 2
- 3
TristanDu
- 粉丝: 15
- 资源: 4681
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 论文(最终)_20240430235101.pdf
- 基于python编写的Keras深度学习框架开发,利用卷积神经网络CNN,快速识别图片并进行分类
- 最全空间计量实证方法(空间杜宾模型和检验以及结果解释文档).txt
- 5uonly.apk
- 蓝桥杯Python组的历年真题
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 前端开发技术实验报告:内含4四实验&实验报告
- Highlight Plus v20.0.1
- 林周瑜-论文.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0