We use tensorflow implemention of VGG 16 based on tensorflow-vgg for perceptual loss. Download the weights of the vgg model from VGG16 NPY and keep them in the current directory as './vgg16.npy'.
Save all the training images in './Data/train' folder in the respective './Data/train/X' and './Data/train/Y' folder and all the test images in './Data/test' folder in './Data/test/X' folder
Generate mask images from "maskdata.json" file for the given dataset before training the network for image inpainting.
For training images:
python genMask.py ./Data/train ./Data/train/M
For test images:
python genMask.py ./Data/test ./Data/test/M
Train the Network for the image inpainting task using the below mentioned python file, it will save the model files in './model' folder.
python train_perceptual_skipconn.py
The pretrained models are kept at modelfile. Download all the files and keep in the './model' folder.
Test the above trained/pretrained network on the test dataset, output will get saved in './Output' folder.
python test_perceptual_skipconn.py