Implemented color and grayscale missing pixel inpainting paper
The original image is masked like Figure 1, where the mask's pixel value is zero. If the image is RGB, then mask each channel independently. The task is to inpaint the pixel of 0 on the masked image.
Table 1. L2 Norm per missing pixel of example
TYPE | 80% Grayscale | 40% Color | 60% Color |
---|---|---|---|
L2 Norm per missing pixel | 0.10093 | 0.03512 | 0.08130 |
The preprocessing.py will generate four .npy files, like train_x_color.npy, train_y_color.npy, train_x_gray.npy, train_y_gray.npy.
python train.py train_gray 1 (train gray model and will generate ./gray-model/
python train.py train_gray 0 (train color model and generate ./color-model/)
The pre-processed data can be downloaded on preprocessed data and pre-trained model could be download on model, where the dataset is randomly select from MSCOCO
python inpainting --img_dir some-of-missing-pixel-image --model_version XXXX (where XXXX is the best trained model)