Repository: XPixelGroup/BasicSR Branch: master Commit: 8d56e3a045f9 Files: 293 Total size: 3.9 MB Directory structure: gitextract_6e6skl2h/ ├── .github/ │ └── workflows/ │ ├── publish-pip.yml │ ├── pylint.yml │ └── release.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .readthedocs.yaml ├── .vscode/ │ └── settings.json ├── CITATION.cff ├── LICENSE/ │ ├── LICENSE-NVIDIA │ ├── LICENSE-stylegan2-pytorch │ ├── LICENSE_SwinIR │ ├── LICENSE_pytorch-image-models │ └── README.md ├── LICENSE.txt ├── MANIFEST.in ├── README.md ├── README_CN.md ├── VERSION ├── basicsr/ │ ├── __init__.py │ ├── archs/ │ │ ├── __init__.py │ │ ├── arch_util.py │ │ ├── basicvsr_arch.py │ │ ├── basicvsrpp_arch.py │ │ ├── dfdnet_arch.py │ │ ├── dfdnet_util.py │ │ ├── discriminator_arch.py │ │ ├── duf_arch.py │ │ ├── ecbsr_arch.py │ │ ├── edsr_arch.py │ │ ├── edvr_arch.py │ │ ├── hifacegan_arch.py │ │ ├── hifacegan_util.py │ │ ├── inception.py │ │ ├── rcan_arch.py │ │ ├── ridnet_arch.py │ │ ├── rrdbnet_arch.py │ │ ├── spynet_arch.py │ │ ├── srresnet_arch.py │ │ ├── srvgg_arch.py │ │ ├── stylegan2_arch.py │ │ ├── stylegan2_bilinear_arch.py │ │ ├── swinir_arch.py │ │ ├── tof_arch.py │ │ └── vgg_arch.py │ ├── data/ │ │ ├── __init__.py │ │ ├── data_sampler.py │ │ ├── data_util.py │ │ ├── degradations.py │ │ ├── ffhq_dataset.py │ │ ├── meta_info/ │ │ │ ├── meta_info_DIV2K800sub_GT.txt │ │ │ ├── meta_info_REDS4_test_GT.txt │ │ │ ├── meta_info_REDS_GT.txt │ │ │ ├── meta_info_REDSofficial4_test_GT.txt │ │ │ ├── meta_info_REDSval_official_test_GT.txt │ │ │ ├── meta_info_Vimeo90K_test_GT.txt │ │ │ ├── meta_info_Vimeo90K_test_fast_GT.txt │ │ │ ├── meta_info_Vimeo90K_test_medium_GT.txt │ │ │ ├── meta_info_Vimeo90K_test_slow_GT.txt │ │ │ └── meta_info_Vimeo90K_train_GT.txt │ │ ├── paired_image_dataset.py │ │ ├── prefetch_dataloader.py │ │ ├── realesrgan_dataset.py │ │ ├── realesrgan_paired_dataset.py │ │ ├── reds_dataset.py │ │ ├── single_image_dataset.py │ │ ├── transforms.py │ │ ├── video_test_dataset.py │ │ └── vimeo90k_dataset.py │ ├── losses/ │ │ ├── __init__.py │ │ ├── basic_loss.py │ │ ├── gan_loss.py │ │ └── loss_util.py │ ├── metrics/ │ │ ├── README.md │ │ ├── README_CN.md │ │ ├── __init__.py │ │ ├── fid.py │ │ ├── metric_util.py │ │ ├── niqe.py │ │ ├── niqe_pris_params.npz │ │ ├── psnr_ssim.py │ │ └── test_metrics/ │ │ └── test_psnr_ssim.py │ ├── models/ │ │ ├── __init__.py │ │ ├── base_model.py │ │ ├── edvr_model.py │ │ ├── esrgan_model.py │ │ ├── hifacegan_model.py │ │ ├── lr_scheduler.py │ │ ├── realesrgan_model.py │ │ ├── realesrnet_model.py │ │ ├── sr_model.py │ │ ├── srgan_model.py │ │ ├── stylegan2_model.py │ │ ├── swinir_model.py │ │ ├── video_base_model.py │ │ ├── video_gan_model.py │ │ ├── video_recurrent_gan_model.py │ │ └── video_recurrent_model.py │ ├── ops/ │ │ ├── __init__.py │ │ ├── dcn/ │ │ │ ├── __init__.py │ │ │ ├── deform_conv.py │ │ │ └── src/ │ │ │ ├── deform_conv_cuda.cpp │ │ │ ├── deform_conv_cuda_kernel.cu │ │ │ └── deform_conv_ext.cpp │ │ ├── fused_act/ │ │ │ ├── __init__.py │ │ │ ├── fused_act.py │ │ │ └── src/ │ │ │ ├── fused_bias_act.cpp │ │ │ └── fused_bias_act_kernel.cu │ │ └── upfirdn2d/ │ │ ├── __init__.py │ │ ├── src/ │ │ │ ├── upfirdn2d.cpp │ │ │ └── upfirdn2d_kernel.cu │ │ └── upfirdn2d.py │ ├── test.py │ ├── train.py │ └── utils/ │ ├── __init__.py │ ├── color_util.py │ ├── diffjpeg.py │ ├── dist_util.py │ ├── download_util.py │ ├── file_client.py │ ├── flow_util.py │ ├── img_process_util.py │ ├── img_util.py │ ├── lmdb_util.py │ ├── logger.py │ ├── matlab_functions.py │ ├── misc.py │ ├── options.py │ ├── plot_util.py │ └── registry.py ├── colab/ │ └── README.md ├── docs/ │ ├── BasicSR_docs_CN.md │ ├── Config.md │ ├── DatasetPreparation.md │ ├── DatasetPreparation_CN.md │ ├── DesignConvention.md │ ├── FAQ.md │ ├── HOWTOs.md │ ├── HOWTOs_CN.md │ ├── INSTALL.md │ ├── Logging.md │ ├── Logging_CN.md │ ├── Makefile │ ├── Metrics.md │ ├── Metrics_CN.md │ ├── ModelZoo.md │ ├── ModelZoo_CN.md │ ├── Models.md │ ├── README.md │ ├── TrainTest.md │ ├── TrainTest_CN.md │ ├── auto_generate_api.py │ ├── conf.py │ ├── history_updates.md │ ├── index.rst │ ├── introduction.md │ ├── make.bat │ └── requirements.txt ├── inference/ │ ├── inference_basicvsr.py │ ├── inference_basicvsrpp.py │ ├── inference_dfdnet.py │ ├── inference_esrgan.py │ ├── inference_ridnet.py │ ├── inference_stylegan2.py │ └── inference_swinir.py ├── options/ │ ├── test/ │ │ ├── BasicVSR/ │ │ │ ├── test_BasicVSR_REDS.yml │ │ │ ├── test_BasicVSR_Vimeo90K_BDx4.yml │ │ │ ├── test_BasicVSR_Vimeo90K_BIx4.yml │ │ │ ├── test_IconVSR_REDS.yml │ │ │ ├── test_IconVSR_Vimeo90K_BDx4.yml │ │ │ └── test_IconVSR_Vimeo90K_BIx4.yml │ │ ├── DUF/ │ │ │ └── test_DUF_official.yml │ │ ├── EDSR/ │ │ │ ├── test_EDSR_Lx2.yml │ │ │ ├── test_EDSR_Lx3.yml │ │ │ ├── test_EDSR_Lx4.yml │ │ │ ├── test_EDSR_Mx2.yml │ │ │ ├── test_EDSR_Mx3.yml │ │ │ └── test_EDSR_Mx4.yml │ │ ├── EDVR/ │ │ │ ├── test_EDVR_L_deblur_REDS.yml │ │ │ ├── test_EDVR_L_deblurcomp_REDS.yml │ │ │ ├── test_EDVR_L_x4_SR_REDS.yml │ │ │ ├── test_EDVR_L_x4_SR_Vid4.yml │ │ │ ├── test_EDVR_L_x4_SR_Vimeo90K.yml │ │ │ ├── test_EDVR_L_x4_SRblur_REDS.yml │ │ │ └── test_EDVR_M_x4_SR_REDS.yml │ │ ├── ESRGAN/ │ │ │ ├── test_ESRGAN_x4.yml │ │ │ ├── test_ESRGAN_x4_woGT.yml │ │ │ └── test_RRDBNet_PSNR_x4.yml │ │ ├── HiFaceGAN/ │ │ │ ├── test_hifacegan.yml │ │ │ └── test_hifacegan_woGT.yml │ │ ├── RCAN/ │ │ │ └── test_RCAN.yml │ │ ├── SRResNet_SRGAN/ │ │ │ ├── test_MSRGAN_x4.yml │ │ │ ├── test_MSRResNet_x2.yml │ │ │ ├── test_MSRResNet_x3.yml │ │ │ ├── test_MSRResNet_x4.yml │ │ │ └── test_MSRResNet_x4_woGT.yml │ │ └── TOF/ │ │ └── test_TOF_official.yml │ └── train/ │ ├── BasicVSR/ │ │ ├── train_BasicVSR_REDS.yml │ │ ├── train_BasicVSR_Vimeo90K_BDx4.yml │ │ ├── train_BasicVSR_Vimeo90K_BIx4.yml │ │ ├── train_IconVSR_REDS.yml │ │ ├── train_IconVSR_Vimeo90K_BDx4.yml │ │ └── train_IconVSR_Vimeo90K_BIx4.yml │ ├── BasicVSRPP/ │ │ └── train_BasicVSRPP_REDS.yml │ ├── ECBSR/ │ │ ├── train_ECBSR_x2_m4c16_prelu.yml │ │ ├── train_ECBSR_x4_m4c16_prelu.yml │ │ └── train_ECBSR_x4_m4c16_prelu_RGB.yml │ ├── EDSR/ │ │ ├── train_EDSR_Lx2.yml │ │ ├── train_EDSR_Lx3.yml │ │ ├── train_EDSR_Lx4.yml │ │ ├── train_EDSR_Mx2.yml │ │ ├── train_EDSR_Mx3.yml │ │ └── train_EDSR_Mx4.yml │ ├── EDVR/ │ │ ├── train_EDVRM_woTSA_GAN_TODO.yml │ │ ├── train_EDVR_L_x4_SR_REDS.yml │ │ ├── train_EDVR_L_x4_SR_REDS_woTSA.yml │ │ ├── train_EDVR_M_x4_SR_REDS.yml │ │ └── train_EDVR_M_x4_SR_REDS_woTSA.yml │ ├── ESRGAN/ │ │ ├── train_ESRGAN_x4.yml │ │ └── train_RRDBNet_PSNR_x4.yml │ ├── HiFaceGAN/ │ │ └── train_hifacegan.yml │ ├── LDL/ │ │ └── train_LDL_Real_x4.yml │ ├── RCAN/ │ │ └── train_RCAN_x2.yml │ ├── RealESRGAN/ │ │ ├── train_realesrgan_x2plus.yml │ │ ├── train_realesrgan_x4plus.yml │ │ ├── train_realesrnet_x2plus.yml │ │ └── train_realesrnet_x4plus.yml │ ├── SRResNet_SRGAN/ │ │ ├── README.md │ │ ├── train_MSRGAN_x4.yml │ │ ├── train_MSRResNet_x2.yml │ │ ├── train_MSRResNet_x3.yml │ │ └── train_MSRResNet_x4.yml │ ├── StyleGAN/ │ │ └── train_StyleGAN2_256_Cmul2_FFHQ.yml │ ├── SwinIR/ │ │ ├── train_SwinIR_SRx2_scratch.yml │ │ └── train_SwinIR_SRx4_scratch.yml │ └── VideoRecurrentGAN/ │ └── train_VideoRecurrentGANModel_REDS.yml ├── requirements.txt ├── scripts/ │ ├── data_preparation/ │ │ ├── create_lmdb.py │ │ ├── download_datasets.py │ │ ├── extract_images_from_tfrecords.py │ │ ├── extract_subimages.py │ │ ├── generate_meta_info.py │ │ ├── prepare_hifacegan_dataset.py │ │ └── regroup_reds_dataset.py │ ├── dist_test.sh │ ├── dist_train.sh │ ├── download_gdrive.py │ ├── download_pretrained_models.py │ ├── matlab_scripts/ │ │ ├── back_projection/ │ │ │ ├── backprojection.m │ │ │ ├── main_bp.m │ │ │ └── main_reverse_filter.m │ │ ├── generate_LR_Vimeo90K.m │ │ └── generate_bicubic_img.m │ ├── metrics/ │ │ ├── calculate_fid_folder.py │ │ ├── calculate_fid_stats_from_datasets.py │ │ ├── calculate_lpips.py │ │ ├── calculate_niqe.py │ │ ├── calculate_psnr_ssim.py │ │ └── calculate_stylegan2_fid.py │ ├── model_conversion/ │ │ ├── convert_dfdnet.py │ │ ├── convert_models.py │ │ ├── convert_ridnet.py │ │ └── convert_stylegan.py │ ├── plot/ │ │ ├── README.md │ │ └── model_complexity_cmp_bsrn.py │ └── publish_models.py ├── setup.cfg ├── setup.py ├── test_scripts/ │ ├── test_discriminator_backward.py │ ├── test_ffhq_dataset.py │ ├── test_lr_scheduler.py │ ├── test_niqe.py │ ├── test_paired_image_dataset.py │ ├── test_reds_dataset.py │ └── test_vimeo90k_dataset.py └── tests/ ├── README.md ├── data/ │ ├── gt.lmdb/ │ │ ├── data.mdb │ │ ├── lock.mdb │ │ └── meta_info.txt │ ├── lq.lmdb/ │ │ ├── data.mdb │ │ ├── lock.mdb │ │ └── meta_info.txt │ ├── meta_info_gt.txt │ └── meta_info_pair.txt ├── test_archs/ │ ├── test_basicvsr_arch.py │ ├── test_discriminator_arch.py │ ├── test_duf_arch.py │ ├── test_ecbsr_arch.py │ └── test_srresnet_arch.py ├── test_data/ │ ├── test_paired_image_dataset.py │ └── test_single_image_dataset.py ├── test_losses/ │ └── test_losses.py ├── test_metrics/ │ └── test_psnr_ssim.py └── test_models/ └── test_sr_model.py ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/workflows/publish-pip.yml ================================================ name: PyPI Publish on: push jobs: build-n-publish: runs-on: ubuntu-latest if: startsWith(github.event.ref, 'refs/tags') steps: - uses: actions/checkout@v2 - name: Set up Python 3.8 uses: actions/setup-python@v1 with: python-version: 3.8 - name: Upgrade pip run: pip install pip --upgrade - name: Install PyTorch (cpu) run: pip install torch==1.7.0+cpu torchvision==0.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html - name: Install dependencies run: pip install -r requirements.txt - name: Build and install run: rm -rf .eggs && pip install -e . - name: Build for distribution # remove bdist_wheel for pip installation with compiling cuda extensions run: python setup.py sdist - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.PYPI_API_TOKEN }} ================================================ FILE: .github/workflows/pylint.yml ================================================ name: PyLint on: [push, pull_request] jobs: build: runs-on: ubuntu-latest strategy: matrix: python-version: [3.8] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install codespell flake8 isort yapf - name: Lint run: | codespell flake8 . isort --check-only --diff basicsr/ options/ scripts/ tests/ inference/ setup.py yapf -r -d basicsr/ options/ scripts/ tests/ inference/ setup.py ================================================ FILE: .github/workflows/release.yml ================================================ name: release on: push: tags: - '*' jobs: build: permissions: write-all name: Create Release runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Create Release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} release_name: BasicSR ${{ github.ref }} Release Note body: | 🚀 See you again 😸 🚀Have a nice day 😸 and happy everyday 😃 🚀 Long time no see ☄️ ✨ **Highlights** ✅ [Features] Support ... 🐛 **Bug Fixes** 🌴 **Improvements** 📢📢📢
| Name | Datasets | Short Description | Download |
|---|---|---|---|
| Classical SR Training | T91 | 91 images for training | Google Drive / Baidu Drive |
| BSDS200 | A subset (train) of BSD500 for training | ||
| General100 | 100 images for training | ||
| Classical SR Testing | Set5 | Set5 test dataset | |
| Set14 | Set14 test dataset | ||
| BSDS100 | A subset (test) of BSD500 for testing | ||
| urban100 | 100 building images for testing (regular structures) | ||
| manga109 | 109 images of Japanese manga for testing | ||
| historical | 10 gray low-resolution images without the ground-truth | ||
| 2K Resolution | DIV2K | proposed in NTIRE17 (800 train and 100 validation) | official website |
| Flickr2K | 2650 2K images from Flickr for training | official website | |
| DF2K | A merged training dataset of DIV2K and Flickr2K | - | |
| OST (Outdoor Scenes) | OST Training | 7 categories images with rich textures | Google Drive / Baidu Drive |
| OST300 | 300 test images of outdoor scenes | ||
| PIRM | PIRM | PIRM self-val, val, test datasets | Google Drive / Baidu Drive |
| Name | Datasets | Short Description | Download |
|---|---|---|---|
| Classical SR Training | T91 | 91 images for training | Google Drive / Baidu Drive |
| BSDS200 | A subset (train) of BSD500 for training | ||
| General100 | 100 images for training | ||
| Classical SR Testing | Set5 | Set5 test dataset | |
| Set14 | Set14 test dataset | ||
| BSDS100 | A subset (test) of BSD500 for testing | ||
| urban100 | 100 building images for testing (regular structures) | ||
| manga109 | 109 images of Japanese manga for testing | ||
| historical | 10 gray low-resolution images without the ground-truth | ||
| 2K Resolution | DIV2K | proposed in NTIRE17 (800 train and 100 validation) | official website |
| Flickr2K | 2650 2K images from Flickr for training | official website | |
| DF2K | A merged training dataset of DIV2K and Flickr2K | - | |
| OST (Outdoor Scenes) | OST Training | 7 categories images with rich textures | Google Drive / Baidu Drive |
| OST300 | 300 test images of outdoor scenes | ||
| PIRM | PIRM | PIRM self-val, val, test datasets | Google Drive / Baidu Drive |