/Missing-Pixel-Inpainting

Implemented color and grayscale missing pixel inpainting paper

Primary LanguagePython

Missing-Pixel-Inpainting

Implemented color and grayscale missing pixel inpainting paper

QUESTION

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.


Figure 1. grayscale 80% masked image

Figure 2. color 40% masked image


Figure 3. color 60% masked image

RESULT

Figure 3. Inpainting CNN Result


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

Training

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

USAGE

python inpainting --img_dir some-of-missing-pixel-image --model_version XXXX (where XXXX is the best trained model)

REFERENCE

[1] https://arxiv.org/pdf/1611.04481.pdf