Coder Social home page Coder Social logo

gsrnet's Introduction

GSRNet

Code for the GSRNet (AAAI 2020)

Environment

tensorflow 1.4.0, python3.4, cuda 8.0.44 cudnn 6.0

Other packages please run:

pip install -r requirements.txt

Download ImageNet pre-trained model:

Refer to https://github.com/DrSleep/tensorflow-deeplab-lfov for more detail

Download model.ckpt-pretrained, net_skeleton.ckpt and put it in the 'ckpt' folder

Prepare tfrecords for dataset

  1. Change the arguments of dataset, train_dir, mask_dir, output_directory, to corresponding directories.

  2. Run python3 im_pre_casia_pair.py

  3. The tfrecords for COCO and CASIA are provided in https://drive.google.com/drive/folders/1YY4UM1PBTbBWMyjx350ubp5udGZG66K1?usp=sharing

Train the model:

  1. Change the tfrecords directory in train_default.sh
  2. Run train_default.sh

Test the model

  1. python3 dry_run.py --model_weights='./snapshots/$FIXME' --dataset='$FIXME'

for single image, use --dataset='single_img'

  1. save output image: python3 dry_run.py --model_weights='./snapshots/$FIXME' --dataset='$FIXME' --save-dir='./output/$FIXME/' --vis=True

  2. visualize generated images: python3 dry_run.py --model_weights='./snapshots/$FIXME' --dataset='$FIXME' --save-dir='./output/$FIXME/' --vis=True --vis_gan=True

Citation:

If this code or dataset helps your research, please cite our paper:

@inproceedings{zhou2020generate,
  title={Generate, Segment, and Refine: Towards Generic Manipulation Segmentation},
  author={Zhou, Peng and Chen, Bor-Chun and Han, Xintong and Najibi, Mahyar and Shrivastava, Abhinav and Lim, Ser Nam and Davis, Larry S},
  booktitle = {AAAI},
  year={2020}
}

gsrnet's People

Contributors

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