(Image from https://github.com/shepnerd/inpainting_gmcnn/blob/master/tensorflow/imgs/paris-streetview_256x256/001.png)
Shape : (1, 256, 256, 3)
Left to right: input, mask, image generated by the network, ground truth
Shape : (1, 256, 256, 3)
Shape : (1, 512, 512, 3)
Shape : (1, 512, 512, 3)
Shape : (1, 512, 680, 3)
Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.
For the sample image,
$ python3 inpainting_gmcnn.py
If you want to specify the input image, put the image path after the --input
option.
You can use --savepath
option to change the name of the output file to save.
$ python3 inpainting_gmcnn.py --input IMAGE_PATH --savepath SAVE_IMAGE_PATH
By adding the --model
option, you can specify model type which is selected from "paris-streetview", "celebahq", "celebahq-512", "places2".
(default is paris-streetview)
And it can specify mask type "rect" or "stroke" after the --mask_type
option.
(default is rect)
$ python3 inpainting_gmcnn --model paris-streetview --mask_type rect
For CelebA-HQ with rectangle masks.
$ python3 inpainting_gmcnn.py --model celebahq -i celebahq_256x256_001.png
For CelebA-HQ with random strokes.
$ python3 inpainting_gmcnn.py --model celebahq-512 --mask_type stroke -i celebahq_512x512_016.png
For Places2 with random strokes.
$ python3 inpainting_gmcnn.py --model places2 --mask_type stroke -i places2_001.png
Image Inpainting via Generative Multi-column Convolutional Neural Networks
TensorFlow
ONNX opset=11
paris-streetview_256x256_rect.onnx.prototxt
celebahq_256x256_rect.onnx.prototxt
celebahq_512x512_rect.onnx.prototxt