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)
-
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
).
-
Training:
- Prepare training images filelist (example).
- Modify inpaint.yml to set DATA_FLIST, LOG_DIR, IMG_SHAPES and other parameters.
- Run
python train.py
.
-
Resume training:
- Modify MODEL_RESTORE flag in inpaint.yml. E.g., MODEL_RESTORE: 20180115220926508503_places2_model.
- Run
python train.py
.
-
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)
- Run
-
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)
My project acknowledge the official code DeepFillv1 and SNGAN. Especially, thanks for the authors of this amazing algorithm.