MathiasGruber / PConv-Keras

Unofficial implementation of "Image Inpainting for Irregular Holes Using Partial Convolutions". Try at: www.fixmyphoto.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testing Script

sadbhawnathakur opened this issue · comments

Hii, can you provide the script for testing your model on a new image and mask set?

change the code in Step5 - Prediction.ipynb, as:

  1. from libs.util import random_mask, ImageChunker
    -> : from libs.util import MaskGenerator, ImageChunker

  2. mask = random_mask(*crop)
    ->: mask = MaskGenerator(lower - upper, right - left)._generate_mask()

  3. download https://drive.google.com/file/d/1OdbuNJj4gV9KUoknQG063jJrJ1srhBvU/view
    and rename 'pconv_imagenet.h5' to 'pconv_imagenet.26-1.07.h5'

  4. check the 'weights.26-1.07.h5' file path:
    -> 'model.load(r"your path/PConv-Keras/data/logs/pconv_imagenet.26-1.07.h5", train_bn=False)'