MCPcopy Index your code
hub / github.com/IceClear/MW-GAN

github.com/IceClear/MW-GAN @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
1,017 symbols 2,892 edges 106 files 364 documented · 36%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

MW-GAN

This repo is the official code for the following papers:

Published on IEEE Transactions on Circuits and Systems for Video Technology in 2021. By MC2 Lab @ Beihang University.

Published on 16TH EUROPEAN CONFERENCE ON COMPUTER VISION in 2020. By MC2 Lab @ Beihang University.

Visual results on JCT-VC

Compressed video (QP=42) Ours
:-------------------------: :-------------------------:

Dependencies and Installation

pip install -r requirements.txt
BASICSR_EXT=True python setup.py develop

Dataset Preparation

Generally, we directly read cropped images from folders. - Run data_process.py to extract frames from videos. - This repo should also support LMDB format for faster IO speed as BasicSR. Not tested yet.

Get Started

The same as BasicSR, you can see here for details.

:star: MWGAN+ Train:

  • MWGAN+ PSNR Model: CUDA_VISIBLE_DEVICES=0 python basicsr/train.py -opt options/train/MWGAN/train_MWGAN_PSNR.yml
  • MWGAN+ GAN Model: CUDA_VISIBLE_DEVICES=0 python basicsr/train.py -opt options/train/MWGAN/train_MWGAN_Percep.yml
  • Tradeoff Model: CUDA_VISIBLE_DEVICES=0 python basicsr/train.py -opt options/train/MWGAN/train_MWGAN_Tradeoff.yml

:star: MWGAN Train:

  • MWGAN PSNR Model: CUDA_VISIBLE_DEVICES=0 python basicsr/train.py -opt options/train/MWGAN/train_MWGAN_ECCV_PSNR.yml
  • MWGAN GAN Model: CUDA_VISIBLE_DEVICES=0 python basicsr/train.py -opt options/train/MWGAN/train_MWGAN_ECCV_Percep.yml

:star: Test:

  • Test example: CUDA_VISIBLE_DEVICES=0 python basicsr/test.py -opt options/test/MWGAN/test_MWGAN_Tradeoff.yml

Pre-train model

Here the models we provide are trained on QP37 in RGB space.

:star: MWGAN+ Model:

  • MWGAN+ PSNR Model: This is the model for MW-GAN+obj in the paper.
  • MWGAN+ GAN Model: This is the model for MW-GAN+ in the paper. (In progress)
  • Tradeoff Model: For PD-tradeoff, instead of the ways introduced in our paper, we further developed an end-to-end model to achieve such a performance. Specifically, we first enhance the frames using the pre-trained PSNR-based model to remove compression artifacts, then using GAN to add high-frequency details. This two-stage enhancement is similar to the 'Two-stage Restoration' used in EDVR.

:star: MWGAN Model:

Acknowledgement

This repo is built mainly based on BasicSR. Also borrowing codes from pacnet and MWCNN_PyTorch. We thank a lot for their contributions to the community.

Citation

If you find our paper or code useful for your research, please cite:

@inproceedings{wang2020multi,
  title={Multi-level Wavelet-Based Generative Adversarial Network for Perceptual Quality Enhancement of Compressed Video},
  author={Wang, Jianyi and Deng, Xin and Xu, Mai and Chen, Congyong and Song, Yuhang},
  booktitle={European Conference on Computer Vision},
  pages={405--421},
  year={2020},
  organization={Springer}
}

@ARTICLE{wang2021mwgan,
  author={Wang, Jianyi and Xu, Mai and Deng, Xin and Shen, Liquan and Song, Yuhang},
  journal={IEEE Transactions on Circuits and Systems for Video Technology},
  title={MW-GAN+ for Perceptual Quality Enhancement on Compressed Video},
  year={2021},
  volume={},
  number={},
  pages={1-1},
  doi={10.1109/TCSVT.2021.3128275}
}

Core symbols most depended-on inside this repo

get
called by 134
basicsr/utils/registry.py
get_root_logger
called by 44
basicsr/utils/logger.py
keys
called by 25
basicsr/utils/registry.py
backward
called by 24
basicsr/archs/pac_util.py
tensor2img
called by 23
basicsr/utils/img_util.py
calculate_metric
called by 23
basicsr/metrics/__init__.py
close
called by 21
basicsr/utils/lmdb_util.py
build_loss
called by 20
basicsr/losses/__init__.py

Shape

Method 570
Function 241
Class 206

Languages

Python98%
C++2%

Modules by API surface

basicsr/archs/swinir_arch.py55 symbols
basicsr/archs/stylegan2_arch.py53 symbols
basicsr/archs/densemwnet_arch.py49 symbols
basicsr/utils/diffjpeg.py48 symbols
basicsr/archs/pac_util.py35 symbols
basicsr/losses/losses.py34 symbols
basicsr/data/degradations.py30 symbols
basicsr/archs/discriminator_multilight_arch.py29 symbols
basicsr/archs/hifacegan_util.py25 symbols
basicsr/ops/dcn/deform_conv.py24 symbols
basicsr/models/base_model.py24 symbols
basicsr/data/video_test_dataset.py22 symbols

For agents

$ claude mcp add MW-GAN \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact