Giter Club home page Giter Club logo

edge-lbam's Introduction

Edge-LBAM

Pytorch implementation of paper "Image Inpainting with Edge-guided Learnable Bidirectional Attention Maps"

Description

This paper is an extension of our previous work. In comparison to LBAM we utilize both the mask of holes and predicted edge map for mask-updating, resulting in our Edge-LBAM method. Moreover, we introduce a multi-scale edge completion network for effective prediction of coherent edges.

Prerequisites

  • Python 3.6
  • Pytorch =1.1.0
  • CPU or NVIDIA GPU + Cuda + Cudnn

Training

To train the Edge-LBAM model:

python train.py --batchSize numOf_batch_size --dataRoot your_image_path \
--maskRoot your_mask_root --modelsSavePath path_to_save_your_model \
--logPath path_to_save_tensorboard_log --pretrain(optional) pretrained_model_path

Testing

To test with random batch with random masks:

python test_random_batch.py --dataRoot your_image_path
--maskRoot your_mask_path --batchSize numOf_batch_size --pretrain pretrained_model_path

Pretrained Models

The pretrained models can be found at google drive, we will release the models removing bn from Edge-LBAM later which may effect better. You can also train the model by yourself.

Results

Inpainting

From left to right are input, the result of Global&Local,PConv,DeepFillv2.

From left to right are the result of Edge-Connect, MEDFE, Ours and GT.

MECNet

From left to right are input, edge competion of single-scale network and multi-scale network.

edge-lbam's People

Contributors

wds1998 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.