Git Product home page Git Product logo

dagf's Introduction

๐Ÿ“– Deep Attentional Guided Image Filtering

[Paper] Zhiwei Zhong, Xianming Liu, Junjun Jiang, Debin Zhao ,Xiangyang Ji
Harbin Institute of Technology, Tsinghua University

Abstract

Guided filter is a fundamental tool in computer vision and computer graphics which aims to transfer structure information from guidance image to target image. Most existing methods construct filter kernels from the guidance itself without considering the mutual dependency between the guidance and the target. However, since there typically exist significantly different edges in the two images, simply transferring all structural information of the guidance to the target would result in various artifacts. To cope with this problem, we propose an effective framework named deep attentional guided image filtering, the filtering process of which can fully integrate the complementary information contained in both images. Specifically, we propose an attentional kernel learning module to generate dual sets of filter kernels from the guidance and the target, respectively, and then adaptively combine them by modeling the pixel-wise dependency between the two images. Meanwhile, we propose a multi-scale guided image filtering module to progressively generate the filtering result with the constructed kernels in a coarse-to-fine manner. Correspondingly, a multi-scale fusion strategy is introduced to reuse the intermediate results in the coarse-to-fine process. Extensive experiments show that the proposed framework compares favorably with the state-of-the-art methods in a wide range of guided image filtering applications, such as guided super-resolution, cross-modality restoration, texture removal, and semantic segmentation.


This repository is an official PyTorch implementation of the paper "Deep Attentional Guided Filtering"

๐Ÿ”ง Dependencies and Installation

Installation

  1. Clone repo

    git https://github.com/zhwzhong/DAGF.git
    cd DAGF
  2. Install dependent packages

    pip install -r requirements.txt

Dataset

  1. NYU
  2. Lu
  3. Middlebury
  4. Sintel
  5. ToFMark
  6. DUT-OMRON

Trained Models

You can directly download the trained model and put it in checkpoints:

  • DAGF (Nearest):4, 8, 16
  • DAGF (Bicubic): 4, 8, 16

Train

You can also train by yourself:

 python main.py  --scale=16  --save_real --dataset_name='NYU' --model_name='DAGF'

Pay attention to the settings in the option (e.g. gpu id, model_name).

Test

We provide the processed test data in 'test_data' and pre-trained models in 'pre_trained' With the trained model, you can test and save depth images.

python quick_test.py

Acknowledgments

TO DO

  1. Release the trained models for compared models:
  2. Release the experimental resutls of the compared models.

News!!! ๐Ÿ…Our method won the Real DSR Challenge in ICMR 2021.

The detail information can be fond here.

๐Ÿ“ง Contact

If you have any question, please email [email protected]

dagf's People

Contributors

zhwzhong avatar

Stargazers

AIIA Lab avatar

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.