Skip to content

An reimplement version of inpainting model in Free-Form Image Inpainting with Gated Convolution

License

Notifications You must be signed in to change notification settings

avalonstrel/GatedConvolution

Repository files navigation

An Reimplemented version of DeepFillv2.

I reimplement this model in pytorch(which is more familiar to me) in https://github.com/avalonstrel/GatedConvolution_pytorch. I provide a pre-trained model on Places2 and some results. This version will not be updated. Sorry. Update (Aug, 2018): The main files I modify is inpaint_ops.py, inpaint_model_gc.py, and train.py. I add mask_from_fnames.py for add masks from Data(voc or coco). And I will refactor this project soon. ( To use this Project, you can refer the official version of DeepFillv1 since it is modified from the DeepFillv1)

Run (From DeepFillv1)

  1. Requirements:

    • Install python3.
    • Install tensorflow (tested on Release 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0).
    • Install tensorflow toolkit neuralgym (run pip install git+https://github.com/JiahuiYu/neuralgym).
  2. Training:

    • Prepare training images filelist (example).
    • Modify inpaint.yml to set DATA_FLIST, LOG_DIR, IMG_SHAPES and other parameters.
    • Run python train.py.
  3. Resume training:

    • Modify MODEL_RESTORE flag in inpaint.yml. E.g., MODEL_RESTORE: 20180115220926508503_places2_model.
    • Run python train.py.
  4. Testing:

    • Run python test.py --image examples/input.png --mask examples/mask.png --output examples/output.png --checkpoint model_logs/your_model_dir.(I have not test)
  5. Still have questions?

    • If you still have questions (e.g.: How filelist looks like? How to use multi-gpus? How to do batch testing?), please first search over closed issues. If the problem is not solved, please open a new issue.(Refer the DeepFillv1)

Results(Still Testing)

Pretrained Model(Still Testing)

Acknowledgments

My project acknowledge the official code DeepFillv1 and SNGAN. Especially, thanks for the authors of this amazing algorithm.

About

An reimplement version of inpainting model in Free-Form Image Inpainting with Gated Convolution

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages