Code Monkey home page Code Monkey logo

rahc's Introduction

Learning to Restore Arbitrary Hybrid Adverse Weather Conditions in One Go (in submission)

Abstract: Adverse conditions typically suffer from stochastic hybrid weather degradations (e.g., rainy and hazy night), while existing image restoration algorithms envisage that weather degradations occur independently, thus may fail to handle real-world complicated scenarios. Besides, supervised training is not feasible due to the lack of comprehensive paired dataset to characterize hybrid conditions. To this end, we have advanced the forementioned limitations with two tactics: framework and data. On the one hand, we present a novel unified framework, dubbed RAHC, to Restore Arbitrary Hybrid adverse weather Conditions in one go, which can comfortably cope with hybrid scenarios with insufficient remaining image constituents and restore arbitrary hybrid conditions with a single trained model flexibly. On the other hand, we establish a new dataset, termed HAC, for learning and benchmarking arbitrary Hybrid Adverse Conditions restoration. HAC contains 31 scenarios composed of an arbitrary combination of five common weather, with a total of ∼316K adverse-weather/clean pairs. As for fabrication, the training set is automatically generated by a dedicated AdverseGAN with no-frills labor, while the test set is manually modulated by experts for authoritative evaluation. Extensive experiments yield superior results and in particular establish new state-of-the-art results on both HAC and conventional datasets.

Framework Architecture

Overall Framework of RAHC

Installation

The model is built in PyTorch 1.1.0 and tested on Ubuntu 16.04 environment (Python3.7, CUDA9.0, cuDNN7.5).

For installing, follow these intructions

conda create -n pytorch1 python=3.7
conda activate pytorch1
conda install pytorch=1.1 torchvision=0.3 cudatoolkit=9.0 -c pytorch
pip install matplotlib scikit-image opencv-python timm einops ptflops PIL argparse

Training

cd dataset
python prepare.py
  • Download the pre-trained VQGAN and place it in ./logs/
  • Train the model with default arguments by running
python train.py

Evaluation

  1. Download the pre-trained model and place it in ./checkpoints/

  2. Download the dataset and place it in ./datasets/

  3. Run

python test.py
  1. Visual results wii be saved in results

Real-world Results

rahc's People

Contributors

jeasco avatar

Stargazers

 avatar Jacob Zietek avatar  avatar Yağız Nalçakan avatar Jason Li avatar An-zhi WANG avatar  avatar sk avatar dengbuqi avatar halo avatar Jinghao avatar Yanwei Liu avatar zhaoZD avatar Hai Jiang avatar Wu Yanan avatar 柳昂 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar LYX avatar  avatar  avatar

Watchers

Yağız Nalçakan avatar  avatar

Forkers

arun-kollan fhuhh

rahc's Issues

预训练时长

您好,我想问下您预训练得到 cookbook 这一步用了多少张卡 训了多久
还是您是用 https://github.com/CompVis/taming-transformers 提供的预训练权重呢

“More precisely, we utilize the VQGAN [11] pre-trained on OpenImages [20] with 8192 quantization encodings as a library of reconstruction vectors.”

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.