Skip to content

(TBD) The MindSpore version of [CVPR 2023] RIDCP: Revitalizing Real Image Dehazing via High-Quality Codebook Priors

License

Notifications You must be signed in to change notification settings

Men1scus/RIDCP_dehazing_MindSpore

 
 

Repository files navigation

$\rm{[MindSpore-phase3]}$ $RIDCP$

本项目包含了以下论文的 MindSpore 实现:

RIDCP: Revitalizing Real Image Dehazing via High-Quality Codebook Priors
Ruiqi Wu, Zhengpeng Duan, Chunle Guo*, Zhi Chai, Chongyi Li ( * indicates corresponding author)
The IEEE / CVF Computer Vision and Pattern Recognition Conference (CVPR), 2023

framework_img

[Arxiv Paper] [中文版 (TBD)] [Website Page] [Dataset (pwd:qqqo)]

文章官方版本仓库链接: https://github.com/RQ-Wu/RIDCP_dehazing

目前已经完成大部分代码的 MindSpore 转化

正在进行中的工作

  • 完整代码的 MindSpore 实现

Dependencies and Installation

  • Ubuntu >= 18.04
  • CUDA >= 11.0
  • MindSpore Nightly
  • MindCV
  • Other required packages in requirements.txt
# git clone this repository
git clone https://github.com/RQ-Wu/RIDCP.git
cd RIDCP

# create new anaconda env
conda create -n ridcp python=3.8
conda activate ridcp 

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

Get Started

Prepare pretrained models & dataset

  1. Downloading pretrained checkpoints
Model Description 🔗 Download Links
HQPs VQGAN pretrained on high-quality data. [Google Drive (TBD)]
[Baidu Disk (TBD)]
RIDCP Dehazing network trained on data generated by our pipeline.
CHM Weight for adjusting controllable HQPs matching.
  1. Preparing data for training
Dataset Description 🔗 Download Links
rgb_500 500 clear RGB images as the input of our phenomenological degradation pipeline [Google Drive (TBD)] [Baidu Disk (pwd: qqqo)]
depth_500 Corresponding depth map generated by RA-Depth(https://github.com/hmhemu/RA-Depth).
Flick2K, DIV2K High-quality data for VQGAN pre-training -
  1. The final directory structure will be arranged as:
datasets
    |- clear_images_no_haze_no_dark_500
        |- xxx.jpg
        |- ...
    |- depth_500
        |- xxx.npy
        |- ...
    |- Flickr2K
    |- DIV2K

pretrained_models
    |- pretrained_HQPs.pth
    |- pretrained_RIDCP.pth
    |- weight_for_matching_dehazing_Flickr.pth

Quick demo (TBD)

Run demos to process the images in dir ./examples/ by following commands:

python inference_ridcp.py -i examples -w pretrained_models/pretrained_RIDCP.pth -o results --use weight --alpha -21.25

Train RIDCP (TBD)

Step 1: Pretrain a VQGAN on high-quality dataset

TBD

Step 2: Train our RIDCP

CUDA_VISIBLE_DEVICES=X,X,X,X python basicsr/train.py --opt options/RIDCP.yml

Step3: Adjust our RIDCP

TBD

About

(TBD) The MindSpore version of [CVPR 2023] RIDCP: Revitalizing Real Image Dehazing via High-Quality Codebook Priors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 81.7%
  • Cuda 9.9%
  • C++ 8.4%