Image inpainting using Convolutional Neural Network and OpenCV library

Author: Agnieszka Ostrowska

Keywords: artificial neural networks, convolutional neural networks, U-net, Python, Keras, OpenCV

The aim of my work is to extract and then recover a missing information from a photo. In order to solve this problem, I have used convolutional neural networks that I constructed and then trained on a dataset I created. The photo is analysed by neural networks to recognise the white spots (damages) and generate a black and white mask to represent them. The generated mask is then used in the inpainting process to reconstruct the image with the help of a ready-made library. This is done by sampling information around tagged pixels and then filling them with average values. My inspiration was the operation of human perceptual processes: bottom-up and top-down processes. On the one hand neural networks analyse an image by looking for features in photos, similarly to the processes taking place in the primary visual cortex. The top-down processes, on the other hand, can b compared to the inpainting process, which, based on the context, completes the missing information in the photo.