All Projects → JingyunLiang → HCFlow

JingyunLiang / HCFlow

Licence: Apache-2.0 license
Official PyTorch code for Hierarchical Conditional Flow: A Unified Framework for Image Super-Resolution and Image Rescaling (HCFlow, ICCV2021)

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to HCFlow

SwinIR
SwinIR: Image Restoration Using Swin Transformer (official repository)
Stars: ✭ 1,260 (+800%)
Mutual labels:  super-resolution, image-super-resolution, image-sr
Awesome-ICCV2021-Low-Level-Vision
A Collection of Papers and Codes for ICCV2021 Low Level Vision and Image Generation
Stars: ✭ 163 (+16.43%)
Mutual labels:  super-resolution, iccv2021
Image Super Resolution
🔎 Super-scale your images and run experiments with Residual Dense and Adversarial Networks.
Stars: ✭ 3,293 (+2252.14%)
Mutual labels:  super-resolution, image-super-resolution
IDN-pytorch
paper implement : Fast and Accurate Single Image Super-Resolution via Information Distillation Network
Stars: ✭ 40 (-71.43%)
Mutual labels:  image-super-resolution
gnerf
[ ICCV 2021 Oral ] Our method can estimate camera poses and neural radiance fields jointly when the cameras are initialized at random poses in complex scenarios (outside-in scenes, even with less texture or intense noise )
Stars: ✭ 152 (+8.57%)
Mutual labels:  iccv2021
Trident-Dehazing-Network
NTIRE 2020 NonHomogeneous Dehazing Challenge (CVPR Workshop 2020) 1st Solution.
Stars: ✭ 42 (-70%)
Mutual labels:  super-resolution
esrgan
Enhanced SRGAN. Champion PIRM Challenge on Perceptual Super-Resolution
Stars: ✭ 48 (-65.71%)
Mutual labels:  super-resolution
EDVR Keras
Keras implementation of EDVR: Video Restoration with Enhanced Deformable Convolutional Networks
Stars: ✭ 35 (-75%)
Mutual labels:  super-resolution
snarf
Official code release for ICCV 2021 paper SNARF: Differentiable Forward Skinning for Animating Non-rigid Neural Implicit Shapes.
Stars: ✭ 184 (+31.43%)
Mutual labels:  iccv2021
LightFieldReconstruction
High-Dimensional Dense Residual Convolutional Neural Network for Light Field Reconstruction
Stars: ✭ 50 (-64.29%)
Mutual labels:  super-resolution
deepsum
DeepSUM: Deep neural network for Super-resolution of Unregistered Multitemporal images (ESA PROBA-V challenge)
Stars: ✭ 39 (-72.14%)
Mutual labels:  super-resolution
Vision-Language-Transformer
Vision-Language Transformer and Query Generation for Referring Segmentation (ICCV 2021)
Stars: ✭ 127 (-9.29%)
Mutual labels:  iccv2021
PoinTr
[ICCV 2021 Oral] PoinTr: Diverse Point Cloud Completion with Geometry-Aware Transformers
Stars: ✭ 260 (+85.71%)
Mutual labels:  iccv2021
Super-Resolution-Meta-Attention-Networks
Open source single image super-resolution toolbox containing various functionality for training a diverse number of state-of-the-art super-resolution models. Also acts as the companion code for the IEEE signal processing letters paper titled 'Improving Super-Resolution Performance using Meta-Attention Layers’.
Stars: ✭ 17 (-87.86%)
Mutual labels:  super-resolution
QmapCompression
Official implementation of "Variable-Rate Deep Image Compression through Spatially-Adaptive Feature Transform", ICCV 2021
Stars: ✭ 27 (-80.71%)
Mutual labels:  iccv2021
ilvr adm
ILVR: Conditioning Method for Denoising Diffusion Probabilistic Models (ICCV 2021 Oral)
Stars: ✭ 133 (-5%)
Mutual labels:  iccv2021
srzoo
SRZoo: An integrated repository for super-resolution using deep learning
Stars: ✭ 135 (-3.57%)
Mutual labels:  super-resolution
CF-Net
Official repository of "Deep Coupled Feedback Network for Joint Exposure Fusion and Image Super-Resolution"
Stars: ✭ 55 (-60.71%)
Mutual labels:  super-resolution
Super resolution Survey
A survey of recent application of deep learning on super-resolution tasks
Stars: ✭ 32 (-77.14%)
Mutual labels:  super-resolution
SMSR
[CVPR 2021] Exploring Sparsity in Image Super-Resolution for Efficient Inference
Stars: ✭ 205 (+46.43%)
Mutual labels:  super-resolution

