XPixelGroup/BasicSR
Open Source Image and Video Restoration Toolbox for Super-resolution, Denoise, Deblurring, etc. Currently, it includes EDSR, RCAN, SRResNet, SRGAN, ESRGAN, EDVR, BasicVSR, SwinIR, ECBSR, etc. Also support StyleGAN2, DFDNet.
🚀 See you again 😸 ✨ **Highlights** ✅ [Add torch to setup_requires & dynamic import to prevent import error](https://github.com/XPixelGroup/BasicSR/commit/3974c3fb3701ff2295d5cecaf652c50f563c4b12) ✅ [fix some codespell](https://github.com/XPixelGroup/BasicSR/commit/44672b0c6a607fc2a5aaeea70b9f565d1f3f095b) ✅ [Add plot](https://github.com/XPixelGroup/BasicSR/commit/b4f48db7d3207d7732d03446010ab2f0d1fdec25), you can find the scripts of drawing the paper figure. **Welcome to contribute your figure scripts**. Here is the [example](https://github.com/XPixelGroup/BasicSR/tree/master/scripts/plot) <p align="center"> <img src="https://github.com/XPixelGroup/BasicSR/blob/master/assets/plot/model_complexity_cmp_bsrn.png" height=200> </p> <p align="center"> <img src="https://raw.githubusercontent.com/XPixelGroup/BasicSR/master/assets/basicsr_xpixel_logo.png" height=150> </p>
🚀 See you again 😸 📢📢📢 ✅ Add Chinses docs: https://github.com/XPixelGroup/BasicSR-docs. Download the PDF here: https://github.com/XPixelGroup/BasicSR-docs/releases ✅ BasicSR 的中文解读文档来啦: https://github.com/XPixelGroup/BasicSR-docs. 你可以从以下链接下载完整 PDF: https://github.com/XPixelGroup/BasicSR-docs/releases ✨ **Highlights** ✅ [fix bgr2ycbcr bug in color conversion](https://github.com/XPixelGroup/BasicSR/commit/85c1c0191eaebcc4819938fc9cddd1aca8609622) <p align="center"> <img src="https://raw.githubusercontent.com/XPixelGroup/BasicSR/master/assets/basicsr_xpixel_logo.png" height=150> </p>
🚀 Long time no see ☄️ This is the first time that BasicSR is released under the XPixelGroup :-) ✨ **Highlights** ✅ [Add training codes of BasicVSR++](https://github.com/XPixelGroup/BasicSR/commit/ab55f479f26ca28cd03426ef492f83fec4f4c68c) ✅ [Add inference code of BasicVSR++](https://github.com/XPixelGroup/BasicSR/commit/786c5fd4d090b16d447d22bb5fc9e7fe7971d834) ✅ [add psnr ssim pytorch version](https://github.com/XPixelGroup/BasicSR/commit/01a75fb9fcdc686b3af9f6602d392e6c6fae0b32) ✅ [add LDL loss](https://github.com/XPixelGroup/BasicSR/commit/542507534c3e959f7598e6f74687738a930b9b7a) ✅ Add online document: [basicsr.readthedocs.io/en/latest/](https://basicsr.readthedocs.io/en/latest/) ✅ [update loss registry](https://github.com/XPixelGroup/BasicSR/commit/fc36502cc406f3b23b97c3910483d95ce232625a) ✅ [add realesrgan to basicsr](https://github.com/XPixelGroup/BasicSR/commit/dd7d188b4adaf9b2b6db303e01b4de7c28d2d737) ✅ [support registry with basicsr suffix](https://github.com/XPixelGroup/BasicSR/commit/2f0ad00923db3370a9609cb722531da59925c7b5) 📢📢📢 我们正在准备 BasicSR 的📕[中文解读文档](https://github.com/XPixelGroup/BasicSR-docs)。将在近期 release :-) <p align="center"> <img src="https://raw.githubusercontent.com/XPixelGroup/BasicSR/master/assets/basicsr_xpixel_logo.png" height=150> </p>
Have a nice day 😸 and happy everyday 😃 I am happy to add a simple logo to BasicSR 😋 (designed by myself! and inspired by the [4K logo](https://www.google.com/search?q=4k+logo)) So I release a new version~ You can see it on [ReadMe](https://github.com/xinntao/BasicSR) (I know that there are still a lot of things to improve in BasicSR =-= I will put more time on it~ ) <p align="center"> <img src="https://raw.githubusercontent.com/xinntao/BasicSR/master/assets/basicsr_logo.png" height=150> </p>
📋 Changes
- fix bug in AvgTimer: https://github.com/xinntao/BasicSR/commit/c05b52798fe29dbb45c839780c10e8a9cd2eebe5
- add pytest unittest framework
🚀 See you again ☄️ ✨✨✨ Highlight ✅ [New method] Add ECBSR training and testing codes. (#478) > ACMMM21: Edge-oriented Convolution Block for Real-time Super Resolution on Mobile Devices <be> > Xindong Zhang, Hui Zeng, Lei Zhang ✅ [Features] Support **multiple validation** datasets and also print the **best metric value** results. > Example: <p align="center"> <img src="https://user-images.githubusercontent.com/17445847/136012453-43a4a571-131c-4a67-a3e7-66e13f58718b.png" height="280"></p> ✅ [Bug fix] `metric_data` is not initialized when no metric is used during validation. See [Here](https://github.com/xinntao/BasicSR/commit/2a590e92c01be5fe007ff0ac10a1b968e401839d)
🚀 Long time no see 😹 ✨✨✨ **Highlight** ✅ [Features] Support multiple inputs for **metrics during validation** (#467) ✅ [Bug fix] Fix bug in option: `force_yml` sometimes cannot be correctly modified ✅ [Bug fix] Fix bug in redsrecurrentdataset: support interval argument (#463) ✅ [Enhancement] add codespell hook, fix typos discovered by codespell 📢 📢 📢 建立了 BasicSR交流讨论的 QQ群和微信群: 技术交流QQ群:**320960100** 入群答案:**互帮互助共同进步** :loudspeaker: [入群指南 (腾讯文档)](https://docs.qq.com/doc/DYXBSUmxOT0xBZ05u) :compass: 入群二维码 <p align="center"> <img src="https://user-images.githubusercontent.com/17445847/134879983-6f2d663b-16e7-49f2-97e1-7c53c8a5f71a.jpg" height="300">     <img src="https://user-images.githubusercontent.com/17445847/134880057-f08e3d3b-2ab1-4ae8-966d-5753fe1f402a.png" height="300"> </p>
🚀 Have a nice day 🐶 This is a _minor_ release~ ✨ Highlight ✅ [Enhancement] Support the official **torchvision.ops.deform_conv2d** for torchvision>=0.9.0 ✅ [Enhancement] Add **`force_yml`** option. You can force to change the option yml options in the command line. Examples: `python basicsr/train.py -opt options/train/SRResNet_SRGAN/train_MSRResNet_x4.yml -train:ema_decay=0.999` ✅ [Enhancement] **Copy the option yml** file to the experiment folder ✅ [Enhancement] Add AvgTimer. The data time and iteration time in the logging are averaged in 200 iterations. ✅ [Enhancement] Add `persistent_workers` option to dataloader ✅ [Enhancement] Add vscode settings. ✅ [Enhancement] Improve some formats
📋 Changes
- ✅ Add SwinIR training and testing codes
- [SwinIR](https://github.com/JingyunLiang/SwinIR) by [Jingyun Liang](https://github.com/JingyunLiang) 👍 Thanks for their great work~
- More details are in [HOWTOs.md](https://github.com/xinntao/BasicSR/blob/master/docs/HOWTOs.md#how-to-train-swinir-sr)
- ✅ All models in BasicSR support `EMA (Exponential Moving Average)`.
🚀 A lot of things have been improved since the last release note. ✨ Highlight 1. We add the official training and testing codes of [BasicVSR](https://arxiv.org/abs/2012.02181) - a video SR method 2. We improve NIQE metric. Now, the python version of NIQE could generate almost the same results as MATLAB. 3. Add [HiFaceGAN](https://github.com/Lotayou/Face-Renovation) codes by [Lotayou](https://lotayou.github.io/). 4. Add more [degradation](https://github.com/xinntao/BasicSR/blob/master/basicsr/data/degradations.py) 5. Add [BasicSR-Examples](https://github.com/xinntao/BasicSR-examples), which provides guidance and templates of using BasicSR as a python package. 6. Fixed many bugs: such as no logging in pt18, resume bugs, etc ...... We will spend more time on solving issues and reviewing the pull request. Welcome to your contributions 😄 🚀🚀🚀
🚀 ✨ Highlight A minor version for quick bug fixed. #396 #397
📋 Changes
- Add registry mechanism
- Support pip install
- Support JIT CUDA ops
- Can be easily used as an external package to develop your own project (example project is coming soon)
- Update format: change max line length to 120
- Add degradations (data utils)
📋 Changes
- Add ESRGAN and DFDNet [colab](https://github.com/xinntao/BasicSR/tree/master/colab)
- Add FID and LPIPS metrics
- Add matlab imresize bicubic (#317)
- README add datasets download links (#318)
- PSNR and SSIM calculation on uint8 type
- Fix metrics bug in video_base_model.py (#314)
- Reorganize code structure and remove unnessary packages
- `tensor2img` support gray images
- + 1 more
📋 Changes
- Add Baidu Drive (百度网盘) download links
- Add funny emoji :relaxed:
- bgr2rgb type conversion in stylegan2 model
- Supporting training w/o validation
- `download_pretrained_models.py` script supports downloading all the models
- Refactor `define_network` functions
📋 Changes
- Add [DFDNet](https://github.com/csxmli2016/DFDNet) inference codes (ECCV20: Blind Face Restoration via Deep Multi-scale Component Dictionaries)
- Add more official StyleGAN2 pretrained models: [Model Zoo](https://drive.google.com/drive/folders/15DgDtfaLASQ3iAPJEVHQF49g9msexECG?usp=sharing)
- Add *New Feature* section in [README](https://github.com/xinntao/BasicSR).
- PyTorch 1.6 uses a new serialization for torch.save. The saved model cannot be loaded by the previous PyTorch version. We updated the `publish_models.py` with `_use_new_zipfile_serialization=False`. [More details](https://pytorch.org/docs/stable/generated/torch.save.html?highlight=save#torch.save).
📋 Changes
- Add StyleGAN2 training and testing codes. Pretrained models are [here](https://drive.google.com/drive/folders/15DgDtfaLASQ3iAPJEVHQF49g9msexECG?usp=sharing).
- Fix bug: cuda prefetcher return none twice.
- Add HOWTOs for quick starts.
📋 Changes
- We use [*Dynamic Instantiation*](https://github.com/xinntao/BasicSR/blob/master/docs/DesignConvention.md#Dynamic-Instantiation) for creating datasets, architectures, and models. So it is easier and more friendly to develop your own algorithms.
- We provide [richer documents](https://github.com/xinntao/BasicSR/tree/master/docs). At the same time, we also provide a Chinese version (同时也提供了中文版本的文档说明).
- We provide more [pre-trained models, training examples](https://github.com/xinntao/BasicSR/blob/master/docs/ModelZoo.md). We also upload the training process and curves to [wandb](https://app.wandb.ai/xintao/basicsr).
- Currently, it supports:
- Training: EDSR, EDVR, ESRGAN, SRResNet, SRGAN
- Testing: DUF, EDSR, EDVR, ESRGAN, RCAN, SRResNt, SRGAN, and TOF.
- We also mirror this codebase to *[Gitee码云](https://gitee.com/xinntao/BasicSR)* for easy access of Chinese users.