Hierarchical Conditional Flow: A Unified Framework for Image Super-Resolution and Image Rescaling (HCFlow, ICCV2021)

arXiv GitHub Stars download google colab logo

This repository is the official PyTorch implementation of Hierarchical Conditional Flow: A Unified Framework for Image Super-Resolution and Image Rescaling (arxiv, supp).

🚀 🚀 🚀 News:


Normalizing flows have recently demonstrated promising results for low-level vision tasks. For image super-resolution (SR), it learns to predict diverse photo-realistic high-resolution (HR) images from the low-resolution (LR) image rather than learning a deterministic mapping. For image rescaling, it achieves high accuracy by jointly modelling the downscaling and upscaling processes. While existing approaches employ specialized techniques for these two tasks, we set out to unify them in a single formulation. In this paper, we propose the hierarchical conditional flow (HCFlow) as a unified framework for image SR and image rescaling. More specifically, HCFlow learns a bijective mapping between HR and LR image pairs by modelling the distribution of the LR image and the rest high-frequency component simultaneously. In particular, the high-frequency component is conditional on the LR image in a hierarchical manner. To further enhance the performance, other losses such as perceptual loss and GAN loss are combined with the commonly used negative log-likelihood loss in training. Extensive experiments on general image SR, face image SR and image rescaling have demonstrated that the proposed HCFlow achieves state-of-the-art performance in terms of both quantitative metrics and visual quality.

         

Requirements

  • Python 3.7, PyTorch == 1.7.1
  • Requirements: opencv-python, lpips, natsort, etc.
  • Platforms: Ubuntu 16.04, cuda-11.0
cd HCFlow-master
pip install -r requirements.txt 

Quick Run (takes 1 Minute)

To run the code with one command (without preparing data), run following command. Or you can go to our online Colob demo google colab logo to have a try.

cd codes
# face image SR
python test_HCFlow.py --opt options/test/test_SR_CelebA_8X_HCFlow.yml

# general image SR
python test_HCFlow.py --opt options/test/test_SR_DF2K_4X_HCFlow.yml

# image rescaling
python test_HCFlow.py --opt options/test/test_Rescaling_DF2K_4X_HCFlow.yml

Data Preparation

The framework of this project is based on MMSR and SRFlow. To prepare data, put training and testing sets in ./datasets as ./datasets/DIV2K/HR/0801.png. Commonly used SR datasets can be downloaded here. There are two ways for accerleration in data loading: First, one can use ./scripts/png2npy.py to generate .npy files and use data/GTLQnpy_dataset.py. Second, one can use .pklv4 dataset (recommended) and use data/LRHR_PKL_dataset.py. Please refer to SRFlow for more details. Prepared datasets can be downloaded here.

Training

To train HCFlow for general image SR/ face image SR/ image rescaling, run this command:

cd codes

# face image SR
python train_HCFlow.py --opt options/train/train_SR_CelebA_8X_HCFlow.yml

# general image SR
python train_HCFlow.py --opt options/train/train_SR_DF2K_4X_HCFlow.yml

# image rescaling
python train_HCFlow.py --opt options/train/train_Rescaling_DF2K_4X_HCFlow.yml

All trained models can be downloaded from here.

Testing

Please follow the Quick Run section. Just modify the dataset path in test_HCFlow_*.yml.

Results

We achieved state-of-the-art performance on general image SR, face image SR and image rescaling.

For more results, please refer to the paper and supp for details.

Citation

@inproceedings{liang21hierarchical,
  title={Hierarchical Conditional Flow: A Unified Framework for Image Super-Resolution and Image Rescaling},
  author={Liang, Jingyun and Lugmayr, Andreas and Zhang, Kai and Danelljan, Martin and Van Gool, Luc and Timofte, Radu},
  booktitle={IEEE International Conference on Computer Vision},
  year={2021}
}

License & Acknowledgement

This project is released under the Apache 2.0 license. The codes are based on MMSR, SRFlow, IRN and Glow-pytorch. Please also follow their licenses. Thanks for their great works.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].